RAM Scraping - what it is, how attackers lift data from memory, and how to prevent it

RAM Scraping

What it is

RAM scraping is when malware reads a process’s live memory to grab sensitive data in plaintext before it’s encrypted or after it’s decrypted. Classic targets are point-of-sale apps where payment card data briefly appears in RAM, but attackers also scrape browsers, password managers, and system processes to lift logins, session tokens, API keys, and other secrets.

Why it matters

Data in memory can bypass at-rest and in-transit protections. One infected checkout lane or server can leak thousands of cards or hand over high-privilege sessions for lateral movement.

How it works 

  • Malware injects into or attaches to a target process.

  • Scans memory for patterns like PANs, Track 1/2, CVV, cookies, tokens, or form fields.

  • Copies matches into buffers, optionally compresses or encrypts them.

  • Exfiltrates to attacker infrastructure on a schedule.

Red flags

  • Processes repeatedly calling ReadProcessMemory or creating suspicious memory dumps.

  • Unusual outbound connections from POS or kiosk networks.

  • EDR alerts on code injection, credential access, or memory scraping behavior.

  • Sudden spikes in declined cards or fraud tied to a specific location.

Prevent it

  • Use point-to-point encryption and tokenization on POS so card data never appears in cleartext.

  • Lock down endpoints: application allowlisting, least privilege, disable macros, patch aggressively.

  • Protect credentials: browser hardening, disable unnecessary password storage, monitor for cookie theft.

  • Segment payment networks and enforce strict egress filtering and TLS inspection where allowed.

  • Monitor for memory-access APIs misuse, code injection, and unexpected dumps; respond and reimage if compromised.

    Glossary (A–Z)

    All A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
      • Related Articles

      • General Data Protection Regulation (GDPR)

        What it is The GDPR is the EU’s data privacy law. It sets clear rules for how organizations collect, use, share, and store personal data - and gives people strong rights over their information, no matter where a company is based if it serves EU ...
      • Data Exfiltration

        What it is Data exfiltration is the unauthorized transfer of your data out of your device or network—quietly slipping customer records, passwords, designs, or finances to an attacker. It’s the punchline of many breaches: get in, get data out, cash ...
      • PSW.Stealer (Trojan-PWS)

        What it is A password-stealing trojan for Windows that harvests credentials and other sensitive data, then exfiltrates it to the attacker. See our overview for defenders for details. Why it matters Once stolen, credentials enable account takeovers, ...
      • Data Breach

        What it is A data breach is when someone gets into a company’s systems without permission and steals sensitive info—customer names, emails, passwords, payment details, medical records, and more. For overview: see our data breach guide How it happens ...
      • Web Protection

        What it is Web protection is a bundle of tools and settings that keep you safer while you browse. It blocks dangerous sites and downloads, warns about fake logins, filters sketchy links, and helps keep your info private. It can run on your device ...