Deep Exploit是與Metasploit鏈接的全自動(dòng)滲透工具。
Deep Exploit有兩種開發(fā)模式:
Deep Exploit可以識(shí)別目標(biāo)服務(wù)器上所有打開的端口的狀態(tài),并根據(jù)過去的經(jīng)驗(yàn)(訓(xùn)練結(jié)果)精確地執(zhí)行漏洞利用。
Deep Exploit利用與用戶指定的產(chǎn)品名稱和端口號(hào)相對(duì)應(yīng)的“漏洞利用模塊”,“目標(biāo)”和“有效負(fù)載”的所有組合來執(zhí)行漏洞利用。
Deep Exploit的主要功能如下:
如果“智能模式”,Deep Exploit可以在精確定位點(diǎn)執(zhí)行攻擊(至少1次嘗試)。
如果“暴力破解模式”,Deep Exploit可以根據(jù)用戶指定的產(chǎn)品名稱和端口號(hào)徹底執(zhí)行漏洞利用程序。
如果Deep Exploit成功利用目標(biāo)服務(wù)器,它會(huì)進(jìn)一步對(duì)其他內(nèi)部服務(wù)器執(zhí)行利用。
您唯一的操作是輸入一個(gè)命令。這很容易!
Deep Exploit不需要“學(xué)習(xí)數(shù)據(jù)”。
Deep Exploit可以學(xué)習(xí)如何使用自己的方法(使用強(qiáng)化學(xué)習(xí))。
Deep Exploit使用多代理的分布式學(xué)習(xí)。
所以,我們采用了一種名為A3C的高級(jí)機(jī)器學(xué)習(xí)模型
目前Deep Exploit的版本是測(cè)試版。
但是,它可以自動(dòng)執(zhí)行以下操作:
系統(tǒng)組成
處理流程
智能模式
第1步 端口掃描目標(biāo)服務(wù)器
Deep Exploit使用Nmap執(zhí)行端口掃描以收集目標(biāo)服務(wù)器的信息。
之后,Deep Exploit通過RPC API執(zhí)行兩個(gè)Metasploit的命令(主機(jī)和服務(wù))。
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從主機(jī)命令的結(jié)果中獲取OS類型。 在上面的例子中,Deep Exploit將Linux作為操作系統(tǒng)類型。
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從端口掃描的結(jié)果中獲取端口號(hào),協(xié)議類型,產(chǎn)品名稱,產(chǎn)品版本。
在上面的例子中,Deep Exploit的端口號(hào)為21,協(xié)議為tcp,產(chǎn)品為vsftpd,版本為2.3.4
第2步 利用Metasploit進(jìn)行培訓(xùn)
Deep Exploit使用名為A3C的高級(jí)機(jī)器學(xué)習(xí)模型學(xué)習(xí)如何開發(fā)方法。
因此,Deep Exploit使用易受攻擊的服務(wù)器,例如metasploitable2,owaspbwa進(jìn)行學(xué)習(xí)。
第3步 利用Metasploit進(jìn)行測(cè)試
第4步 利用后
第5步 生成報(bào)告
Deep Exploit生成匯總漏洞的報(bào)告。報(bào)告的樣式是html。
蠻力模式
用法
步驟0 初始化Metasploit DB
首先,你使用msfdb命令初始化metasploit db(postgreSQL)。
root@kali:~# msfdb init
步驟1 啟動(dòng)Metasploit框架
您可以在安裝Metasploit Framework的遠(yuǎn)程服務(wù)器(如Kali Linux)上啟動(dòng)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 啟動(dòng)RPC服務(wù)器
啟動(dòng)Metasploit的RPC服務(wù)器。
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 選項(xiàng) | 描述 |
---|---|
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 訓(xùn)練深度利用
您在客戶端計(jì)算機(jī)上使用培訓(xùn)模式執(zhí)行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 使用訓(xùn)練有素的Deep Exploit進(jìn)行測(cè)試
您在客戶端計(jì)算機(jī)上使用測(cè)試模式執(zhí)行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 檢查掃描報(bào)告
請(qǐng)使用任何網(wǎng)頁瀏覽器檢查掃描報(bào)告。
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