HTB Ellingson
10.10.10.139 | 40 pts
PART 1 : INITIAL RECON
1.1 NMAP SCAN
$ nmap --min-rate 15000 -p- -v 10.10.10.139
PORT STATE SERVICE
22/tcp open ssh
80/tcp open http
$ nmap -p 22,80 -sC -sV -T4 10.10.10.139
PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 7.6p1 Ubuntu 4 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey:
| 2048 49:e8:f1:2a:80:62:de:7e:02:40:a1:f4:30:d2:88:a6 (RSA)
| 256 c8:02:cf:a0:f2:d8:5d:4f:7d:c7:66:0b:4d:5d:0b:df (ECDSA)
|_ 256 a5:a9:95:f5:4a:f4:ae:f8:b6:37:92:b8:9a:2a:b4:66 (ED25519)
80/tcp open http nginx 1.14.0 (Ubuntu)
|_http-server-header: nginx/1.14.0 (Ubuntu)
| http-title: Ellingson Mineral Corp
|_Requested resource was http://10.10.10.139/index
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernelPART 2 : PORT ENUMERATION
2.1 TCP PORT 80


PART 3 : EXPLOITATION
3.1 WSGI DEBUGGER


PART 4 : GENERATE USER SHELL (hal)
4.1 Web Shell as hal
4.2 SSH as hal
PART 5 : hal -> margo
5.1 shadow.bak
5.2 su as margo
PART 6 : PRIVILEGE ESCALATION (margo -> root)
6.1 SUID Binaries
6.2 ltrace
6.3 Program Flow
6.4 auth() function
6.5 Finding the right offset
6.6 Leaking libc addresses
6.7 Write "/bin/sh" to .data
6.8 Calculating libc offsets
6.9 Putting everything together
PART 7 : REFERENCES
Last updated