当前位置:网站首页>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

边栏推荐
- Redis实现分布式锁原理详解
- Experiment 6 inheritance and polymorphism
- [three paradigms of database] you can understand it at a glance
- 【MySQL数据库的学习】
- [MySQL database learning]
- HackMyvm靶机系列(2)-warrior
- 【VMware异常问题】问题分析&解决办法
- 仿牛客技术博客项目常见问题及解答(二)
- Write a program to simulate the traffic lights in real life.
- (original) make an electronic clock with LCD1602 display to display the current time on the LCD. The display format is "hour: minute: Second: second". There are four function keys K1 ~ K4, and the fun
猜你喜欢

Experiment 6 inheritance and polymorphism

强化学习基础记录

Hackmyvm Target Series (3) - vues

HackMyvm靶机系列(1)-webmaster

HackMyvm靶机系列(3)-visions

Intensive literature reading series (I): Courier routing and assignment for food delivery service using reinforcement learning

【VMware异常问题】问题分析&解决办法

Nuxtjs quick start (nuxt2)

强化学习系列(一):基本原理和概念

Mode 1 two-way serial communication is adopted between machine a and machine B, and the specific requirements are as follows: (1) the K1 key of machine a can control the ledi of machine B to turn on a
随机推荐
[面试时]——我如何讲清楚TCP实现可靠传输的机制
A comprehensive summary of MySQL transactions and implementation principles, and no longer have to worry about interviews
扑克牌游戏程序——人机对抗
The difference between overloading and rewriting
7-6 矩阵的局部极小值(PTA程序设计)
Read only error handling
2022 Teddy cup data mining challenge question C idea and post game summary
Leetcode.3 无重复字符的最长子串——超过100%的解法
Why use redis
HackMyvm靶机系列(6)-videoclub
【MySQL数据库的学习】
HackMyvm靶机系列(4)-vulny
4. Branch statements and loop statements
【黑马早报】上海市监局回应钟薛高烧不化;麦趣尔承认两批次纯牛奶不合格;微信内测一个手机可注册俩号;度小满回应存款变理财产品...
Callback function ----------- callback
HackMyvm靶机系列(5)-warez
7-11 mechanic mustadio (PTA program design)
. How to upload XMIND files to Jinshan document sharing online editing?
透彻理解LRU算法——详解力扣146题及Redis中LRU缓存淘汰
Canvas foundation 1 - draw a straight line (easy to understand)