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.
- 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.
- 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
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:
Replace
frida -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.
- 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.
- 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.
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.