Deep Exploit是與Metasploit鏈接的全自動滲透工具。
Deep Exploit有兩種開發模式:
Deep Exploit可以識別目標服務器上所有打開的端口的狀態,并根據過去的經驗(訓練結果)精確地執行漏洞利用。
Deep Exploit利用與用戶指定的產品名稱和端口號相對應的“漏洞利用模塊”,“目標”和“有效負載”的所有組合來執行漏洞利用。
Deep Exploit的主要功能如下:
如果“智能模式”,Deep Exploit可以在精確定位點執行攻擊(至少1次嘗試)。
如果“暴力破解模式”,Deep Exploit可以根據用戶指定的產品名稱和端口號徹底執行漏洞利用程序。
如果Deep Exploit成功利用目標服務器,它會進一步對其他內部服務器執行利用。
您唯一的操作是輸入一個命令。這很容易!
Deep Exploit不需要“學習數據”。
Deep Exploit可以學習如何使用自己的方法(使用強化學習)。
Deep Exploit使用多代理的分布式學習。
所以,我們采用了一種名為A3C的高級機器學習模型
目前Deep Exploit的版本是測試版。
但是,它可以自動執行以下操作:
系統組成
處理流程
智能模式
第1步 端口掃描目標服務器
Deep Exploit使用Nmap執行端口掃描以收集目標服務器的信息。
之后,Deep Exploit通過RPC API執行兩個Metasploit的命令(主機和服務)。
Hosts
=====
address mac name os_name os_flavor os_sp purpose info comments
——- — —- ——- ——— —– ——- —- ——–
192.168.220.145 00:0c:29:16:3a:ce Linux 2.6.X server
Deep Exploit從主機命令的結果中獲取OS類型。 在上面的例子中,Deep Exploit將Linux作為操作系統類型。
Services
========
host port proto info
—- —- —– —-
192.168.220.145 21 tcp vsftpd 2.3.4
192.168.220.145 22 tcp OpenSSH 4.7p1 Debian 8ubuntu1 protocol 2.0
192.168.220.145 23 tcp Linux telnetd
192.168.220.145 25 tcp Postfix smtpd
192.168.220.145 53 tcp ISC BIND 9.4.2
…snip…
192.168.220.145 5900 tcp VNC protocol 3.3
192.168.220.145 6000 tcp access denied
192.168.220.145 6667 tcp UnrealIRCd
192.168.220.145 8009 tcp Apache Jserv Protocol v1.3
192.168.220.145 8180 tcp Apache Tomcat/Coyote JSP engine 1.1
RHOSTS => 192.168.220.145
Deep Exploit從端口掃描的結果中獲取端口號,協議類型,產品名稱,產品版本。
在上面的例子中,Deep Exploit的端口號為21,協議為tcp,產品為vsftpd,版本為2.3.4
第2步 利用Metasploit進行培訓
Deep Exploit使用名為A3C的高級機器學習模型學習如何開發方法。
因此,Deep Exploit使用易受攻擊的服務器,例如metasploitable2,owaspbwa進行學習。
第3步 利用Metasploit進行測試
第4步 利用后
第5步 生成報告
Deep Exploit生成匯總漏洞的報告。報告的樣式是html。
蠻力模式
用法
步驟0 初始化Metasploit DB
首先,你使用msfdb命令初始化metasploit db(postgreSQL)。
root@kali:~# msfdb init
步驟1 啟動Metasploit框架
您可以在安裝Metasploit Framework的遠程服務器(如Kali Linux)上啟動Metasploit。
root@kali:~# msfconsole
______________________________________________________________________________
| |
| METASPLOIT CYBER MISSILE COMMAND V4 |
|______________________________________________________________________________|
\\ / /
\\ . / / x
\\ / /
\\ / + /
\\ + / /
* / /
/ . /
X / / X
/ ###
/ # % #
/ ###
. /
. / . * .
/
*
+ *
^
#### __ __ __ ####### __ __ __ ####
#### / \\ / \\ / \\ ########### / \\ / \\ / \\ ####
################################################################################
################################################################################
# WAVE 4 ######## SCORE 31337 ################################## HIGH FFFFFFFF #
################################################################################
https://metasploit.com
=[ metasploit v4.16.15-dev ]
+ — –=[ 1699 exploits – 968 auxiliary – 299 post ]
+ — –=[ 503 payloads – 40 encoders – 10 nops ]
+ — –=[ Free Metasploit Pro trial: http://r-7.co/trymsp ]
msf >
步驟2 啟動RPC服務器
啟動Metasploit的RPC服務器。
msf> load msgrpc ServerHost=192.168.220.144 ServerPort=55553 User=test Pass=test1234
[*] MSGRPC Service: 192.168.220.144:55553
[*] MSGRPC Username: test
[*] MSGRPC Password: test1234
[*] Successfully loaded plugin: msgrpc
msgrpc 選項 | 描述 |
---|---|
ServerHost | IP address of your server that launched Metasploit. Above example is 192.168.220.144 . |
ServerPort | Any port number of your server that launched Metasploit. Above example is 55553 . |
User | Any user name using authentication (default => msf). Above example is test . |
Pass | Any password using authentication (default => random string). Above example is test1234 . |
步驟3 編輯配置文件
您必須在config.ini中更改以下值
…snip…
[Common]
server_host : 192.168.220.144
server_port : 55553
msgrpc_user : test
msgrpc_pass : test1234
…snip…
[Metasploit]
lhost : 192.168.220.144
config | description |
---|---|
server_host | IP address of your server that launched Metasploit. Your setting value ServerHost in Step2. |
server_port | Any port number of your server that launched Metasploit. Your setting value ServerPort in Step2. |
msgrpc_user | Metasploit’s user name using authentication. Your setting value User in Step2. |
msgrpc_pass | Metasploit’s password using authentication. Your setting value Pass in Step2. |
lhost | IP address of your server that launched Metasploit. Your setting value ServerHost in Step2. |
智能模式
步驟4 訓練深度利用
您在客戶端計算機上使用培訓模式執行Deep Exploit。
local@client:~$ python DeepExploit.py -t 192.168.184.132 -m train
command options | description |
---|---|
-t, –target | IP address of training vulnerable host such as Metasploitable2. |
-m, –mode | Execution mode “train”. |
步驟5 使用訓練有素的Deep Exploit進行測試
您在客戶端計算機上使用測試模式執行Deep Exploit。
local@client:~$ python DeepExploit.py -t 192.168.184.129 -m test
command options | description |
---|---|
-t, –target | IP address of test target host. |
-m, –mode | Execution mode “test”. |
Step.6 檢查掃描報告
請使用任何網頁瀏覽器檢查掃描報告。
local@client:~$ firefox “Deep Exploit root path”/report/DeepExploit_report.html
來源:https://github.com/13o-bbr-bbq/machine_learning_security/tree/master/DeepExploit#step6-check-scan-report