Security operations

What Is an SMB Brute Force Attack? How It Works and How to Stop It

An SMB brute force attack guesses passwords against Windows file sharing until one works. Here is how it works and how to stop it.

Cysoro Security TeamPublished · 9 min read
\\SERVER\shareLogin failed x 1,204 SECURITY OPERATIONS SMB brute force Guessing passwords, one by one.
Quick answer

An SMB brute force attack is an automated campaign that guesses usernames and passwords against the Server Message Block protocol, usually on TCP port 445, until a valid login is found. Attackers scan for open SMB ports, enumerate users and shares, then try dictionary, spraying, and credential stuffing attacks. One valid login can read files and move laterally, so block port 445 from the internet, remove SMBv1, and use strong passwords with MFA.

Key takeaways

  • SMB brute force attacks guess passwords against Windows file sharing, usually on TCP port 445.
  • One valid login can lead to file access, admin shares, and lateral movement across the network.
  • Blocking port 445 from the internet, removing SMBv1, and using MFA stop most of these attacks.

A Windows file share answers on port 445. Somewhere on the internet, an automated tool is already knocking on that port, trying one password after another. That is an SMB brute force attack, and it only needs one weak password to walk in.

What is an SMB brute force attack?

An SMB brute force attack is an automated campaign that guesses usernames and passwords against the Server Message Block protocol, which Windows uses for file sharing, printers, and remote administration. The attacker tries thousands of combinations until one works.

SMB runs on TCP port 445 on modern Windows networks, and on TCP port 139 for older NetBIOS-based SMB. When a server answers on one of those ports, an attacker can attempt to log in as any user, including Administrator, and test passwords as fast as the server allows.

MITRE ATT&CK lists this under technique T1110, Brute Force, in the Credential Access tactic. It notes that password spraying, a slower variant, is commonly aimed at SMB, along with SSH, RDP, FTP, and LDAP, because those services accept remote logins.

A successful guess is not the end of the attack. It is the beginning. One valid SMB login can read shared files, copy tools to the machine, and move laterally to other computers, often all the way to domain administrator.

How does an SMB brute force attack work?

An SMB brute force attack follows a predictable sequence: find a target, learn its users and shares, guess passwords, and then use the first valid login to spread. Each step is automated, so one attacker can run it against many networks at once.

How an SMB brute force attack unfolds1Scanfind openport 4452Enumeratelist usersand shares3Guesstry passwordsat scale4Log invalid accountfound5Spreadmove laterallyto more hosts
An SMB brute force attack scans, enumerates, guesses, logs in, and spreads. Illustration by Cysoro.

Step 1: Scan. The attacker scans for hosts with TCP port 445 open, using tools such as Nmap or Masscan. An internet-facing SMB port is an open invitation, and scanners find it within hours of exposure.

Step 2: Enumerate. The attacker lists shared folders and user accounts, often with tools such as enum4linux or smbclient. Anonymous or guest access, where it still exists, makes this step easy. Even without it, common usernames such as Administrator are a safe guess.

Step 3: Guess. The attacker tries passwords from a wordlist, such as the well-known rockyou list, or from passwords leaked in earlier breaches. Tools such as Hydra, Metasploit smb_login module, NetExec, and Patator can test many combinations in parallel.

Step 4: Log in. When a combination works, the attacker has a valid SMB session. From there they can read files, list more shares, and use admin shares such as C$ and ADMIN$ to copy tools and run commands on the machine.

Step 5: Spread. With one foothold, the attacker repeats the process inside the network, guessing passwords on other machines and using the stolen credentials to move laterally. MITRE notes that the Lazarus Group used this exact pattern, trying permutations of Administrator with weak passwords to reach Windows shares.

What are the types of SMB brute force attacks?

Not every guessing attack looks the same. Attackers choose a method based on what they know, how much noise they can afford to make, and whether the target locks accounts after failed logins.

MethodHow it worksWhy attackers use it
Brute forceTry every combinationWorks against short passwords
DictionaryTry words and common passwordsFast, low effort
Password sprayingOne password, many accountsAvoids lockouts
Credential stuffingReuse leaked passwordsExploits password reuse
HybridWords plus numbers and symbolsBeats simple complexity rules

Brute force tries every possible combination, character by character. It is slow against long passwords, but it will eventually crack a short one. Modern password policies make pure brute force impractical against a long, random password.

Dictionary attacks try words from a list, plus common passwords such as Password123 and seasonal variants. They are fast because most people choose predictable passwords, even when complexity rules force a capital letter and a number.

