当前位置:网站首页>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
边栏推荐
- 7-3 construction hash table (PTA program design)
- 抽象类和接口的区别
- Differences among fianl, finally, and finalize
- js判断对象是否是数组的几种方式
- [the Nine Yang Manual] 2019 Fudan University Applied Statistics real problem + analysis
- [面試時]——我如何講清楚TCP實現可靠傳輸的機制
- Mixlab unbounded community white paper officially released
- PriorityQueue (large root heap / small root heap /topk problem)
- [data processing of numpy and pytoch]
- 实验六 继承和多态
猜你喜欢
这次,彻底搞清楚MySQL索引
仿牛客技术博客项目常见问题及解答(三)
强化学习基础记录
[dark horse morning post] Shanghai Municipal Bureau of supervision responded that Zhong Xue had a high fever and did not melt; Michael admitted that two batches of pure milk were unqualified; Wechat i
[hand tearing code] single case mode and producer / consumer mode
Using spacedesk to realize any device in the LAN as a computer expansion screen
Mixlab unbounded community white paper officially released
1143_ SiCp learning notes_ Tree recursion
FAQs and answers to the imitation Niuke technology blog project (III)
Read only error handling
随机推荐
FAQs and answers to the imitation Niuke technology blog project (I)
【手撕代码】单例模式及生产者/消费者模式
Meituan dynamic thread pool practice ideas, open source
Strengthen basic learning records
5月14日杂谈
Miscellaneous talk on May 14
[the Nine Yang Manual] 2021 Fudan University Applied Statistics real problem + analysis
优先队列PriorityQueue (大根堆/小根堆/TopK问题)
PriorityQueue (large root heap / small root heap /topk problem)
Thoroughly understand LRU algorithm - explain 146 questions in detail and eliminate LRU cache in redis
一段用蜂鸣器编的音乐(成都)
Attach the simplified sample database to the SQLSERVER database instance
[the Nine Yang Manual] 2017 Fudan University Applied Statistics real problem + analysis
Miscellaneous talk on May 27
canvas基础1 - 画直线(通俗易懂)
关于双亲委派机制和类加载的过程
【VMware异常问题】问题分析&解决办法
[experiment index of educator database]
【MySQL-表结构与完整性约束的修改(ALTER)】
Difference and understanding between detected and non detected anomalies