2021年1月4日-Vulnhub-DerpNStink渗透学习
靶机地址:https://www.vulnhub.com/entry/derpnstink-1,221/
kali地址:192.168.31.77
靶机IP地址:192.168.31.31
开放21、22、80端口
访问主页,发现flag1和/webnotes/info.txt路径,老手法了。
更新dns解析,才能访问blog
修改 /etc/hosts 文件
尝试访问robots.txt, 这是每次都不能放过的文件
访问一下 这两个文件
使用dirb 对目录进行爆破
访问http://192.168.31.31/weblog/index.php
访问 http://192.168.31.31/weblog/wp-login.php, 需要用户名密码
使用 admin/admin 可以登录,但是权限有限
我们使用wpscan枚举插件,主题和用户。
wpscan --url 'http://derpnstink.local/weblog/' --api-token xxxxxxx
–api-token 需要自己在 https://wpscan.com/register 注册 后获取
使用metasploit利用该漏洞
获得shell
访问 wp-config.php, 获得root/mysql
访问http://192.168.31.31/php/phpmyadmin/ 使用root/mysql 登录
登录成功
获得 flag2
在wp_user表中发现两个用户
对unclestinky的密码用John进行爆破,得到wedgie57
用unclestinky登录,看到 flag2,之前已经发现过了的
在/home 目录下发现两个用户
使用ftp登录
使用 用户stinky,密码wedgie57可以登录成功。接着用ftp网页登录
发现 ssh的 txt文件,保存到本地
使用ssh登录
在 Desktop下 发现flag.txt ,获得flag3
Documents 下还有derpissues.pcap,将其下载到本地
接收端:
发送端:
使用wireshark 打开
耐心查找, 找到 用户 mrderp密码 derpderpderpderpderpderpderp
使用ssh登录
访问Desktop下的 helpdesk.log文件
访问 https://pastebin.com/RzK9WfGw
重新 sudo -l
创建 binaries 目录,写入二进制文件
将biu.sh 重命名为 derpy.sh 并执行,获得root权限