HTB WP -Dancing

task1:

1
2
What does the 3-letter acronym SMB stand for?
SMB这三个字母的缩写代表什么?

回答:

1
2
Server Message Block
服务器消息块,是一种网络文件共享协议。

task2:

1
2
What port does SMB use to operate at?
SMB协议使用哪个端口运行?

回答:

1
445

task3:

1
2
What is the service name for port 445 that came up in our Nmap scan?
我们在 Nmap 扫描中发现的 445 端口的服务名称是什么?

回答:

nmap扫一下:

1
nmap -sV 10.129.90.154

扫出来几个端口,其中445端口的服务名称是

1
microsoft-ds

这就是答案(注意那个问号其实是后面version对应的只不过因为缩进跑到前面来了)

task4:

1
2
What is the 'flag' or 'switch' that we can use with the smbclient utility to 'list' the available SMB shares on Dancing?
我们可以使用 smbclient 工具的哪个“标志”或“开关”来“列出”Dancing 上可用的 SMB 共享?

回答:

1
-L

task5:

1
2
How many shares are there on Dancing?
Dancing 这台机器上有多少个 SMB 共享资源(shares)

回答:

这就需要使用 smbclient 工具:

1
smbclient -L //10.129.90.154/ -N
1
2
-L   列出目标机器的共享列表
-N 不使用密码,匿名登录

可以看到有四个:

1
4

task6:

1
2
What is the name of the share we are able to access in the end with a blank password?
最后,我们不用密码就能访问哪个共享文件夹?

回答:

1
WorkShares

task7:

1
2
What is the command we can use within the SMB shell to download the files we find?
在 SMB shell 中,我们可以使用什么命令来下载找到的文件?

回答:

1
get

这和ftp是一样的。

task8:

1
Submit the flag located on the SMB share.

前面提到

1
smbclient -L //10.129.90.154/ -N

这个命令,套个路径就行了,然后-L是列出机器共享列表的,这里不需要。所以命令就是:

1
smbclient //10.129.90.154/Workshares -N

OK,登录上了。看看文件目录:

1
ls

两个文件夹,进去看看:

1
2
3
cd Amy.J
ls
get worknotes.txt

这里不是flag的地方,看看另一个,先退出来:

1
2
cd \
或者cd ..

然后如法炮制:

1
2
3
cd James.P
ls
get flag.txt

得到flag: