d1337-kit 3.0.0 → 3.1.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.
@@ -1,116 +1,262 @@
1
1
  ---
2
- description: Offensive recon — subdomain, DNS history, leak search, fingerprint, OSINT
2
+ description: Offensive recon — subdomain, DNS history, leak search, fingerprint, cloud assets, OSINT. Intelligence gathering yang THOROUGH.
3
3
  ---
4
4
  // turbo-all
5
5
 
6
- > CONTEXT: Workflow ini dipake buat full offensive recon terhadap target. Pakai SecurityTrails API buat domain/subdomain intel, kombinasi sama web search buat CVE/exploit terbaru.
6
+ > **CONTEXT:** Full offensive reconnaissance. INTELLIGENCE gathering, bukan scanning. Lu collect SEMUA data yang ada sebelum satu exploit pun dijalanin. Tanpa recon = tembak buta.
7
7
 
8
- # /recon — D1337 Offensive Recon
8
+ # /recon — D1337 Offensive Intelligence Gathering
9
+
10
+ ## 🔴 H3: HALAL HARAM HANTAM
11
+
12
+ ```
13
+ HALAL: Setiap data point yang expand attack surface knowledge
14
+ HARAM: Scanning tanpa intel, brute force tanpa wordlist yang targeted
15
+ HANTAM: Gak ada recon yang "cukup" — dig deeper SELALU
16
+ ```
17
+
18
+ ---
9
19
 
10
20
  ## Prerequisites
11
21
 
12
- - SecurityTrails API key (set di env: `SECTRAILS_KEY`)
13
22
  - Target domain/IP dari Ketua/Abangda
23
+ - SecurityTrails API key (env: `SECTRAILS_KEY`) — recommended
24
+ - Shodan API key (env: `SHODAN_KEY`) — optional
25
+ - VirusTotal API key (env: `VT_KEY`) — optional
14
26
 
15
27
  ---
16
28
 
17
- ## Phase 1: Domain Intel (SecurityTrails)
29
+ ## Phase 1: Passive OSINT (ZERO NOISE — Target Gak Tau)
30
+
31
+ ### 1.1 Domain Intelligence
18
32
 
19
33
  ```bash
20
- # 1. Domain overview
34
+ # SecurityTrails domain overview
21
35
  curl -s "https://api.securitytrails.com/v1/domain/$TARGET" \
22
36
  -H "apikey: $SECTRAILS_KEY" | python -m json.tool
23
37
 
24
- # 2. Subdomain enumeration
38
+ # Subdomain enumeration (passive — gak sentuh target)
25
39
  curl -s "https://api.securitytrails.com/v1/domain/$TARGET/subdomains" \
26
40
  -H "apikey: $SECTRAILS_KEY" | python -m json.tool
27
41
 
28
- # 3. DNS history (A records)
42
+ # DNS history cari origin IP di belakang CDN
29
43
  curl -s "https://api.securitytrails.com/v1/history/$TARGET/dns/a" \
30
44
  -H "apikey: $SECTRAILS_KEY" | python -m json.tool
31
45
 
32
- # 4. WHOIS history
46
+ # MX records history — email infrastructure
47
+ curl -s "https://api.securitytrails.com/v1/history/$TARGET/dns/mx" \
48
+ -H "apikey: $SECTRAILS_KEY" | python -m json.tool
49
+
50
+ # WHOIS history — ownership changes
33
51
  curl -s "https://api.securitytrails.com/v1/history/$TARGET/whois" \
34
52
  -H "apikey: $SECTRAILS_KEY" | python -m json.tool
35
53
 
36
- # 5. Associated domains (reverse IP)
54
+ # Associated domains (reverse IP — siapa lagi di server yang sama)
37
55
  curl -s "https://api.securitytrails.com/v1/domain/$TARGET/associated" \
38
56
  -H "apikey: $SECTRAILS_KEY" | python -m json.tool
39
57
  ```
40
58
 
41
- ## Phase 2: Tech Fingerprint
59
+ ### 1.2 Certificate Transparency
42
60
 
