HTB Travel
10.10.10.189 | 40 pts | Synack Track
PART 1 : INITIAL ENUMERATION
1.1 nmap
$ nmap --min-rate 3000 -oN nmap-tcp.initial -p- -v 10.10.10.189
PORT STATE SERVICE
22/tcp open ssh
80/tcp open http
443/tcp open https
$ nmap -oN nmap-tcp -p 22,80,443 -sC -sV -v 10.10.10.189
PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 8.2p1 Ubuntu 4 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey:
| 3072 d3:9f:31:95:7e:5e:11:45:a2:b4:b6:34:c0:2d:2d:bc (RSA)
| 256 ef:3f:44:21:46:8d:eb:6c:39:9c:78:4f:50:b3:f3:6b (ECDSA)
|_ 256 3a:01:bc:f8:57:f5:27:a1:68:1d:6a:3d:4e:bc:21:1b (ED25519)
80/tcp open http nginx 1.17.6
| http-methods:
|_ Supported Methods: GET HEAD
|_http-server-header: nginx/1.17.6
|_http-title: Travel.HTB
443/tcp open ssl/http nginx 1.17.6
| http-methods:
|_ Supported Methods: GET HEAD
|_http-server-header: nginx/1.17.6
|_http-title: Travel.HTB - SSL coming soon.
| ssl-cert: Subject: commonName=www.travel.htb/organizationName=Travel.HTB/countryName=UK
| Subject Alternative Name: DNS:www.travel.htb, DNS:blog.travel.htb, DNS:blog-dev.travel.htb
| Issuer: commonName=www.travel.htb/organizationName=Travel.HTB/countryName=UK
| Public Key type: rsa
| Public Key bits: 2048
| Signature Algorithm: sha256WithRSAEncryption
| Not valid before: 2020-04-23T19:24:29
| Not valid after: 2030-04-21T19:24:29
| MD5: ef0a a4c1 fbad 1ac4 d160 58e3 beac 9698
|_SHA-1: 0170 7c30 db3e 2a93 cda7 7bbe 8a8b 7777 5bcd 0498
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernelPART 2 : PORT ENUMERATION
2.1 TCP PORT 80 : HTTP
2.1.1 http[://]travel.htb

2.1.2 http[://]blog.travel.htb

2.1.3 http[://]blog-dev.travel.htb

2.2 TCP PORT 443 : HTTPS

PART 3 : EXPLOITATION
3.1 The RSS Feed
3.1.1 RSS in blog.travel.htb:


3.1.3 Review of rss_template.php:

3.2 RFI in get_feed()
3.3 Interaction with memcache
3.3.1 How data is saved to memcache
3.3.2 Review of debug.php
3.4 Input Sanitation Check
3.4.1 Review of template.php
3.4.2 The location of __DIR__.'/logs'
__DIR__.'/logs'3.5 SSRF in RSS Feed
3.5.1 Leverage the TemplateHelper class
3.5.2 Using Gopherus to Generate Payload:
3.5.3 Bypassing the security check in template.php
3.5.4 Writing the gopher payload to cache
3.5.5 How data is loaded from the cache
3.5.6 Deserializing the right way
3.5.7 The Uploaded Webshell
PART 4 : www-data -> lynik-admin
4.1 Machine Enumeration
4.1.1 Host Information
4.1.2 Database Information
4.1.3 Search for a Valid User
4.2 Cracking the Hashes
4.3 SSH as lynik-admin
PART 5 : lynik-admin -> brian
5.1 Machine Enumeration
5.1.1 Host information
5.1.2 User Directory Enumeration
5.2 LDAP Enumeration
5.2.1 ldapsearch
5.2.2 ldapmodify
PART 6 : PRIVESC (brian -> root)
PART 7 : REFERENCES
Last updated