Skip to content
WETNav

Execution · Windows · LOLBAS

regasm.exe

Assembly Registration Tool

.NET tool that registers assemblies for COM. It can run code in an assembly's registration methods, giving proxy execution under a trusted binary.

Legitimate use

Developers use it to expose .NET assemblies to COM clients.

Worst caseHigh

Switches

/u

Unregisters the assembly, running its unregister method.

Medium
/codebase

Registers with a codebase path.

Low
/tlb

Also generates a type library.

Info

Command lines to worry about

  • High

    RegAsm running an assembly from a user path

    RegAsm registers a DLL from a writable folder, which runs its registration code. Check where the DLL came from.

    Detection regexregasm(\.exe)?\s+.*\\(temp|appdata|programdata|public|downloads)\\[^\s]+\.dll

    T1218.009

Where it is recorded

  • Security4688Process creation with the full command line, when command-line auditing is enabled.
  • Sysmon1Process creation with command line, hashes and parent process.

Community detections

7 SigmaHQ rules for regasm.exe. The explainer checks every pasted command line against all of them.

  • High
    Bad Opsec Defaults Sacrificial Processes With Improper Arguments

    Detects attackers using tooling with bad opsec defaults. E.g. spawning a sacrificial process to inject a capability into the process without taking into account how the process is normally run. One trivial example of this is using rundll32.exe without arguments as a sacrificial process (default in CS, now highlighted by c2lint), running WerFault without arguments (Kraken - credit am0nsec), and…

    T1218.011by Oleg Kolesnikov @securonix invrep_de, oscd.community, Florian Roth (Nextron Systems), Christian Burkard (Nextron Systems)

  • High
    Potential PowerShell Execution Via DLL

    Detects potential PowerShell execution from a DLL instead of the usual PowerShell process as seen used in PowerShdll. This detection assumes that PowerShell commands are passed via the CommandLine.

    T1218.011by Markus Neis, Nasreddine Bencherchali (Nextron Systems)

  • High
    Suspicious Microsoft Office Child Process

    Detects a suspicious process spawning from one of the Microsoft Office suite products (Word, Excel, PowerPoint, Publisher, Visio, etc.)

    T1047T1204.002T1218.010by Florian Roth (Nextron Systems), Markus Neis, FPT.EagleEye Team, Vadim Khrykov, Cyb3rEng, Michael Haag, Christopher Peacock @securepeacock, @scythe_io

  • High
    Suspicious Microsoft OneNote Child Process

    Detects suspicious child processes of the Microsoft OneNote application. This may indicate an attempt to execute malicious embedded objects from a .one file.

    T1566T1566.001by Tim Rauch (Nextron Systems), Nasreddine Bencherchali (Nextron Systems), Elastic (idea)

  • Medium
    Potentially Suspicious Execution Of Regasm/Regsvcs From Uncommon Location

    Detects potentially suspicious execution of the Regasm/Regsvcs utilities from a potentially suspicious location

    T1218.009by Nasreddine Bencherchali (Nextron Systems)

  • Medium
    Potentially Suspicious Execution Of Regasm/Regsvcs With Uncommon Extension

    Detects potentially suspicious execution of the Regasm/Regsvcs utilities with an uncommon extension.

    T1218.009by Nasreddine Bencherchali (Nextron Systems)

  • Low
    RegAsm.EXE Execution Without CommandLine Flags or Files

    Detects the execution of "RegAsm.exe" without a commandline flag or file, which might indicate potential process injection activity. Usually "RegAsm.exe" should point to a dedicated DLL file or call the help with the "/?" flag.

    T1218.009by frack113

Rules from SigmaHQ (rules/windows/process_creation), Detection Rule License (DRL) 1.1. Each rule links to its source and credits its authors.