43
61
  ```bash
44
- # Pakai search_web atau firecrawl_search
45
- # Target: "$TARGET site:shodan.io OR site:censys.io"
62
+ # crt.sh subdomain via CT logs (FREE, no API key)
63
+ curl -s "https://crt.sh/?q=%25.$TARGET&output=json" | \
64
+ python -c "import sys,json; [print(x['name_value']) for x in json.load(sys.stdin)]" | \
65
+ sort -u
66
+
67
+ # Alternative: certspotter
68
+ curl -s "https://api.certspotter.com/v1/issuances?domain=$TARGET&include_subdomains=true" | \
69
+ python -c "import sys,json; [print(d) for x in json.load(sys.stdin) for d in x.get('dns_names',[])]" | \
70
+ sort -u
71
+ ```
46
72
 
47
- # Cek tech stack
48
- curl -s "https://$TARGET" -I | grep -i "server\|x-powered-by\|x-aspnet\|x-generator"
73
+ ### 1.3 Search Engine & Web Archive Recon
49
74
 
50
- # Pakai httpx kalau ada
51
- # httpx -u https://$TARGET -tech-detect -status-code
75
+ ```bash
76
+ # Google dorks (via search_web)
77
+ search_web: "site:$TARGET filetype:pdf OR filetype:doc OR filetype:xls"
78
+ search_web: "site:$TARGET inurl:admin OR inurl:login OR inurl:dashboard"
79
+ search_web: "site:$TARGET inurl:api OR inurl:swagger OR inurl:graphql"
80
+ search_web: "\"$TARGET\" password OR secret OR api_key OR token"
81
+
82
+ # GitHub dorks — leaked secrets
83
+ search_web: "site:github.com \"$TARGET\" password OR secret OR api_key"
84
+ search_web: "site:github.com \"$TARGET\" filename:.env OR filename:config"
85
+
86
+ # Wayback Machine — historical pages
87
+ search_web: "site:web.archive.org $TARGET"
88
+ curl -s "https://web.archive.org/cdx/search/cdx?url=*.$TARGET/*&output=json&fl=original&collapse=urlkey" | head -100
52
89
  ```
53
90
 
54
- ## Phase 3: CVE & Exploit Hunting (WAJIB)
91
+ ### 1.4 Leak & Credential Search
55
92
 
56
93
  ```bash
57
- # search_web: "$TARGET_TECH CVE 2024 2025 exploit PoC"
58
- # search_web: "$TARGET_TECH vulnerability RCE"
94
+ # IntelX breach data search
95
+ curl -s "https://3.intelx.io/intelligent/search" \
96
+ -H "x-key: $INTELX_KEY" \
97
+ -d '{"term":"$TARGET","maxresults":100,"media":0,"sort":2,"terminate":[]}'
59
98
 
60
- # Cek exploit-db
61
- # firecrawl_search: "site:exploit-db.com $TARGET_TECH"
99
+ # Dehashed (via search_web kalau gak ada API)
100
+ search_web: "site:dehashed.com $TARGET"
62
101
 
63
- # Cek GitHub PoCs
64
- # firecrawl_search: "site:github.com $TARGET_TECH exploit PoC"
102
+ # HaveIBeenPwned domain search
103
+ search_web: "\"$TARGET\" breach leaked credentials"
65
104
  ```
66
105
 
67
- **Output yang dibutuhin:**
68
- - CVE number
69
- - Affected versions
70
- - PoC link (GitHub/exploit-db)
71
- - Attack vector description
106
+ ## Phase 2: Active Recon (LOW NOISE — Calculated Probes)
72
107
 
73
- ## Phase 4: Subdomain Takeover Check
108
+ ### 2.1 Tech Stack Fingerprint
74
109
 
