HTB WP -Crocodile

task1:

1
2
What Nmap scanning switch employs the use of default scripts during a scan?
哪一个 Nmap 扫描参数(开关)在扫描期间会使用默认脚本?

回答:

1
-sC 之前说过,它等同于 --script=default。在实际使用中,大家也经常把 -sC 和用于探测版本的 -sV 组合在一起,写作 -sCV

task2:

1
2
What service version is found to be running on port 21?
在 21 端口上发现了哪个正在运行的服务版本?

探测版本用-sV参数

1
nmap -sV 10.129.98.248 -p 21 

没有-p也是可以的,答案是:

1
vsftpd 3.0.3

task3:

1
2
What FTP code is returned to us for the "Anonymous FTP login allowed" message?
提示 “允许匿名 FTP 登录”(Anonymous FTP login allowed)时,返回给我们的 FTP 状态码是多少?

回答:

之前好像tier0就有一样的问题是230,这个你登录上ftp服务也能看到。

1
230

task4:

1
2
After connecting to the FTP server using the ftp client, what username do we provide when prompted to log in anonymously?
使用 FTP 客户端连接到 FTP 服务器后,当系统提示匿名登录时,我们需要提供什么用户名?

回答:

1
anonymous(tier0里面说过)

task5:

1
2
After connecting to the FTP server anonymously, what command can we use to download the files we find on the FTP server?
匿名连接到 FTP 服务器后,我们可以使用什么命令来下载在 FTP 服务器上找到的文件?

回答:

1
get(之前tier0也说过)

task6:

1
2
What is one of the higher-privilege sounding usernames in 'allowed.userlist' that we download from the FTP server?
在从 FTP 服务器下载的 “allowed.userlist” 文件中,听起来权限较高的用户名之一是什么?

这需要我们连上服务 看看了:

1
ftp 10.129.1.15(后面写wp的时候换靶机了)

用anonymous用户空密码登录,找到文件get下来。

听起来权限较高的,一看就是admin:

1
admin

task7:

1
2
What version of Apache HTTP Server is running on the target host?
目标主机上运行的是什么版本的 Apache HTTP 服务器?

针对的是主机,那就nmap扫一下有哪些端口:

1
nmap -sV 10.129.1.15   

可以看到80端口开了http服务,版本是:

1
Apache httpd 2.4.41 

task8:

1
2
What switch can we use with Gobuster to specify we are looking for specific filetypes?
在 Gobuster 中,我们可以使用什么参数(开关)来指定我们正在寻找特定的文件类型?

回答:

1
-x

task9:

1
2
Which PHP file can we identify with directory brute force that will provide the opportunity to authenticate to the web service?
通过目录暴力破解(directory brute force),我们可以识别出哪一个 PHP 文件,从而获得向 Web 服务进行身份验证(登录)的机会?

其实目录暴力破解可以用dirsearch:

1
dirsearch -u 10.129.1.15     

开扫:

身份验证登录是:

1
login.php

task10:

1
Submit the flag located in the webpage.

找flag,得先登进去,怎么登呢,我们注意到:

文件有userlist和他的password,都get下来:

admin对应的密码是rKXM59ESxesUFHAd

在浏览器里打开http://10.129.101.52/login.php(又换靶机了,嘿嘿)

把账号密码输进去,进到仪表盘,拿到flag:

flag:

1
c7110277ac44d78b6a9fff2232434d16