Skip to content

Commit 7cff7eb

Browse files
authored
Create README.md
1 parent 8427707 commit 7cff7eb

File tree

1 file changed

+286
-0
lines changed

1 file changed

+286
-0
lines changed

Walkthroughs/TryHackMe/Blue/README.md

+286
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,286 @@
1+
# Report Template
2+
## Table of Contents
3+
* [Summary](#summary)
4+
* [Enumerate](#enumerate)
5+
* [Ports](#ports)
6+
* [Services](#services)
7+
* [FTP](#ftp)
8+
* [SSH](#ssh)
9+
* [SMTP](#smtp)
10+
* [DNS](#dns)
11+
* [HTTP](#http)
12+
* [POP3](#pop3)
13+
* [RPC](#rpc)
14+
* [IMAP](#imap)
15+
* [NetBIOS](#netbios)
16+
* [SMB](#smb)
17+
* [SQL](#sql)
18+
* [RDP](#rdp)
19+
* [OS](#os)
20+
* [Nmap OS Discovery Scan](#nmap-os-discovery-scan)
21+
* [Nmap OS Discovery Scan via SMB](#nmap-os-discovery-scan-via-smb)
22+
* [Exploit](#exploit)
23+
* [Password Guessing](#password-guessing)
24+
* [Default Credentials](#default-credentials)
25+
* [Hydra](#hydra)
26+
* [CVE-2021-1234](#cve-2021-1234)
27+
* [EDB-ID-56789](#edb-id-56789)
28+
* [cyberphor POC](#cyberphor-poc)
29+
* [Metasploit](#metasploit)
30+
* [Explore](#explore)
31+
* [Escalate](#escalate)
32+
* [Lessons Learned](#lessons-learned)
33+
34+
## Summary
35+
* Hostname:
36+
* Description:
37+
* IP Address:
38+
* MAC Address: (ref:)
39+
* Domain: WORKGROUP
40+
* TCP Ports and Services
41+
* 22
42+
* OpenSSH
43+
* 80
44+
* HTTP
45+
* 445
46+
* SMBv1
47+
* UDP Ports and Services
48+
* 53
49+
* DNS
50+
* OS
51+
* Distro: (ref:)
52+
* Kernel: (ref:)
53+
* Architecture: (ref:)
54+
* Users (ref:)
55+
* root
56+
* administrator
57+
* Vulnerabilities and Exploits
58+
* CVE-2021-1234 (ref:)
59+
* EDB-ID-56789
60+
* cyberphor POC
61+
* Metasploit
62+
* Tools Used
63+
* Nmap
64+
* Flag
65+
* ???
66+
* Hints
67+
* n/a
68+
69+
# Enumerate
70+
## Setup
71+
```bash
72+
TARGET=10.11.12.13
73+
NAME=demo
74+
new-ctf $NAME
75+
cd $NAME
76+
```
77+
78+
## Ports
79+
```bash
80+
sudo nmap $TARGET -sS -sU --min-rate 1000 -oN scans/$NAME-nmap-initial
81+
sudo nmap $TARGET -sS -sU -p- --min-rate 1000 -oN scans/$NAME-nmap-complete
82+
sudo nmap $TARGET -sV $(print-open-ports-from-nmap-scan scans/$NAME-nmap-complete) -oN scans/$NAME-nmap-versions
83+
84+
# output
85+
NSTR
86+
```
87+
88+
## Services
89+
### FTP
90+
```bash
91+
cd loot
92+
touch README.too # create a file
93+
ftp $TARGET 21 # login using anonymous:anonymous
94+
put README.too # upload file created above (i.e. check if we have write privileges)
95+
ls
96+
binary
97+
get file.txt # download a file (i.e. check if we have read privileges)
98+
mget * # download everything
99+
exit
100+
```
101+
102+
### SSH
103+
```bash
104+
???
105+
```
106+
107+
### SMTP
108+
Automated enumeration of supported SMTP commands.
109+
```bash
110+
sudo nmap $TARGET -p25 --script smtp-commands -oN scans/$NAME-nmap-script-smtp-commands
111+
```
112+
113+
Automated enumeration of existing SMTP users.
114+
```bash
115+
sudo nmap $TARGET -p25 --script smtp-enum-users --script-args smtp-enum-users.methods={VRFY,EXPN,RCPT} -oN scans/$NAME-nmap-script-smtp-enum-users
116+
```
117+
```bash
118+
smtp-user-enum -M VRFY -U /usr/share/wordlists/metasploit/unix_users.txt -t $TARGET
119+
```
120+
121+
Automated enumeration of exploitable SMTP vulnerabilities.
122+
```bash
123+
sudo nmap $TARGET -p25 --script smtp-vuln* -oN scans/mailman-nmap-script-smtp-vuln
124+
```
125+
126+
## DNS
127+
```bash
128+
???
129+
```
130+
131+
### HTTP
132+
```bash
133+
dirsearch -u $TARGET:$PORT -o $FULLPATH/$NAME-dirsearch --format=simple
134+
dirsearch -u $TARGET:$PORT -e php -o $FULLPATH/$NAME-dirsearch-php --format=simple
135+
136+
# output
137+
NSTR
138+
```
139+
```bash
140+
dirb http://$TARGET -r -z10 -o scans/$NAME-dirb-common
141+
142+
# output
143+
NSTR
144+
```
145+
```bash
146+
nikto -h $TARGET -p $PORT -T 2 -Format txt -o scans/$NAME-nikto-misconfig
147+
148+
# output
149+
NSTR
150+
```
151+
```bash
152+
sudo nmap $TARGET -p80 --script http-shellshock -oN scans/$NAME-nmap-script-http-shellshock
153+
154+
# output
155+
NSTR
156+
```
157+
158+
### RPC
159+
```bash
160+
rpcclient -U '' $TARGET
161+
162+
# output
163+
NSTR
164+
```
165+
166+
### NetBIOS
167+
```bash
168+
nbtscan $TARGET
169+
170+
# output
171+
NSTR
172+
```
173+
174+
### SMB
175+
```bash
176+
smbclient -L $TARGET
177+
178+
# output
179+
NSTR
180+
```
181+
```bash
182+
smbmap -H $TARGET
183+
184+
# output
185+
NSTR
186+
```
187+
```bash
188+
# check if vulnerable to EternalBlue
189+
sudo nmap $TARGET -p445 --script smb-vuln-ms17-010 -oN scans/$NAME-nmap-scripts-smb-vuln-ms17-010
190+
191+
# output
192+
NSTR
193+
```
194+
```bash
195+
# check if vulnerable to SambaCry
196+
sudo nmap $TARGET -p445 --script smb-vuln-cve-2017-7494 --script-args smb-vuln-cve-2017-7494.check-version -oN scans/$NAME-nmap-smb-vuln-cve-2017-7494
197+
198+
# output
199+
NSTR
200+
```
201+
202+
### SQL
203+
```bash
204+
mysql -u $USER -h $TARGET
205+
206+
# output
207+
NSTR
208+
```
209+
210+
### RDP
211+
```bash
212+
sudo nmap $TARGET -p3389 --script rdp-ntlm-info -oN scans/$NAME-nmap-script-rdp-ntlm-info
213+
214+
# output
215+
NSTR
216+
```
217+
```bash
218+
rdesktop -u administrator $TARGET
219+
```
220+
221+
## OS
222+
### Nmap OS Discovery Scan
223+
```bash
224+
sudo nmap $TARGET -O -oN scans/$NAME-nmap-os
225+
226+
# output
227+
NSTR
228+
```
229+
230+
### Nmap OS Discovery Scan via SMB
231+
```bash
232+
sudo nmap $TARGET -p445 --script smb-os-discovery -oN scans/$NAME-nmap-os-smb
233+
234+
# output
235+
NSTR
236+
```
237+
238+
# Exploit
239+
## Password Guessing
240+
### Default Credentials
241+
```bash
242+
# CMS Web App 9000
243+
# admin:admin
244+
```
245+
246+
### Hydra
247+
```bash
248+
hydra -l root -P /usr/share/wordlists/rockyou.txt $TARGET http-post-form "/phpmyadmin/index.php?:pma_username=^USER^&pma_password=^PASS^:Cannot|without"
249+
250+
# output
251+
NSTR
252+
```
253+
254+
## CVE-2021-1234
255+
### EDB-ID-56789
256+
```bash
257+
searchsploit foo
258+
mkdir edb-id-56789
259+
cd edb-id-56789
260+
searchsploit -x 56789
261+
```
262+
263+
### cyberphor POC
264+
```bash
265+
git clone https://github.com/cyberphor/cve-2021-1234-poc.git
266+
cd cve-2021-56789-poc
267+
```
268+
269+
### Metasploit
270+
```bash
271+
msfconsole
272+
search ???
273+
use exploit/???/???
274+
set LHOST tun0
275+
set RHOST $TARGET
276+
run
277+
```
278+
279+
# Explore
280+
NSTR
281+
282+
# Escalate
283+
NSTR
284+
285+
# Lessons Learned
286+
* Birds are not real.

0 commit comments

Comments
 (0)