当前位置:网站首页>HackMyvm靶机系列(4)-vulny
HackMyvm靶机系列(4)-vulny
2022-07-06 09:22:00 【月应知我意】
一、信息收集
老办法,先来一波网段扫描,发现主机
nmap -sP 192.168.200.0/24 | grep -i -B 2 virtualbox
使用nmap扫描端口,发现两个端口,一个80端口,一个33060(不知道是什么,先不管它)
nmap -sC -sV 192.168.200.153 -p-
访问主页,然而并没有发现什么有用的信息。
老办法,先来一波目录扫描,看看能不能发现什么有用的信息。
使用gobuster扫描一下目录。
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
发现几个目录和文件,经访问,只有secret目录有用。
发现关键字wordpress,难道这个网站的cms是wordpress?
再使用dirsearch扫描一下这个录试试
dirsearch -u "http://192.168.200.153/secret/" -e php,html,txt,zip,bak,gz,7z -x 404,500-599 -t 50
果然是wordpress,出了好多目录。
挨个访问下面的目录看看有啥收获不
发现一个压缩文件,下载下来看看。然而打开之后才发现我还是太年轻了,根本就看不懂。
于是百度了一下,这是wordpress的一个插件,而且还存在一个任意文件上传漏洞。
上exploitdb上搜索一番,发现有个利用脚本。但是这脚本我使用总是报语法错误,咱也不会改,那就只能另谋出路了。
二、漏洞利用
使用msf,在msf上面搜到了这个漏洞的利用方法。
配置模块参数,利用成功,获得一个web权限。使用python获得一个交互式shell
python3 -c 'import pty; pty.spawn("/bin/bash")'
查看一下用户,发现除了root还有一个adrian用户
cat /etc/passwd
注意这里这句话,提到了配置文件和可以读取账号和密码。
那尝试读取一下wordpress的配置文件试试呗!
<!-- 这里少截了一张图片,读取配置文件可以看到一行注释 -->
咦!在这里发现了一行注释,这会不会是上面那个用户的密码?
adrian:idrinksomewater
完美,成功切换用户!
获得第一个flag
三、权限提升
看看有没有啥提权的命令!
flock命令不需要权限密码就能以任何用户的身份执行。
输入下面命令进行提权呗
sudo flock -u / /bin/bash
完美,成功将权限提升至root
拿到第二个flag
边栏推荐
- Strengthen basic learning records
- MySQL锁总结(全面简洁 + 图文详解)
- FAQs and answers to the imitation Niuke technology blog project (III)
- A comprehensive summary of MySQL transactions and implementation principles, and no longer have to worry about interviews
- Analysis of penetration test learning and actual combat stage
- Zatan 0516
- Difference and understanding between detected and non detected anomalies
- Inaki Ading
- [the Nine Yang Manual] 2019 Fudan University Applied Statistics real problem + analysis
- Redis实现分布式锁原理详解
猜你喜欢
Difference and understanding between detected and non detected anomalies
(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
7-7 7003 组合锁(PTA程序设计)
[VMware abnormal problems] problem analysis & Solutions
2022泰迪杯数据挖掘挑战赛C题思路及赛后总结
撲克牌遊戲程序——人機對抗
Meituan dynamic thread pool practice ideas, open source
A comprehensive summary of MySQL transactions and implementation principles, and no longer have to worry about interviews
Nuxtjs快速上手(Nuxt2)
2022 Teddy cup data mining challenge question C idea and post game summary
随机推荐
[the Nine Yang Manual] 2020 Fudan University Applied Statistics real problem + analysis
Detailed explanation of redis' distributed lock principle
杂谈0516
UGUI—Text
Using qcommonstyle to draw custom form parts
Zatan 0516
[during the interview] - how can I explain the mechanism of TCP to achieve reliable transmission
SRC mining ideas and methods
关于双亲委派机制和类加载的过程
Relationship between hashcode() and equals()
. How to upload XMIND files to Jinshan document sharing online editing?
[MySQL table structure and integrity constraint modification (Alter)]
Matlab opens M file garbled solution
4. Branch statements and loop statements
The difference between abstract classes and interfaces
[the Nine Yang Manual] 2018 Fudan University Applied Statistics real problem + analysis
[面试时]——我如何讲清楚TCP实现可靠传输的机制
【educoder数据库实验 索引】
Safe driving skills on ice and snow roads
TypeScript快速入门