当前位置:网站首页>HackMyvm靶机系列(2)-warrior
HackMyvm靶机系列(2)-warrior
2022-07-06 09:22:00 【月应知我意】
一、信息收集
先扫描网段,探测存活主机,由于是校园网主机太多,我就偷点小懒了哈。
发现目标主机IP
nmap -sP 192.168.200.0/24 | grep -i -B 2 virtualbox

使用nmap对目标端口进行扫描,探测开放的服务。
nmap -sT -T4 -sV -sC -O -A -p- 192.168.200.183
如下图,扫描到两个端口,分别是ssh和http服务
访问一下http服务,查看源代码,然而并没有发现什么有用的信息。
使用dirsearch进行目录扫描。
dirsearch -u http://192.168.200.183/ -e php,html,txt,db,bak,zip,7z,gz -x 404,301,500-599 -t 50 -r -R 3
发现如下信息。
访问robots.txt文件,发现下面有这些文件和目录,挨个访问看看。
user.txt,应该是一个用户名

翻译一下看看,这意思大概就是要不断变换一下mac地址最后一位,而上面secret.txt因该就是变换的范围,刚好16位。

二、漏洞利用
更改计算机的MAC地址,使用情形如下:
防止某些软件记录你真实的MAC地址
网络管理员屏蔽了你的MAC地址
经过测试只有mac地址为00:00:00:00:00:af能成功访问
ifconfig eth0 down
ifconfig eth0 hw ether 00:00:00:00:00:af
ifconfig eth0 up

如上图,得到了密码Zurviv0r1
我先是用了user.txt当中的loco,但是登录失败了。但是看到当时那句话提到了bro,于是用这个用户再次登录。登录成功!(嘿嘿!幸好当时截了图)
拿到第一个flag
三、权限提升
先看看用没用sudo滥用。
???没有该命令?
不慌,试试suid提权。
查看具有s权限的文件,发现居然有一个sudo。连忙查看一下环境变量。???真的服了,环境变量没有/usr/sbin/目录。
输入下面命令,发现task命令不需要密码就可以以root权限运行
sudo -l

利用task命令进行提权
/usr/sbin/sudo task execute /bin/bash
如图,成功将权限提升至root

拿到最后一个flag
边栏推荐
- Using qcommonstyle to draw custom form parts
- Detailed explanation of redis' distributed lock principle
- 1143_ SiCp learning notes_ Tree recursion
- 【Numpy和Pytorch的数据处理】
- Mode 1 two-way serial communication is adopted between machine a and machine B, and the specific requirements are as follows: (1) the K1 key of machine a can control the ledi of machine B to turn on a
- canvas基础1 - 画直线(通俗易懂)
- MySQL lock summary (comprehensive and concise + graphic explanation)
- 7-8 7104 约瑟夫问题(PTA程序设计)
- 仿牛客技术博客项目常见问题及解答(一)
- Renforcer les dossiers de base de l'apprentissage
猜你喜欢
![[VMware abnormal problems] problem analysis & Solutions](/img/64/f44864da600b61a1a646a5865a2083.jpg)
[VMware abnormal problems] problem analysis & Solutions

HackMyvm靶机系列(6)-videoclub

The difference between cookies and sessions

Attach the simplified sample database to the SQLSERVER database instance

仿牛客技术博客项目常见问题及解答(三)

Leetcode. 3. Longest substring without repeated characters - more than 100% solution

MySQL锁总结(全面简洁 + 图文详解)

1143_ SiCp learning notes_ Tree recursion

记一次猫舍由外到内的渗透撞库操作提取-flag

2022 Teddy cup data mining challenge question C idea and post game summary
随机推荐
实验五 类和对象
FAQs and answers to the imitation Niuke technology blog project (III)
【黑马早报】上海市监局回应钟薛高烧不化;麦趣尔承认两批次纯牛奶不合格;微信内测一个手机可注册俩号;度小满回应存款变理财产品...
附加简化版示例数据库到SqlServer数据库实例中
5月27日杂谈
编写程序,模拟现实生活中的交通信号灯。
Custom RPC project - frequently asked questions and explanations (Registration Center)
The difference between cookies and sessions
FAQs and answers to the imitation Niuke technology blog project (II)
Using spacedesk to realize any device in the LAN as a computer expansion screen
Strengthen basic learning records
Principles, advantages and disadvantages of two persistence mechanisms RDB and AOF of redis
【MySQL-表结构与完整性约束的修改(ALTER)】
强化学习系列(一):基本原理和概念
A piece of music composed by buzzer (Chengdu)
5月14日杂谈
QT meta object qmetaobject indexofslot and other functions to obtain class methods attention
这次,彻底搞清楚MySQL索引
Beautified table style
优先队列PriorityQueue (大根堆/小根堆/TopK问题)