首先把靶机换成NAT模式
![](https://i-blog.csdnimg.cn/img_convert/10ba1b7bfdd9330898bdf73ae05cbffc.png)
使用 arp-scan 命令扫描网段内存活的主机,以获取靶机ip地址
arp-scn -l
![](https://i-blog.csdnimg.cn/img_convert/a7c66d07192acc4201ef04b21ec7ba28.png)
尝试访问ip
![](https://i-blog.csdnimg.cn/img_convert/4bd04bd58ded569849d5d33e53f7f16e.png)
使用御剑扫描子域名,尝试访问robots.txt文件
![](https://i-blog.csdnimg.cn/img_convert/3e43949de88d6355b271ff2f21382e23.png)
![](https://i-blog.csdnimg.cn/img_convert/e10f80a6ced9894c4bc9c54216ecfea1.png)
通过访问文件我们发现了一个/textpattern/textpattern目录
访问一下目录发现了登录页面
![](https://i-blog.csdnimg.cn/img_convert/817d1fc126243be5525f7e3659527958.png)
他还给了一个提示 :别忘了加上,zip扩展到你的dir brute
尝试爆破一下目录
python3 dirsearch.py -u http://192.168.19.134/ -e php -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -t 20
提示没有安装dirsearch,使用命令安装一下
apt install dirsearch
![](https://i-blog.csdnimg.cn/img_convert/aa2b985fc479ef6a990d7f63be8dd41d.png)
下载完进入dirsearch
cd dirsearch
![](https://i-blog.csdnimg.cn/img_convert/289186b1092a6f159292e98ee625e899.png)
再次输入命令,开始爆破
python3 dirsearch.py -u http://192.168.19.134/ -e php -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -t 20
![](https://i-blog.csdnimg.cn/img_convert/e454f74aa080cfc47f7460ed8acf9eee.png)
爆破完成
输入spammer.zip
![](https://i-blog.csdnimg.cn/img_convert/b8e6c7ed79f2378c6a69602f0acb3708.png)
解压一下,发现需要密码
![](https://i-blog.csdnimg.cn/img_convert/9d37776f4d94cfe331d0afab6b3e9f98.png)
使用john暴力破解zip文件
zip2join spammer.zip > possword.txt
john possword.txt
![](https://i-blog.csdnimg.cn/img_convert/08745f532da637fefe5c9a24d7969bf6.png)
找到了密码: myspace4
解压一下
unzip spammer.zip
![](https://i-blog.csdnimg.cn/img_convert/cd9d858fa471f19621b92ef03d4a1632.png)
找到了账号密码,尝试登录一下
账号:mayer ,密码:lionheart
![](https://i-blog.csdnimg.cn/img_convert/d9c6215da6f4bd9c0f34cb55925189b0.png)
登录后台之后我们要上传shell,发现了Files 模块可以进行上传。
![](https://i-blog.csdnimg.cn/img_convert/a4fb2646fb9043602535e89f2e60d85b.png)
上传一个一句话木马文件1.php
![](https://i-blog.csdnimg.cn/img_convert/9b5f0543ee391e2541ee8eec14497749.png)
成功上传后,没有显示路径,在管理界面找到了上传文件的路径
![](https://i-blog.csdnimg.cn/img_convert/4c0d226c12345b6e283220f7bca0e940.png)
http://192.168.19.134/textpattern/files/1.php
![](https://i-blog.csdnimg.cn/img_convert/3f8f37ad47726959552fa1eb35a4e531.png)
使用蚁剑连一下
![](https://i-blog.csdnimg.cn/img_convert/efc1d41b08cfc42a88ee0eea83b10012.png)
![](https://i-blog.csdnimg.cn/img_convert/b89e4bf3a44476e5451b5ae513850414.png)