Lame
先扫一下
sudo nmap -sS -sV 10.10.10.3
PORT STATE SERVICE VERSION
21/tcp open ftp vsftpd 2.3.4
22/tcp open ssh OpenSSH 4.7p1 Debian 8ubuntu1 (protocol 2.0)
139/tcp open netbios-ssn Samba smbd 3.X - 4.X (workgroup: WORKGROUP)
445/tcp open netbios-ssn Samba smbd 3.X - 4.X (workgroup: WORKGROUP)
Service Info: OSs: Unix, Linux; CPE: cpe:/o:linux:linux_kernel
扫出了4个端口,先去看一下21端口,允许匿名登录但是这个ftp好像没有文件
ssh没有key和账密也没啥好利用的,那就看一下剩下的这个Samba吧。
Google了一下
This program is part of the samba(7) suite. smbd is the server daemon that provides filesharing and printing services to Windows clients. The server provides filespace and printer services to clients using the SMB (or CIFS) protocol.
可以得知使用的SMB协议那就可以用smbclient连一下
└─$ smbclient -L 10.10.10.3 -N
Anonymous login successful
Sharename Type Comment
--------- ---- -------
print$ Disk Printer Drivers
tmp Disk oh noes!
opt Disk
IPC$ IPC IPC Service (lame server (Samba 3.0.20-Debian))
ADMIN$ IPC IPC Service (lame server (Samba 3.0.20-Debian))
进入tmp目录
└─$ smbclient \\\\10.10.10.3\\tmp -N
Anonymous login successful
Try "help" to get a list of possible commands.
smb: \> ls
. D 0 Fri Jun 17 07:35:36 2022
.. DR 0 Sat Oct 31 14:33:58 2020
5552.jsvc_up R 0 Fri Jun 17 07:12:43 2022
.ICE-unix DH 0 Fri Jun 17 07:11:41 2022
vmware-root DR 0 Fri Jun 17 07:12:07 2022
.X11-unix DH 0 Fri Jun 17 07:12:07 2022
.X0-lock HR 11 Fri Jun 17 07:12:07 2022
vgauthsvclog.txt.0 R 1600 Fri Jun 17 07:11:38 2022
下载了vgauthsvclog.txt.0看了一下没看出啥有用的,Google了解到这是VMware的一个守护进程。What does the VGAuthService.exe file do?
没找到啥利用的,通过查找wp发现用-p-还能扫出一个3632/tcp open distccd服务。所有有时候还是得全部扫一遍
搜索distccd(1)是debian中一个分布式C/C++编译服务,用于提高编译速度。搜漏洞是搜到了几个DistCC Vulnerability和 DistCC Daemon Command Execution - Rapid7
照着做都不行。将目光转回到Samba smbd
Samba “username map script” Command Execution照着做就行,然后find \ -name *flag*找不到,然后想到找用户cat /etc/passwd有个叫makis的用户进到makis的目录找到了flag。
makis:x:1003:1003::/home/makis:/bin/sh
然后Write-Up: Hack The Box: Beginner Track — Lame介绍了另一种不借助msf的方法。
|