Skip to content
WETNav

Discovery · Windows

net.exe

Net command

Manages users, groups, shares, services and sessions. It is used for account and domain discovery, account creation, mapping admin shares and stopping services. net.exe hands off to net1.exe.

Legitimate use

Admins use it to manage local accounts, map drives and start or stop services.

Worst caseHigh

Subcommands

user

Lists, creates, changes or deletes user accounts.

Low
group

Lists or changes domain global groups. Runs against a domain controller.

Low
localgroup

Lists or changes local groups such as Administrators or Remote Desktop Users.

Low
accounts

Shows or sets the password and lockout policy.

Low
view

Lists computers on the network or the shares on a given computer.

Low
share

Lists, creates or deletes shares on the local computer.

Low
session

Lists or ends SMB sessions connected to this computer.

Low
use

Connects to, lists or removes mapped network resources, including admin shares such as C$ and ADMIN$.

Medium
start

Starts a service, or lists running services when no name is given.

Low
stop

Stops a service. Stopping security, backup or database services before encryption is a known ransomware step.

Medium
time

Shows or syncs the time against another computer.

Low

Switches

/domain

Runs the query or change against the domain instead of the local computer.

Low
/add

Creates the account or group, or adds a member.

High
/deletealso del

Deletes the account, membership, share or mapping.

Medium
/active

Enables or disables an account (yes or no).

Medium
/persistent

Controls whether a mapping is restored at the next logon.

Low
/user<value>

Gives the account used for the net use connection. Explicit credentials can mean credential reuse.

Medium

Command lines to worry about

  • High

    Account created with a password on the command line

    Creates an account and sets its password in one step. Check 4720 for the new account, then whether it was added to a privileged group.

    Detection regex\bnet1?(\.exe)?\s+user\s+\S+\s+\S+\s+.*\/add\b

    T1136.001T1136.002

  • High

    Account added to a privileged local group

    Grants admin or RDP rights on this computer. Check 4732 and the account that was added.

    Detection regex\bnet1?(\.exe)?\s+localgroup\s+"?(administrators|remote desktop users)"?\s+\S+.*\/add\b

    T1098

  • Medium

    Privileged domain group enumeration

    Lists the members of a highly privileged domain group. Common in domain discovery after a foothold.

    Detection regex\bnet1?(\.exe)?\s+group\s+"?(domain admins|enterprise admins|schema admins)"?\s+.*\/do(main)?\b

    T1069.002

  • Medium

    Admin share connection

    Connects to an administrative share on another computer. Often seen before files are copied or a service is created remotely.

    Detection regex\bnet1?(\.exe)?\s+use\s+\\\\[^\s\\]+\\(admin|c|ipc)\$

    T1021.002

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.
  • Security4720A user account was created (net user /add).
  • Security4732A member was added to a security-enabled local group.
  • Security5140A network share was accessed, logged on the target of net use.

