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

边栏推荐
- MySQL lock summary (comprehensive and concise + graphic explanation)
- 使用Spacedesk实现局域网内任意设备作为电脑拓展屏
- PriorityQueue (large root heap / small root heap /topk problem)
- QT meta object qmetaobject indexofslot and other functions to obtain class methods attention
- 7-4 散列表查找(PTA程序设计)
- Simply understand the promise of ES6
- 4. Branch statements and loop statements
- 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
- C language Getting Started Guide
- Leetcode. 3. Longest substring without repeated characters - more than 100% solution
猜你喜欢

C language Getting Started Guide

UGUI—Text

4. Branch statements and loop statements

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

Package bedding of components

SRC mining ideas and methods

Strengthen basic learning records

Yugu p1012 spelling +p1019 word Solitaire (string)

Write a program to simulate the traffic lights in real life.

1143_ SiCp learning notes_ Tree recursion
随机推荐
使用Spacedesk实现局域网内任意设备作为电脑拓展屏
【educoder数据库实验 索引】
仿牛客技术博客项目常见问题及解答(一)
FAQs and answers to the imitation Niuke technology blog project (III)
【头歌educoder数据表中数据的插入、修改和删除】
强化学习系列(一):基本原理和概念
Implementation of count (*) in MySQL
[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
5月27日杂谈
The difference between cookies and sessions
Cookie和Session的区别
Strengthen basic learning records
编写程序,模拟现实生活中的交通信号灯。
[the Nine Yang Manual] 2020 Fudan University Applied Statistics real problem + analysis
[insert, modify and delete data in the headsong educator data table]
[MySQL database learning]
为什么要使用Redis
String abc = new String(“abc“),到底创建了几个对象
1. First knowledge of C language (1)
自定义RPC项目——常见问题及详解(注册中心)