Dictionary, Brute-Force, Spray, and Stuffing Attacks

An engagement authorizes limited password testing against a company login. You have a list of employee accounts, a small set of likely passwords, and a rule allowing no more than two attempts per account. Service accounts are excluded. What kind of test fits those conditions, an…

An engagement authorizes limited password testing against a company login. You have a list of employee accounts, a small set of likely passwords, and a rule allowing no more than two attempts per account. Service accounts are excluded. What kind of test fits those conditions, and what would a successful login actually allow you to do?

Those questions are connected. Choosing an authentication attack isn't just choosing a tool or finding something that produces login attempts. You need to understand how the technique generates password candidates, which accounts receive those candidates, and how the authentication system may respond. You also need to know what the rules of engagement permit before the first attempt is sent.

The PenTest+ objective for this area includes dictionary attacks, brute-force attacks, mask attacks, password spraying, and credential stuffing. The names can sound like interchangeable ways to guess a password, but they describe meaningfully different approaches. Some distinctions concern candidate generation. Others concern how candidates and accounts are paired. That difference affects attempt volume, account lockout, rate limiting, detection, and the evidence you can reasonably collect.

A dictionary attack draws candidates from a prepared collection of words or password-like strings. The collection might reflect the kinds of choices the assessment is authorized to test, but calling it a dictionary doesn't mean it contains only ordinary language words. The defining idea is that the candidates come from a selected list rather than every possible combination. If a candidate isn't in that collection, the attack won't discover it.

A brute-force attack works through a candidate space systematically. That space might consist of character combinations within defined limits. Expanding those limits creates more possibilities and more work.

Brute force is therefore not a synonym for every repeated password attempt. Its key feature is systematic candidate generation across the selected space. When many candidates are concentrated against one account or a small number of accounts, the per-account attempt count can rise quickly.

A mask attack narrows candidate generation by imposing a known or suspected pattern. Suppose an authorized test is based on evidence that a password has eight positions, begins with a capital letter, and ends with two digits. A mask can generate candidates that fit that shape instead of exploring unrelated shapes. The mask may make the search more focused, but it also embeds assumptions.

If the assumed pattern is wrong, the correct password may sit entirely outside the generated candidates. A failed mask test can therefore show that no tested candidate worked. It doesn't prove that the account has a strong password or that the guessed pattern was accurate.

These first three techniques are primarily distinguished by how candidates are produced. They don't, by themselves, dictate one universal account-targeting pattern. A dictionary, brute-force, or mask process could be applied to one authorized account or more than one, depending on the engagement. You must inspect both dimensions: where candidates came from and how attempts were distributed.

Password spraying puts the distribution across accounts at the center of the technique. It tries a small set of candidate passwords across many accounts, keeping the number of guesses against each account relatively low. Rather than testing hundreds of candidates against one user, a spray might test one authorized candidate against a selected set of users. That changes the pattern of activity, but it doesn't make the activity safe or invisible.

Credential stuffing uses a different starting point. It tests previously obtained username and password pairs against another service to identify credential reuse. The username and password remain paired because the question is whether credentials associated with one context also work elsewhere.

This isn't the same as taking one common password and trying it across many unrelated usernames. That latter pattern is spraying. In credential stuffing, each account may receive a different password because the candidates arrive as existing pairs.

Before selecting among these methods, begin with the result you're authorized to establish. Are you evaluating whether a particular test account accepts a weak candidate? Are you assessing exposure to a limited spray pattern?

Are you validating whether a controlled set of credential pairs has been reused on an in-scope service? Those are different questions. The least disruptive valid method is the one that can answer the approved question without creating unnecessary attempts or touching excluded identities.

Then identify the boundaries that shape the action. Confirm the target system, the permitted accounts, the maximum attempts per account, the allowed timing, and any required coordination with defenders or system owners. Determine whether lockout or rate-limiting behavior is known, and don't treat missing information as permission to guess. If a boundary is unclear, clarification is the next action. A technically possible test outside the agreed target or timing is still the wrong engagement decision.

Return to the company login with its two-attempt limit and excluded service accounts. A concentrated brute-force test would conflict with the per-account limit almost immediately. A large dictionary against one user would have the same problem even though its candidate source is different. A mask doesn't automatically fix that conflict. It may reduce the overall candidate space, but if it still sends more than two candidates to one account, it exceeds the stated limit.

