DeepExploit工具(后渗透自动化工框架)调研

栏目: Python · 发布时间: 7年前

内容简介:Deep Exploit是一款可与Metasploit链接使用,且结合机器学习的全自动渗透测试工具。根据官方安装手册:https://github.com/13o-bbr-bbq/machine_learning_security/wiki/Installation执行命令:

DeepExploit工具调研

Deep Exploit是一款可与Metasploit链接使用,且结合机器学习的全自动渗透测试工具。

0x00 安装

安装步骤

根据官方安装手册:https://github.com/13o-bbr-bbq/machine_learning_security/wiki/Installation

  1. 安装Kali

  2. 命令执行 git clone https://github.com/13o-bbr-bbq/machine_learning_security.git

  3. 命令执行 安装 python 3的pip apt-get install python3-pip

  4. 切换到DeepExploit目录下运行 pip3 install -r requirements.txt

  5. 编辑 config.ini ,修改其中的 server_host 为本机IP(ifconfig查看一下~)

  6. 编辑 proxychains.conf ,修改监听IP和端口(要求和DeepExploit目录下 config.ini 的 proxy_host 、 proxy_port 对应)

  7. 初始化Metasploit DB,命令执行 msfdb init

  8. 启动Metasploit,命令执行 msfconsole

  9. 启动Metasploit RPC服务,命令执行

    msf > load msgrpc ServerHost=172.16.108.139 ServerPort=55553 User=test Pass=test1234
    [*] MSGRPC Service:  172.16.108.139:55553 
    [*] MSGRPC Username: test
    [*] MSGRPC Password: test1234
    [*] Successfully loaded plugin: msgrpc

安装的坑记录

  • 安装Scrapy库时报Twisted错误

    Python.h: No such file or directory
    

    解决方法:运行命令 sudo apt install python3.6-dev 安装 python3.6-dev

  • 运行DeepExploit报错

    ImportError: numpy.core.multiarray failed to import
    

    解决方法:输入python3进入交互界面-> import numpy -> print(numpy.__path__) ->获得numpy的安装路径退出交互界面,运行 sudo rm -r 安装路径 删除numpy,然后运行 sudo apt install python3-numpy

  • 运行时会报错

    /usr/lib/python3/dist-packages/requests/ init .py:80: RequestsDependencyWarning: urllib3 (1.24.1) or chardet (3.0.4) doesn’t match a supported version!

    查阅了一下资料说这个提示不会影响使用,所以无需处理。

0x01 使用&工作原理

DeepExploit Train模式

执行命令: python3 DeepExploit.py -t 地址 -m train

command options description
-t, –target 训练易受攻击主机的IP地址
-m, –mode 执行模式”训练”

DeepExploit工具(后渗透自动化工框架)调研

训练过程

功能有点像Metasploit之前的db_autopwn。

  • 通过Nmap进行端口扫描,将扫描结果进行输出: [*] nmap -p0-65535 -T5 -Pn -sV -sT --min-rate 1000 -oX nmap_result_172.16.108.140.xml 172.16.108.140

  • 从扫描结果中获取已开放的端口信息: [+] Get port list from nmap_result_172.16.108.140.xml.

  • 载入Metasploit的Exploit模块列表: [+] Get exploit list. ,载入Metaploit的Payload模块列表: [+] Get payload list. ,获取每个模块的选项设置信息。

    [+] Get exploit list.
    [*] Loaded exploit list from : /root/machine_learning_security/DeepExploit/data/exploit_list.csv
    [+] Get payload list.
    [*] Loaded payload list from : /root/machine_learning_security/DeepExploit/data/payload_list.csv
    [+] Get exploit tree.
    [*] Loaded exploit tree from : /root/machine_learning_security/DeepExploit/data/exploit_tree.json
  • 获取端口信息,检查WEB端口 [+] Get target info. [+] Check web port. ,针对开放的WEB服务进行站内链接爬虫。

  • 针对爬虫爬取的链接进行CMS指纹识别(静态规则针对链接的响应内容进行分析)

    DeepExploit工具(后渗透自动化工框架)调研

    载入字典对网站目录进行暴力猜解:

    DeepExploit工具(后渗透自动化工框架)调研

  • 分析开放的端口(获取端口对应的服务等信息)选择对应的信息的测试模块(metasploit)

    DeepExploit工具(后渗透自动化工框架)调研

  • 载入Metasploit模块进行自动化测试

    DeepExploit工具(后渗透自动化工框架)调研

  • 训练结束:

    DeepExploit工具(后渗透自动化工框架)调研

训练结果报告

最终测试结束以后,报告会存储在 /report/train 下:

DeepExploit工具(后渗透自动化工框架)调研

切换到DeepExploit目录下执行命令: python3 CreateReport.py -m train

[+] Creating training report.
[*] Creating training report done.

在 /report/train 目录下会多出一个 DeepExploit_train_report.html 的HTML报告文件,打开查看结果:

DeepExploit工具(后渗透自动化工框架)调研

DeepExploit Test模式

执行命令 python3 DeepExploit.py -t 172.16.108.140 -m test

流程与DeepExploit Train模式一样,如果Deep Exploit成功利用了目标服务器,它会进一步的对其他内部服务器进行横行攻击。

问题

测试靶机有445端口开放,并且存在漏洞。

DeepExploit在做探测的时候也检测到了端口的开放情况:

DeepExploit工具(后渗透自动化工框架)调研

但是445端口在匹配Metasploit模块的时候却是0,没有利用模块:

DeepExploit工具(后渗透自动化工框架)调研

端口匹配模块使用的是Metasploit的search语法:

search_cmd = 'search name:' + service_name + ' type:exploit app:server\n'

调试输出service_name,发现445端口的是unknown,所以无法搜索出利用模块。

DeepExploit工具(后渗透自动化工框架)调研


以上所述就是小编给大家介绍的《DeepExploit工具(后渗透自动化工框架)调研》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。

The Book of CSS3

The Book of CSS3

Peter Gasston / No Starch Press / 2011-5-13 / USD 34.95

CSS3 is the technology behind most of the eye-catching visuals on the Web today, but the official documentation can be dry and hard to follow. Luckily, The Book of CSS3 distills the heady technical la......一起来看看 《The Book of CSS3》 这本书的介绍吧!

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具