5 min read

Detecting Authentication Brute Force: The Three Attacks Behind 401, 530 and 535

Brute force is among the easiest attacks to miss in a capture, because it looks like a stream of perfectly ordinary login requests. This article gives the counting criteria and thresholds for HTTP, FTP, SMTP and POP3, explains how brute force, password spraying and guessing are separated into buckets, and how to keep false positives down.

Detecting Authentication Brute Force: The Three Attacks Behind 401, 530 and 535
SummaryKey Points
  • The unit of detection is not a packet but a count of failures on one flow
  • HTTP 401/403 ≥10 and FTP 530 / SMTP 535 ≥5 trigger a brute-force judgment
  • ≥3 distinct usernames from one source is spraying; ≥5 attempts on one username is guessing
  • Brute force inside HTTPS shows no status codes — you need decryption or another angle

Why Brute Force Is Hard to See in a Capture

From a log perspective, brute force is the easiest attack to catch: two hundred 4625 events in a minute and the alert fires immediately. From a packet perspective it is the opposite — every request the attacker sends is a syntactically valid HTTP POST or FTP command, indistinguishable from a normal login at the packet level.

Worse, many tools deliberately throttle. Each attempt is spaced out by seconds, the source port changes, a little jitter is added. Such low-and-slow attempts never trip a rate threshold over any fixed window. Detection based on "requests per second" simply fails here.

The one viable angle is response semantics. Failed authentication always leaves a trace at the protocol layer: HTTP returns 401 or 403, FTP returns 530, SMTP returns 535, POP3 returns -ERR. Aggregate these failures by the client-to-server direction and the shape of the attack becomes visible.

Four Protocols, Two Counting Rules

PcapDecoder's brute-force detector counts four cleartext-authentication protocols, with thresholds set per protocol noise level:

ProtocolPortFailure signatureThreshold
HTTP80 / 8080Response line starts with HTTP/1. and status is 401 / 403≥10 per pair
FTP21Response starts with 530≥5 per pair
SMTP25 / 587Response starts with 535≥5 per pair
POP3110Response starts with -ERR≥5 per pair

The threshold difference is deliberate. HTTP 401 is common in healthy environments — failed asset loads, expired token retries, health checks without credentials all produce it. So HTTP needs a higher bar (10), while FTP, SMTP and POP3 auth failures almost never repeat in normal traffic, making 5 already abnormal.

Port 443 is not analyzed. HTTPS is encrypted and status codes are invisible; guessing by packet count and duration would generate a flood of false positives. That is an explicit boundary, not an oversight.

Separating the Three Forms

"Many failures" carries very different intent depending on distribution. The detector buckets along the username dimension:

Form 1: Password brute force (T1110)

Failures on one flow exceed the threshold. The username may vary or stay fixed. Crudest form, usually a dictionary run by tools like hydra or medusa.

Form 2: Password spraying (T1110.003)

One source tries ≥3 distinct usernames, a few attempts each. This has become the dominant form because it defeats account lockout — two or three attempts per account never trigger a lock, but sweeping hundreds of employee accounts eventually finds a weak password.

The usernames come from the protocol fields: FTP USER , POP3 USER , IMAP LOGIN , and HTTP Basic in the Authorization header (base64-decoded to extract the user). The size of the distinct-username set per source is the direct evidence.

Form 3: Password guessing (T1110.001)

≥5 failures from one source against one username on one target. A technical detail matters here: a failure belongs to whichever username that flow most recently submitted. FTP and POP3 submit in cleartext and are easy to align; HTTP forms require reading the most recent POST body.

All three can appear at once. A capture where source A sprays while source B hammers a single account is a perfectly normal combination and the report lists them separately.

How-to: Four Steps from Suspicion to Conclusion

Step 1: Look at auth failure density. Open the capture and check the deep-scan findings for authentication items. If nothing hits, you can confirm manually with a display filter such as tcp.port == 80 and inspecting the protocol tree; the built-in filter subset covers field predicates like this but not full semantics.

Step 2: Confirm direction. Brute force must be repeated failures in the client-to-server direction. If a server returns 401 to many clients, that is a configuration problem — an endpoint requiring auth that the frontend does not send.

Step 3: Look at username distribution. This decides the classification. Few usernames with many variations = guessing; many usernames with few attempts each = spraying; both = combined attack. The follow-stream view shows FTP USER commands and HTTP POST bodies directly.

Step 4: Pivot on the source. Take the source IP and inspect all its sessions in the capture. If it is also port scanning (T1046) or touching admin shares (T1021), the chain escalates from "isolated brute force" to "pre-compromise reconnaissance" and priority changes completely.

False Positives and Blind Spots

False positives come mainly from automation. Monitoring agents, backup software and IoT devices retry fixed credentials dozens of times as a matter of course. Two auxiliary signals help: interval regularity (machine retries are steady) and whether any success follows (a misconfigured client occasionally succeeds; brute force does not). The current version judges by count threshold, so in such environments raise the threshold or exclude the IP explicitly.

The blind spot is encrypted authentication. HTTPS, SMTPS and IMAPS keep the entire authentication exchange inside TLS. Reading it requires the keylog path (see the TLS decryption guide); without decryption you can only look at JA3/JA4 fingerprints and connection frequency, which is correlation, not direct evidence. The detector chooses not to guess here — silence beats noise.


Related reading: How to Find Cleartext Credentials in Traffic, Detecting Lateral Movement: RDP / SMB / WinRM.

Brute ForcePassword SprayingCredential StuffingT1110Authentication Security
Share
Back to home