mirror of
https://github.com/hyugogirubato/KeyDive.git
synced 2024-12-22 19:13:35 +00:00
2.5 KiB
2.5 KiB
Offline DRM Key Extraction for Axinom Content
This project focuses on extracting DRM keys offline from streams protected by Axinom DRM. It involves patching an open-source application to customize stream definitions, disabling network connectivity checks, and optionally bypassing SSL pinning. Additionally, it includes steps for handling device provisioning requests using a fake server.
Prerequisites
- Android Studio SDK to modify and build the APK.
- Frida setup on your device/emulator for runtime instrumentation.
- HTTP Toolkit for intercepting and modifying network traffic.
- Basic understanding of Android development and network protocols.
Setup
Step 1: Patch the APK
- Clone the repository of the open-source app you intend to patch.
- Modify the app’s source code to:
- Define the correct stream URL.
- Disable any network connectivity checks in the app. For example, bypass methods that check for active internet connections.
python3 builder_mobile.py
- Build the modified APK and install it on your Android device or emulator.
python3 patcher.py
Step 2: Bypass SSL Pinning (if necessary)
If the app implements SSL pinning, follow the steps below to bypass it using Frida:
- Ensure Frida is installed on your device or emulator.
- Use the script provided in the Frida-CodeShare repository to intercept SSL pinning methods dynamically.
- Run the script using the command:
Replacefrida -D "DEVICE_ID" -l "pinning.js" -f "PACKAGE_NAME"
"DEVICE_ID"
with your device or emulator ID and"PACKAGE_NAME"
with the package name of your patched app.
Step 3: Setup Fake Server for Provisioning
- Setup a Python server to mimic the license server. This server should always respond with a 302 redirect loop, essentially providing an infinite timeout.
python3 app.py
- Implement the fake server with endpoints required for the DRM license and provisioning requests.
Step 4: Use HTTP Toolkit
- Install and set up HTTP Toolkit on your PC.
- Import predefined rules to simulate the static responses needed for the app, like
manifest.mpd
. - Direct your app traffic through HTTP Toolkit to manipulate the responses as needed.
Running the App
Launch the patched app on your device. Since the network checks are disabled, and the app is configured to use the fake server responses, it should function without real internet access, allowing for offline DRM key extraction.