Null session
A null session is a connection to a network made anonymously, without credentials, to inspect resources, possibly to gather data for malicious purposes. Learn how null sessions work, why they were a classic Windows weakness, and how to disable them.
What is a null session?
A null session is an unauthenticated connection to a system, made with a blank username and password. It is most closely associated with older versions of Windows, where an anonymous connection to the hidden IPC$ share allowed a remote user to query information about the system without signing in.
Null sessions were originally intended to let computers on a network exchange basic information with one another.
How does a null session work?
- An attacker connects to a target's file-sharing service (SMB) without providing credentials.
- If anonymous access is allowed, the system accepts the connection.
- The attacker uses it to enumerate information, such as user and group names, shared folders, password policies, and domain details.
None of this grants direct control, but the information helps plan the next step, such as guessing passwords for the accounts it revealed.
Because the connection is anonymous, it may also leave fewer useful traces in logs than an attempt made with a real account.
Null session vs. guest access
Guest access uses a specific built-in guest account, which may have its own limited permissions. A null session uses no account at all. Both are forms of anonymous access, and both should be disabled unless there is a clear, controlled need.
Why does a null session matter?
Information gathered through null sessions makes attacks faster and more targeted. Modern Windows versions restrict anonymous access by default, but legacy systems, compatibility settings, and misconfigured services can still allow it. Hardening baselines that restrict anonymous enumeration, removing outdated SMB versions, and blocking SMB from untrusted networks close the gap.
Frequently asked questions
What is a null session?
A null session is connecting to a network anonymously, without credentials, to inspect resources, possibly to gather data for malicious purposes.
Are null sessions still a risk?
Modern systems restrict them by default, but older systems and permissive settings can still allow anonymous enumeration, so they are worth checking. Vulnerability scanners and hardening benchmarks usually include checks for anonymous enumeration, which makes them easy to find during routine reviews.
How do you disable null sessions?
Apply security settings that restrict anonymous access and enumeration, disable outdated SMB versions, and block SMB traffic from untrusted networks.
Close the gaps around privileged access
Secure, rotate, and audit every privileged account across your infrastructure.
Related terms
Hardening
Hardening is the process of increasing security and minimizing vulnerabilities in a system.
Read now →Authentication
Authentication is the action or process of validating an identity, usually that of a user or process requesting access.
Read now →Network mapping
Network mapping is the creation of a visual representation, or "map", of connections on a network.
Read now →