sslbaqer 0.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- sslbaqer-0.0.1/PKG-INFO +37 -0
- sslbaqer-0.0.1/README.md +13 -0
- sslbaqer-0.0.1/setup.cfg +4 -0
- sslbaqer-0.0.1/setup.py +23 -0
- sslbaqer-0.0.1/sslbaqer/__init__.py +0 -0
- sslbaqer-0.0.1/sslbaqer/fridapybass.py +88 -0
- sslbaqer-0.0.1/sslbaqer/libflutter.py +124 -0
- sslbaqer-0.0.1/sslbaqer.egg-info/PKG-INFO +37 -0
- sslbaqer-0.0.1/sslbaqer.egg-info/SOURCES.txt +10 -0
- sslbaqer-0.0.1/sslbaqer.egg-info/dependency_links.txt +1 -0
- sslbaqer-0.0.1/sslbaqer.egg-info/requires.txt +2 -0
- sslbaqer-0.0.1/sslbaqer.egg-info/top_level.txt +1 -0
sslbaqer-0.0.1/PKG-INFO
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: sslbaqer
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: A Python library for SSL bypass techniques in Flutter applications.
|
|
5
|
+
Home-page: https://github.com/b_1qr/sslbaqer
|
|
6
|
+
Author: b_1qr
|
|
7
|
+
Author-email: b_1qr@example.com
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
+
Classifier: Operating System :: OS Independent
|
|
11
|
+
Requires-Python: >=3.6
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
Requires-Dist: r2pipe
|
|
14
|
+
Requires-Dist: frida
|
|
15
|
+
Dynamic: author
|
|
16
|
+
Dynamic: author-email
|
|
17
|
+
Dynamic: classifier
|
|
18
|
+
Dynamic: description
|
|
19
|
+
Dynamic: description-content-type
|
|
20
|
+
Dynamic: home-page
|
|
21
|
+
Dynamic: requires-dist
|
|
22
|
+
Dynamic: requires-python
|
|
23
|
+
Dynamic: summary
|
|
24
|
+
|
|
25
|
+
# sslbaqer
|
|
26
|
+
|
|
27
|
+
A Python library for SSL bypass techniques in Flutter applications.
|
|
28
|
+
|
|
29
|
+
## Modules:
|
|
30
|
+
|
|
31
|
+
* `libflutter`: Implements SSL bypass using `radare2` for static patching of `libflutter.so`.
|
|
32
|
+
* `fridapybass`: Implements SSL bypass using `Frida` for dynamic runtime injection.
|
|
33
|
+
|
|
34
|
+
## Contact:
|
|
35
|
+
|
|
36
|
+
* Telegram: t.me/b_4qr
|
|
37
|
+
* Instagram: instagram.com/b_4qr
|
sslbaqer-0.0.1/README.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# sslbaqer
|
|
2
|
+
|
|
3
|
+
A Python library for SSL bypass techniques in Flutter applications.
|
|
4
|
+
|
|
5
|
+
## Modules:
|
|
6
|
+
|
|
7
|
+
* `libflutter`: Implements SSL bypass using `radare2` for static patching of `libflutter.so`.
|
|
8
|
+
* `fridapybass`: Implements SSL bypass using `Frida` for dynamic runtime injection.
|
|
9
|
+
|
|
10
|
+
## Contact:
|
|
11
|
+
|
|
12
|
+
* Telegram: t.me/b_4qr
|
|
13
|
+
* Instagram: instagram.com/b_4qr
|
sslbaqer-0.0.1/setup.cfg
ADDED
sslbaqer-0.0.1/setup.py
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
from setuptools import setup, find_packages
|
|
2
|
+
|
|
3
|
+
setup(
|
|
4
|
+
name='sslbaqer',
|
|
5
|
+
version='0.0.1',
|
|
6
|
+
packages=find_packages(),
|
|
7
|
+
install_requires=[
|
|
8
|
+
'r2pipe',
|
|
9
|
+
'frida',
|
|
10
|
+
],
|
|
11
|
+
author='b_1qr',
|
|
12
|
+
author_email='b_1qr@example.com', # Placeholder email
|
|
13
|
+
description='A Python library for SSL bypass techniques in Flutter applications.',
|
|
14
|
+
long_description=open('README.md').read(),
|
|
15
|
+
long_description_content_type='text/markdown',
|
|
16
|
+
url='https://github.com/b_1qr/sslbaqer', # Placeholder URL
|
|
17
|
+
classifiers=[
|
|
18
|
+
'Programming Language :: Python :: 3',
|
|
19
|
+
'License :: OSI Approved :: MIT License',
|
|
20
|
+
'Operating System :: OS Independent',
|
|
21
|
+
],
|
|
22
|
+
python_requires='>=3.6',
|
|
23
|
+
)
|
|
File without changes
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import frida
|
|
2
|
+
import sys
|
|
3
|
+
|
|
4
|
+
def on_message(message, data):
|
|
5
|
+
print(f"[+] Message: {message}, Data: {data}")
|
|
6
|
+
|
|
7
|
+
def bypass_ssl_frida(process_name):
|
|
8
|
+
try:
|
|
9
|
+
device = frida.get_usb_device(timeout=10)
|
|
10
|
+
pid = device.spawn([process_name])
|
|
11
|
+
device.resume(pid)
|
|
12
|
+
session = device.attach(pid)
|
|
13
|
+
|
|
14
|
+
script = session.create_script("""
|
|
15
|
+
Interceptor.attach(Module.findExportByName(\'libflutter.so\', \'ssl_verify_peer_cert\'), {
|
|
16
|
+
onEnter: function (args) {
|
|
17
|
+
// You can inspect arguments here if needed
|
|
18
|
+
// console.log(\'ssl_verify_peer_cert called\');
|
|
19
|
+
},
|
|
20
|
+
onLeave: function (retval) {
|
|
21
|
+
// Force return value to 0 (true for success in many C/C++ contexts)
|
|
22
|
+
// This effectively bypasses the SSL certificate verification.
|
|
23
|
+
retval.replace(0);
|
|
24
|
+
console.log(\'ssl_verify_peer_cert bypassed!\');
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
// Alternative approach: Hooking a more generic SSL_CTX_set_verify or similar
|
|
29
|
+
// This might require more research into the specific SSL library Flutter uses (BoringSSL usually)
|
|
30
|
+
// Example for OpenSSL (might need adaptation for BoringSSL):
|
|
31
|
+
/*
|
|
32
|
+
var SSL_CTX_set_verify = Module.findExportByName(null, \'SSL_CTX_set_verify\');
|
|
33
|
+
if (SSL_CTX_set_verify) {
|
|
34
|
+
Interceptor.attach(SSL_CTX_set_verify, {
|
|
35
|
+
onEnter: function (args) {
|
|
36
|
+
// Set verify_mode to SSL_VERIFY_NONE (0)
|
|
37
|
+
args[1] = ptr(0);
|
|
38
|
+
// Set verify_callback to NULL
|
|
39
|
+
args[2] = ptr(0);
|
|
40
|
+
console.log(\'SSL_CTX_set_verify hooked and disabled verification!\');
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
*/
|
|
45
|
+
|
|
46
|
+
// Another common target for Android apps using OkHttp/TrustManager
|
|
47
|
+
// This would be for Java/Kotlin code, not directly libflutter.so
|
|
48
|
+
/*
|
|
49
|
+
Java.perform(function () {
|
|
50
|
+
var X509TrustManager = Java.use(\'javax.net.ssl.X509TrustManager\');
|
|
51
|
+
var TrustManagerImpl = Java.use(\'com.android.org.conscrypt.TrustManagerImpl\');
|
|
52
|
+
|
|
53
|
+
var CertificateFactory = Java.use(\'java.security.cert.CertificateFactory\');
|
|
54
|
+
var ByteArrayInputStream = Java.use(\'java.io.ByteArrayInputStream\');
|
|
55
|
+
|
|
56
|
+
var certFactory = CertificateFactory.getInstance(\'X.509\');
|
|
57
|
+
var bais = ByteArrayInputStream.$new(Java.array(\'byte\', [])); // Empty array for no certs
|
|
58
|
+
var emptyCerts = certFactory.generateCertificates(bais);
|
|
59
|
+
|
|
60
|
+
X509TrustManager.checkServerTrusted.implementation = function (chain, authType) {
|
|
61
|
+
console.log(\'Bypassing checkServerTrusted for X509TrustManager\');
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
TrustManagerImpl.checkTrusted.implementation = function (chain, authType, session) {
|
|
65
|
+
console.log(\'Bypassing checkTrusted for TrustManagerImpl\');
|
|
66
|
+
return Java.array(\'java.security.cert.X509Certificate\', emptyCerts);
|
|
67
|
+
};
|
|
68
|
+
});
|
|
69
|
+
*/
|
|
70
|
+
|
|
71
|
+
""")
|
|
72
|
+
script.on(\'message\', on_message)
|
|
73
|
+
script.load()
|
|
74
|
+
print(f"[+] Successfully injected script into {process_name}. Press Ctrl+D to detach.\n")
|
|
75
|
+
sys.stdin.read()
|
|
76
|
+
session.detach()
|
|
77
|
+
except Exception as e:
|
|
78
|
+
print(f"[!] Error: {e}")
|
|
79
|
+
print("[!] Ensure Frida server is running on the target device and the app is installed.")
|
|
80
|
+
print("[!] You might need to run \'frida-server\' on your Android device (root required).")
|
|
81
|
+
print("[!] For non-rooted devices, you can inject Frida into a debuggable app.\n")
|
|
82
|
+
|
|
83
|
+
if __name__ == \'__main__\':
|
|
84
|
+
if len(sys.argv) != 2:
|
|
85
|
+
print(f"Usage: python {sys.argv[0]} <package_name_or_process_name>")
|
|
86
|
+
sys.exit(1)
|
|
87
|
+
process_name = sys.argv[1]
|
|
88
|
+
bypass_ssl_frida(process_name)
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import sys
|
|
2
|
+
import os
|
|
3
|
+
import platform
|
|
4
|
+
import subprocess
|
|
5
|
+
import tempfile
|
|
6
|
+
import urllib.request
|
|
7
|
+
import zipfile
|
|
8
|
+
import shutil
|
|
9
|
+
import r2pipe
|
|
10
|
+
|
|
11
|
+
def is_radare2_installed():
|
|
12
|
+
try:
|
|
13
|
+
subprocess.run(["r2", "-v"], capture_output=True, check=True)
|
|
14
|
+
return True
|
|
15
|
+
except:
|
|
16
|
+
return False
|
|
17
|
+
|
|
18
|
+
def get_system_type():
|
|
19
|
+
system = platform.system().lower()
|
|
20
|
+
if os.path.exists("/data/data/com.termux"):
|
|
21
|
+
return "termux"
|
|
22
|
+
elif system == "linux":
|
|
23
|
+
return "linux"
|
|
24
|
+
elif system == "darwin":
|
|
25
|
+
return "macos"
|
|
26
|
+
elif system == "windows":
|
|
27
|
+
return "windows"
|
|
28
|
+
return "linux"
|
|
29
|
+
|
|
30
|
+
def install_radare2():
|
|
31
|
+
print("[*] Installing radare2 ...")
|
|
32
|
+
sys_type = get_system_type()
|
|
33
|
+
try:
|
|
34
|
+
if sys_type == "termux":
|
|
35
|
+
subprocess.run(["pkg", "update", "-y"], check=True)
|
|
36
|
+
subprocess.run(["pkg", "install", "radare2", "-y"], check=True)
|
|
37
|
+
elif sys_type == "linux":
|
|
38
|
+
subprocess.run(["sudo", "apt", "update"], check=True)
|
|
39
|
+
subprocess.run(["sudo", "apt", "install", "radare2", "-y"], check=True)
|
|
40
|
+
elif sys_type == "macos":
|
|
41
|
+
subprocess.run(["brew", "install", "radare2"], check=True)
|
|
42
|
+
elif sys_type == "windows":
|
|
43
|
+
print("[*] Windows: Downloading radare2 ...")
|
|
44
|
+
url = "https://github.com/radareorg/radare2/releases/download/5.9.0/radare2-5.9.0-w64.zip"
|
|
45
|
+
with tempfile.TemporaryDirectory() as tmp:
|
|
46
|
+
zip_path = os.path.join(tmp, "r2.zip")
|
|
47
|
+
urllib.request.urlretrieve(url, zip_path)
|
|
48
|
+
with zipfile.ZipFile(zip_path, 'r') as zf:
|
|
49
|
+
zf.extractall("C:\\radare2")
|
|
50
|
+
os.environ["PATH"] += os.pathsep + "C:\\radare2\\bin"
|
|
51
|
+
return is_radare2_installed()
|
|
52
|
+
except Exception as e:
|
|
53
|
+
print(f"[!] Installation failed: {e}")
|
|
54
|
+
return False
|
|
55
|
+
|
|
56
|
+
patterns = {
|
|
57
|
+
"arm64": [
|
|
58
|
+
"F. 0F 1C F8 F. 5. 01 A9 F. 5. 02 A9 F. .. 03 A9 .. .. .. .. 68 1A 40 F9",
|
|
59
|
+
"F. 43 01 D1 FE 67 01 A9 F8 5F 02 A9 F6 57 03 A9 F4 4F 04 A9 13 00 40 F9 F4 03 00 AA 68 1A 40 F9",
|
|
60
|
+
],
|
|
61
|
+
"arm": [
|
|
62
|
+
"2D E9 F. 4. D0 F8 00 80 81 46 D8 F8 18 00 D0 F8",
|
|
63
|
+
],
|
|
64
|
+
"x86": [
|
|
65
|
+
"55 41 57 41 56 41 55 41 54 53",
|
|
66
|
+
],
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
def find_ssl_verify_offset(r2):
|
|
70
|
+
info = r2.cmdj("iaj")
|
|
71
|
+
arch = info["bins"][0]["arch"]
|
|
72
|
+
bits = info["bins"][0]["bits"]
|
|
73
|
+
if arch == "arm" and bits == 64:
|
|
74
|
+
arch = "arm64"
|
|
75
|
+
elif arch == "arm" and bits == 32:
|
|
76
|
+
arch = "arm"
|
|
77
|
+
elif arch == "x86" and bits == 64:
|
|
78
|
+
arch = "x86"
|
|
79
|
+
else:
|
|
80
|
+
print(f"[!] Unsupported architecture: {arch} {bits}")
|
|
81
|
+
return None
|
|
82
|
+
print(f"[+] Architecture: {arch}")
|
|
83
|
+
for pattern in patterns.get(arch, []):
|
|
84
|
+
res = r2.cmd(f"/x {pattern}").strip()
|
|
85
|
+
if res:
|
|
86
|
+
offset = res.split()[0]
|
|
87
|
+
print(f"[+] Found ssl_verify_peer_cert at {offset}")
|
|
88
|
+
return offset
|
|
89
|
+
return None
|
|
90
|
+
|
|
91
|
+
def patch_libflutter(file_path):
|
|
92
|
+
if not os.path.exists(file_path):
|
|
93
|
+
print(f"[!] File not found: {file_path}")
|
|
94
|
+
return False
|
|
95
|
+
print(f"[*] Patching: {file_path}")
|
|
96
|
+
if not is_radare2_installed():
|
|
97
|
+
if not install_radare2():
|
|
98
|
+
print("[!] Failed to install radare2")
|
|
99
|
+
return False
|
|
100
|
+
try:
|
|
101
|
+
import r2pipe
|
|
102
|
+
except:
|
|
103
|
+
print("[*] Installing r2pipe ...")
|
|
104
|
+
subprocess.run([sys.executable, "-m", "pip", "install", "r2pipe"], check=True)
|
|
105
|
+
import r2pipe
|
|
106
|
+
r2 = r2pipe.open(file_path, flags=["-w", "-e", "log.quiet=true"])
|
|
107
|
+
r2.cmd("aac")
|
|
108
|
+
print("[*] Searching for ssl_verify_peer_cert ...")
|
|
109
|
+
offset = find_ssl_verify_offset(r2)
|
|
110
|
+
if offset:
|
|
111
|
+
r2.cmd(f"wao ret0 @ {offset}")
|
|
112
|
+
print("[+] SSL Pinning disabled successfully!")
|
|
113
|
+
r2.quit()
|
|
114
|
+
return True
|
|
115
|
+
else:
|
|
116
|
+
print("[!] Pattern not found")
|
|
117
|
+
r2.quit()
|
|
118
|
+
return False
|
|
119
|
+
|
|
120
|
+
if __name__ == "__main__":
|
|
121
|
+
if len(sys.argv) != 2:
|
|
122
|
+
print(f"Usage:\n python {sys.argv[0]} <path/to/libflutter.so>")
|
|
123
|
+
sys.exit(1)
|
|
124
|
+
patch_libflutter(sys.argv[1])
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: sslbaqer
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: A Python library for SSL bypass techniques in Flutter applications.
|
|
5
|
+
Home-page: https://github.com/b_1qr/sslbaqer
|
|
6
|
+
Author: b_1qr
|
|
7
|
+
Author-email: b_1qr@example.com
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
+
Classifier: Operating System :: OS Independent
|
|
11
|
+
Requires-Python: >=3.6
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
Requires-Dist: r2pipe
|
|
14
|
+
Requires-Dist: frida
|
|
15
|
+
Dynamic: author
|
|
16
|
+
Dynamic: author-email
|
|
17
|
+
Dynamic: classifier
|
|
18
|
+
Dynamic: description
|
|
19
|
+
Dynamic: description-content-type
|
|
20
|
+
Dynamic: home-page
|
|
21
|
+
Dynamic: requires-dist
|
|
22
|
+
Dynamic: requires-python
|
|
23
|
+
Dynamic: summary
|
|
24
|
+
|
|
25
|
+
# sslbaqer
|
|
26
|
+
|
|
27
|
+
A Python library for SSL bypass techniques in Flutter applications.
|
|
28
|
+
|
|
29
|
+
## Modules:
|
|
30
|
+
|
|
31
|
+
* `libflutter`: Implements SSL bypass using `radare2` for static patching of `libflutter.so`.
|
|
32
|
+
* `fridapybass`: Implements SSL bypass using `Frida` for dynamic runtime injection.
|
|
33
|
+
|
|
34
|
+
## Contact:
|
|
35
|
+
|
|
36
|
+
* Telegram: t.me/b_4qr
|
|
37
|
+
* Instagram: instagram.com/b_4qr
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
README.md
|
|
2
|
+
setup.py
|
|
3
|
+
sslbaqer/__init__.py
|
|
4
|
+
sslbaqer/fridapybass.py
|
|
5
|
+
sslbaqer/libflutter.py
|
|
6
|
+
sslbaqer.egg-info/PKG-INFO
|
|
7
|
+
sslbaqer.egg-info/SOURCES.txt
|
|
8
|
+
sslbaqer.egg-info/dependency_links.txt
|
|
9
|
+
sslbaqer.egg-info/requires.txt
|
|
10
|
+
sslbaqer.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
sslbaqer
|