HTB Attended
10.10.10.221 | 50 pts
PART 1 : INITIAL RECON
1.1 NMAP SCAN
$ nmap --min-rate 3000 -oN nmap-tcp.initial -p- -Pn -T4 -v 10.10.10.221
PORT STATE SERVICE
22/tcp open ssh
25/tcp open smtp
$ nmap -oN nmap-tcp -p 22,25 -Pn -sC -sV -v 10.10.10.221
PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 8.0 (protocol 2.0)
| ssh-hostkey:
| 3072 4f:08:48:10:a2:89:3b:bd:4a:c6:81:03:cb:20:04:f5 (RSA)
| 256 1a:41:82:21:9f:07:9d:cd:61:97:e7:fe:96:3a:8f:b0 (ECDSA)
|_ 256 e0:6e:3d:52:ca:5a:7b:4a:11:cb:94:ef:af:49:07:aa (ED25519)
25/tcp open smtp
| fingerprint-strings:
| GenericLines, GetRequest:
| 220 proudly setup by guly for attended.htb ESMTP OpenSMTPD
| 5.5.1 Invalid command: Pipelining not supported
| Hello:
| 220 proudly setup by guly for attended.htb ESMTP OpenSMTPD
| 5.5.1 Invalid command: EHLO requires domain name
| Help:
| 220 proudly setup by guly for attended.htb ESMTP OpenSMTPD
| 214- This is OpenSMTPD
| 214- To report bugs in the implementation, please contact bugs@openbsd.org
| 214- with full details
| 2.0.0: End of HELP info
| NULL:
|_ 220 proudly setup by guly for attended.htb ESMTP OpenSMTPD
| smtp-commands: proudly setup by guly for attended.htb Hello nmap.scanme.org [10.10.14.28], pleased to meet you, 8BITMIME, ENHANCEDSTATUSCODES, SIZE 36700160, DSN, HELP,
|_ This is OpenSMTPD To report bugs in the implementation, please contact bugs@openbsd.org with full details 2.0.0: End of HELP infoPART 2 : PORT ENUMERATION
2.1 TCP PORT 22 : OpenSSH
2.2 TCP PORT 25 : SMTP
PART 3 : EXPLOITATION
3.1 VIM MODELINES
3.2 PAYLOAD CREATION
3.3 REMOTE CODE EXECUTION
PART 4 : USER SHELL (freshness)
4.1 SYSTEM ENUMERATION
4.2 .config.swp RESTORATION
PART 5 : EXPLOITING authkeys
5.1 ENUMERATING freshness
5.2 PERSONAL OpenBSD
5.3 BUFFER OVERFLOW
5.4 STARTING THE EXPLOIT
5.5 ROP GADGETS
5.6 CONTROLLING RAX
5.7 RDI, RSI, RDX CONTROL
5.8 ADDING SYSCALL
5.9 TESTING LOCALLY
PART 6 : PRIVESC (freshness -> root)
6.1 ATTENDED GATEWAY
6.2 FINAL EXPLOIT
PART 7 : REFERENCES
Last updated