# Credential Harvesting: Techniques & Prevention

> Learn what credential harvesting is, how credential harvesting attacks work, common techniques, warning signs, and ways to prevent credential theft.

- Canonical URL: https://www.puppygraph.com/learn/credential-harvesting
- Published: 2026-12-04
- Author: Hao Wu

A stolen password can turn an ordinary login into unauthorized access. A stolen session can let an attacker continue as an already authenticated user. Defending against credential harvesting therefore requires protecting both the sign-in process and the activity that follows it.

This guide explains how harvesting works, common techniques, warning signs, documented attacks, and prevention measures. It also examines how an investigative AI agent can help a security team establish what a suspected compromise reached, using evidence across identity, device, and application records.

## What Is Credential Harvesting?

Credential harvesting is the unauthorized collection of authentication material that attackers can use to impersonate a user or service. Targets include usernames and passwords, API keys, and other secrets. Attackers also [steal session cookies](https://attack.mitre.org/techniques/T1539/) and tokens that can preserve access after authentication.

Harvesting can involve deceiving someone into submitting a password, extracting stored secrets from a compromised endpoint, or collecting credentials exposed in files. MITRE ATT&CK groups related theft techniques under [Credential Access](https://attack.mitre.org/tactics/TA0006/).

Collection and subsequent use are distinct. [Credential stuffing](https://owasp.org/www-community/attacks/Credential_stuffing) tests previously stolen username-password pairs against other services, exploiting password reuse. [Password spraying](https://attack.mitre.org/techniques/T1110/003/) attempts a small set of likely passwords across many accounts. Neither requires collecting a new password directly from the victim during that attempt.

The distinction matters operationally: blocking repeated login failures may stop guessing, while leaving an attacker able to use a valid stolen secret.

## How Credential Harvesting Attacks Work

A harvesting attack creates or exploits an opportunity to collect authentication material, then attempts to turn that material into access.

Consider a hypothetical finance employee receiving a payroll-update message. Its link opens a page resembling the organization's sign-in portal. The employee submits a password; the page sends it to the attacker. A more involved attack may relay the authentication exchange and capture a resulting session cookie. Whether the attacker can reuse it depends on the service's session protections.

The victim may still reach the legitimate application and notice nothing unusual. The attack can therefore leave a successful sign-in in the logs. Investigators need to examine the surrounding activity, rather than assuming that a completed MFA challenge establishes who controlled every subsequent request.

Successful access creates a second problem: determining its scope. Did the suspect session reach only the employee's mailbox, or also a delegated payments mailbox? Were payment-related messages read or sent?

An investigative agent given that business question should locate the relevant identity and session records, test possible explanations, and choose its next checks from the evidence. The analyst supplies the objective and authorized scope without prescribing every query.

![Credential capture does not establish the scope of a compromise. An investigative agent uses each result to choose its next check, separating potential access from recorded activity and unresolved evidence gaps.](https://o6xswp5m6ilbks2z.public.blob.vercel-storage.com/uploads/ab8e18ef4ebebeddc0b3152c/e0baef41-05cc-40de-b10b-a0c80a601bb8/credential-harvesting-figure-1-ec2c1aa6ce.png)

Figure: Credential capture does not establish the scope of a compromise. An investigative agent uses each result to choose its next check, separating potential access from recorded activity and unresolved evidence gaps.

## Common Credential Harvesting Techniques

**Deceptive sign-in requests.** Fake login forms imitate email, payroll, or collaboration services. The lure may arrive through email, SMS, workplace chat, or a phone call directing someone to a page. Attackers exploit the apparent sender and the requested task to make credential entry seem routine. These channels are covered in the [2023 joint phishing guidance](https://www.ic3.gov/CSA/2023/231018.pdf) from CISA, NSA, FBI, and MS-ISAC.

**Adversary-in-the-middle phishing.** An AiTM site relays traffic between the victim and a legitimate service. It can capture passwords and authenticated session cookies during the exchange. Some MFA methods, including [manually entered one-time codes](https://pages.nist.gov/800-63-4/sp800-63b.html), can be relayed. Microsoft's [AiTM analysis](https://www.microsoft.com/en-us/security/blog/2022/07/12/from-cookie-theft-to-bec-attackers-use-aitm-phishing-sites-as-entry-point-to-further-financial-fraud/) explains why session theft requires attention beyond password security.

**Endpoint theft.** Infostealer malware can extract saved authentication material from an infected device. MITRE documents [credential theft from browsers](https://attack.mitre.org/techniques/T1555/003/) and [input capture](https://attack.mitre.org/techniques/T1056/), including keylogging. These routes can expose credentials without a user submitting them to a fake website.

**Compromised portals and exposed secrets.** Attackers may modify a legitimate login portal to capture submitted credentials, or find secrets in configuration files and source code. MITRE describes these as [web portal capture](https://attack.mitre.org/techniques/T1056/003/) and [credentials in files](https://attack.mitre.org/techniques/T1552/001/). The former makes an authentic domain insufficient reassurance; the latter extends the problem to service accounts and automation.

## Credential Harvesting vs Phishing

The terms overlap, but describe different aspects of an attack.

| **Dimension** | **Credential harvesting** | **Phishing** |
| --- | --- | --- |
| What it describes | Collection of authentication material | Deceptive communication that induces a harmful action |
| Typical objective | Obtain material usable for impersonation | Obtain credentials, deliver malware, or induce another action |
| Victim interaction | May occur without the victim entering anything | Commonly asks the recipient to click, disclose information, or act |
| Example | Malware extracting stored passwords | A payroll message directing an employee to a fake login |

A fake sign-in page reached through a deceptive message can involve both. An infostealer extracting passwords is credential harvesting even when phishing played no part in its delivery. A deceptive payment request can be phishing without collecting credentials.

This is why email filtering covers only part of the problem. Authentication design, endpoint protection, and secrets handling address other routes to theft and reuse.

## Signs of a Credential Harvesting Attack

Before submission, suspicious signs include an unexpected request to sign in, a destination domain inconsistent with the service, or a caller asking for a password or authentication code. Navigate through a known bookmark or official application to verify the request. A familiar logo and an [HTTPS connection](https://www.ic3.gov/PSA/2019/PSA190610) do not establish that the page belongs to the organization it claims to represent.

After possible exposure, investigate unfamiliar sign-ins, [unexpected MFA prompts](https://learn.microsoft.com/en-us/security/zero-trust/security-operations-playbook-password-spray), and activity inconsistent with the account's normal work. New forwarding rules, deleted messages, or unfamiliar sent mail can indicate mailbox compromise; Microsoft's [compromised-account guidance](https://learn.microsoft.com/en-us/defender-office-365/responding-to-a-compromised-email-account) documents these symptoms.

These warning signs do not, by themselves, establish credential harvesting. A changed IP address may reflect a VPN or travel. In the payroll scenario, an agent could test that explanation against device observations and session history, then inspect mailbox activity if the explanation does not hold. Fast successive lookups help it pursue several explanations before recommending containment. Preserve timestamps and source-event identifiers so an analyst can inspect the evidence behind that recommendation.

## Credential Harvesting Attack Examples

**Session theft followed by payment fraud.** In a [report published in July 2022](https://www.microsoft.com/en-us/security/blog/2022/07/12/from-cookie-theft-to-bec-attackers-use-aitm-phishing-sites-as-entry-point-to-further-financial-fraud/), Microsoft described attackers using AiTM phishing to obtain passwords and session cookies. They accessed mailboxes, searched for finance-related conversations, and attempted business email compromise. The case connects credential capture to later activity that investigators must reconstruct.

**Credentials disclosed, access blocked.** Cloudflare's [August 2022 incident report](https://blog.cloudflare.com/2022-07-sms-phishing-attacks/) described a July SMS campaign imitating its Okta login. Some employees entered credentials, but Cloudflare reported that required FIDO2 security keys prevented the attackers from completing authentication and that no Cloudflare systems were compromised.

These cases illustrate different outcomes. Credential disclosure creates risk, while successful account access depends on the authentication and session controls the attacker encounters. An investigation should establish both, rather than treating a submitted password as proof of every downstream consequence.

## Risks of Credential Harvesting

Stolen credentials can expose email, documents, and business applications within the compromised identity's permissions. Mailbox access can enable impersonation and payment fraud. Privileged accounts or service credentials can expose additional systems, while password reuse can carry the compromise into otherwise unrelated services.

The potential scope follows access relationships. In the payroll example, shared-mailbox delegation could put payment correspondence within reach. That does not prove the correspondence was accessed: permission records show potential exposure, while audit events establish recorded actions.

Recovery also has operational consequences. Disabling a shared service credential may interrupt scheduled jobs or integrations. Knowing which workloads depend on it helps responders plan replacement credentials and restore authorized activity without overlooking an exposed copy or an attacker-added access method.

Determining the scope may require many identity, application, and permission tables, including historical records. A recent alert can lead an agent back to an older delegation change or earlier activity. Gaps in that history can leave potential exposure unresolved.

## How to Prevent Credential Harvesting

Use complementary controls to reduce collection, prevent reuse, and limit the consequences of exposure.

**Prefer phishing-resistant authentication.** FIDO2/WebAuthn security keys and passkeys bind authentication to the legitimate service, preventing a lookalike site from obtaining an authentication response valid for that service. [NIST's authentication guidance](https://pages.nist.gov/800-63-4/sp800-63b.html) explains this verifier binding. Prioritize privileged accounts and identity administration, and review recovery and fallback methods. Ordinary MFA still adds protection, but manually entered codes can be phished. Phishing-resistant authentication also does not remove the need to protect an already authenticated endpoint.

**Reduce reusable secrets and privileges.** Use unique passwords stored in an approved [password manager](https://www.ncsc.gov.uk/collection/top-tips-for-staying-secure-online/protect-your-accounts). Keep service secrets out of source code and logs; prefer short-lived credentials where supported. Restrict each account to its required work. [OWASP's secrets-management guidance](https://cheatsheetseries.owasp.org/cheatsheets/Secrets_Management_Cheat_Sheet.html) covers access controls, rotation, and revocation. Removing an exposed key from a file alone does not invalidate a copy someone already obtained.

Maintain an owner and a revocation procedure for each service credential. Test replacement and revocation before an incident, including the applications that consume the secret. For employee accounts, protect [password recovery](https://cheatsheetseries.owasp.org/cheatsheets/Forgot_Password_Cheat_Sheet.html#account-recovery-after-suspected-compromise) and [new-authenticator enrollment](https://cheatsheetseries.owasp.org/cheatsheets/Multifactor_Authentication_Cheat_Sheet.html#changing-mfa-factors) with verification through established channels, since those workflows can restore access to an attacker.

**Protect delivery channels and endpoints.** Apply email and web filtering, keep software up to date, restrict unapproved applications, and [monitor endpoint behavior](https://attack.mitre.org/mitigations/M1043/) for credential theft. Train employees to report suspicious requests promptly, including after they entered information. Filtering, software controls, and reporting align with the [joint phishing guidance](https://www.ic3.gov/CSA/2023/231018.pdf); training works alongside technical controls.

**Respond to suspected exposure.** Contact the security team through a trusted channel. Block or restrict affected access as appropriate, reset exposed passwords from a trusted device, and revoke affected sessions and tokens through the relevant identity and application controls. [Investigate the endpoint](https://learn.microsoft.com/en-us/defender-xdr/sop-documentation-template) if malware is suspected. Check for unauthorized authentication methods, application grants, and forwarding rules before restoring access. Microsoft's [response procedure](https://learn.microsoft.com/en-us/defender-office-365/responding-to-a-compromised-email-account) treats session revocation and these reviews as separate steps.

Preserve evidence while containing the incident. A password reset alone is not a reliable way to close every access path created during a compromise.

## Credential Harvesting in Enterprise Security

Enterprise defense combines detection, access enforcement, and investigation. The SIEM brings together alerts; identity and application systems enforce containment. An investigative agent needs access to the underlying records to determine which accounts, sessions, and resources warrant action.

For the payroll scenario, start with identities, sessions, devices, mailbox delegation, and audit events linked through stable identifiers and event times. Give the agent authority to explore evidence within its assigned scope, with a defined policy for containment actions. Missing logs should remain explicit gaps in its findings.

Preserve the history of access relationships as well as events. Today's mailbox delegation may differ from the delegation in effect during the suspect session. An agent needs the applicable time window to avoid attributing historical access using current permissions, and should return the supporting records alongside its assessment.

Keeping retained evidence searchable at large volumes allows that investigation to widen. Querying existing security warehouse or lakehouse tables can support new questions without preparing a separate dataset for each query.

[PuppyGraph](https://www.puppygraph.com/) helps an agent follow these relationships across the security records your team already maintains. It is a data engine for building AI agents across 3,000 tables, with no data movement into a separate graph database. It reads existing SQL databases, warehouses, and lakehouses, including direct reads of Iceberg and Delta Lake. Its [distributed engine](https://www.puppygraph.com/how-it-works) scales to petabytes and supports [subsecond graph traversals on selected workloads](https://www.puppygraph.com/benchmarks), helping an agent test successive hypotheses while the same source tables remain queryable with SQL.

![PuppyGraph queries the existing tables in place, so graph and SQL queries share one copy of the data and no pipeline keeps a graph copy in sync.](https://o6xswp5m6ilbks2z.public.blob.vercel-storage.com/uploads/ab8e18ef4ebebeddc0b3152c/ef1496f9-cf08-4b8b-933c-8baac5450baa/snowflake-zero-copy-clone-figure-2-0777fe67cc.png)

Figure: PuppyGraph queries the existing tables in place, so graph and SQL queries share one copy of the data and no pipeline keeps a graph copy in sync.

The built-in AI assistant proposes a graph model mapping connected tables to entities and relationships for review and approval. Agents can explore that model through the [open-source MCP server](https://docs.puppygraph.com/ai/ai-integrations/), using openCypher or Gremlin underneath. With [strict schema validation](https://docs.puppygraph.com/querying/querying-using-opencypher/#strict-schema-validation) enabled, openCypher rejects undefined model references and returns feedback the agent can use to correct its query.

In the illustrative investigation, a suspicious mailbox action could lead the agent to inspect delegation, compare activity before and after the suspect login, and investigate other affected identities. The useful output is an evidence-backed scope assessment separating observed activity, potential exposure, and unanswered questions. PuppyGraph supplies the data exploration capability; identity and security tools carry out the response.

![PuppyGraph customer logos under the heading Trusted by.](https://o6xswp5m6ilbks2z.public.blob.vercel-storage.com/uploads/ab8e18ef4ebebeddc0b3152c/4b17a9ad-9bbb-4dba-b342-1ebf59630ba0/snowflake-zero-copy-clone-figure-3-070c58edc4.png)

![PuppyGraph customer testimonials from Trend Micro, Palo Alto Networks, Sola Security, Netskope, Coinbase, and Baker Hughes.](https://o6xswp5m6ilbks2z.public.blob.vercel-storage.com/uploads/ab8e18ef4ebebeddc0b3152c/8f2946c8-ecd0-4f10-adcb-cb2c9c6ca379/snowflake-zero-copy-clone-figure-4-65c2a94de2.png)

## Conclusion

Credential harvesting defense starts with preventing disclosure and making stolen material harder to reuse. Phishing-resistant authentication, protected endpoints, and controlled secrets reduce exposure. When theft is suspected, revoke affected access and investigate the evidence across identities, sessions, and business resources.

Try the forever-free [PuppyGraph Developer Edition](https://www.puppygraph.com/download-confirmation) and [book a demo](https://www.puppygraph.com/book-demo) with the team to see how openCypher and Gremlin queries connect warehouse and lakehouse tables, with no graph-specific ETL, so an investigative agent can trace the scope of suspected credential misuse.
