> your AI agent picks dependencies from memory; give it dated facts — try starlog.dev ↗ vet your agent's deps ↗ vibe-coding is fine. vibe-importing isn’t. — try starlog.dev ↗ vibe-importing isn’t fine ↗ your agent has never seen your private packages — try starlog.dev ↗ facts for private packages ↗ a linter for the dependencies your AI agent picks — try starlog.dev ↗ a linter for agent deps ↗

Back to Articles

How Google Password Alert Fingerprints Your Passwords Without Storing Them

[ View on GitHub ]

How Google Password Alert Fingerprints Your Passwords Without Storing Them

Hook

Every time you type your Google password on a phishing site, you have about 30 seconds before attackers use it—unless something is watching your keystrokes and screaming at you to stop.

Context

Phishing attacks remain devastatingly effective not because users can't identify fake login pages, but because they're distracted, rushed, or faced with increasingly sophisticated replicas. Traditional anti-phishing solutions operate at the network level—blocking known bad domains or analyzing URLs. But this approach has a fundamental timing problem: by the time a phishing site is identified and blocklisted, thousands of credentials may already be compromised. The window between a phishing campaign launching and security vendors updating their blocklists can span hours or days.

Google Password Alert, released as an open-source Chrome extension, attacks the problem from a different angle: instead of trying to identify malicious sites before you visit them, it watches what you type and alerts you the moment you enter your password on any page that isn't a legitimate Google login screen. This shift from preventative blocking to real-time behavioral detection represents a fundamentally different philosophy in credential protection. The extension essentially asks: what if we could detect the exact moment someone falls for a phishing attack and give them one last chance to change their password before attackers can use it?

Technical Insight

Browser Extension

Keystrokes

Password on Google

Generate hashes

Store fingerprints

Typing on web page

Retrieve fingerprints

Match detected

DOM content

Fake login detected

Enterprise mode

User Input

Keystroke Monitor

Password Capture

Hash Generator

Local Storage

Real-time Comparator

Alert UI

Page Load

HTML Analyzer

Admin Notification API

System architecture — auto-generated

The technical challenge Password Alert solves is deceptively complex: how do you monitor what users type without creating a massive security liability? Storing actual passwords locally would make the extension itself an attractive target for malware. Transmitting keystrokes to a remote server violates user privacy. The solution lies in cryptographic fingerprinting using what Google calls "partial hash chains."

When you successfully authenticate to Google, Password Alert captures your password and generates a series of cryptographic fingerprints from it. Instead of storing "mypassword123", it creates hashes of progressively longer substrings: hash("m"), hash("my"), hash("myp"), and so on. These fingerprints are stored locally in the extension's storage. The critical insight is that these hashes are one-way: even if malware extracts them from your browser, they can't be reversed to reveal your actual password.

Here's a simplified example of how the fingerprinting mechanism works:

// Simplified version of password fingerprinting
function generatePasswordFingerprints(password, email) {
  const fingerprints = [];
  const salt = email.toLowerCase(); // Use email as salt
  
  // Generate fingerprints for all substrings
  for (let length = 1; length <= password.length; length++) {
    const substring = password.substring(0, length);
    const fingerprint = {
      hash: sha1(salt + substring),
      length: length
    };
    fingerprints.push(fingerprint);
  }
  
  return fingerprints;
}

// When user types on any webpage
function checkKeystrokesAgainstFingerprints(typedChars, fingerprints) {
  const potentialMatches = [];
  
  // Check typed characters against stored fingerprints
  for (let i = 0; i < typedChars.length; i++) {
    const substring = typedChars.substring(i);
    const hash = sha1(userEmail + substring);
    
    // Look for matching fingerprint
    const match = fingerprints.find(fp => 
      fp.hash === hash && fp.length === substring.length
    );
    
    if (match) {
      potentialMatches.push({
        startPosition: i,
        matchLength: match.length
      });
    }
  }
  
  return potentialMatches;
}

The extension monitors every keypress event in the browser through content scripts injected into web pages. As you type, it builds a rolling buffer of recent characters and continuously compares fingerprints of this buffer against the stored password fingerprints. When it detects a match—meaning you've typed a sequence that hashes to one of your stored password fingerprints—it immediately checks whether you're on an authorized Google domain.

The second detection mechanism operates independently: HTML analysis. Password Alert examines the structure of every page you visit, looking for telltale signs of fake Google login pages. It searches for specific DOM patterns: forms with password fields, Google logos, OAuth-style layouts, and brand imagery. The extension maintains a signature database of legitimate Google authentication flows and flags pages that mimic these patterns while served from non-Google domains.

For enterprise deployments, Password Alert includes an administrative backend that allows IT teams to configure additional protected domains beyond Google's own properties. If your organization uses Okta, OneLogin, or a custom SSO portal, administrators can add these to the protection list. When the extension detects a password being entered on an unauthorized page, it can send an encrypted alert to a central reporting server, giving security teams visibility into phishing attempts targeting employees.

The architecture carefully separates concerns to maintain privacy: keystroke analysis happens entirely client-side, fingerprints never leave the user's machine, and only metadata about detected phishing attempts (like the suspicious URL and timestamp—never the typed content) is reported to enterprise administrators. This design allows organizations to benefit from aggregated threat intelligence without compromising individual user privacy.

One clever implementation detail: the extension rate-limits its own checking to avoid performance degradation. Rather than hashing on every single keystroke, it batches checks and uses a sliding window approach, only performing the expensive cryptographic operations when the typed buffer reaches certain lengths or patterns that could indicate a complete password entry.

Gotcha

Password Alert's most significant limitation is its narrow scope: it only protects Google account passwords by default. If you reuse passwords across services (which you shouldn't, but many do), the extension won't alert you when typing that same password on a fake Facebook or Amazon login page. For enterprise configurations, each additional protected domain requires administrative setup, and IT teams must maintain the list of legitimate authentication URLs—a non-trivial operational burden as services evolve.

The extension is completely disabled in Incognito mode, a deliberate design decision to respect user privacy expectations, but one that creates a security gap. Attackers who understand this limitation could theoretically craft phishing attacks that encourage users to "use a private window for security"—ironically leaving them more vulnerable. Performance can also be an issue on complex single-page applications that capture keyboard events aggressively; the extension's content scripts sometimes conflict with React or Angular applications that implement their own keyboard handling, occasionally resulting in delayed keypress detection or false negatives. The repository's last significant update was several years ago, raising questions about whether it keeps pace with evolving phishing techniques and modern web APIs. With only 324 stars and limited recent activity, community-contributed improvements and security patches are infrequent compared to more actively maintained security tools.

Verdict

Use Password Alert if: you're a Google Workspace administrator managing enterprise accounts and need an additional defense layer specifically for Google credential phishing, particularly in organizations where users have varying levels of security awareness; you're implementing a defense-in-depth strategy and want real-time behavioral detection to complement network-level protections; or you're studying client-side security architectures and want to understand practical implementations of cryptographic fingerprinting in browser extensions. Skip it if: you need comprehensive protection across multiple services beyond Google's ecosystem—modern password managers like Bitwarden or 1Password provide broader coverage with similar anti-phishing features; you require active development and rapid response to emerging threats (the project's maintenance velocity doesn't inspire confidence); you rely heavily on Incognito browsing; or you're looking for a consumer-friendly solution without enterprise deployment complexity. For most individual developers, your browser's built-in password manager combined with hardware security keys provides more comprehensive protection with less setup friction.