Password spraying flips the approach. Instead of trying many passwords against one account, it tries one common password against many accounts. That stays under most lockout thresholds, because no single account sees many failures. MITRE describes it as using one password, or a small list, that matches the domain complexity policy.

Credential stuffing uses real username and password pairs stolen in earlier breaches. Because many people reuse passwords across sites, a pair from one breach often works on a completely different system.

Hybrid attacks combine dictionary words with numbers, symbols, and capitalization, such as Summer2026! That defeats complexity rules that only check for character types, without requiring real length or randomness.

Why is SMB such a popular target?

SMB is popular with attackers for three reasons: it is everywhere, it accepts remote logins, and one login opens a lot of doors. Every Windows network uses it, and many networks expose it by accident.

First, SMB is the default file-sharing protocol on Windows. Shared folders, mapped drives, printers, and the SYSVOL and NETLOGON shares that Group Policy depends on all run over SMB. Disabling it entirely is rarely an option, so attackers know it will be there.

Second, SMB authentication has a long history of weak defaults. NTLM authentication, still common in many networks, is vulnerable to relay and guessing attacks when SMB signing is not enforced. Guest access and null sessions made enumeration easy on older systems, and some still allow them.

Third, a valid SMB login is powerful. It is not just file access. Admin shares and remote service creation let an attacker run code on the machine, dump credentials from memory, and pivot to the domain controller. That is why MITRE links SMB brute force to lateral movement, not just initial access.

Old versions make it worse. SMBv1, the version exploited by the WannaCry ransomware in 2017 through the EternalBlue flaw, is deprecated and no longer installed by default on modern Windows. But it survives on upgraded hosts, old appliances, and legacy systems, and CISA still recommends disabling it everywhere.

How do you know if you are under an SMB brute force attack?

An SMB brute force attack leaves a trail in your logs, if you look for it. The signs are bursts of failed logins, unusual accounts, and logins from places that make no sense for your team.

Watch for many failed logins against port 445 in a short time, especially against Administrator or other privileged accounts. Windows logs these as failed logon events, and a sudden spike is the clearest signal.

Watch for logins outside working hours, from unfamiliar IP addresses, or from countries where you have no staff. A single successful login after hundreds of failures is the event that matters most, and it should trigger an immediate investigation.

Watch for enumeration. Repeated attempts to list shares, or connections to ADMIN$ and C$ from a workstation that never uses them, suggest an attacker is mapping your network after an initial guess succeeded.

Set up alerts, not just logs. A SIEM or even a simple scheduled check that counts failed SMB logins per hour will catch an attack while it is still guessing, instead of after it has spread. If you see the pattern, block the source, force password resets for targeted accounts, and check for new sessions and scheduled tasks the attacker may have created.

How do you prevent SMB brute force attacks?

Prevention has a clear order: remove SMB from the internet, make passwords hard to guess, add MFA, and watch the logs. No single step is enough, but together they make brute force impractical.

Defenses that stop SMB brute force attacks1. Block port 445 at the boundarySMB should never be reachable from the internet. Block TCP 445, UDP 137-138, TCP 139.2. Strong passwords plus MFALong, unique passwords and MFA make guessing impractical and useless.3. Lockouts, signing, and monitoringLock accounts after failed logins, require SMB signing, and alert on bursts.Remove SMBv1 too: it has no place on a modern network.
SMB defenses: block port 445, use strong passwords and MFA, and monitor logins. Illustration by Cysoro.

Block SMB at the boundary. CISA recommends blocking all versions of SMB at the network boundary by blocking TCP port 445, UDP ports 137 to 138, and TCP port 139. SMB should never be reachable from the internet. If remote staff need file access, give them a VPN or SMB over QUIC, not an open port.

Disable SMBv1. Remove it from every Windows host, and check with PowerShell that it is gone. Modern Windows does not install it by default, but upgraded machines and old images may still have it.

Require SMB signing and encryption. SMB signing stops relay attacks, and SMB 3 encryption protects data on sensitive shares. Newer Windows versions require signing by default, but older hosts need it turned on explicitly.

Use long, unique passwords and MFA. Passphrases of four or more random words resist dictionary and hybrid attacks far better than a short complex password. MFA means a guessed password alone is not enough to log in. Give every person their own account, and never use a domain admin account for daily work or for services.

Set account lockouts and rate limits. Lock an account after a small number of failed logins, and use the SMB authentication rate limiter available on newer Windows Server versions. Be careful with lockouts on admin accounts, because an attacker can use them to lock you out, so pair lockouts with alerting and a separate break-glass account.

Limit who can reach port 445 internally. Segment the network so workstations cannot talk SMB to each other, only to the file servers they need. Disable the Server service on machines that do not share files, and remove unused shares.

