nmap -sP 192.168.56.0/24 Starting Nmap 7.94SVN ( https://nmap.org ) at 2025-04-13 03:02 EDT Nmap scan report for 192.168.56.1 Host is up (0.00040s latency). MAC Address: 0A:00:27:00:00:09 (Unknown) Nmap scan report for 192.168.56.2 Host is up (0.00022s latency). MAC Address: 08:00:27:EA:BE:43 (Oracle VirtualBox virtual NIC) Nmap scan report for 192.168.56.42 Host is up (0.00032s latency). MAC Address: 08:00:27:53:2D:C6 (Oracle VirtualBox virtual NIC) Nmap scan report for 192.168.56.4 Host is up. Nmap done: 256 IP addresses (4 hosts up) scanned in 15.07 seconds
nmap -sT -min-rate 10000 -p- 192.168.56.42 Starting Nmap 7.94SVN ( https://nmap.org ) at 2025-04-13 03:08 EDT Nmap scan report for 192.168.56.42 Host is up (0.00042s latency). Not shown: 65522 closed tcp ports (conn-refused) PORT STATE SERVICE 22/tcp open ssh 80/tcp open http 7066/tcp open unknown 8237/tcp open unknown 9460/tcp open unknown 10825/tcp open unknown 11523/tcp open unknown 14055/tcp open unknown 15617/tcp open unknown 18585/tcp open unknown 20111/tcp open unknown 22005/tcp open optohost004 24745/tcp open unknown MAC Address: 08:00:27:53:2D:C6 (Oracle VirtualBox virtual NIC)
Nmap done: 1 IP address (1 host up) scanned in 10.77 seconds
nmap -sT -A -T4 -O -p 22,80 192.168.56.42 Starting Nmap 7.94SVN ( https://nmap.org ) at 2025-04-13 03:10 EDT Nmap scan report for 192.168.56.42 Host is up (0.00050s latency).
PORT STATE SERVICE VERSION 22/tcp open ssh OpenSSH 7.9p1 Debian 10+deb10u2 (protocol 2.0) | ssh-hostkey: | 2048 93:a4:92:55:72:2b:9b:4a:52:66:5c:af:a9:83:3c:fd (RSA) | 256 1e:a7:44:0b:2c:1b:0d:77:83:df:1d:9f:0e:30:08:4d (ECDSA) |_ 256 d0:fa:9d:76:77:42:6f:91:d3:bd:b5:44:72:a7:c9:71 (ED25519) 80/tcp open http Apache httpd 2.4.59 ((Debian)) |_http-title: Mindful Listening |_http-server-header: Apache/2.4.59 (Debian) MAC Address: 08:00:27:53:2D:C6 (Oracle VirtualBox virtual NIC) Warning: OSScan results may be unreliable because we could not find at least 1 open and 1 closed port Device type: general purpose Running: Linux 4.X|5.X OS CPE: cpe:/o:linux:linux_kernel:4 cpe:/o:linux:linux_kernel:5 OS details: Linux 4.15 - 5.8 Network Distance: 1 hop Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel
TRACEROUTE HOP RTT ADDRESS 1 0.50 ms 192.168.56.42
OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . Nmap done: 1 IP address (1 host up) scanned in 14.89 seconds
gobuster dir -u http://192.168.56.42 -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -b 404,403,502,429 --no-error =============================================================== Gobuster v3.6 by OJ Reeves (@TheColonial) & Christian Mehlmauer (@firefart) =============================================================== [+] Url: http://192.168.56.42 [+] Method: GET [+] Threads: 10 [+] Wordlist: /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt [+] Negative Status codes: 404,403,502,429 [+] User Agent: gobuster/3.6 [+] Timeout: 10s =============================================================== Starting gobuster in directory enumeration mode =============================================================== /tools (Status: 301) [Size: 314] [--> http://192.168.56.42/tools/] Progress: 220560 / 220561 (100.00%) =============================================================== Finished ===============================================================
扫描到 Tools文件夹,里面是常用(雾)的工具
没找到入口,仔细阅读主页上的文本:
The quieter you become,the more you are able to hear
在扫描一次端口,发现依旧存在只有22,80,7066
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
⚡ root@kali ~/Desktop/test/Todd nmap -sT -min-rate 10000 -p- 192.168.56.42 Starting Nmap 7.94SVN ( https://nmap.org ) at 2025-04-13 03:26 EDT Nmap scan report for 192.168.56.42 Host is up (0.0010s latency). Not shown: 65523 closed tcp ports (conn-refused) PORT STATE SERVICE 22/tcp open ssh 80/tcp open http 5182/tcp open unknown 5974/tcp open unknown 7066/tcp open unknown 12754/tcp open unknown 15375/tcp open unknown 20687/tcp open unknown 22952/tcp open unknown 25782/tcp open unknown 27457/tcp open unknown 29429/tcp open unknown MAC Address: 08:00:27:53:2D:C6 (Oracle VirtualBox virtual NIC)
for i in $(seq 10) do a=$((RANDOM)) sleep 0.2 create_ssh $a & done
查看一下sudo权限
1 2 3 4 5 6 7 8
$ sudo -l Matching Defaults entries for todd on todd: env_reset, mail_badpass, secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin
User todd may run the following commands on todd: (ALL : ALL) NOPASSWD: /bin/bash /srv/guess_and_check.sh (ALL : ALL) NOPASSWD: /usr/bin/rm (ALL : ALL) NOPASSWD: /usr/sbin/reboot