Starting Nmap 7.95 ( https://nmap.org ) at 2025-04-15 11:15 EDTNmap scan report for 10.10.18.117Host is up (0.19s latency).Not shown: 997 closed tcp ports (reset)PORT STATE SERVICE VERSION21/tcp open ftp vsftpd 3.0.322/tcp open ssh OpenSSH 7.2p2 Ubuntu 4ubuntu2.10 (Ubuntu Linux; protocol 2.0)80/tcp open http Apache httpd 2.4.18 ((Ubuntu))Device type: general purposeRunning: Linux 4.XOS CPE: cpe:/o:linux:linux_kernel:4.4OS details: Linux 4.4Network Distance: 2 hopsService Info: OSs: Unix, Linux; CPE: cpe:/o:linux:linux_kernelOS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .Nmap done: 1 IP address (1 host up) scanned in 54.77 seconds
Ascan.txt:
Starting Nmap 7.95 ( https://nmap.org ) at 2025-04-15 11:21 EDTWarning: 10.10.18.117 giving up on port because retransmission cap hit (6).Nmap scan report for 10.10.18.117Host is up (0.18s latency).Not shown: 65532 closed tcp ports (reset)PORT STATE SERVICE VERSION21/tcp open ftp vsftpd 3.0.3| ftp-anon: Anonymous FTP login allowed (FTP code 230)| drwxrwxrwx 2 65534 65534 4096 Nov 12 2020 ftp [NSE: writeable]| -rw-r--r-- 1 0 0 251631 Nov 12 2020 important.jpg|_-rw-r--r-- 1 0 0 208 Nov 12 2020 notice.txt| ftp-syst:| STAT:| FTP server status:| Connected to 10.21.154.145| Logged in as ftp| TYPE: ASCII| No session bandwidth limit| Session timeout in seconds is 300| Control connection is plain text| Data connections will be plain text| At session startup, client count was 16| vsFTPd 3.0.3 - secure, fast, stable|_End of status22/tcp open tcpwrapped| ssh-hostkey:| 2048 b9:a6:0b:84:1d:22:01:a4:01:30:48:43:61:2b:ab:94 (RSA)|_ 256 ec:13:25:8c:18:20:36:e6:ce:91:0e:16:26:eb:a2:be (ECDSA)80/tcp open http Apache httpd 2.4.18 ((Ubuntu))|_http-title: Maintenance|_http-server-header: Apache/2.4.18 (Ubuntu)Device type: general purposeRunning: Linux 4.XOS CPE: cpe:/o:linux:linux_kernel:4.4OS details: Linux 4.4Network Distance: 2 hopsService Info: OS: UnixTRACEROUTE (using port 3389/tcp)HOP RTT ADDRESS1 177.86 ms 10.21.0.12 177.91 ms 10.10.18.117OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .Nmap done: 1 IP address (1 host up) scanned in 1166.51 seconds
ftp enum:
logged in as anonymous and found a directory and 2 files
drwxrwxrwx 2 65534 65534 4096 Nov 12 2020 ftp-rw-r--r-- 1 0 0 251631 Nov 12 2020 important.jpg-rw-r--r-- 1 0 0 208 Nov 12 2020 notice.txt
the ftp directory has nothing in it/doesnt show anything in it
important.jpg:
notice.txt:
Whoever is leaving these damn Among Us memes in this share, it IS NOT FUNNY. People downloading documents from our website will think we are a joke! Now I dont know who it is, but Maya is looking pretty sus.
possible uname found:
Maya
gonna run two bruteforces against ftp and ssh and see if we get anything while i enumerate http
http enum:
root source:
<!doctype html><title>Maintenance</title><style> body { text-align: center; padding: 150px; } h1 { font-size: 50px; } body { font: 20px Helvetica, sans-serif; color: #333; } article { display: block; text-align: left; width: 650px; margin: 0 auto; } a { color: #dc8100; text-decoration: none; } a:hover { color: #333; text-decoration: none; }</style><article> <h1>No spice here!</h1> <div> <!--when are we gonna update this??--> <p>Please excuse us as we develop our site. We want to make it the most stylish and convienient way to buy peppers. Plus, we need a web developer. BTW if you're a web developer, <a href="mailto:#">contact us.</a> Otherwise, don't you worry. We'll be online shortly!</p> <p>— Dev Team</p> </div></article>
we dont have any perms for planner.sh although that doesnt matter at this point
priv esc to root
SOOOOOOOOOOOOOOOOO we got a file we have full access to that gets ran as root every one minutes
i just echo’d /tmp/shell5.elf into /etc/print.sh (i created another payload called shell5.elfwith msfvenom and uploaded it at /tmp that listens on a different port than the one the current meterpreter session is using)
and then i ran another listener in metasploit that listens on that port
and one minute later we got rooooooooooooooooooooooottttttttt