A tightly bounded spray could match the attempt limit more closely because a small number of candidates would be distributed across eligible accounts. That doesn't mean you should proceed merely because the label sounds compatible. First remove the excluded service accounts from the authorized target set.

Confirm that the candidate count, timing, and total account population remain permitted. Predict what evidence the approved test should create, including authentication responses and any expected defensive alerting. Only then is there a defensible basis for the bounded action.

Candidate quality matters too. If the approved question concerns one specific organization-selected weak password, testing unrelated guesses adds impact without improving the answer. If the question concerns credential reuse, a generic spray doesn't answer it because spraying doesn't preserve a previously obtained username and password pairing. Conversely, possession of paired credentials doesn't automatically authorize credential stuffing. The service receiving the test, the source and handling of those credentials, and the approved accounts all remain subject to scope and privacy constraints.

That decision process can be expressed simply. Begin by defining the required outcome. Predict what you should observe if the suspected condition is present. Choose the lowest-impact authorized action capable of producing that evidence.

Compare the result with the prediction. Then document both what the evidence supports and what remains uncertain. The tool sits inside that process. It doesn't replace it.

Authentication is also broader than a password field. Password policy, account state, throttling, lockout, monitoring, and other controls can affect what the system does with an attempt. A rejected login doesn't reveal one universal cause.

The candidate may be wrong, the account may be disabled, the request may be rate limited, the target may be incorrect, or the test may be malformed. The first output is an observation. It becomes a useful finding only after the relevant assumptions have been checked.

Imagine that the bounded spray returns failures for nearly every eligible account, while one response appears different. It's tempting to label that account compromised immediately. Instead, compare the response with known baselines. Was the candidate accepted, or did the application merely redirect to another authentication stage?

Was the username valid and in scope? Did the request reach the intended system? Could an expired session, configuration difference, or stale account list explain the result? A distinct response deserves validation, not an automatic conclusion.

Use the least impactful available evidence first. Review the authentication result and the engagement's approved records. Correlate timing with permitted logs or defensive observations when those are available.

If another live attempt would consume the account's remaining allowance or increase operational risk, don't repeat it casually. Preserve the initial evidence and ask whether the finding can be established without another authentication attempt. Escalation is justified by an evidence need and explicit authorization, not curiosity.

The same discipline applies when every attempt fails. That result may be consistent with the candidate not working, but it doesn't validate every surrounding assumption. Check that the correct endpoint was used, that the selected accounts were eligible, that the test stayed within its timing window, and that rate limiting didn't change the responses. Confirm that the candidate generation behaved as intended. A mask with the wrong pattern or a dictionary missing the relevant candidate can fail perfectly while testing the wrong hypothesis.

Now consider a defender who says spraying is safe because it avoids a large number of guesses against any single account. That's the dangerous misconception. Spraying changes the distribution of attempts. It doesn't remove account lockout, rate limiting, detection, or engagement risk.

Some accounts may already have prior failed attempts. Different account classes may be governed by different controls. A broad set of login attempts may also create a conspicuous pattern even when each account receives only one or two guesses.

The verification step is to compare the proposed spray with actual engagement limits and the authentication system's expected behavior. Ask how many attempts each account may receive, which identities are excluded, how prior failures are handled, and what monitoring or operational concerns apply. If those answers aren't established, safe execution hasn't been established either. The right response may be a smaller approved set, a test account, a different validation method, or a request for clarification. It isn't an assumption that low per-account volume makes the activity harmless.

Operational context can make this especially important. An identity may support a business process whose interruption has consequences beyond one user's inconvenience. The engagement might therefore exclude service accounts or place tighter timing restrictions around sensitive systems.

You don't need to discover the consequences by causing them. The rules of engagement and system-owner guidance should define what may be tested. When lower-impact evidence can establish the issue, use it before considering a stronger action.

Suppose one credential is accepted during the authorized test. That result needs careful interpretation. First verify that the response represents successful authentication rather than a different page, an intermediate challenge, or an application error.

Confirm the account and target are the ones authorized. Record the candidate source and attack type because they affect the finding. A successful dictionary candidate suggests something different from a reused username and password pair accepted by another service, even though both may produce a valid login.

Once the success is validated, stop at the boundary of the approved question. A working credential is evidence about an authentication or credential-control weakness. It isn't permission to browse the account, access files, test other applications, change settings, or expand to systems that weren't authorized. Any additional action requires its own basis in the rules of engagement. The account's apparent privilege doesn't enlarge your permission either.

