当前位置:网站首页>Hackmyvm target series (4) -vulny
Hackmyvm target series (4) -vulny
2022-07-06 13:57:00 【The moon should know my meaning】
One 、 information gathering
The old , Let's start with a wave of network segment scanning , Discover the host
nmap -sP 192.168.200.0/24 | grep -i -B 2 virtualbox
Use nmap Scan port , Two ports were found , One 80 port , One 33060( I don't know what it is , No matter it first )
nmap -sC -sV 192.168.200.153 -p-
Visit the home page , However, no useful information was found .

The old , Let's start with a wave of directory scanning , See if you can find any useful information .
Use gobuster Scan the directory .
gobuster dir -u http://192.168.200.153 -w directory-list-2.3-medium.txt -t 30 -x php,html,txt,7z,zip,bak,gz
Found several directories and files , After visiting , Only secret The directory is useful .
Find keywords wordpress, Is this website cms yes wordpress?

Reuse dirsearch Scan this record and try
dirsearch -u "http://192.168.200.153/secret/" -e php,html,txt,zip,bak,gz,7z -x 404,500-599 -t 50Sure enough wordpress, There are many catalogues .

Visit the following directories one by one to see if there are any gains

Found a compressed file , Download it and see . However, after opening it, I found that I was still too young , I don't understand .

So Baidu took a look , This is a wordpress A plug-in for , There is also an arbitrary file upload vulnerability .

On exploitdb Search the Internet , Found a utilization script . But I always report syntax errors in this script , We won't change , Then we can only find another way .

Two 、 Exploit
Use msf, stay msf The exploitation method of this vulnerability is found above .

Configuration module parameters , Use success , To obtain a web jurisdiction .
Use python Get an interactive shell
python3 -c 'import pty; pty.spawn("/bin/bash")'Check the user , Find out besides root One more adrian user
cat /etc/passwdPay attention to this sentence , Mentioned the configuration file and the ability to read accounts and passwords .

Then try reading wordpress Try the configuration file of !
<!-- A picture is missing here , Reading the configuration file, you can see a line of comments -->
Why ! A line of comments is found here , Is this the password of the user above ?
adrian:idrinksomewaterperfect , Successfully switched users !
Get the first flag

3、 ... and 、 Elevated privileges
See if there is any order to raise power !

flock The command can be executed as any user without permission password .
Enter the following command to raise the right
sudo flock -u / /bin/bashperfect , Successfully promoted the permission to root
Get the second flag

边栏推荐
- [modern Chinese history] Chapter 6 test
- Experiment 7 use of common classes
- 1. First knowledge of C language (1)
- [au cours de l'entrevue] - Comment expliquer le mécanisme de transmission fiable de TCP
- 使用Spacedesk实现局域网内任意设备作为电脑拓展屏
- 透彻理解LRU算法——详解力扣146题及Redis中LRU缓存淘汰
- 【Numpy和Pytorch的数据处理】
- 7-8 7104 约瑟夫问题(PTA程序设计)
- Meituan dynamic thread pool practice ideas, open source
- 记一次猫舍由外到内的渗透撞库操作提取-flag
猜你喜欢

【黑马早报】上海市监局回应钟薛高烧不化;麦趣尔承认两批次纯牛奶不合格;微信内测一个手机可注册俩号;度小满回应存款变理财产品...

Using spacedesk to realize any device in the LAN as a computer expansion screen

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

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

PriorityQueue (large root heap / small root heap /topk problem)

仿牛客技术博客项目常见问题及解答(二)

The difference between cookies and sessions

Read only error handling

仿牛客技术博客项目常见问题及解答(一)

Callback function ----------- callback
随机推荐
7-14 错误票据(PTA程序设计)
Poker game program - man machine confrontation
实验七 常用类的使用
HackMyvm靶机系列(3)-visions
Callback function ----------- callback
一段用蜂鸣器编的音乐(成都)
MATLAB打开.m文件乱码解决办法
HackMyvm靶机系列(2)-warrior
Get started with typescript
Meituan dynamic thread pool practice ideas, open source
The difference between cookies and sessions
1. First knowledge of C language (1)
[three paradigms of database] you can understand it at a glance
Canvas foundation 2 - arc - draw arc
记一次猫舍由外到内的渗透撞库操作提取-flag
简单理解ES6的Promise
QT meta object qmetaobject indexofslot and other functions to obtain class methods attention
[the Nine Yang Manual] 2021 Fudan University Applied Statistics real problem + analysis
[data processing of numpy and pytoch]
强化学习基础记录