Quick answer
Credential harvesting is the bulk collection of usernames and passwords by an attacker, through fake login pages, malware, interception or stolen databases, so that the logins can be used or sold.
What is credential harvesting?
Credential harvesting is the large-scale collection of usernames and passwords (and sometimes session tokens or one-time codes) by an attacker, so the stolen logins can be used or sold. MITRE ATT&CK places this under its Credential Access tactic, where the adversary is trying to steal account names and passwords. The word "harvesting" matters: the goal is volume, not one specific victim.
Harvesting is the collection step. What happens next is a different attack: the stolen pairs are tried on other sites (credential stuffing), used to take over the account directly, or sold. Defending against each step needs different controls, so the terms should not be mixed.
How credentials get harvested
| Method | How it works | Where the defender can act |
|---|---|---|
| Phishing email with a fake login page | A message links to a look-alike site; the victim types the password into it | Email filtering, user training, a second factor |
| Fake login pop-ups and cloned sites | A copy of a real page, often on a similar-looking domain | Domain monitoring, takedown requests, brand protection |
| Malware (keyloggers, information stealers) | Software on the victim's device records keystrokes or reads saved passwords | Endpoint protection, no password saving in unmanaged browsers |
| Data breaches | A database of logins is stolen from a service and leaked or sold | Hash passwords slowly, force resets after a breach |
| Interception (a man in the middle) | Logins are read or relayed on an insecure network or by a proxy | HTTPS everywhere, phishing-resistant authentication |
| Compromised web forms | Injected code on a site copies what visitors type | Content security policy, script review, dependency control |
CISA notes that phishing uses email or malicious websites to pose as a trusted organisation, and that malicious sites "may look identical to a legitimate site", sometimes with a misspelled address or a different domain ending such as .net instead of .com.
A worked example: how few clicks it takes
Sample data: an attacker sends one phishing campaign.
| Step | Count | Calculation |
|---|---|---|
| Emails delivered | 5,000 | |
| Recipients who click the link (12%) | 600 | 5,000 × 12% |
| Clickers who type their login into the fake page (30%) | 180 | 600 × 30% |
| Of those 180, accounts with multi-factor authentication | 60 | |
| Accounts a password alone opens | 120 | 180 − 60 |
| Stolen passwords reused on one other site (10% reuse) | 18 | 180 × 10% |
| Reuse hits across three other sites | 54 | 540 attempts × 10% |
The rates are made up to show the structure, not measured, and real campaigns vary widely, so use your own numbers. The arithmetic shows two points. A low click rate still produces a large harvest because the cost of sending is almost zero. And the damage multiplies when passwords are reused: 180 harvested logins became 54 more compromised accounts elsewhere, without a single new phish. Multi-factor authentication cut the immediately usable accounts from 180 to 120 in this example, but it does not stop a phishing page that relays the code in real time, so phishing-resistant methods matter.
Credential harvesting versus related attacks
| Attack | Goal | How it obtains the password |
|---|---|---|
| Credential harvesting | Collect logins in bulk | Tricks the user, steals from a device, or takes a database |
| Brute force | Guess one account's password | Tries many candidates against a login |
| Credential stuffing | Take over accounts on other sites | Replays pairs harvested elsewhere |
| Phishing | Trick a person into an action | A message; harvesting is one of its aims |
| Basic authentication abuse | Reach a protected page | Sends a username and password in a header, easily replayed if captured |
How to defend, by role
For users. Check the address before typing a password and go to the site by typing it or using a saved bookmark, not by clicking a link in a message. Use a password manager, which will not auto-fill on a look-alike domain. Never reuse a password. Turn on multi-factor authentication. If you entered a password on a suspicious page, change it at once and everywhere you reused it, as CISA advises.
For organisations. Filter email, train staff with realistic simulations, monitor for look-alike domains, require phishing-resistant sign-in for administrators, and revoke sessions after a suspected compromise. Alert on logins from new devices.
For site owners. Hash stored passwords with a slow function, rate-limit logins (see rate limiting), check new passwords against known-breached lists, offer a second factor, and watch for look-alike copies of your login page. Keep the number of third-party scripts on login and checkout pages small, because an injected script can harvest what visitors type.
Signs that credentials are being harvested
- Customers report a sign-in email you did not send, or a login page with a different web address.
- A burst of failed logins from many addresses, each trying a different account, which often follows a leak.
- Sign-ins that succeed from new countries or devices shortly after a phishing wave.
- A clone of your page that references your images or scripts.
- A sudden rise in password-reset requests.
- Support tickets from users who say they "were logged out" or saw a security warning they cannot reproduce; ask for a screenshot and the address bar.
Common mistakes
- Treating harvesting as a user-only problem. Training helps, but a site that allows unlimited login attempts and stores weak hashes makes every harvested password more valuable to the attacker.
- Believing HTTPS means the site is real. A padlock only shows an encrypted connection; phishing sites can have one too.
- Counting on SMS codes alone. A real-time phishing page can relay the code. Prefer authentication that is bound to the genuine domain.
- Forgetting to rotate after a breach. Leaked pairs stay valid until someone changes them.
- Relying on bot blocking alone. Bot mitigation handles automated traffic to your site, not a user typing into a fake site.
What TapCub does and does not do
TapCub is not a security product. It does not detect phishing, protect accounts or find leaked passwords, and nothing here is security or legal advice. Its relevance is narrower.
- It does not collect passwords. Autocapture never captures password fields, and form tracking is off by default; when you turn it on with
data-forms="true", it records only the form's id, name and action, not what was typed. - It can show unusual login traffic. In Web analytics › Pages, a spike on the login URL, and in Web analytics › Sources a matching jump in direct visits, is a prompt to check your server logs for failed logins. See brute force attack for what that traffic looks like.
- It separates recognised bots. In Web analytics › Bots, TapCub shows the bots it recognises in their own report so they do not inflate human numbers. That is a measurement feature, not a login defence.
- The domain check is a setting, not a shield. TapCub decides on the server which page domains may send data, using the project's allowed domains. Keep that list short, so a cloned page that copies your script tag is not a domain you accept.
- Alert on odd volume. A monitor in All-platform analytics › Operations › Monitors can notify you when visitors or pageviews cross a threshold. It only notifies.
Sources
- MITRE ATT&CK, Credential Access (TA0006).
- CISA, Avoiding Social Engineering and Phishing Attacks.
Was this explanation clear?
We use your answers to fix and expand this page.
Couldn’t send. Please try again in a minute.
Thanks for the feedback. We’ll use it to improve this page.You’ve already sent feedback on this page. Thanks.

Data Analyst
Explores traffic sources, conversion funnels, and retention, using clear metric definitions and concrete examples to explain what the numbers mean.