CobaltStrike_Resources_Template__x32_x64_Ps1_v1_45_to_v2_5_and_v3_11_to_v3_14
Description
Cobalt Strike's resources/template.x64.ps1, resources/template.x32 from v3.11 to v3.14 and resources/template.ps1 from v1.45 to v2.5
Query · yara
strings:
$importVA = "[DllImport(\"kernel32.dll\")] public static extern IntPtr VirtualAlloc" nocase
$importCT = "[DllImport(\"kernel32.dll\")] public static extern IntPtr CreateThread" nocase
$importWFSO = "[DllImport(\"kernel32.dll\")] public static extern int WaitForSingleObject" nocase
$compiler = "New-Object Microsoft.CSharp.CSharpCodeProvider" nocase
$params = "New-Object System.CodeDom.Compiler.CompilerParameters" nocase
$paramsSys32 = ".ReferencedAssemblies.AddRange(@(\"System.dll\", [PsObject].Assembly.Location))" nocase
$paramsGIM = ".GenerateInMemory = $True" nocase
$result = "$compiler.CompileAssemblyFromSource($params, $assembly)" nocase
//$data = "[Byte[]]$var_code = [System.Convert]::FromBase64String(" nocase
//$64bitSpecific = "[IntPtr]::size -eq 8"
condition:
all of them