Automated Credential Harvesting
A familiar pattern shows up in post-incident reviews. The timeline reads: phish delivered 09:14, credential submitted 09:17, password changed 09:41, incident closed 11:30. Everyone nods. Four days later, mail is going out to an address nobody recognises and the whole thing reopens.
The gap is almost always persistence. The password stopped mattering after minute three.
Most credential-theft guidance still aims at a stage of the attack that stopped being interesting years ago. This is an attempt to describe where the attack actually lives now.
Important Disclaimer
Educational and defensive purposes only. This describes general attack patterns rather than specific tools, campaigns, or criminal services. Commands are read-only and for systems you own or administer.
Never test credential attacks against anything you don't own or have written permission for, because unauthorised access is a criminal offence in most jurisdictions. No liability is assumed for anything resulting from misuse.
First, a definition problem
"Automated credential harvesting" gets used to mean about four different things, which is where a lot of the confusion starts.
Delivery is automated. Collection is automated. Validation, the step where a captured password is tested against the real service, is automated. First use is automated.
Target selection isn't. Deciding which CFO is worth a bespoke lure still needs somebody with a spreadsheet. Post-access decisions aren't automated either. A person still has to sit down and work out what to do with the mailbox they just got into.
That split matters more than it sounds, because the automated stages generate enormous noise and the manual ones generate almost none, and defensive budgets tend to go at the noisy end.
Where the list comes from
Every campaign starts with a list, and the list gets assembled without touching anything you own.
Most of it is old breach data. Sets get aggregated, deduplicated, enriched with job titles and company names, then sold on. Addresses circulate for years. Nobody knows which compilations they appear in.
Scraping supplies the rest. Conference attendee pages are a gift. So are corporate team pages with job titles, and job adverts that name the hiring manager. A reasonably accurate org chart can be built from public sources in an afternoon.
Public code is the underrated source. Repositories with addresses in commit metadata. CI configs with internal hostnames. Documentation with example credentials that stopped being examples. Live API keys turn up in public repos with surprising regularity, often in code that has been sitting there for over a year.
Then recycling. Yesterday's campaign output becomes today's input, and one success compounds.
Delivery, which is the boring part
Kits are products now. Somebody else builds the login page clone, the backend, the scanner evasion, and the notification that pings the operator when a credential lands. It's a purchase rather than a skill.
The ones that cause real trouble are the adversary-in-the-middle frameworks, which proxy the genuine page and relay authentication live. The second factor gets captured and replayed rather than bypassed. The session cookie that comes out of that exchange works from anywhere, which is why the technique reshaped the phishing market.
Worth noting that AI-written lures have largely solved the grammar problem from the attacker's side. If user training still says "look for bad spelling," it's roughly as useful as teaching people to spot typos in a ransom note.
The stage nobody discusses
Capture and validation.
A password gets typed into a kit. It's captured, and within seconds a script is testing it against the real login. Not an hour later. Seconds.
In case it doesn’t, there will be an immediate prompt to try again. If it works out and additional authentication factor is needed, there will be another prompt. It happens pretty quickly for a person to see it as regular login hassle.
Infostealers skip this stage entirely. No phishing page, no typing. The malware reads the credential store and the cookie jar off the machine and uploads both. Which means awareness training is irrelevant to that path, and it's a growing share of the total.
Why persistence beats a password reset
This belongs in every incident response runbook.
A validated credential gets used almost immediately, and the objective of that first session usually isn't data. It's something that survives a password change. App passwords. A newly enrolled MFA device. A forwarding rule. An OAuth grant to an application the attacker controls. An SSH key.
Password resets revoke none of those.
The pattern repeats across organisations. First response finds the login, changes the password, considers the matter closed. Second response, four to seven days later, finds the app password. The first response wasn't wrong so much as aimed at the wrong target.
Why this keeps working
Sophistication isn't the answer. There are four structural reasons.
Cost asymmetry is the obvious one. A campaign costs pocket change. The defender has to be right every time, indefinitely.
Latency is the second. A good detect-to-respond loop is measured in hours. The pipeline is measured in seconds. Defence is structurally always looking backwards.
Channel spread is the third and the least discussed. Email gateway sees email. Web proxy sees web. EDR sees the endpoint. Identity sees the login. The pipeline crosses all four, and no single product holds the whole picture, which is why correlation carries the signal and why another point product rarely helps.
And reuse. A stolen credential doesn't become worthless because a different one was changed. A session token doesn't die because somebody logged out on their phone.
What to actually watch
Behaviour rather than signatures. Blocking consumes the budget and the pipeline walks straight past it.
Impossible travel and unfamiliar device fingerprints at login still earn their place. A replay from a hosting provider range looks nothing like the user's normal pattern.
Data-centre IP ranges as a filter, specifically for stuffing. Real people connect from home broadband and mobile networks. Automated replay comes from cloud instances. If only one rule gets built this quarter, it should probably be this one.
Session tokens presented from an address they weren't issued to. This catches adversary-in-the-middle regardless of how convincing the fake page was, because the contradiction sits at the token layer rather than the credential layer.
New persistence appearing within minutes of a successful login. If identity events are being logged at all, this is a query that can be written this afternoon, and it carries more value than anything else on the list.
And attempts spread thin across many addresses against one account. Per-IP rate limits won't see it. Per-account counters will.
What to actually build
Make a stolen password insufficient. That's the strategy. Everything else is decoration.
Phishing-resistant authentication comes first. Passkeys or hardware keys, bound to the origin, unable to be relayed through a proxy. The adversary-in-the-middle stage yields nothing even when the user does everything right, and users will do everything right.
Device-state conditional access comes second. A working password from an unmanaged machine should be a dead end rather than a session.
Shorter session lifetimes and revocation on credential change come third. Reduces the value of a stolen cookie and closes the window where the old token and the new password are both live.
Alerts on persistence creation come fourth. App passwords, MFA enrolments, forwarding rules, OAuth grants. That's the foothold stage, and it's the last point before data leaves.
Account-level rate limiting comes fifth, because distributed stuffing defeats anything applied per IP.
Two incidents worth comparing
The one that got reopened
An employee receives a message about a shared document, clicks, lands on what looks like the corporate sign-in, types the password, approves the push. Then does the right thing and reports it about twenty minutes later. Security changes the password, tells the user they're fine, closes the ticket.
Forty seconds after that push was approved, the session was in use from a hosting provider address. The first action taken inside it was creating an app password. Four days later that app password is reading mail, and nobody can work out how, given the password was changed on day one.
The response wasn't incompetent. It answered how the attacker got in, and never asked what the attacker built while they were there.
The one that held
Different organisation. Passkeys for everyone, mail access requires a managed device, and somebody had set alerting on new MFA registrations and forwarding rules rather than on failed logins.
A breach compilation containing a few hundred of their addresses got replayed from a spread of cloud hosts. Everything with a still-valid password failed at the authentication step, because a password alone gets nowhere without a passkey.
Plenty of failed authentication events. No successful sessions. Aggregate alerting picked up the pattern inside an hour, and the follow-up was confirming that no account had an unusual MFA registration. Dull outcome. Best kind.
Signals worth putting on a dashboard
A cluster of failed logins across many accounts from cloud ranges. That's stuffing.
Successful logins from hosting providers. Real users don't work in AWS.
A session used from a device and address it wasn't issued to. Token replay.
A new app password, MFA enrolment, or forwarding rule within minutes of a login. Persistence.
Several users reporting the same message inside an hour. Delivery stage running.
One account being tried from many addresses, slowly. Distributed stuffing.
An OAuth grant to an application nobody in the company recognises. Persistence that outlives everything else.
Password reset emails the user didn't ask for. Somebody testing whether the account is recoverable.
Quick Reference
|
Stage |
What Happens |
Control That Works |
|
Target collection |
Breach lists, scraping, public code |
Assume addresses are public; focus downstream |
|
Delivery |
Phishing kits, AITM proxies, multi-channel |
Filtering helps; assume some will land |
|
Collection |
Credentials captured and tested in seconds |
Phishing-resistant authentication |
|
Validation |
Stuffing at scale from distributed IPs |
Account-based rate limits, device binding |
|
First use |
Persistence created immediately |
Alert on new app passwords, MFA, rules, OAuth |
|
Ongoing |
Session tokens replayed |
Short lifetimes, binding, revoke on reset |
Closing thought
Four stages, seconds to complete, and most defensive investment sits at stage two where it makes the least difference.
If only one thing gets done this week, it shouldn't be a control. It should be a question. Would anyone notice a new app password or forwarding rule being created two minutes after a successful login? If the answer is no, that's the gap, and everything else is secondary.
FAQ
What is automated credential harvesting?
The industrialised version of password theft. A target list gets built, lures get delivered, credentials get captured, tested against the real service, and used. None of those steps require a human.
How is it different from credential stuffing?
Stuffing is one stage of it. Credentials somebody already stole get replayed against login pages at scale. Harvesting describes the whole pipeline, including how those credentials were obtained.
Why doesn't changing the password fix a compromised account?
Because persistence tends to be created within seconds of the first login. App passwords, MFA enrolments, forwarding rules, OAuth grants. None of those are revoked by a password reset.
Can MFA stop automated credential harvesting?
Standard MFA helps but doesn't stop adversary-in-the-middle, since a proxy can relay the second factor live and take the resulting session. Passkeys and hardware keys can't be relayed, which is why they're the ones that actually work here.
What's the most useful detection signal?
Failed logins spread across many accounts, all originating from cloud address ranges. Real users connect from residential and mobile networks, so hosting-provider origins are a strong tell for automated replay.
Why does rate limiting by IP fail?
Because distributed stuffing uses many addresses so nothing crosses a per-source threshold. Counting has to happen per account rather than per address.
What should be checked immediately after a suspected credential compromise?
Persistence rather than access. App passwords, MFA registrations, forwarding rules, OAuth grants, new SSH keys, API tokens. That's what gets created in the seconds after the login.
Is being in a breach the reason someone is targeted?
It's the reason an address is on the list. It isn't the reason it was picked out. What a stolen password would actually be worth to someone is the more useful question.