当前位置:网站首页>Hackmyvm target series (5) -warez
Hackmyvm target series (5) -warez
2022-07-06 13:58:00 【The moon should know my meaning】
One 、 information gathering
Scan a wave of network segment first , Find the target .
nmap -sP 192.168.220.0/24
Use nmap Port scan , Found open 22,80,6800 Three ports .
nmap -sC -sV -T4 -p- -sT -A 192.168.220.128
Visit a wave http service , The page is as follows . I don't know what it is , But found keywords Aria2 WebUI, Search on Baidu , I found that this is a thing to download resources .

Take a look at the source code , Find the following keywords , Search for a wave of , See if there are any loopholes that can be exploited .

forehead ....., Out of line , There is really no one .

Come on , On gobuster Do a wave of directory scanning
gobuster dir -u "http://192.168.220.128/" -w directory-list-2.3-medium.txt -t 30 -x php,html,txt,7z,zip,bak,gzgive the result as follows , Found two txt file ,robots.txt,result.txt

robots.txt The contents are as follows

result.txt The contents are as follows , Um. .... This thing doesn't look very familiar ? Don't worry , Look at the following

I am here kali On the implementation ps -aux, Combined with the above figure , See? , The above should be the process list . And it turns out that aria2c In order to carolina Identity running .

Notice the following arrows , This is a download tool , guess dir Is the default directory we download .

Click Add , Click the use link to download . Can we use kali Generate the key , Then open a http service , This enables the target machine to download to /home/carolina Under the directory ?

Two 、 Exploit
Use kali Generate the key
ssh-keygenUse python To start a http service
python3 -m http.server 80
Add download links and save directories

Here's the picture , Download successful

ssh [email protected] -i id_rsaSuccessfully log in to the target machine with the private key , Get the first one flag

3、 ... and 、 Elevated privileges
The next step is to raise the permission to root 了 .
Let's see if there is sudo The abuse of ,??? No order ?

Forget it , First let's see if we can suid and sgid Raise your rights .
find / -perm -u=s -type f 2>/dev/nullPictured , Find a /usr/bin/rtorrent, See if you can raise your rights

After Baidu , Found that this can be used execute.throw Execute some system commands , But use rtorrent The premise is that you need a configuration file .rtorrent.rc, So I'll use to create this file first , Then enter the following , establish /root/.ssh Catalog , And copy the public key to the directory .
because rtorrent Command has suid jurisdiction , So when other users execute the command, they can get root jurisdiction , So create /roo/.ssh Catalog , And copy the public key .

stay kali Login with private key on root, Successfully get the second flag

边栏推荐
猜你喜欢

SRC挖掘思路及方法

Renforcer les dossiers de base de l'apprentissage

7-7 7003 组合锁(PTA程序设计)

实验六 继承和多态
![[dark horse morning post] Shanghai Municipal Bureau of supervision responded that Zhong Xue had a high fever and did not melt; Michael admitted that two batches of pure milk were unqualified; Wechat i](/img/d7/4671b5a74317a8f87ffd36be2b34e1.jpg)
[dark horse morning post] Shanghai Municipal Bureau of supervision responded that Zhong Xue had a high fever and did not melt; Michael admitted that two batches of pure milk were unqualified; Wechat i

MySQL锁总结(全面简洁 + 图文详解)

FAQs and answers to the imitation Niuke technology blog project (III)

Mixlab unbounded community white paper officially released

Principles, advantages and disadvantages of two persistence mechanisms RDB and AOF of redis

1. First knowledge of C language (1)
随机推荐
[MySQL database learning]
Reinforcement learning series (I): basic principles and concepts
7-4 hash table search (PTA program design)
Strengthen basic learning records
[the Nine Yang Manual] 2019 Fudan University Applied Statistics real problem + analysis
简单理解ES6的Promise
7-3 construction hash table (PTA program design)
仿牛客技术博客项目常见问题及解答(一)
Get started with typescript
7-14 错误票据(PTA程序设计)
Implementation principle of automatic capacity expansion mechanism of ArrayList
【数据库 三大范式】一看就懂
7-6 local minimum of matrix (PTA program design)
HackMyvm靶机系列(7)-Tron
7-8 7104 约瑟夫问题(PTA程序设计)
MATLAB打开.m文件乱码解决办法
Safe driving skills on ice and snow roads
canvas基础2 - arc - 画弧线
[MySQL table structure and integrity constraint modification (Alter)]
Write a program to simulate the traffic lights in real life.