21/tcp open ftp
22/tcp open ssh
80/tcp open http
111/tcp open rpcbind
139/tcp open netbios-ssn
445/tcp open microsoft-ds
2049/tcp open nfs
nmap -p- -Pn -T4 -A IP:
Starting Nmap 7.95 ( https://nmap.org ) at 2025-04-11 10:04 EDTNmap scan report for 10.10.147.243Host is up (0.22s latency).Not shown: 65524 closed tcp ports (reset)PORT STATE SERVICE VERSION21/tcp open ftp ProFTPD 1.3.522/tcp open ssh OpenSSH 7.2p2 Ubuntu 4ubuntu2.7 (Ubuntu Linux; protocol 2.0)| ssh-hostkey:| 2048 b3:ad:83:41:49:e9:5d:16:8d:3b:0f:05:7b:e2:c0:ae (RSA)| 256 f8:27:7d:64:29:97:e6:f8:65:54:65:22:f7:c8:1d:8a (ECDSA)|_ 256 5a:06:ed:eb:b6:56:7e:4c:01:dd:ea:bc:ba:fa:33:79 (ED25519)80/tcp open http Apache httpd 2.4.18 ((Ubuntu))| http-robots.txt: 1 disallowed entry|_/admin.html|_http-title: Site doesn't have a title (text/html).|_http-server-header: Apache/2.4.18 (Ubuntu)111/tcp open rpcbind 2-4 (RPC #100000)| rpcinfo: | program version port/proto service| 100000 2,3,4 111/tcp rpcbind| 100000 2,3,4 111/udp rpcbind| 100000 3,4 111/tcp6 rpcbind| 100000 3,4 111/udp6 rpcbind| 100003 2,3,4 2049/tcp nfs| 100003 2,3,4 2049/tcp6 nfs| 100003 2,3,4 2049/udp nfs| 100003 2,3,4 2049/udp6 nfs| 100005 1,2,3 47287/tcp6 mountd| 100005 1,2,3 52055/udp mountd| 100005 1,2,3 52478/udp6 mountd| 100005 1,2,3 59225/tcp mountd| 100021 1,3,4 34965/tcp nlockmgr| 100021 1,3,4 38076/udp nlockmgr| 100021 1,3,4 43356/udp6 nlockmgr| 100021 1,3,4 43659/tcp6 nlockmgr| 100227 2,3 2049/tcp nfs_acl| 100227 2,3 2049/tcp6 nfs_acl| 100227 2,3 2049/udp nfs_acl|_ 100227 2,3 2049/udp6 nfs_acl139/tcp open netbios-ssn Samba smbd 3.X - 4.X (workgroup: WORKGROUP)445/tcp open netbios-ssn Samba smbd 4.3.11-Ubuntu (workgroup: WORKGROUP)2049/tcp open nfs 2-4 (RPC #100003)34965/tcp open nlockmgr 1-4 (RPC #100021)35355/tcp open mountd 1-3 (RPC #100005)36423/tcp open mountd 1-3 (RPC #100005)59225/tcp open mountd 1-3 (RPC #100005)Device type: general purposeRunning: Linux 4.XOS CPE: cpe:/o:linux:linux_kernel:4.4OS details: Linux 4.4Network Distance: 2 hopsService Info: Host: KENOBI; OSs: Unix, Linux; CPE: cpe:/o:linux:linux_kernelHost script results:| smb-security-mode: | account_used: guest| authentication_level: user| challenge_response: supported|_ message_signing: disabled (dangerous, but default)| smb2-time: | date: 2025-04-11T14:26:14|_ start_date: N/A|_nbstat: NetBIOS name: KENOBI, NetBIOS user: <unknown>, NetBIOS MAC: <unknown> (unknown)| smb2-security-mode: | 3:1:1: |_ Message signing enabled but not required|_clock-skew: mean: 1h40m00s, deviation: 2h53m13s, median: 0s| smb-os-discovery: | OS: Windows 6.1 (Samba 4.3.11-Ubuntu)| Computer name: kenobi| NetBIOS computer name: KENOBI\x00| Domain name: \x00| FQDN: kenobi|_ System time: 2025-04-11T09:26:14-05:00TRACEROUTE (using port 1723/tcp)HOP RTT ADDRESS1 214.12 ms 10.21.0.12 214.11 ms 10.10.147.243OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .Nmap done: 1 IP address (1 host up) scanned in 1334.73 seconds
http enum:
nothing showed up. got a directory from directory busting but it was a trap lol
ftp enum 1:
ftp anon login didnt work
got the version tho. has a vulnerability where it lets you copy files from any destination to any other destination within the server without needing to be authenticated. this can be done by running SITE CPFR path and then SITE CPTO path
yup its there. lets make some dummy binaries at /tmp and echo /bin/bash -ip in em and give em 777 perms
lets run menu now
yup got root
why: menu has its SUID set for root so any command menu itself runs gets ran as root as well. and since it runs ifconfig,curl and uname as root but doesnt seem to have the actual binary locations set up. the first match the system finds in any of the locations in the PATH system variable is the one that gets run as root. and we modified the PATH variable and added the /tmp directory there so the /tmp directory is the first location the system checks for those binaries when menu tries to use them. and since we made dummy binaries with the same name in /tmp, the system runs them as root through menu. and because all the dummy files just have the command /bin/bash -ip in them and nothing else, thats what actually gets ran and gives us a partial root bash shell (we can priv esc to full root just by running sudo su in this case).