You can check your own password strength with our free password strength checker.

Also see whether a password has appeared in a breach with the pwned password checker.

MITRE lists this attack as technique T1110, Brute Force, and names SMB among the services commonly targeted by password spraying. Read MITRE ATT&CK T1110: Brute Force for the full technique description.

CISA also recommends blocking SMB at the network boundary. See CISA best practices for securing systems, which call for disabling SMBv1 and blocking TCP port 445.

What should you do if an SMB brute force attack succeeds?

Act fast, and assume the attacker has already moved. A single guessed password is rarely the whole incident, so your response must cover the account, the machine, and the network around it.

  1. Isolate the affected machine from the network, but do not turn it off yet, so you can preserve logs and memory for investigation.
  2. Disable the compromised account and force a password reset. Check for new accounts, new admin group members, and new scheduled tasks the attacker may have created.
  3. Check where the account logged in. Review authentication logs for other machines the same credentials reached, and isolate those too.
  4. Look for persistence. Check for new services, new shares, and new firewall rules, and review the admin shares for tools the attacker may have copied in.
  5. Reset credentials more widely if the compromised account was privileged, including service accounts and any password that was reused.
  6. Fix the entry point. Block the source, close the exposed port, and apply the prevention steps above before you bring the machine back.

Report the incident to your security team or provider, and if data was accessed, follow your breach notification duties. Keep the logs, because they are the evidence that shows how far the attacker got.

Never expose port 445 to the internetAn open SMB port is scanned constantly. If you find one on a public address, close it before you do anything else.

The bottom line

An SMB brute force attack is automated password guessing against Windows file sharing, and it only needs one weak password to open a door to your whole network. Block port 445 from the internet, remove SMBv1, and make guessing useless with long unique passwords and MFA.

Start by checking your own passwords, then review who can reach your file shares. Use the free password strength checker to test the passwords that protect your most important accounts.

Frequently asked questions

What port does an SMB brute force attack target?

Modern SMB uses TCP port 445. Older NetBIOS-based SMB uses TCP port 139, with UDP ports 137 and 138. CISA recommends blocking all of these at the network boundary so SMB is never reachable from the internet.

What is the difference between brute force and password spraying?

Brute force tries many passwords against one account. Password spraying tries one common password against many accounts, which stays under most account lockout thresholds because no single account sees many failures.

What tools do attackers use for SMB brute force?

Common tools include Hydra, Metasploit with the smb_login module, NetExec, the successor to CrackMapExec, and Patator. Security teams use the same tools in authorized penetration tests to find weak passwords before attackers do.

Can MFA stop an SMB brute force attack?

Yes, in most cases. Even if an attacker guesses the password, they still need the second factor to log in. MFA is one of the strongest defenses, which is why it should be enforced on every account that can log in remotely.

Should I disable SMBv1?

Yes. SMBv1 is deprecated, is not installed by default on modern Windows, and was exploited by the WannaCry ransomware in 2017. CISA recommends disabling it on your internal network as well as blocking SMB at the boundary.

How can I tell if someone is brute forcing my SMB server?

Look for bursts of failed logins against port 445, especially against Administrator, logins outside working hours or from unfamiliar addresses, and repeated attempts to list shares or reach ADMIN$ and C$. Alert on these patterns instead of only logging them.

What is credential stuffing?

Credential stuffing uses real username and password pairs stolen in earlier data breaches. Because many people reuse passwords, a pair from one breach often works on a different system, including SMB logins.

Is SMB brute force illegal?

Yes. Guessing passwords to access a system without permission is unauthorized access, which is a crime in most countries, even if the attacker only tries and fails.

Sources

  1. MITRE ATT&CK — Technique T1110: Brute Force
  2. CISA — Best Practices for Securing Election Systems (SMB guidance)
  3. MITRE ATT&CK — Software S0488: CrackMapExec
  4. CISA — SMB Security Best Practices (US-CERT)
Written & fact-checked byCysoro Security Team

The engineers and analysts who build Cysoro's domain scanner, email-authentication checks and free security tools. We test what we write about every day — SPF, DKIM, DMARC, certificates, look-alike domains and phishing — and check each guide against the relevant standards, government guidance and vendor documentation.

  • Email authentication
  • Phishing & BEC
  • Domain & DNS security
  • Small-business security

Checked against MITRE ATT&CK T1110 and CISA SMB security guidance.

How we write and fact-check →

Free tools for this topic

No account needed.

See where your domain stands

Free for up to 3 domains. No card, no installs.

Start free