-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRecon
350 lines (205 loc) · 11.9 KB
/
Recon
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
Requirements:
$sudo apt update
$sudo apt upgrade
$sudo apt install zip curl wget git
$sudo apt install golang-go
__________________________________________________________________________________________________________________________________________________________________________________________________________________
SubFinder Install:
$go install -v github.com/projectdiscovery/subfinder/v2/cmd/subfinder@latest
$sudo cp ~/go/bin/subfinder /usr/bin
$sudo subfinder -up
$subfinder
__ _____ __
_______ __/ /_ / __(_)___ ____/ /__ _____
/ ___/ / / / __ \/ /_/ / __ \/ __ / _ \/ ___/
(__ ) /_/ / /_/ / __/ / / / / /_/ / __/ /
/____/\__,_/_.___/_/ /_/_/ /_/\__,_/\___/_/
projectdiscovery.io
[INF] Current subfinder version v2.6.7 (latest)
__________________________________________________________________________________________________________________________________________________________________________________________________________________
HTTPX Install:
$go install -v github.com/projectdiscovery/httpx/cmd/httpx@latest
$sudo cp ~/go/bin/httpx /usr/bin
$httpx dashboard
$go install -v github.com/projectdiscovery/httpx/cmd/httpx@latest
$httpx
__ __ __ _ __
/ /_ / /_/ /_____ | |/ /
/ __ \/ __/ __/ __ \| /
/ / / / /_/ /_/ /_/ / |
/_/ /_/\__/\__/ .___/_/|_|
/_/
projectdiscovery.io
[INF] Current httpx version v1.6.9 (latest)
[WRN] UI Dashboard is disabled, Use -dashboard option to enable
OPTIONAL:
For GUI Dashboard:
#Go to "https://cloud.projectdiscovery.io"
#Create an account(Either through email,google or github)
#Click on your profile picture at top-right corner
#Select 'API key' option
#Copy your API key.
$httpx -dashboard
__ __ __ _ __
/ /_ / /_/ /_____ | |/ /
/ __ \/ __/ __/ __ \| /
/ / / / /_/ /_/ /_/ / |
/_/ /_/\__/\__/ .___/_/|_|
/_/
projectdiscovery.io
[INF] Current httpx version v1.6.9 (latest)
[INF] To view results in UI dashboard, visit https://cloud.projectdiscovery.io/assets upon completion.
[INF] Get your free api key by signing up at https://cloud.projectdiscovery.io
[*] Enter PDCP API Key (exit to abort): API_KEY
[INF] Successfully logged in as (@Account_Name)
__________________________________________________________________________________________________________________________________________________________________________________________________________________
Katana Install:
$go install github.com/projectdiscovery/katana/cmd/katana@latest
$sudo cp ~/go/bin/Katana /usr/bin
$katana
__ __
/ /_____ _/ /____ ____ ___ _
/ '_/ _ / __/ _ / _ \/ _ /
/_/\_\\_,_/\__/\_,_/_//_/\_,_/
projectdiscovery.io
[INF] Current katana version v1.1.1 (latest)
__________________________________________________________________________________________________________________________________________________________________________________________________________________
Nuclei Install:
$go install -v github.com/projectdiscovery/nuclei/v3/cmd/nuclei@latest
$sudo cp ~/go/bin/nuclei /usr/bin
$nuclei
__ _
____ __ _______/ /__ (_)
/ __ \/ / / / ___/ / _ \/ /
/ / / / /_/ / /__/ / __/ /
/_/ /_/\__,_/\___/_/\___/_/ v3.2.9
projectdiscovery.io
__________________________________________________________________________________________________________________________________________________________________________________________________________________
OPTIONAL:You can install all the above packages together with other extras by doing the following:
PDTM install:
$go install -v github.com/projectdiscovery/pdtm/cmd/pdtm@latest
$sudo cp ~/go/bin/pdtm /usr/bin
$sudo apt install -y libcap
$sudo apt install -y massdns
$pdtm -install-all
#pdtm -i package_name(To install specific package)
__________________________________________________________________________________________________________________________________________________________________________________________________________________
DirSearch Install:
First check your python version
$python --version
if python --verson >= 3.11 :
1. Using a Virtual Environment (Recommended)
Creating a virtual environment ensures that your packages are isolated from the system's Python environment.
# Step 1: Install the venv module if not already installed
$sudo apt install python3-venv
# Step 2: Create a virtual environment
python3 -m venv myenv
# Step 3: Activate the virtual environment
source myenv/bin/activate
# Step 4:Go to line 174
To exit the virtual environment, run:
deactivate
2. Using `--break-system-packages` (Not Recommended)
If you want to override the restriction and install packages directly into the system Python environment, use the `--break-system-packages` flag.
$sudo pip3 install package_name --break-system-packages
(where package_name= dirsearch setup-tools psycopg2-binary psycopg2 psycopg mysql-connector-python-rf defusedcsv httpx_ntlm requests_toolbelt)``
Warning: This approach can lead to issues with system-managed Python packages and is discouraged for production systems.
3. Using pipx for Application Installation
If you need install python packages for a standalone Python application, you can use `pipx` to create a virtual environment automatically.
# Step 1: Install pipx if not already installed
$sudo apt install pipx
# Step 2: Use pipx to install the package
$pipx install package_name
(where package_name= dirsearch setup-tools psycopg2-binary psycopg2 psycopg mysql-connector-python-rf defusedcsv httpx_ntlm requests_toolbelt)
4. Installing System-Wide via APT
To install Python packages system-wide, try apt install python3-xyz, where xyz is the package you are trying to install.
$sudo apt install python3-xyz
else:
$pip3 install dirsearch setup-tools
#If errors : Execute line 180
$dirsearch -u target.com
OR
$git clone https://github.com/maurosoria/dirsearch.git --depth 1
$pip3 install psycopg2-binary psycopg2 psycopg mysql-connector-python-rf defusedcsv httpx_ntlm requests_toolbelt
$dirsearch/dirsearch.py https://target.com
_|. _ _ _ _ _ _|_ v0.4.3
(_||| _) (/_(_|| (_| )
Extensions: php, asp, aspx, jsp, html, htm | HTTP method: GET | Threads: 25 | Wordlist size: 12266
Target: https://target.com
#If u get the below error after executing 'pip3 install' command then u need to follow the 'if' statement:
error: externally-managed-environment
× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
python3-xyz, where xyz is the package you are trying to
install.
If you wish to install a non-Kali-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have pypy3-venv installed.
If you wish to install a non-Kali-packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.
For more information, refer to the following:
* https://www.kali.org/docs/general-use/python3-external-packages/
* /usr/share/doc/python3.12/README.venv
__________________________________________________________________________________________________________________________________________________________________________________________________________________
Step 1 :Subdomain Enumeration
$subfinder -d domain.com --all -recursive >>subs.txt
Step 2:Filter Live Hosts
$cat subs.txt |httpx -td -title -sc -ip >>live.txt
Step 3:Run Nuclei for Vulnerabilities
$nuclei -l live.txt -rl 10 -bs 2 -c 2 -as -silent -s critical,high,medium
Step 4: Filter for HTTP 200 Subdomains
$cat subs.txt | grep 200 | awk '{print $1}'
Step 5: Identify WAF Subdomains
$cat live.txt | grep 403
Step 6: Identify specific WAFs
$cat live.txt | grep -v -I -E 'cloudfront|cloudflare|imperva' | awk '{print $1}'
Step 7: Fetch Urls from sites
$katana -u subs.txt -d 5 waybackarchive,commoncrawl,alienvault -kf -jc -fx -ef woff,css,png,svg,jpg,woff2,jpeg,gif,svg >> allurls.txt
#katana -u subdomains_alive.txt -d 5 -ps -pss waybackarchive,commoncrawl,alienvault -kf -jc -fx -ef woff,css,png,svg,jpg,woff2,jpeg,gif,svg -o allurls.txt
Step 8: Identify secrets files
$cat allurls.txt | grep -E "\.txt|\.log|\.cache|\.secret|\.db|\.backup|\.yml|\.json|\.gz|\.rar|\.zip|\.config"
Step 9: Find Javascritpt files
$cat allurls.txt | grep -E "\.js$" >> js.txt
Step 10: Directory Brute-Forcing
$python3 dirsearch/dirsearch.py -u https://target.com -o dirs.txt -e xml,json,sql,db,log,yml,bak,txt,tar.gz,zip -x 301,403,404,500,400,502,503,302,429
#dirsearch -u target.com -e xml, json, sql, db, log, yml, bak, txt, tar.gz, zip -x 301,403,404,500,400,502,503,302,429 --random-agent
#Do not use sudo for this one.
__________________________________________________________________________________________________________________________________________________________________________________________________________________
Internet Archive's Wayback Machine (https://archive.org/web/) :
$git clone https://github.com/tomnomnom/waybackurls
$cd waybackurls
$go build
$./waybackurls domain.com >subdomain.txt
__________________________________________________________________________________________________________________________________________________________________________________________________________________
DNS Enumeration :
$sudo apt install -y dig nslookup dnsrecon dnsenum
$dnsrecon -d target.com
$nslookup target.com
$dig target.com
$dnsenum target.com
Whois Information :
$sudo apt install -y whois
$whois target.com
Web Fingerprinting :
$sudo apt install -y whatweb
$whatweb https://target.com
Wappalyzer(https://www.wappalyzer.com/)
- Passive Recon:
- Use tools like `whois`, `dnsenum`, and `sublist3r` to gather domain and subdomain information.
- Identify technologies using [Wappalyzer](https://www.wappalyzer.com/) or `whatweb`.
- Analyze DNS records using `dig` or `dnsrecon`.
- Search for public information in Google (`site:biocorellc.com`) or GitHub.
- TLS/SSL Testing:
- Analyze SSL/TLS configurations using `sslscan` or [Qualys SSL Labs](https://www.ssllabs.com/ssltest/):
sslscan biocorellc.com
- CMS and Software Scanning:
- Detect vulnerable plugins or software with `wpscan` (for WordPress) or `joomscan` (for Joomla).
wpscan --url https://biocorellc.com
- Brute Force:
- Use tools like `ffuf` or `dirbuster` to identify hidden directories/files:
ffuf -u https://biocorellc.com/FUZZ -w /path/to/wordlist
__________________________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________________________