Community detections

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

  • Critical
    Suspicious Child Process Of Veeam Dabatase

    Detects suspicious child processes of the Veeam service process. This could indicate potential RCE or SQL Injection.

    by Nasreddine Bencherchali (Nextron Systems)

  • High
    New User Created Via Net.EXE With Never Expire Option

    Detects creation of local users via the net.exe command with the option "never expire"

    T1136.001by Nasreddine Bencherchali (Nextron Systems)

  • High
    Potential Process Injection Via Msra.EXE

    Detects potential process injection via Microsoft Remote Asssistance (Msra.exe) by looking at suspicious child processes spawned from the aforementioned process. It has been a target used by many threat actors and used for discovery and persistence tactics

    T1055by Alexander McDonald

  • High
    Potentially Suspicious Child Process Of Regsvr32

    Detects potentially suspicious child processes of "regsvr32.exe".

    T1218.010by elhoim, Florian Roth (Nextron Systems), Nasreddine Bencherchali (Nextron Systems)

  • High
    Suspicious Child Process Of Manage Engine ServiceDesk

    Detects suspicious child processes of the "Manage Engine ServiceDesk Plus" Java web service

    T1102by Florian Roth (Nextron Systems)

  • High
    Suspicious Child Process Of Wermgr.EXE

    Detects suspicious Windows Error Reporting manager (wermgr.exe) child process

    T1055T1036by Florian Roth (Nextron Systems)

  • High
    Suspicious Manipulation Of Default Accounts Via Net.EXE

    Detects suspicious manipulations of default accounts such as 'administrator' and 'guest'. For example 'enable' or 'disable' accounts or change the password...etc

    T1560.001by Nasreddine Bencherchali (Nextron Systems)

  • High
    Suspicious Process By Web Server Process

    Detects potentially suspicious processes being spawned by a web server process which could be the result of a successfully placed web shell or exploitation

    T1505.003T1190by Thomas Patzke, Florian Roth (Nextron Systems), Zach Stanford @svch0st, Tim Shelton, Nasreddine Bencherchali (Nextron Systems)

  • High
    Suspicious Processes Spawned by Java.EXE

    Detects suspicious processes spawned from a Java host process which could indicate a sign of exploitation (e.g. log4j)

    by Andreas Hunkeler (@Karneades), Florian Roth

  • High
    Suspicious Spool Service Child Process

    Detects suspicious print spool service (spoolsv.exe) child processes.

    T1203T1068by Justin C. (@endisphotic), @dreadphones (detection), Thomas Patzke (Sigma rule)

  • High
    Suspicious Windows Service Tampering

    Detects the usage of binaries such as 'net', 'sc' or 'powershell' in order to stop, pause, disable or delete critical or important Windows services such as AV, Backup, etc. As seen being used in some ransomware scripts

    T1489T1685by Nasreddine Bencherchali (Nextron Systems), frack113 , X__Junior (Nextron Systems)

  • High
    Webshell Detection With Command Line Keywords

    Detects certain command line parameters often used during reconnaissance activity via web shells

    T1505.003T1018T1033T1087by Florian Roth (Nextron Systems), Jonhnathan Ribeiro, Anton Kutepov, oscd.community, Chad Hudson, Matt Anderson

  • High
    Windows Internet Hosted WebDav Share Mount Via Net.EXE

    Detects when an internet hosted webdav share is mounted using the "net.exe" utility

    T1021.002by Nasreddine Bencherchali (Nextron Systems)

  • Medium
    New User Created Via Net.EXE

    Identifies the creation of local users via the net.exe command.

    T1136.001by Endgame, JHasenbusch (adapted to Sigma for oscd.community)

  • Medium
    Password Provided In Command Line Of Net.EXE

    Detects a when net.exe is called with a password in the command line

    T1021.002T1078by Tim Shelton (HAWK.IO)

  • Medium
    Potential Defense Evasion Via Binary Rename

    Detects the execution of a renamed binary often used by attackers or malware leveraging new Sysmon OriginalFileName datapoint.

    T1036.003by Matthew Green @mgreen27, Ecco, James Pemberton @4A616D6573, oscd.community, Andreas Hunkeler (@Karneades)

  • Medium
    Potentially Suspicious Child Process Of ClickOnce Application

    Detects potentially suspicious child processes of a ClickOnce deployment application

    by Nasreddine Bencherchali (Nextron Systems)

  • Medium
    Remote Access Tool - ScreenConnect Potential Suspicious Remote Command Execution

    Detects potentially suspicious child processes launched via the ScreenConnect client service.

    T1219.002by Florian Roth (Nextron Systems), Nasreddine Bencherchali (Nextron Systems), @Kostastsale

  • Medium
    Suspicious Group And Account Reconnaissance Activity Using Net.EXE

    Detects suspicious reconnaissance command line activity on Windows systems using Net.EXE Check if the user that executed the commands is suspicious (e.g. service accounts, LOCAL_SYSTEM)

    T1087.001T1087.002by Florian Roth (Nextron Systems), omkar72, @svch0st, Nasreddine Bencherchali (Nextron Systems)

  • Medium
    Windows Admin Share Mount Via Net.EXE

    Detects when an admin share is mounted using net.exe

    T1021.002by oscd.community, Teymur Kheirkhabarov @HeirhabarovT, Zach Stanford @svch0st, wagga

  • Low
    Discovery of a System Time

    Identifies use of various commands to query a systems time. This technique may be used before executing a scheduled task or to discover the time zone of a target system.

    T1124by E.M. Anhaus (originally from Atomic Blue Detections, Endgame), oscd.community

  • Low
    Local Accounts Discovery

    Local accounts, System Owner/User discovery using operating systems utilities

    T1033T1087.001by Timur Zinniatullin, Daniil Yugoslavskiy, oscd.community

  • Low
    Share And Session Enumeration Using Net.EXE

    Detects attempts to enumerate file shares, printer shares and sessions using "net.exe" with the "view" flag.

    T1018by Endgame, JHasenbusch (ported for oscd.community)

  • Low
    Start Windows Service Via Net.EXE

    Detects the usage of the "net.exe" command to start a service using the "start" flag

    T1569.002by Timur Zinniatullin, Daniil Yugoslavskiy, oscd.community

  • Low
    Stop Windows Service Via Net.EXE

    Detects the stopping of a Windows service via the "net" utility.

    T1489by Jakob Weinzettl, oscd.community, Nasreddine Bencherchali (Nextron Systems)

  • Low
    System Network Connections Discovery Via Net.EXE

    Adversaries may attempt to get a listing of network connections to or from the compromised system they are currently accessing or from remote systems by querying for information over the network.

    T1049by frack113

  • Low
    Unmount Share Via Net.EXE

    Detects when when a mounted share is removed. Adversaries may remove share connections that are no longer useful in order to clean up traces of their operation

    T1070.005by oscd.community, @redcanary, Zach Stanford @svch0st

  • Low
    Windows Share Mount Via Net.EXE

    Detects when a share is mounted using the "net.exe" utility

    T1021.002by Nasreddine Bencherchali (Nextron Systems)

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