75
110
  ```bash
76
- # Dari subdomain list Phase 1
77
- # Cek CNAME records yang dangling
78
- # dig CNAME sub.$TARGET
79
- # Kalau NXDOMAIN + CNAME ke service (AWS, Azure, Heroku) → takeover possible
111
+ # HTTP headers analysis
112
+ curl -sI "https://$TARGET" | grep -iE "server|x-powered-by|x-aspnet|x-generator|x-framework|set-cookie|content-security-policy"
113
+
114
+ # Detailed tech detection
115
+ search_web: "$TARGET technology stack web framework"
116
+
117
+ # JavaScript analysis — hidden endpoints, API keys, tech indicators
118
+ curl -s "https://$TARGET" | grep -oP 'src="[^"]*\.js"' | head -20
119
+ # Download dan analisis JS files buat:
120
+ # - API endpoints
121
+ # - Hardcoded tokens/keys
122
+ # - Framework signatures
123
+ # - Source maps (goldmine kalau ada)
124
+
125
+ # robots.txt + sitemap.xml — hidden paths
126
+ curl -s "https://$TARGET/robots.txt"
127
+ curl -s "https://$TARGET/sitemap.xml"
128
+
129
+ # Common admin/debug endpoints
130
+ curl -sI "https://$TARGET/.env" | head -5
131
+ curl -sI "https://$TARGET/debug" | head -5
132
+ curl -sI "https://$TARGET/info.php" | head -5
133
+ curl -sI "https://$TARGET/server-status" | head -5
134
+ curl -sI "https://$TARGET/.git/config" | head -5
135
+ curl -sI "https://$TARGET/graphql" | head -5
136
+ curl -sI "https://$TARGET/swagger.json" | head -5
137
+ curl -sI "https://$TARGET/api-docs" | head -5
80
138
  ```
81
139
 
82
- ## Phase 5: Report
140
+ ### 2.2 Port & Service Discovery
83
141
 
84
- Output format:
142
+ ```bash
143
+ # Shodan — passive port scan (ZERO noise to target)
144
+ curl -s "https://api.shodan.io/shodan/host/$TARGET_IP?key=$SHODAN_KEY" | python -m json.tool
85
145
 
86
- ```markdown
87
- # Recon Report: $TARGET
146
+ # Kalau Shodan gak available, search_web:
147
+ search_web: "site:shodan.io $TARGET"
148
+ search_web: "site:censys.io $TARGET"
88
149
 
89
- ## Domain Intel
90
- - Subdomains found: X
91
- - DNS history changes: Y
92
- - Associated domains: Z
150
+ # Active port scan (hanya kalau authorized)
151
+ # nmap -sS -sV -T3 --top-ports 1000 $TARGET -oN recon_$TARGET.txt
152
+ # masscan -p1-65535 $TARGET --rate=500 -oJ ports_$TARGET.json
153
+ ```
93
154
 
94
- ## Tech Stack
95
- - Server: X
96
- - Framework: Y
97
- - CMS: Z
155
+ ## Phase 3: Cloud Asset Discovery
98
156
 
99
- ## Vulnerabilities Found
100
- | CVE | Severity | PoC | Status |
101
- |-----|----------|-----|--------|
102
- | CVE-XXXX-XXXXX | Critical | [link] | Unpatched |
157
+ ```bash
158
+ # AWS S3 bucket enum
159
+ search_web: "site:s3.amazonaws.com $TARGET"
160
+ search_web: "\"$TARGET\" s3 bucket"
161
+ # Common patterns: $TARGET.s3.amazonaws.com, s3-$TARGET, $TARGET-backup, $TARGET-dev
162
+
163
+ # Azure blob
164
+ search_web: "site:blob.core.windows.net $TARGET"
165
+ # Pattern: $TARGET.blob.core.windows.net
166
+
167
+ # GCP storage
168
+ search_web: "site:storage.googleapis.com $TARGET"
169
+ # Pattern: storage.googleapis.com/$TARGET
170
+ ```
103
171
 
104
- ## Subdomain Takeover
105
- | Subdomain | CNAME | Status |
172
+ ## Phase 4: Subdomain Takeover Check
173
+
174
+ ```bash
175
+ # Dari subdomain list Phase 1, cek CNAME records
176
+ # Yang dicari: CNAME pointing ke service yang UDAH GAK DIPAKE
177
+
178
+ # Cek setiap subdomain:
179
+ # 1. dig CNAME sub.$TARGET
180
+ # 2. Kalau CNAME → external service (AWS, Azure, Heroku, GitHub Pages, Shopify)
181
+ # 3. DAN service return 404/NXDOMAIN → TAKEOVER POSSIBLE
182
+
183
+ # Services yang sering vulnerable:
184
+ # - GitHub Pages (404)
185
+ # - Heroku (No such app)
186
+ # - AWS S3 (NoSuchBucket)
187
+ # - Azure (404 Web Site not found)
188
+ # - Shopify (Sorry, this shop is unavailable)
189
+ # - Fastly (Fastly error: unknown domain)
190
+ # - Pantheon (404 error unknown site)
191
+ ```
192
+
193
+ ## Phase 5: Compile Recon Report
194
+
195
+ ```markdown
196
+ # 🔍 Recon Report: $TARGET
197
+
198
+ ## Target Overview
199
+ - Domain: $TARGET
200
+ - IP(s): [resolved IPs, CDN info]
201
+ - Registrar: [from WHOIS]
202
+ - Hosting: [cloud provider/datacenter]
203
+
204
+ ## Domain Intelligence
205
+ | Data Point | Count | Source |
106
206
  |-----------|-------|--------|
