Malware Research

Infostealer Mechanics

How credential stealers extract browser passwords, cookies, and sessions using DPAPI

// What is this?
How modern malware silently harvests your passwords, tokens, and crypto wallets in under 60 seconds.

Infostealers collect credentials from browsers, applications, and files, then exfiltrate everything to the attacker. Modern variants target Chrome/Firefox passwords (via DPAPI), Discord tokens (LocalStorage), cryptocurrency wallets, session cookies, and system information. The data is compressed, exfiltrated over HTTPS or Telegram, and used immediately or sold. Runtime is typically under 60 seconds — often gone before AV responds.

PowerShell — Infostealer Detection
# Browser credential database access
Get-Item "$env:LOCALAPPDATA\Google\Chrome\User Data\Default\Login Data" -ErrorAction SilentlyContinue |
  Select-Object LastAccessTime, LastWriteTime

# Cookie database (session theft)
Get-Item "$env:LOCALAPPDATA\Google\Chrome\User Data\Default\Cookies" -ErrorAction SilentlyContinue |
  Select-Object LastAccessTime

# Discord tokens
Test-Path "$env:APPDATA\discord\Local Storage\leveldb"

# Crypto wallet files
Get-ChildItem "$env:APPDATA\*wallet*","$env:LOCALAPPDATA\*wallet*" -Recurse -Force -ErrorAction SilentlyContinue |
  Select-Object FullName
If this flags: Recent LastAccessTime on Login Data or Cookies = theft in progress. Discord leveldb contains tokens. Crypto wallets are high-value targets.

Full reverse engineering walkthrough — ABE bypass via DLL injection, Chrome v20/v21 differences, live HTTP exfiltration demo.

Correction

In the video I said BIP32 — it should be BIP39 (mnemonic seed phrases).

What Is An Infostealer?

An infostealer is malware that steals your saved passwords, browser cookies, and login sessions. When you click "Remember Me" on Netflix, your browser saves that login. Infostealers grab all of those saved logins and send them to an attacker.

Why should you care? If you've ever saved a password in Chrome, Edge, or Firefox - an infostealer can steal it in under 10 seconds. Your email, bank, social media, everything. The attacker doesn't need to "hack" anything - they just read what your browser already saved.

How It Works (Plain English)

Your browser encrypts saved passwords so other programs can't read them. But here's the catch: any program running as YOU can decrypt them. Windows trusts that if you're logged in, you're allowed to see your own passwords.

So when you run a malicious .exe (disguised as a game crack, free software, or PDF), it runs as you. It can ask Windows "hey, decrypt these passwords please" and Windows says "sure, you're the owner." Game over.

The 4 Steps of Password Theft

Step 1: Distraction Social Engineering

What happens: A fake "Windows Update" or "Scanning..." screen appears fullscreen. You can't click away.

Why: While you're staring at that fake screen, the malware is stealing your passwords in the background. The screen exists to stop you from closing the program before it finishes.

"Installing updates... Do not turn off your PC"

Step 2: Unlock The Vault DPAPI Abuse

What happens: The malware asks Windows to decrypt your browser's master password key.

Why this works: Windows uses something called DPAPI to protect passwords. But DPAPI was designed so YOU can access your own data - and any program running as you counts as "you."

CryptUnprotectData() → Master Key

Step 3: Raid The Database Password Extraction

What happens: Chrome stores all your saved passwords in a file called "Login Data." The malware copies this file and decrypts every password inside.

The scary part: This file contains EVERY password you ever clicked "Save" on. Gmail, Facebook, your bank - all in one place.

SELECT origin_url, username, password FROM logins

Step 4: Send To Attacker Exfiltration

What happens: Your passwords get sent to the attacker via Discord webhook, Telegram bot, or a random web server.

Speed: This entire process takes 5-15 seconds. By the time the fake "update" screen closes, your passwords are already in the attacker's hands.

POST → discord.com/api/webhooks/...

Technical Flow (For The Curious)

1
Find Chrome's Config

Look in %LOCALAPPDATA%\Google\Chrome\User Data - this folder has everything

2
Grab The Master Key

The file "Local State" has your encrypted master key - the key that unlocks all your passwords

3
Ask Windows To Decrypt

Call CryptUnprotectData() - Windows will decrypt it because you're the logged-in user

4
Decrypt Each Password

Each saved password is encrypted with AES. Now we have the key, so we decrypt them all

5
Send To Attacker

Package everything (sites, usernames, passwords) and POST to Discord/Telegram webhook

How To Protect Yourself

Don't Save Passwords In Browser

Use a password manager like Bitwarden or 1Password instead. They don't store passwords in a way infostealers can grab.

Don't Run Random .exe Files

Game cracks, "free" software, PDFs from strangers - these are how infostealers spread. If it's too good to be true, it's malware.

Enable 2FA Everywhere

Even if they steal your password, 2FA stops them from logging in. Use an authenticator app, not SMS.

Check Session Cookies

Infostealers also steal session cookies (logged-in sessions). Log out of important accounts periodically to invalidate old sessions.

Lab demo: DPAPI + AES-GCM extraction against a test environment. Chrome Local State decryption → Login Data SQLite → live exfil. MITRE T1555.003.

Why This Page Exists

Most security education is written for security people. This page exists because everyone deserves to understand how their passwords can be stolen - so they can protect themselves. Knowledge isn't dangerous; ignorance is.