ineedcodes 1.6.0 → 1.7.0

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.
Files changed (218) hide show
  1. package/package.json +2 -1
  2. package/skills/401-403-bypass-techniques/SKILL.md +348 -0
  3. package/skills/active-directory-acl-abuse/BLOODHOUND_PATHS.md +281 -0
  4. package/skills/active-directory-acl-abuse/SKILL.md +295 -0
  5. package/skills/active-directory-certificate-services/ADCS_ESC_MATRIX.md +197 -0
  6. package/skills/active-directory-certificate-services/SKILL.md +303 -0
  7. package/skills/active-directory-kerberos-attacks/KERBEROS_ATTACK_CHAINS.md +226 -0
  8. package/skills/active-directory-kerberos-attacks/SKILL.md +311 -0
  9. package/skills/ai-ml-security/SKILL.md +425 -0
  10. package/skills/android-pentesting-tricks/FRIDA_SCRIPTS.md +394 -0
  11. package/skills/android-pentesting-tricks/SKILL.md +369 -0
  12. package/skills/anti-debugging-techniques/ANTI_DEBUG_MATRIX.md +117 -0
  13. package/skills/anti-debugging-techniques/SKILL.md +407 -0
  14. package/skills/api-auth-and-jwt-abuse/SKILL.md +76 -0
  15. package/skills/api-authorization-and-bola/SKILL.md +48 -0
  16. package/skills/api-recon-and-docs/SKILL.md +61 -0
  17. package/skills/api-sec/SKILL.md +49 -0
  18. package/skills/arbitrary-write-to-rce/SKILL.md +361 -0
  19. package/skills/auth-sec/SKILL.md +41 -0
  20. package/skills/authbypass-authentication-flaws/SKILL.md +441 -0
  21. package/skills/bba-ad-attacker/SKILL.md +420 -0
  22. package/skills/bba-api-security/SKILL.md +95 -0
  23. package/skills/bba-attack-planner/SKILL.md +186 -0
  24. package/skills/bba-binary-exploit/SKILL.md +65 -0
  25. package/skills/bba-bizlogic-hunter/SKILL.md +304 -0
  26. package/skills/bba-bug-bounty/SKILL.md +245 -0
  27. package/skills/bba-cicd-redteam/SKILL.md +515 -0
  28. package/skills/bba-cloud-security/SKILL.md +97 -0
  29. package/skills/bba-container-escape/SKILL.md +161 -0
  30. package/skills/bba-credential-tester/SKILL.md +346 -0
  31. package/skills/bba-crypto-analyst/SKILL.md +54 -0
  32. package/skills/bba-ctf-solver/SKILL.md +166 -0
  33. package/skills/bba-detection-engineer/SKILL.md +93 -0
  34. package/skills/bba-engagement-planner/SKILL.md +68 -0
  35. package/skills/bba-exploit-chainer/SKILL.md +280 -0
  36. package/skills/bba-exploit-guide/SKILL.md +96 -0
  37. package/skills/bba-forensics-analyst/SKILL.md +512 -0
  38. package/skills/bba-graphql-hunter/SKILL.md +145 -0
  39. package/skills/bba-hardware-hacker/SKILL.md +57 -0
  40. package/skills/bba-jwt-cracker/SKILL.md +133 -0
  41. package/skills/bba-llm-redteam/SKILL.md +149 -0
  42. package/skills/bba-malware-analyst/SKILL.md +305 -0
  43. package/skills/bba-mobile-pentester/SKILL.md +350 -0
  44. package/skills/bba-osint-collector/SKILL.md +645 -0
  45. package/skills/bba-payload-crafter/SKILL.md +347 -0
  46. package/skills/bba-phishing-operator/SKILL.md +516 -0
  47. package/skills/bba-poc-validator/SKILL.md +249 -0
  48. package/skills/bba-privesc-advisor/SKILL.md +98 -0
  49. package/skills/bba-purple-team/SKILL.md +56 -0
  50. package/skills/bba-recon-advisor/SKILL.md +215 -0
  51. package/skills/bba-red-team-operator/SKILL.md +61 -0
  52. package/skills/bba-report-generator/SKILL.md +145 -0
  53. package/skills/bba-reverse-engineer/SKILL.md +298 -0
  54. package/skills/bba-social-engineer/SKILL.md +341 -0
  55. package/skills/bba-ssrf-hunter/SKILL.md +120 -0
  56. package/skills/bba-stig-analyst/SKILL.md +108 -0
  57. package/skills/bba-subdomain-takeover/SKILL.md +141 -0
  58. package/skills/bba-swarm-orchestrator/SKILL.md +351 -0
  59. package/skills/bba-threat-modeler/SKILL.md +574 -0
  60. package/skills/bba-vuln-scanner/SKILL.md +305 -0
  61. package/skills/bba-web-hunter/SKILL.md +285 -0
  62. package/skills/bba-wireless-pentester/SKILL.md +539 -0
  63. package/skills/binary-protection-bypass/PROTECTION_BYPASS_MATRIX.md +168 -0
  64. package/skills/binary-protection-bypass/SKILL.md +295 -0
  65. package/skills/browser-exploitation-v8/SKILL.md +334 -0
  66. package/skills/browser-exploitation-v8/V8_EXPLOITATION_PATTERNS.md +288 -0
  67. package/skills/business-logic-vuln/SKILL.md +33 -0
  68. package/skills/business-logic-vulnerabilities/CHECKLIST.md +375 -0
  69. package/skills/business-logic-vulnerabilities/METHODOLOGY.md +337 -0
  70. package/skills/business-logic-vulnerabilities/SCENARIOS.md +1095 -0
  71. package/skills/business-logic-vulnerabilities/SKILL.md +711 -0
  72. package/skills/classical-cipher-analysis/SKILL.md +663 -0
  73. package/skills/clickjacking/SKILL.md +163 -0
  74. package/skills/cmdi-command-injection/SKILL.md +687 -0
  75. package/skills/code-obfuscation-deobfuscation/SKILL.md +391 -0
  76. package/skills/container-escape-techniques/DOCKER_ESCAPE_CHAINS.md +296 -0
  77. package/skills/container-escape-techniques/SKILL.md +339 -0
  78. package/skills/cors-cross-origin-misconfiguration/SCENARIOS.md +152 -0
  79. package/skills/cors-cross-origin-misconfiguration/SKILL.md +270 -0
  80. package/skills/crlf-injection/SKILL.md +179 -0
  81. package/skills/csp-bypass-advanced/SKILL.md +259 -0
  82. package/skills/csrf-cross-site-request-forgery/SKILL.md +526 -0
  83. package/skills/csv-formula-injection/SKILL.md +144 -0
  84. package/skills/dangling-markup-injection/SKILL.md +321 -0
  85. package/skills/defi-attack-patterns/SKILL.md +355 -0
  86. package/skills/dependency-confusion/SKILL.md +178 -0
  87. package/skills/deserialization-insecure/JAVA_GADGET_CHAINS.md +511 -0
  88. package/skills/deserialization-insecure/SKILL.md +725 -0
  89. package/skills/dns-rebinding-attacks/SKILL.md +337 -0
  90. package/skills/email-header-injection/SKILL.md +349 -0
  91. package/skills/expression-language-injection/SKILL.md +243 -0
  92. package/skills/file-access-vuln/SKILL.md +33 -0
  93. package/skills/format-string-exploitation/SKILL.md +312 -0
  94. package/skills/ghost-bits-cast-attack/PAYLOAD_COOKBOOK.md +448 -0
  95. package/skills/ghost-bits-cast-attack/SKILL.md +799 -0
  96. package/skills/graphql-and-hidden-parameters/SKILL.md +50 -0
  97. package/skills/hack/SKILL.md +162 -0
  98. package/skills/hash-attack-techniques/SKILL.md +491 -0
  99. package/skills/heap-exploitation/HOUSE_OF_TECHNIQUES.md +244 -0
  100. package/skills/heap-exploitation/IO_FILE_EXPLOITATION.md +256 -0
  101. package/skills/heap-exploitation/SKILL.md +217 -0
  102. package/skills/http-host-header-attacks/SKILL.md +323 -0
  103. package/skills/http-parameter-pollution/SKILL.md +208 -0
  104. package/skills/http2-specific-attacks/SKILL.md +350 -0
  105. package/skills/idor-broken-object-authorization/SKILL.md +336 -0
  106. package/skills/injection-checking/EXTRA_INJECTION_TYPES.md +450 -0
  107. package/skills/injection-checking/SKILL.md +50 -0
  108. package/skills/insecure-source-code-management/SKILL.md +161 -0
  109. package/skills/ios-pentesting-tricks/IOS_RUNTIME_TRICKS.md +411 -0
  110. package/skills/ios-pentesting-tricks/SKILL.md +418 -0
  111. package/skills/jndi-injection/SKILL.md +265 -0
  112. package/skills/jwt-oauth-token-attacks/SKILL.md +301 -0
  113. package/skills/kernel-exploitation/KERNEL_HEAP_TECHNIQUES.md +293 -0
  114. package/skills/kernel-exploitation/KERNEL_MITIGATION_BYPASS.md +224 -0
  115. package/skills/kernel-exploitation/SKILL.md +307 -0
  116. package/skills/kubernetes-pentesting/SKILL.md +348 -0
  117. package/skills/lattice-crypto-attacks/SKILL.md +497 -0
  118. package/skills/linux-lateral-movement/SKILL.md +348 -0
  119. package/skills/linux-privilege-escalation/KERNEL_EXPLOITS_CHECKLIST.md +260 -0
  120. package/skills/linux-privilege-escalation/SKILL.md +346 -0
  121. package/skills/linux-privilege-escalation/SUID_CAPABILITIES_TRICKS.md +305 -0
  122. package/skills/linux-security-bypass/SKILL.md +345 -0
  123. package/skills/llm-prompt-injection/JAILBREAK_PATTERNS.md +306 -0
  124. package/skills/llm-prompt-injection/SKILL.md +357 -0
  125. package/skills/macos-process-injection/DYLIB_XPC_TECHNIQUES.md +373 -0
  126. package/skills/macos-process-injection/SKILL.md +384 -0
  127. package/skills/macos-security-bypass/SKILL.md +337 -0
  128. package/skills/macos-security-bypass/TCC_BYPASS_MATRIX.md +200 -0
  129. package/skills/memory-forensics-volatility/SKILL.md +323 -0
  130. package/skills/memory-forensics-volatility/VOLATILITY_CHEATSHEET.md +225 -0
  131. package/skills/mobile-ssl-pinning-bypass/SKILL.md +531 -0
  132. package/skills/network-protocol-attacks/NAME_RESOLUTION_POISONING.md +226 -0
  133. package/skills/network-protocol-attacks/SKILL.md +330 -0
  134. package/skills/nosql-injection/SKILL.md +341 -0
  135. package/skills/ntlm-relay-coercion/COERCION_METHODS.md +253 -0
  136. package/skills/ntlm-relay-coercion/SKILL.md +267 -0
  137. package/skills/oauth-oidc-misconfiguration/SKILL.md +46 -0
  138. package/skills/open-redirect/SKILL.md +380 -0
  139. package/skills/path-traversal-lfi/SKILL.md +802 -0
  140. package/skills/prototype-pollution/SKILL.md +190 -0
  141. package/skills/prototype-pollution-advanced/KNOWN_GADGETS.md +253 -0
  142. package/skills/prototype-pollution-advanced/SKILL.md +338 -0
  143. package/skills/race-condition/SKILL.md +526 -0
  144. package/skills/recon-and-methodology/SKILL.md +389 -0
  145. package/skills/recon-for-sec/SKILL.md +29 -0
  146. package/skills/request-smuggling/H2_SMUGGLING_VARIANTS.md +498 -0
  147. package/skills/request-smuggling/SKILL.md +314 -0
  148. package/skills/reverse-shell-techniques/SHELL_CHEATSHEET.md +196 -0
  149. package/skills/reverse-shell-techniques/SKILL.md +290 -0
  150. package/skills/rsa-attack-techniques/RSA_ATTACK_CATALOG.md +432 -0
  151. package/skills/rsa-attack-techniques/SKILL.md +437 -0
  152. package/skills/saml-sso-assertion-attacks/SKILL.md +41 -0
  153. package/skills/sandbox-escape-techniques/PYTHON_SANDBOX_ESCAPE.md +349 -0
  154. package/skills/sandbox-escape-techniques/SECCOMP_BYPASS.md +332 -0
  155. package/skills/sandbox-escape-techniques/SKILL.md +250 -0
  156. package/skills/smart-contract-vulnerabilities/SKILL.md +314 -0
  157. package/skills/smart-contract-vulnerabilities/SOLIDITY_VULN_PATTERNS.md +460 -0
  158. package/skills/sqli-sql-injection/SCENARIOS.md +575 -0
  159. package/skills/sqli-sql-injection/SKILL.md +489 -0
  160. package/skills/sqli-sql-injection/SQLMAP_ADVANCED.md +642 -0
  161. package/skills/ssrf-server-side-request-forgery/SCENARIOS.md +226 -0
  162. package/skills/ssrf-server-side-request-forgery/SKILL.md +323 -0
  163. package/skills/ssrf-server-side-request-forgery/URL_PARSER_TRICKS.md +650 -0
  164. package/skills/ssti-server-side-template-injection/ENGINE_PAYLOADS.md +456 -0
  165. package/skills/ssti-server-side-template-injection/SCENARIOS.md +319 -0
  166. package/skills/ssti-server-side-template-injection/SKILL.md +344 -0
  167. package/skills/stack-overflow-and-rop/ROP_ADVANCED_TECHNIQUES.md +249 -0
  168. package/skills/stack-overflow-and-rop/SKILL.md +304 -0
  169. package/skills/steganography-techniques/SKILL.md +348 -0
  170. package/skills/steganography-techniques/STEGO_TOOLS_GUIDE.md +335 -0
  171. package/skills/subdomain-takeover/SKILL.md +247 -0
  172. package/skills/symbolic-execution-tools/ANGR_COOKBOOK.md +437 -0
  173. package/skills/symbolic-execution-tools/SKILL.md +419 -0
  174. package/skills/symmetric-cipher-attacks/BLOCK_CIPHER_ATTACKS.md +364 -0
  175. package/skills/symmetric-cipher-attacks/SKILL.md +462 -0
  176. package/skills/traffic-analysis-pcap/SKILL.md +341 -0
  177. package/skills/tunneling-and-pivoting/SKILL.md +343 -0
  178. package/skills/type-juggling/SKILL.md +291 -0
  179. package/skills/unauthorized-access-common-services/PORT_SERVICE_MATRIX.md +340 -0
  180. package/skills/unauthorized-access-common-services/SKILL.md +388 -0
  181. package/skills/upload-insecure-files/SCENARIOS.md +158 -0
  182. package/skills/upload-insecure-files/SKILL.md +543 -0
  183. package/skills/vm-and-bytecode-reverse/SKILL.md +450 -0
  184. package/skills/vr-cheatsheet-authentication_bypass/SKILL.md +184 -0
  185. package/skills/vr-cheatsheet-dangerous_functions/SKILL.md +200 -0
  186. package/skills/vr-cheatsheet-linux_commands/SKILL.md +40 -0
  187. package/skills/vr-cheatsheet-rce/SKILL.md +177 -0
  188. package/skills/vr-cheatsheet-reverse_engineering/SKILL.md +144 -0
  189. package/skills/vr-cheatsheet-sqli/SKILL.md +270 -0
  190. package/skills/vr-cheatsheet-ssrf/SKILL.md +173 -0
  191. package/skills/vr-cheatsheet-xss/SKILL.md +177 -0
  192. package/skills/vr-methodology-mindset_and_tips/SKILL.md +51 -0
  193. package/skills/vr-template-vulnerability_report_template/SKILL.md +59 -0
  194. package/skills/vr-writeup-CVE-2026-9136/SKILL.md +171 -0
  195. package/skills/vr-writeup-ZVE-2026-3795/SKILL.md +350 -0
  196. package/skills/vr-writeup-api_key_leak/SKILL.md +103 -0
  197. package/skills/waf-bypass-techniques/SKILL.md +290 -0
  198. package/skills/waf-bypass-techniques/WAF_PRODUCT_MATRIX.md +202 -0
  199. package/skills/web-cache-deception/CACHE_POISONING_TECHNIQUES.md +637 -0
  200. package/skills/web-cache-deception/SKILL.md +222 -0
  201. package/skills/websocket-security/SKILL.md +454 -0
  202. package/skills/windows-av-evasion/AMSI_BYPASS_TECHNIQUES.md +289 -0
  203. package/skills/windows-av-evasion/SKILL.md +342 -0
  204. package/skills/windows-lateral-movement/CREDENTIAL_DUMPING.md +308 -0
  205. package/skills/windows-lateral-movement/SKILL.md +335 -0
  206. package/skills/windows-privilege-escalation/SKILL.md +328 -0
  207. package/skills/windows-privilege-escalation/TOKEN_POTATO_TRICKS.md +216 -0
  208. package/skills/windows-privilege-escalation/UAC_BYPASS_METHODS.md +225 -0
  209. package/skills/xslt-injection/SKILL.md +281 -0
  210. package/skills/xss-cross-site-scripting/ADVANCED_XSS_TRICKS.md +276 -0
  211. package/skills/xss-cross-site-scripting/SCENARIOS.md +278 -0
  212. package/skills/xss-cross-site-scripting/SKILL.md +379 -0
  213. package/skills/xxe-xml-external-entity/SCENARIOS.md +112 -0
  214. package/skills/xxe-xml-external-entity/SKILL.md +554 -0
  215. package/src/agent.js +1 -1
  216. package/src/session.js +47 -11
  217. package/src/skills.js +30 -6
  218. package/src/ui.js +1 -1
