Cdb.exe

type: OtherMSBinaries
Debugging tool included with Windows Debugging Tools.

Full path

C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\cdb.exe
C:\Program Files (x86)\Windows Kits\10\Debuggers\x86\cdb.exe

Commands

  1. ExecuteUser T1127

    Local execution of assembly shellcode.

    cdb.exe -cf {PATH:.wds} -o notepad.exe

    Launch 64-bit shellcode from the specified .wds file using cdb.exe.

    os: Windows

    Execute: Shellcode

  2. ExecuteUser T1127

    Run a shell command under a trusted Microsoft signed binary

    cdb.exe -pd -pn {process_name}
    .shell {CMD}
    

    Attaching to any process and executing shell commands.

    os: Windows

    Execute: CMD

  3. ExecuteUser T1127

    Run commands under a trusted Microsoft signed binary

    cdb.exe -c {PATH:.txt} "{CMD}"

    Execute arbitrary commands and binaries using a debugging script (see Resources section for a sample file).

    os: Windows

    Execute: CMD

Detection

Code samples

Resources

acknowledgement: Matt Graeber @mattifestation, mr.d0x @mrd0x, Spooky Sec @sec_spooky, Nasreddine Bencherchali @nas_bench