当前位置:网站首页>动力:2 vulnhub预排
动力:2 vulnhub预排
2022-08-02 03:59:00 【xdeclearn】
信息
Momentum2.ova (Size: 698 MB)
Download (Mirror): https://download.vulnhub.com/momentum/Momentum2.ova
Download (Torrent): https://download.vulnhub.com/momentum/Momentum2.ova.torrent ( Magnet)
Port scanning and directory scanning
PORT STATE SERVICE
22/tcp open ssh
80/tcp open http
访问80端口,没发现什么有价值的东西.
于是进行目录扫描,这里使用gobuster进行目录遍历.
* gobuster-linux-amd64 ./gobuster dir -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -u http://192.168.143.183 -x php,php.bak,html,txt
===============================================================
Gobuster v3.1.0
by OJ Reeves (@TheColonial) & Christian Mehlmauer (@firefart)
===============================================================
[+] Url: http://192.168.143.183
[+] Method: GET
[+] Threads: 10
[+] Wordlist: /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt
[+] Negative Status codes: 404
[+] User Agent: gobuster/3.1.0
[+] Extensions: php,php.bak,html,txt
[+] Timeout: 10s
===============================================================
2021/07/19 08:45:42 Starting gobuster in directory enumeration mode
===============================================================
/index.html (Status: 200) [Size: 1428]
/img (Status: 301) [Size: 316] [--> http://192.168.143.183/img/]
/css (Status: 301) [Size: 316] [--> http://192.168.143.183/css/]
/ajax.php (Status: 200) [Size: 0]
/ajax.php.bak (Status: 200) [Size: 357]
/manual (Status: 301) [Size: 319] [--> http://192.168.143.183/manual/]
/js (Status: 301) [Size: 315] [--> http://192.168.143.183/js/]
/dashboard.html (Status: 200) [Size: 513]
/owls (Status: 301) [Size: 317] [--> http://192.168.143.183/owls/]
/server-status (Status: 403) [Size: 280]
访问dashboard.html
,Found to file upload,Upload processing forajax.php
,But it did some limit,具体查看ajax.php.bak
.
//The boss told me to add one more Upper Case letter at the end of the cookie
if(isset($_COOKIE['admin']) && $_COOKIE['admin'] == '&[email protected]&Ms'){
//[+] Add if $_POST['secure'] == 'val1d'
$valid_ext = array("pdf","php","txt");
}
else{
$valid_ext = array("txt");
}
// Remember success upload returns 1
You can see upload need to add parameterssecure
和cookie
,但是cookieNeed to add a capital letter after traversal test,为了方便,直接使用burp的intruder模块.
成功实现文件上传.
获取shell,root提权
curlAccess pages for reboundshell.
进入/home/athena
,发现了第一个flagAnd a password prompt file.
According to clew the userathena
的密码myvulnerableapp*
.切换到该用户,查看sudo -l
.
看看cookie-gen.py
import random
import os
import subprocess
print('~ Random Cookie Generation ~')
print('[!] for security reasons we keep logs about cookie seeds.')
chars = '@#$ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefgh'
seed = input("Enter the seed : ")
random.seed = seed
cookie = ''
for c in range(20):
cookie += random.choice(chars)
print(cookie)
cmd = "echo %s >> log.txt" % seed
subprocess.Popen(cmd, shell=True)
很简单,Directly to a command splicing reboundshell搞定,成功获取root权限.
边栏推荐
- JS objects, functions and scopes
- 14. JS Statements and Comments, Variables and Data Types
- Warzone: 3 (Exogen) vulnhub walkthrough
- Solve the problem of Zlibrary stuck/can't find the domain name/reached the limit, the latest address of Zlibrary
- 14.JS语句和注释,变量和数据类型
- After the mailbox of the Pagoda Post Office is successfully set up, it can be sent but not received.
- TCP communications program
- PHP 发起支付宝支付时 订单信息乱码解决
- Xiaoyao multi-open emulator ADB driver connection
- 4.表单与输入
猜你喜欢
TypeScript error error TS2469, error TS2731 solution
The Error in the render: "TypeError: always read the properties of null '0' (reading)" Error solution
Phonebook
hackmyvm-bunny walkthrough
[league/climate] A robust command-line function manipulation library
12.什么是JS
kali安装IDEA
PHP有哪些框架?
Introduction to PHP (self-study notes)
13.JS输出内容和语法
随机推荐
PHP有哪些框架?
PHP实现搜索框的自动反查提示
What are the killer super powerful frameworks or libraries or applications for PHP?
[symfony/mailer]一个优雅易用的发送邮件类库
IO stream, encoding table, character stream, character buffer stream
SQL: DDL, DML, DQL, DCL corresponding introduction and demonstration
PHP图片压缩到指定的大小
PHP image compression to specified size
Function hoisting and variable hoisting
hackmyvm-random walkthrough
PHP8.2 version release administrator and release plan
Praying: 1 vulnhub walkthrough
Several interesting ways to open PHP: from basic to perverted
微信小程序开发视频加载:[渲染层网络层错误] Failed to load media
(1) print()函数、转义字符、二进制与字符编码 、变量、数据类型、input()函数、运算符
Warzone: 3 (Exogen) vulnhub walkthrough
[phpunit/php-timer] A timer for code execution time
js __proto__、prototype、constructor的关系
[sebastian/diff]一个比较两段文本的历史变化扩展库
hackmyvm: again walkthrough