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.
Subcommands
Lists, creates, changes or deletes user accounts.
LowLists or changes domain global groups. Runs against a domain controller.
LowLists or changes local groups such as Administrators or Remote Desktop Users.
LowShows or sets the password and lockout policy.
LowLists computers on the network or the shares on a given computer.
LowLists, creates or deletes shares on the local computer.
LowLists or ends SMB sessions connected to this computer.
LowConnects to, lists or removes mapped network resources, including admin shares such as C$ and ADMIN$.
MediumStarts a service, or lists running services when no name is given.
LowStops a service. Stopping security, backup or database services before encryption is a known ransomware step.
MediumShows or syncs the time against another computer.
LowSwitches
Runs the query or change against the domain instead of the local computer.
LowCreates the account or group, or adds a member.
HighDeletes the account, membership, share or mapping.
MediumEnables or disables an account (yes or no).
MediumControls whether a mapping is restored at the next logon.
LowGives the account used for the net use connection. Explicit credentials can mean credential reuse.
MediumCommand lines to worry about
- 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 - 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 - 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)\$
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.
- CriticalSuspicious 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)
- HighNew 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)
- HighPotential 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
- HighPotentially Suspicious Child Process Of Regsvr32
Detects potentially suspicious child processes of "regsvr32.exe".
T1218.010by elhoim, Florian Roth (Nextron Systems), Nasreddine Bencherchali (Nextron Systems)
- HighSuspicious Child Process Of Manage Engine ServiceDesk
Detects suspicious child processes of the "Manage Engine ServiceDesk Plus" Java web service
T1102by Florian Roth (Nextron Systems)
- HighSuspicious Child Process Of Wermgr.EXE
Detects suspicious Windows Error Reporting manager (wermgr.exe) child process
T1055T1036by Florian Roth (Nextron Systems)
- HighSuspicious 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)
- HighSuspicious 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)
- HighSuspicious 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
- HighSuspicious Spool Service Child Process
Detects suspicious print spool service (spoolsv.exe) child processes.
T1203T1068by Justin C. (@endisphotic), @dreadphones (detection), Thomas Patzke (Sigma rule)
- HighSuspicious 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)
- HighWebshell 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
- HighWindows 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)
- MediumNew 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)
- MediumPassword 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)
- MediumPotential 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)
- MediumPotentially Suspicious Child Process Of ClickOnce Application
Detects potentially suspicious child processes of a ClickOnce deployment application
by Nasreddine Bencherchali (Nextron Systems)
- MediumRemote 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
- MediumSuspicious 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)
- MediumWindows 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
- LowDiscovery 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
- LowLocal Accounts Discovery
Local accounts, System Owner/User discovery using operating systems utilities
T1033T1087.001by Timur Zinniatullin, Daniil Yugoslavskiy, oscd.community
- LowShare 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)
- LowStart 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
- LowStop 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)
- LowSystem 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
- LowUnmount 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
- LowWindows 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.