Giter Site home page Giter Site logo

adb-ssl-unpinning's Introduction

adb-ssl-unpinning

Automated script to disable SSL certificate pinning without root using adb.

Usage

This script will pull the apk from the device, disable the SSL pinning, and push it back to the device through adb.

Be aware that this script will uninstall the app from the device, so make sure you have a backup of the app.

You can also find the original apk in the com.example and the modified apk in the com.example_patched folder.

$ python3 adb-ssl-unpinning.py <serial> <package_name>

Example:

$ python3 adb-ssl-unpinning.py emulator-5554 com.example

Find device serial

Connect your device to your computer and run adb usb to enable USB debugging, or use an emulator.

Then, find the serial of your device by running:

$ adb devices
List of devices attached
emulator-5554	device

Here emulator-5554 is the serial number of the device.

Find package name

$ adb shell pm list packages
$ adb shell pm list packages | grep example

References

adb-ssl-unpinning's People

Contributors

skyf0l avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

adb-ssl-unpinning's Issues

Error occurs

root@kali-linux:~/Binance/adb-ssl-unpinning# python3 adb-ssl-unpinning.py ce70a47c0721 com.binance.dev --debug
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true
I: Using Apktool 2.6.1 on split_trade.apk
I: Copying raw manifest...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true
I: Using Apktool 2.6.1
W: Could not find sources
[Fatal Error] :1:1: Content is not allowed in prolog.
I: Checking whether resources has changed...
I: Building AndroidManifest.xml...
W: /root/Binance/adb-ssl-unpinning/com.binance.dev_patched/split_trade/AndroidManifest.xml:1: error: Error parsing XML: not well-formed (invalid token)
W:
W: Parse AndroidManifest.xml failed, treat it as raw file.
I: Copying raw AndroidManifest.xml...
I: Building apk file...
I: Copying unknown files/dir...
I: Built apk...
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true
source:
        /root/Binance/adb-ssl-unpinning/com.binance.dev_patched
zipalign location: PATH
        /usr/bin/zipalign
keystore:
        [0] 161a0018 /tmp/temp_14159699821941363948_debug.keystore (DEBUG_EMBEDDED)

01. split_trade.repack.apk

        SIGN
        file: /root/Binance/adb-ssl-unpinning/com.binance.dev_patched/split_trade.repack.apk (0.0 MiB)
        checksum: e22fcc1cefe4a7b376ec17542303b8d7389b2b2405ef6a2f432b5cb599616909 (sha256)
        - could not align
could not execute zipalign
Run with '--debug' parameter to get additional information.
Traceback (most recent call last):
  File "/root/Binance/adb-ssl-unpinning/adb-ssl-unpinning.py", line 132, in <module>
    patch_package(device, package_name)
  File "/root/Binance/adb-ssl-unpinning/adb-ssl-unpinning.py", line 108, in patch_package
    os.rename(signed_apk_path, patched_apk_path)
FileNotFoundError: [Errno 2] No such file or directory: 'com.binance.dev_patched/split_trade.repack-aligned-debugSigned.apk' -> 'com.binance.dev_patched/split_trade_patched.apk'

The system cannot find the file specified

PS C:\Users\Home\Downloads\platform-tools_r34.0.4-windows\platform-tools> python C:\Users\Home\Downloads\adb-ssl-unpinning-main\adb-ssl-unpinning-main\adb-ssl-unpinning.py 127.0.0.1:21503 com.supercell.brawlstars
Pulling /data/app/com.supercell.brawlstars-0LcR7gT70r6XtP7oYFRp5Q==/base.apk...
Pulling /data/app/com.supercell.brawlstars-0LcR7gT70r6XtP7oYFRp5Q==/split_config.arm64_v8a.apk...
Pulling /data/app/com.supercell.brawlstars-0LcR7gT70r6XtP7oYFRp5Q==/split_config.uk.apk...
Pulling /data/app/com.supercell.brawlstars-0LcR7gT70r6XtP7oYFRp5Q==/split_config.xhdpi.apk...
Pulling /data/app/com.supercell.brawlstars-0LcR7gT70r6XtP7oYFRp5Q==/split_googleplay_asset_pack.apk...
Traceback (most recent call last):
File "C:\Users\Home\Downloads\adb-ssl-unpinning-main\adb-ssl-unpinning-main\adb-ssl-unpinning.py", line 132, in
patch_package(device, package_name)
File "C:\Users\Home\Downloads\adb-ssl-unpinning-main\adb-ssl-unpinning-main\adb-ssl-unpinning.py", line 88, in patch_package
sp.run(["java", "-jar", APKTOOL, "d", apk_path, "-o", unpacked_apk_path, "-s"])
File "C:\Users\Home\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 548, in run
with Popen(*popenargs, **kwargs) as process:
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Home\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 1026, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Users\Home\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 1538, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [WinError 2] The system cannot find the file specified

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.