207
+ | Subdomains | X | SecurityTrails + CT logs |
208
+ | DNS changes (1yr) | X | SecurityTrails history |
209
+ | Associated domains | X | Reverse IP |
210
+ | MX records | X | DNS |
211
+
212
+ ### Subdomains Found
213
+ | Subdomain | IP | Status | Tech | Notes |
214
+ |-----------|-----|--------|------|-------|
215
+ | api.$TARGET | 1.2.3.4 | 200 | Node.js | API endpoint |
216
+ | admin.$TARGET | 1.2.3.5 | 302→login | PHP | Admin panel |
217
+ | staging.$TARGET | 1.2.3.6 | 200 | Same as prod | Possible test data |
107
218
 
108
- ## Recommended Attack Vectors
109
- 1. ...
110
- 2. ...
111
- 3. ...
219
+ ## Tech Stack
220
+ | Component | Technology | Version | Notes |
221
+ |----------|-----------|---------|-------|
222
+ | Web server | nginx | 1.25.x | From headers |
223
+ | Framework | Next.js | 14.x | From JS analysis |
224
+ | Database | PostgreSQL | unknown | From error pages |
225
+ | CDN | Cloudflare | - | DNS resolution |
226
+
227
+ ## Leaked/Exposed Data
228
+ | Type | Source | Content | Risk |
229
+ |------|--------|---------|------|
230
+ | Credentials | [source] | X accounts found | HIGH |
231
+ | API keys | [source] | X keys found | CRITICAL |
232
+ | Source code | [source] | repo found | MEDIUM |
233
+
234
+ ## Subdomain Takeover
235
+ | Subdomain | CNAME | Service | Status |
236
+ |-----------|-------|---------|--------|
237
+ | old.$TARGET | xyz.herokuapp.com | Heroku | ⚠️ TAKEOVER POSSIBLE |
238
+
239
+ ## Cloud Assets
240
+ | Asset | Type | Access | Risk |
241
+ |-------|------|--------|------|
242
+ | $TARGET.s3.amazonaws.com | S3 bucket | Public listing | HIGH |
243
+
244
+ ## Vulnerabilities Identified (Pre-Exploitation)
245
+ | CVE/Issue | Severity | Component | PoC Available |
246
+ |-----------|----------|-----------|--------------|
247
+ | CVE-XXXX-XXXXX | Critical | [component] | ✅ Yes |
248
+
249
+ ## Recommended Attack Vectors (Priority Order)
250
+ 1. [Highest impact, lowest effort — describe why]
251
+ 2. [Second priority — describe attack path]
252
+ 3. [Third priority — describe chain opportunity]
253
+
254
+ ## OPSEC Notes
255
+ - CDN detected: [adjust techniques accordingly]
256
+ - WAF detected: [type, bypass strategy]
257
+ - Rate limiting: [observed limits]
112
258
  ```
113
259
 
114
260
  ---
115
261
 
116
- > **Recon itu fondasi. Tanpa recon yang solid, exploit lu bakal sia-sia. SCAN HABIS, DOCUMENT SEMUA.**
262
+ > **"Recon yang THOROUGH = exploit yang PRESISI. Recon yang DANGKAL = tembak buta kayak script kiddie. Lu D1337 — lu GATHER INTELLIGENCE, bukan jalanin scanner."**