@@ -0,0 +1,531 @@
1
+ ---
2
+ name: mobile-ssl-pinning-bypass
3
+ description: >-
4
+ Mobile SSL pinning bypass playbook. Use when intercepting HTTPS traffic from mobile applications that implement certificate pinning, public key pinning, or SPKI hash pinning on Android and iOS, including React Native, Flutter, and Xamarin frameworks.gated: true
5
+ ---
6
+
7
+ # SKILL: Mobile SSL Pinning Bypass — Expert Attack Playbook
8
+
9
+ > **AI LOAD INSTRUCTION**: Expert SSL pinning bypass techniques for mobile platforms. Covers Android and iOS bypass methods (Frida, Objection, Xposed, SSL Kill Switch), framework-specific bypasses (Flutter, React Native, Xamarin), and troubleshooting non-standard pinning implementations. Base models miss framework-specific hook points and multi-layer pinning configurations.
10
+
11
+ ## 0. RELATED ROUTING
12
+
13
+ Before going deep, consider loading:
14
+
15
+ - [android-pentesting-tricks](../android-pentesting-tricks/SKILL.md) for broader Android testing beyond SSL bypass
16
+ - [ios-pentesting-tricks](../ios-pentesting-tricks/SKILL.md) for broader iOS testing beyond SSL bypass
17
+ - [api-sec](../api-sec/SKILL.md) once traffic is intercepted for API-level testing
18
+
19
+ ---
20
+
21
+ ## 1. SSL PINNING TYPES
22
+
23
+ | Pinning Type | What Is Pinned | Resilience | Common In |
24
+ |---|---|---|---|
25
+ | Certificate pinning | Exact leaf certificate (DER/PEM) | Low (breaks on cert rotation) | Legacy apps |
26
+ | Public key pinning | Subject Public Key Info | Medium (survives cert renewal if key unchanged) | Modern apps |
27
+ | SPKI hash pinning | SHA-256 of SPKI | Medium (same as public key) | OkHttp, AFNetworking |
28
+ | CA pinning | Intermediate or root CA cert | High (any cert from that CA works) | Enterprise apps |
29
+ | Multi-pin (backup pins) | Primary + backup pins | High (fallback pins) | HPKP-aware apps |
30
+
31
+ ### How Pinning Works
32
+
33
+ ```
34
+ TLS Handshake
35
+
36
+ ├── Server presents certificate chain
37
+
38
+ ├── Standard validation (system trust store)
39
+ │ └── Passes? continue : connection fails
40
+
41
+ └── Pin validation (app-level check)
42
+ ├── Extract server cert/pubkey/SPKI hash
43
+ ├── Compare against embedded pins
44
+ └── Match found? → allow : → reject connection
45
+ ```
46
+
47
+ ---
48
+
49
+ ## 2. ANDROID BYPASS METHODS
50
+
51
+ ### 2.1 Frida Universal SSL Bypass
52
+
53
+ ```javascript
54
+ // Hooks TrustManager, OkHttp, Volley, Retrofit, Conscrypt
55
+ Java.perform(function() {
56
+
57
+ // ── TrustManagerImpl (Android system) ──
58
+ try {
59
+ var TMI = Java.use('com.android.org.conscrypt.TrustManagerImpl');
60
+ TMI.verifyChain.implementation = function() {
61
+ console.log('[Bypass] TrustManagerImpl.verifyChain');
62
+ return arguments[0]; // return untouched chain
63
+ };
64
+ } catch(e) {}
65
+
66
+ // ── X509TrustManager (custom implementations) ──
67
+ var TrustManager = Java.registerClass({
68
+ name: 'com.bypass.TrustManager',
69
+ implements: [Java.use('javax.net.ssl.X509TrustManager')],
70
+ methods: {
71
+ checkClientTrusted: function() {},
72
+ checkServerTrusted: function() {},
73
+ getAcceptedIssuers: function() { return []; }
74
+ }
75
+ });
76
+
77
+ var SSLContext = Java.use('javax.net.ssl.SSLContext');
78
+ SSLContext.init.overload('[Ljavax.net.ssl.KeyManager;',
79
+ '[Ljavax.net.ssl.TrustManager;', 'java.security.SecureRandom')
80
+ .implementation = function(km, tm, sr) {
81
+ console.log('[Bypass] SSLContext.init');
82
+ this.init(km, [TrustManager.$new()], sr);
83
+ };
84
+
85
+ // ── OkHttp3 CertificatePinner ──
86
+ try {
87
+ var CP = Java.use('okhttp3.CertificatePinner');
88
+ CP.check.overload('java.lang.String', 'java.util.List').implementation = function() {
89
+ console.log('[Bypass] OkHttp3 CertificatePinner.check: ' + arguments[0]);
90
+ };
91
+ // check$okhttp variant (OkHttp 4.x)
92
+ try { CP['check$okhttp'].implementation = function() {}; } catch(e) {}
93
+ } catch(e) {}
94
+
95
+ // ── Retrofit / OkHttp interceptor ──
96
+ try {
97
+ var OkHttpClient = Java.use('okhttp3.OkHttpClient$Builder');
98
+ OkHttpClient.certificatePinner.implementation = function(pinner) {
99
+ console.log('[Bypass] OkHttpClient.Builder.certificatePinner');
100
+ return this; // return builder without pinner
101
+ };
102
+ } catch(e) {}
103
+
104
+ // ── Volley (HurlStack) ──
105
+ try {
106
+ var HurlStack = Java.use('com.android.volley.toolbox.HurlStack');
107
+ HurlStack.createConnection.implementation = function(url) {
108
+ console.log('[Bypass] Volley HurlStack: ' + url);
109
+ var conn = this.createConnection(url);
110
+ // Remove hostname verifier
111
+ conn.setHostnameVerifier(Java.use(
112
+ 'javax.net.ssl.HttpsURLConnection').getDefaultHostnameVerifier());
113
+ return conn;
114
+ };
115
+ } catch(e) {}
116
+
117
+ // ── Conscrypt / BoringSSL (modern Android) ──
118
+ try {
119
+ var Conscrypt = Java.use('org.conscrypt.ConscryptFileDescriptorSocket');
120
+ Conscrypt.verifyCertificateChain.implementation = function() {
121
+ console.log('[Bypass] Conscrypt verifyCertificateChain');
122
+ };
123
+ } catch(e) {}
124
+
125
+ // ── Apache HttpClient (legacy) ──
126
+ try {
127
+ var AbstractVerifier = Java.use('org.apache.http.conn.ssl.AbstractVerifier');
128
+ AbstractVerifier.verify.overload('java.lang.String', '[Ljava.lang.String;',
129
+ '[Ljava.lang.String;', 'boolean').implementation = function() {
130
+ console.log('[Bypass] Apache AbstractVerifier');
131
+ };
132
+ } catch(e) {}
133
+
134
+ // ── HostnameVerifier ──
135
+ try {
136
+ var HV = Java.use('javax.net.ssl.HttpsURLConnection');
137
+ HV.setDefaultHostnameVerifier.implementation = function(v) {
138
+ console.log('[Bypass] Ignoring custom HostnameVerifier');
139
+ };
140
+ } catch(e) {}
141
+
142
+ console.log('[+] Android universal SSL bypass loaded');
143
+ });
144
+ ```
145
+
146
+ ### 2.2 Objection (One Command)
147
+
148
+ ```bash
149
+ objection -g com.target.app explore --startup-command "android sslpinning disable"
150
+ ```
151
+
152
+ ### 2.3 Network Security Config (Debug Override)
153
+
154
+ ```xml
155
+ <!-- AndroidManifest.xml: android:networkSecurityConfig="@xml/network_security_config" -->
156
+
157
+ <!-- res/xml/network_security_config.xml -->
158
+ <network-security-config>
159
+ <base-config>
160
+ <trust-anchors>
161
+ <certificates src="system" />
162
+ <certificates src="user" /> <!-- Trust user-installed CAs -->
163
+ </trust-anchors>
164
+ </base-config>
165
+ </network-security-config>
166
+ ```
167
+
168
+ Workflow: decompile APK → add/modify config → repackage → re-sign → install.
169
+
170
+ ```bash
171
+ apktool d target.apk -o target_dir
172
+ # Edit res/xml/network_security_config.xml
173
+ # Add reference in AndroidManifest.xml if missing
174
+ apktool b target_dir -o target_patched.apk
175
+ zipalign -v 4 target_patched.apk target_aligned.apk
176
+ apksigner sign --ks my-key.keystore target_aligned.apk
177
+ adb install target_aligned.apk
178
+ ```
179
+
180
+ ### 2.4 Xposed / LSPosed Modules
181
+
182
+ | Module | Method | Scope | Root Required |
183
+ |---|---|---|---|
184
+ | JustTrustMe | Hooks TrustManager + OkHttp | Per-app | Yes (Xposed) |
185
+ | SSLUnpinning | Hooks certificate validation | Per-app | Yes (LSPosed) |
186
+ | TrustMeAlready | Global TrustManager bypass | System-wide | Yes (LSPosed) |
187
+
188
+ ### 2.5 Magisk + System CA Installation
189
+
190
+ ```bash
191
+ # Install proxy CA as system cert (Android 7+ requires this for system-level trust)
192
+ # Method 1: MagiskTrustUserCerts module
193
+ # Moves user CAs to /system/etc/security/cacerts/ via Magisk overlay
194
+
195
+ # Method 2: Manual (requires root)
196
+ adb push burp_ca.pem /sdcard/
197
+ adb shell
198
+ su
199
+ mount -o remount,rw /system
200
+ cp /sdcard/burp_ca.pem /system/etc/security/cacerts/9a5ba575.0 # hash-named
201
+ chmod 644 /system/etc/security/cacerts/9a5ba575.0
202
+ mount -o remount,ro /system
203
+
204
+ # Get correct hash filename:
205
+ openssl x509 -inform PEM -subject_hash_old -in burp_ca.pem | head -1
206
+ # Output: 9a5ba575 → filename is 9a5ba575.0
207
+ ```
208
+
209
+ ### 2.6 Manual Decompile → Patch → Repackage
210
+
211
+ ```bash
212
+ # Step 1: Decompile
213
+ jadx -d decompiled/ target.apk
214
+
215
+ # Step 2: Find pinning code
216
+ grep -r "CertificatePinner\|X509TrustManager\|checkServerTrusted\|ssl" decompiled/
217
+
218
+ # Step 3: Identify pinning implementation and patch
219
+ # Use smali editing for precise control:
220
+ apktool d target.apk
221
+ # Edit smali files to NOP out pinning checks
222
+ # Look for invoke-virtual {checkServerTrusted} and replace with return-void
223
+
224
+ # Step 4: Repackage and sign
225
+ apktool b target_dir -o patched.apk
226
+ apksigner sign --ks debug.keystore patched.apk
227
+ ```
228
+
229
+ ---
230
+
231
+ ## 3. iOS BYPASS METHODS
232
+
233
+ ### 3.1 Frida (SecTrust Hooks)
234
+
235
+ ```javascript
236
+ // Hook core iOS SSL validation functions
237
+ var SecTrustEvaluateWithError = Module.findExportByName('Security', 'SecTrustEvaluateWithError');
238
+ Interceptor.attach(SecTrustEvaluateWithError, {
239
+ onLeave: function(retval) {
240
+ retval.replace(ptr(1));
241
+ }
242
+ });
243
+
244
+ var SecTrustEvaluate = Module.findExportByName('Security', 'SecTrustEvaluate');
245
+ Interceptor.attach(SecTrustEvaluate, {
246
+ onLeave: function(retval) {
247
+ retval.replace(ptr(0));
248
+ }
249
+ });
250
+
251
+ // Hook SSLHandshake (lower-level)
252
+ var SSLHandshake = Module.findExportByName('Security', 'SSLHandshake');
253
+ if (SSLHandshake) {
254
+ Interceptor.attach(SSLHandshake, {
255
+ onLeave: function(retval) {
256
+ if (retval.toInt32() === -9807) { // errSSLXCertChainInvalid
257
+ retval.replace(ptr(0));
258
+ }
259
+ }
260
+ });
261
+ }
262
+
263
+ // Hook NSURLSession delegate method
264
+ try {
265
+ var cls = ObjC.classes.NSURLSession;
266
+ // Hook URLSession:didReceiveChallenge:completionHandler: on delegates
267
+ ObjC.enumerateLoadedClasses({
268
+ onMatch: function(name) {
269
+ try {
270
+ var methods = ObjC.classes[name].$ownMethods;
271
+ for (var i = 0; i < methods.length; i++) {
272
+ if (methods[i].indexOf('didReceiveChallenge') !== -1 &&
273
+ methods[i].indexOf('completionHandler') !== -1) {
274
+ console.log('[SSL] Found delegate: ' + name + ' ' + methods[i]);
275
+ }
276
+ }
277
+ } catch(e) {}
278
+ },
279
+ onComplete: function() {}
280
+ });
281
+ } catch(e) {}
282
+ ```
283
+
284
+ ### 3.2 Objection (One Command)
285
+
286
+ ```bash
287
+ objection -g com.target.app explore --startup-command "ios sslpinning disable"
288
+ ```
289
+
290
+ ### 3.3 SSL Kill Switch 2 (Jailbreak Tweak)
291
+
292
+ ```bash
293
+ # Install via Cydia/Sileo
294
+ # Package: com.nablac0d3.sslkillswitch2
295
+ # Disables SSL pinning system-wide or per-app via Settings toggle
296
+
297
+ # Hooks:
298
+ # - SecTrustEvaluate
299
+ # - SSLHandshake
300
+ # - SSLSetSessionOption
301
+ # - tls_helper_create_peer_trust
302
+ ```
303
+
304
+ ### 3.4 Library-Specific Hooks
305
+
306
+ | Library | iOS Hook Point | Frida Approach |
307
+ |---|---|---|
308
+ | AFNetworking | `AFSecurityPolicy.evaluateServerTrust:forDomain:` | Return YES |
309
+ | Alamofire | `ServerTrustManager.evaluate(_:forHost:)` | Skip evaluation |
310
+ | TrustKit | `TSKPinningValidator verifyPublicKeyPin:` | Return success |
311
+ | NSURLSession | `URLSession:didReceiveChallenge:completionHandler:` | Call completionHandler with .useCredential |
312
+
313
+ ### 3.5 Manual Binary Patch
314
+
315
+ ```bash
316
+ # Find pinning function in binary
317
+ strings decrypted_binary | grep -i "pin\|cert\|trust"
318
+ # Disassemble and find the validation function
319
+ # Replace comparison/branch instruction with NOP or unconditional pass
320
+
321
+ # LLDB runtime modification
322
+ lldb -n TargetApp
323
+ (lldb) breakpoint set -n "SecTrustEvaluateWithError"
324
+ (lldb) breakpoint command add 1
325
+ > thread return 1
326
+ > continue
327
+ > DONE
328
+ ```
329
+
330
+ ---
331
+
332
+ ## 4. FRAMEWORK-SPECIFIC BYPASSES
333
+
334
+ ### 4.1 Flutter
335
+
336
+ Flutter uses Dart's `dart:io` library with BoringSSL underneath. Standard Frida hooks on Java/ObjC layers don't work.
337
+
338
+ ```javascript
339
+ // Flutter SSL bypass — must hook BoringSSL directly
340
+ // Find ssl_crypto_x509_session_verify_cert_chain in libflutter.so
341
+ var libflutter = Process.findModuleByName('libflutter.so'); // Android
342
+ // var libflutter = Process.findModuleByName('Flutter'); // iOS
343
+
344
+ // Hook ssl_verify_peer_cert (BoringSSL function)
345
+ // Signature varies by Flutter version — use pattern scanning
346
+ var pattern = 'FF C3 ..'; // Example pattern, varies
347
+ var matches = Memory.scan(libflutter.base, libflutter.size, pattern, {
348
+ onMatch: function(address, size) {
349
+ console.log('[Flutter] Potential verify function at: ' + address);
350
+ Interceptor.attach(address, {
351
+ onLeave: function(retval) {
352
+ retval.replace(ptr(0)); // SSL_VERIFY_OK
353
+ }
354
+ });
355
+ },
356
+ onComplete: function() {}
357
+ });
358
+
359
+ // Alternative: use reflutter tool for automated patching
360
+ // reflutter target.apk
361
+ // This patches BoringSSL in the Flutter engine directly
362
+ ```
363
+
364
+ **reflutter tool** (recommended for Flutter apps):
365
+
366
+ ```bash
367
+ pip install reflutter
368
+ reflutter target.apk
369
+ # Outputs patched APK that redirects traffic to your proxy
370
+ # Also disables SSL verification in the BoringSSL engine
371
+ ```
372
+
373
+ ### 4.2 React Native
374
+
375
+ React Native uses platform networking: OkHttp on Android, NSURLSession on iOS.
376
+
377
+ | Platform | Networking Stack | Bypass Method |
378
+ |---|---|---|
379
+ | Android | OkHttp3 | Standard OkHttp CertificatePinner hook |
380
+ | iOS | NSURLSession | Standard SecTrust hooks |
381
+ | Android (Hermes) | Same OkHttp | Same hooks, but Hermes JIT may need additional handling |
382
+
383
+ ```javascript
384
+ // React Native Android — same as OkHttp bypass
385
+ Java.perform(function() {
386
+ try {
387
+ var CP = Java.use('okhttp3.CertificatePinner');
388
+ CP.check.overload('java.lang.String', 'java.util.List').implementation = function() {};
389
+ } catch(e) { console.log('OkHttp3 not found, trying okhttp2...'); }
390
+
391
+ try {
392
+ var CP2 = Java.use('com.squareup.okhttp.CertificatePinner');
393
+ CP2.check.overload('java.lang.String', 'java.util.List').implementation = function() {};
394
+ } catch(e) {}
395
+ });
396
+ ```
397
+
398
+ ### 4.3 Xamarin
399
+
400
+ ```csharp
401
+ // Xamarin pinning typically via:
402
+ // ServicePointManager.ServerCertificateValidationCallback
403
+ // or custom HttpClientHandler
404
+ ```
405
+
406
+ ```javascript
407
+ // Frida bypass for Xamarin (Mono runtime)
408
+ // Hook Mono method: System.Net.ServicePointManager.set_ServerCertificateValidationCallback
409
+ var mono_method = Module.findExportByName('libmonosgen-2.0.so',
410
+ 'mono_runtime_invoke');
411
+ // More practical: hook the managed callback at CIL level
412
+ // Use Frida's Mono bridge or objection's built-in Xamarin support
413
+
414
+ // Objection has built-in Xamarin bypass:
415
+ // objection -g com.target.app explore
416
+ // > android sslpinning disable (covers Xamarin on Android)
417
+ ```
418
+
419
+ ---
420
+
421
+ ## 5. CERTIFICATE TRANSPARENCY & HPKP
422
+
423
+ | Technology | Status | Impact on Testing |
424
+ |---|---|---|
425
+ | Certificate Transparency (CT) | Active, enforced by browsers | Mobile apps rarely enforce CT; not a bypass obstacle |
426
+ | HPKP (HTTP Public Key Pinning) | Deprecated (2018) | Legacy apps may still check; remove header from proxy response |
427
+ | Expect-CT header | Deprecated (2024) | Minimal impact on mobile testing |
428
+ | CT in mobile apps | Rare | Only Google apps enforce via custom CT checks |
429
+
430
+ ---
431
+
432
+ ## 6. TROUBLESHOOTING
433
+
434
+ ### 6.1 Common Failures
435
+
436
+ | Symptom | Cause | Fix |
437
+ |---|---|---|
438
+ | Bypass script loaded but traffic still fails | Multiple pinning layers | Hook ALL layers: TrustManager + OkHttp + custom checks |
439
+ | "Client certificate required" | Mutual TLS (mTLS) | Extract client cert from app bundle/keychain, import into proxy |
440
+ | Connection works but no HTTP traffic | Non-HTTP protocol (MQTT, gRPC, WebSocket) | Use Wireshark or protocol-specific proxy |
441
+ | App crashes after bypass | Anti-tampering detects hooks | Bypass integrity checks first, then SSL |
442
+ | Proxy CA not trusted | Android 7+ user CA restrictions | Install CA as system cert (Magisk module) |
443
+ | Flutter app ignores hooks | BoringSSL not hooked at native layer | Use reflutter or native BoringSSL hooks |
444
+ | Certificate chain validation timeout | OCSP stapling mismatch | Disable OCSP checks or mock OCSP responder |
445
+
446
+ ### 6.2 Diagnostic Steps
447
+
448
+ ```bash
449
+ # Verify proxy CA is installed correctly
450
+ # Android:
451
+ adb shell "ls /system/etc/security/cacerts/ | grep $(openssl x509 -subject_hash_old -in ca.pem | head -1)"
452
+
453
+ # iOS: Settings → General → About → Certificate Trust Settings
454
+
455
+ # Check if target app is actually using SSL (vs. plain HTTP)
456
+ # Wireshark filter: tcp.port == 443 and ip.addr == <device_ip>
457
+
458
+ # Check if Frida is hooking the right process
459
+ frida-ps -U | grep target
460
+
461
+ # Verbose Frida output for debugging hooks
462
+ frida -U -f com.target.app -l bypass.js --debug
463
+ ```
464
+
465
+ ---
466
+
467
+ ## 7. SSL PINNING BYPASS DECISION TREE
468
+
469
+ ```
470
+ Need to intercept mobile app HTTPS traffic
471
+
472
+ ├── Platform?
473
+ │ ├── Android ↓
474
+ │ │ ├── Rooted device available?
475
+ │ │ │ ├── Yes → Frida universal bypass (§2.1) [FIRST TRY]
476
+ │ │ │ │ ├── Works? → done
477
+ │ │ │ │ └── Fails? → add Conscrypt + Volley hooks
478
+ │ │ │ ├── Still fails? → LSPosed + TrustMeAlready (§2.4)
479
+ │ │ │ └── Still fails? → install CA as system cert (§2.5)
480
+ │ │ └── No root?
481
+ │ │ ├── Debug build? → Network Security Config (§2.3)
482
+ │ │ └── Release build? → decompile + patch + repackage (§2.6)
483
+ │ │
484
+ │ └── iOS ↓
485
+ │ ├── Jailbroken device available?
486
+ │ │ ├── Yes → Objection ios sslpinning disable (§3.2) [FIRST TRY]
487
+ │ │ │ ├── Works? → done
488
+ │ │ │ └── Fails? → Frida SecTrust hooks (§3.1)
489
+ │ │ ├── Still fails? → SSL Kill Switch 2 (§3.3)
490
+ │ │ └── Still fails? → library-specific hooks (§3.4)
491
+ │ └── No jailbreak?
492
+ │ ├── Re-sign with Frida gadget → run Frida hooks
493
+ │ └── Binary patch → sideload (§3.5)
494
+
495
+ ├── Framework-specific app?
496
+ │ ├── Flutter → reflutter tool or BoringSSL native hooks (§4.1)
497
+ │ ├── React Native → standard platform hooks (§4.2)
498
+ │ └── Xamarin → Objection or Mono runtime hooks (§4.3)
499
+
500
+ ├── Bypass works but issues remain?
501
+ │ ├── Client cert required? → extract + import to proxy (§6.1)
502
+ │ ├── Non-HTTP protocol? → protocol-specific tooling (§6.1)
503
+ │ └── App crashes? → fix anti-tampering first (§6.1)
504
+
505
+ └── All methods fail?
506
+ ├── Analyze traffic at network level (Wireshark/tcpdump)
507
+ ├── Check for custom proprietary protocol
508
+ └── Consider iptables + transparent proxy approach
509
+ ```
510
+
511
+ ---
512
+
513
+ ## 8. PROXY SETUP QUICK REFERENCE
514
+
515
+ | Proxy Tool | Best For | SSL Bypass Integration |
516
+ |---|---|---|
517
+ | Burp Suite | Full HTTP analysis | Import CA to device |
518
+ | mitmproxy | Scripted interception | `mitmproxy --set confdir=~/.mitmproxy` |
519
+ | Charles Proxy | macOS-native, easy setup | Built-in CA installation |
520
+ | Proxyman | macOS/iOS native | Direct iOS device support |
521
+ | HTTP Toolkit | Quick Android setup | Automated CA + Frida bypass |
522
+
523
+ ```bash
524
+ # Android proxy setup
525
+ adb shell settings put global http_proxy <host_ip>:8080
526
+
527
+ # Remove proxy
528
+ adb shell settings put global http_proxy :0
529
+
530
+ # iOS proxy: Settings → Wi-Fi → Configure Proxy → Manual
531
+ ```