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

边栏推荐
- 编写程序,模拟现实生活中的交通信号灯。
- Matlab opens M file garbled solution
- Why use redis
- 实验七 常用类的使用(修正帖)
- Strengthen basic learning records
- FAQs and answers to the imitation Niuke technology blog project (III)
- 实验七 常用类的使用
- Thoroughly understand LRU algorithm - explain 146 questions in detail and eliminate LRU cache in redis
- 优先队列PriorityQueue (大根堆/小根堆/TopK问题)
- PriorityQueue (large root heap / small root heap /topk problem)
猜你喜欢

It's never too late to start. The tramp transformation programmer has an annual salary of more than 700000 yuan

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

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

Yugu p1012 spelling +p1019 word Solitaire (string)

甲、乙机之间采用方式 1 双向串行通信,具体要求如下: (1)甲机的 k1 按键可通过串行口控制乙机的 LEDI 点亮、LED2 灭,甲机的 k2 按键控制 乙机的 LED1

Programme de jeu de cartes - confrontation homme - machine

Difference and understanding between detected and non detected anomalies

SRC mining ideas and methods

Have you encountered ABA problems? Let's talk about the following in detail, how to avoid ABA problems

Principles, advantages and disadvantages of two persistence mechanisms RDB and AOF of redis
随机推荐
1143_ SiCp learning notes_ Tree recursion
js判断对象是否是数组的几种方式
关于双亲委派机制和类加载的过程
[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
[the Nine Yang Manual] 2017 Fudan University Applied Statistics real problem + analysis
Why use redis
编写程序,模拟现实生活中的交通信号灯。
强化学习基础记录
仿牛客技术博客项目常见问题及解答(一)
The difference between overloading and rewriting
强化学习基础记录
About the parental delegation mechanism and the process of class loading
Thoroughly understand LRU algorithm - explain 146 questions in detail and eliminate LRU cache in redis
. How to upload XMIND files to Jinshan document sharing online editing?
为什么要使用Redis
Write a program to simulate the traffic lights in real life.
[hand tearing code] single case mode and producer / consumer mode
Wechat applet
FAQs and answers to the imitation Niuke technology blog project (II)
Read only error handling