Join our Newsletter — 33% off our NHI Course
Home› FAQ› Threats, Abuse & Incident Response› How do attackers use net command?
Threats, Abuse & Incident Response

How do attackers use net command?

← Back to all FAQ
By NHI Mgmt Group Editorial Team Updated October 18, 2026 Domain: Threats, Abuse & Incident Response

Attackers use the net command on Windows to enumerate users, groups, sessions, shares, and domain information, then to add accounts or change administrative access after compromise. Defenders should treat unexpected use as suspicious, especially on servers and endpoints that do not normally administer systems. Monitor command-line activity and restrict privilege so the command cannot alter sensitive settings.

What attackers are doing when they use net

On a Windows system, net is a legitimate administrative utility, which is why it is useful to attackers after they gain a foothold. They use it to learn who is present, what groups exist, which sessions are active, what shares are exposed, and how the domain is structured, then to make simple but powerful changes such as adding accounts or changing local admin membership.

That combination makes net attractive in hands-on-keyboard activity. It does not look like a custom malware framework, yet it can reveal the environment and then change access with built-in commands. MITRE ATT&CK Enterprise Matrix is useful for mapping those steps to credential access, discovery, privilege escalation, and lateral movement patterns.

Why net is useful for post-compromise discovery and privilege change

net user, net localgroup, net group, net session, and net view give attackers fast visibility into the target without needing special tooling. In practice, that means they can confirm whether they have landed on a workstation, a server, or a domain-joined host, then choose the least noisy path for expanding access.

The same utility can also modify access state, which is why its abuse matters more than simple enumeration. Adding a user to an administrators group, creating an account, or querying domain trust relationships can all be part of the same intrusion sequence. The State of NHI & AI Agent Breach Report 2026 reinforces the broader pattern that attackers often combine discovery with credential and privilege abuse once they are inside.

Because net is native to Windows, defenders cannot rely on software reputation alone. The key question is whether the command usage fits the host role and the operator's usual behaviour. On a jump host, domain controller, or admin workstation it may be normal; on an ordinary endpoint it is often a stronger signal of compromise or hands-on administration than the command itself.

How defenders should investigate suspicious net activity

Context matters more than the command name. Look at the parent process, the logged-on user, the account's role, the target machine, and the sequence of commands around the event. A short burst of discovery followed by group changes, account creation, or remote session checks is far more concerning than a single administrative query during a planned change window.

Watch for unusual use from non-administrative accounts, use during off-hours, and activity on systems that normally should not manage users or groups. NIST SP 800-53 Rev 5 Security and Privacy Controls supports this kind of monitoring and least-privilege enforcement, while NIST Cybersecurity Framework 2.0 helps structure detect-and-respond coverage around those events.

Command-line telemetry is especially important because net leaves a lot of the detection value in the surrounding process chain rather than in the binary itself. If you can tie the command to a new logon, a remote administration attempt, or privilege assignment, the event becomes much more actionable than a bare command-line string.

Risk and Threat Considerations

Attackers like net because it blends into normal Windows administration while still exposing high-value information and changing local or domain access. That makes it useful for quiet recon, privilege expansion, and post-compromise control changes, especially where logging is thin or admin activity is common enough to hide in noise.

Failure mechanism: The environment allows built-in administrative commands to run with more privilege than the user should have, or without sufficient monitoring of who ran them, from where, and against which host. That lets an intruder enumerate the environment and then alter group membership or account state before defenders notice.

Impact: A small amount of initial access can turn into broader administrative control, faster lateral movement, and harder-to-detect persistence. If the same account can query and change sensitive access state, one compromised endpoint or credential can affect multiple systems.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

MITRE ATT&CK addresses the attack and risk surface, while CIS Controls v8 and NIST SP 800-53 Rev 5 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
MITRE ATT&CKT1087 — Account Discoverynet user and net group are used for account and group discovery.
T1069 — Permission Groups Discoverynet localgroup and net group reveal group membership and admin paths.
T1098 — Account ManipulationAttackers use net to add accounts or change group membership after compromise.
Recommendation — Map net discovery commands to T1087 and hunt for account enumeration on non-admin hosts. Correlate group discovery activity with later privilege changes and lateral movement. Alert on group membership or account changes performed through built-in Windows tools.
CIS Controls v8CIS-6 — Access Control ManagementRestricts who can create accounts or change privileged access.
Recommendation — Limit account and group changes to approved administrative roles and systems.
NIST SP 800-53 Rev 5AU-2 — Event LoggingCommand-line use needs auditable records to spot suspicious administration.
Recommendation — Log command execution with enough context to reconstruct who did what and where.

Practitioner Guidance

What to verify: Confirm which hosts are allowed to use net for administration, which accounts are permitted to do so, and whether those actions are recorded with enough fidelity to distinguish routine administration from intruder activity.

Decision rule: If net appears on a workstation, server, or account that does not normally administer identity or group state, treat it as a triage event and review the preceding logon, parent process, and any follow-on group or account changes before assuming it is benign.

Practitioner takeaway: The important control is not banning a Windows admin tool everywhere, it is making sure its discovery and access-changing uses are rare, attributable, and easy to separate from normal administration.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on October 18, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org