This is where good password handling becomes part of technical quality. Credentials and authentication evidence may be sensitive. Use only the approved collection, storage, access, and reporting arrangements.

Don't copy a recovered or supplied password into unnecessary notes or expose it to people who don't need it for the engagement. The report can describe the validated weakness and its scope without turning the credential itself into casually distributed evidence. Privacy constraints continue to apply even when the test is authorized.

Your report should distinguish observation, validation, and conclusion. An observation might state that an in-scope authentication endpoint returned a success response for one permitted account and one approved candidate at a recorded time. Validation explains how you confirmed that the response represented authentication. The conclusion then states what the result supports, such as acceptance of a tested weak candidate or reuse of a controlled credential pair. It should not claim that all accounts are vulnerable, that every defensive control failed, or that unrelated systems are accessible unless separate authorized evidence supports those statements.

Failed tests need equally careful language. If no dictionary candidate succeeded, report that none of the tested candidates was accepted under the recorded conditions. Don't say the passwords are unguessable.

If a mask produced no success, preserve the mask assumptions and limits. If a spray was interrupted by rate limiting, explain that the control affected the test and that the broader hypothesis remains unresolved. An incomplete test isn't automatically a secure result, and it isn't automatically a vulnerability.

Consider two plausible choices after one unusual response appears during the limited spray. The first is to increase the candidate count and retry the account immediately. The second is to preserve the response, compare it with the expected authentication flow, and check whether another attempt remains authorized and necessary. The second choice is stronger because it respects both the evidence problem and the attempt limit. More activity might produce more output, but it could also exceed scope, trigger lockout, or obscure the original event.

The answer could change if the rules explicitly permitted a controlled confirmation attempt, the account owner had approved the timing, and the first response couldn't otherwise be validated. Even then, the reason for repeating the attempt would be confirmation of a specific observation, not a general desire to explore. If existing logs or a lower-impact check can establish the same fact, they should be considered before another live attempt.

Now compare that with a credential-stuffing question. If an approved set contains username and password pairs from another controlled context, preserving each pair is essential to testing reuse. Replacing the paired passwords with one common candidate would change the mechanism into a spray and would no longer answer the same question. Yet preserving the pairs doesn't remove the need to filter targets. An excluded account stays excluded even if its credentials appear in the supplied data, and an out-of-scope service doesn't become eligible because a pair might work there.

The practical artifact from this work isn't merely a list of successful and failed logins. It includes the authorization basis, target set, excluded identities, candidate-generation method, account-distribution method, timing, attempt limits, relevant responses, validation steps, and unresolved conditions. Those details allow another reviewer to understand what was tested and what wasn't. They also support proportionate remediation, whether the evidence concerns weak candidate acceptance, credential reuse, insufficient protective controls, or gaps in monitoring.

Return to the original decision. With two attempts per account and service accounts excluded, you can't justify a concentrated dictionary, brute-force, or mask campaign merely because one of those techniques might eventually find a password. A bounded spray may fit the distribution constraint, but only after account selection, candidate count, timing, detection concerns, and authorization are confirmed. If one candidate succeeds, you validate and report that result within its exact context. You don't treat the credential as a key to everything the account can reach.

The important distinction is both technical and professional. Dictionary, brute-force, and mask attacks differ mainly in how they generate candidates. Spraying distributes a small candidate set across many accounts, while credential stuffing preserves previously obtained username and password pairs to test reuse.

Those mechanisms shape the evidence, but engagement constraints determine whether a test is appropriate at all. Lockout, rate limiting, detection, excluded accounts, privacy, and attempt limits must be considered before acting. Then the result still needs validation.

A successful credential supports a specific authentication finding within the authorized target. It doesn't expand your permission. A defensible test matches the method to the question, uses the least disruptive valid action, and reports only what the evidence can support.

Carry this question into practice: What kind of test fits those conditions, and what would a successful login actually allow you to do? Review the matching episode reference for exact terminology, named tools or standards, source-derived evidence checkpoints, and review material for Dictionary, Brute-Force, Mask, Spray, and Stuffing Attacks. This lesson was produced by Bare Metal Cyber dot com.

Dictionary, Brute-Force, Spray, and Stuffing Attacks

headphones Listen Anywhere

More Options »
Broadcast by