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
/mnt/kenobiâââ backupsâ  âââ apt.extended_states.0âââ cacheâ  âââ apache2â  â  âââ mod_cache_diskâ  âââ apparmorâ  âââ aptâ  â  âââ archivesâ  â  âââ pkgcache.binâ  â  âââ srcpkgcache.binâ  âââ debconfâ  â  âââ config.datâ  â  âââ config.dat-oldâ  â  âââ passwords.datâ  â  âââ templates.datâ  â  âââ templates.dat-oldâ  âââ ldconfig [error opening dir]â  âââ sambaâ  â  âââ browse.datâ  â  âââ gencache.tdbâ  â  âââ printingâ  âââ snapdâ  âââ commands.dbâ  âââ namesâ  âââ sectionsâââ crashâââ libâ  âââ apache2â  â  âââ confâ  â  âââ moduleâ  â  âââ siteâ  âââ apparmorâ  â  âââ profilesâ  âââ aptâ  â  âââ cdroms.listâ  â  âââ cdroms.list~â  â  âââ daily_lockâ  â  âââ extended_statesâ  â  âââ keyringsâ  â  âââ listsâ  â  âââ mirrorsâ  â  âââ periodicâ  âââ dbusâ  â  âââ machine-idâ  âââ dhcpâ  â  âââ dhclient.enp0s3.leasesâ  â  âââ dhclient.eth0.leasesâ  âââ dpkgâ  â  âââ alternativesâ  â  âââ archâ  â  âââ availableâ  â  âââ cmethoptâ  â  âââ diversionsâ  â  âââ diversions-oldâ  â  âââ infoâ  â  âââ lockâ  â  âââ lock-frontendâ  â  âââ partsâ  â  âââ statoverrideâ  â  âââ statoverride-oldâ  â  âââ statusâ  â  âââ status-oldâ  â  âââ triggersâ  â  âââ updatesâ  âââ gitâ  âââ initramfs-toolsâ  â  âââ 4.4.0-142-genericâ  â  âââ 4.8.0-58-genericâ  âââ initscriptsâ  âââ insservâ  âââ localesâ  â  âââ supported.dâ  âââ logrotateâ  âââ lxcfsâ  âââ lxdâ  â  âââ unix.socketâ  âââ mdadmâ  â  âââ mdadm.conf-generatedâ  âââ miscâ  âââ nfsâ  â  âââ etabâ  â  âââ export-lockâ  â  âââ rmtabâ  â  âââ smâ  â  âââ sm.bakâ  â  âââ stateâ  â  âââ v4recoveryâ  â  âââ xtabâ  âââ os-proberâ  âââ pamâ  â  âââ accountâ  â  âââ authâ  â  âââ passwordâ  â  âââ seenâ  â  âââ sessionâ  â  âââ session-noninteractiveâ  âââ plymouthâ  âââ polkit-1 [error opening dir]â  âââ pythonâ  â  âââ python3.5_installedâ  âââ resolvconfâ  â  âââ linkifiedâ  âââ sambaâ  â  âââ account_policy.tdbâ  â  âââ group_mapping.tdbâ  â  âââ printersâ  â  âââ privateâ  â  âââ registry.tdbâ  â  âââ share_info.tdbâ  â  âââ usersharesâ  âââ sgml-baseâ  â  âââ supercatalogâ  â  âââ supercatalog.oldâ  âââ snapdâ  â  âââ apparmorâ  â  âââ assertionsâ  â  âââ auto-importâ  â  âââ cookieâ  â  âââ desktopâ  â  âââ deviceâ  â  âââ environmentâ  â  âââ firstbootâ  â  âââ libâ  â  âââ snapsâ  â  âââ state.jsonâ  â  âââ system-keyâ  â  âââ voidâ  âââ sudoâ  â  âââ lecturedâ  âââ systemdâ  â  âââ catalogâ  â  âââ clockâ  â  âââ coredumpâ  â  âââ deb-systemd-helper-enabledâ  â  âââ random-seedâ  â  âââ timersâ  âââ ubuntu-release-upgraderâ  â  âââ release-upgrade-availableâ  âââ ucfâ  â  âââ cacheâ  â  âââ hashfileâ  â  âââ hashfile.0â  â  âââ hashfile.1â  â  âââ hashfile.2â  â  âââ hashfile.3â  â  âââ hashfile.4â  â  âââ hashfile.5â  â  âââ hashfile.6â  â  âââ hashfile.7â  â  âââ registryâ  â  âââ registry.0â  â  âââ registry.1â  â  âââ registry.2â  â  âââ registry.3â  â  âââ registry.4â  âââ update-managerâ  â  âââ meta-release-ltsâ  âââ update-notifierâ  â  âââ dpkg-run-stampâ  â  âââ fsck-at-rebootâ  â  âââ package-data-downloadsâ  â  âââ updates-availableâ  â  âââ user.dâ  âââ update-rc.dâ  âââ urandomâ  â  âââ random-seedâ  âââ ureadaheadâ  â  âââ debugfsâ  âââ usbutilsâ  â  âââ usb.idsâ  âââ vimâ  â  âââ addonsâ  âââ xml-coreâ  âââ catalogâ  âââ xml-coreâââ localâââ lock -> /run/lockâââ logâ  âââ alternatives.logâ  âââ apache2 [error opening dir]â  âââ aptâ  â  âââ history.logâ  â  âââ term.logâ  âââ auth.logâ  âââ bootstrap.logâ  âââ btmpâ  âââ dist-upgradeâ  âââ dmesgâ  âââ dpkg.logâ  âââ faillogâ  âââ fsckâ  â  âââ checkfsâ  â  âââ checkrootâ  âââ installerâ  â  âââ cdebconfâ  â  âââ hardware-summaryâ  â  âââ initial-status.gzâ  â  âââ lsb-releaseâ  â  âââ media-infoâ  â  âââ partmanâ  â  âââ statusâ  â  âââ syslogâ  âââ kern.logâ  âââ lastlogâ  âââ lxdâ  âââ samba [error opening dir]â  âââ syslogâ  âââ unattended-upgrades [error opening dir]â  âââ wtmpâââ mailâââ optâââ run -> /runâââ snapâââ spoolâ  âââ cronâ  â  âââ atjobsâ  â  âââ atspoolâ  â  âââ crontabsâ  âââ mail -> ../mailâ  âââ rsyslog [error opening dir]â  âââ sambaâââ tmpâ  âââ systemd-private-2408059707bc41329243d2fc9e613f1e-systemd-timesyncd.service-a5PktM [error opening dir]â  âââ systemd-private-6f4acd341c0b40569c92cee906c3edc9-systemd-timesyncd.service-z5o4Aw [error opening dir]â  âââ systemd-private-7c89902dad6a49058ad209f2e37f5eab-systemd-timesyncd.service-5wgQt4 [error opening dir]â  âââ systemd-private-e69bbb0653ce4ee3bd9ae0d93d2a5806-systemd-timesyncd.service-zObUdn [error opening dir]âââ www âââ html âââ admin.html âââ image.gif âââ image.jpg âââ index.html âââ robots.txt
lots of stuff. but i wanna get my hands on that id_rsa real quick first
moved it into /var/tmp with the vulnerability and copied it into my system. lets see if i can login with this or if it asks for a passphrase
yaaay got in as kenobi. lets priv esc
got user.txt:
d0b0f3f53b6caa532a83915e19224899
didnt find anything else that was interesting, dont know the actual creds for kenobi either. found these bins with their SUID set:
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).