Skip to content

Runbook: Frontend Compromise

Security SpecialistOperations & StrategyDevops

This is an example runbook. Review and customize for your protocol before use. Add your specific DNS provider, hosting platform, and deployment procedures.

Quick Reference

FieldValue
Typical SeverityP1
Primary ResponderFrontend SME
Last Updated[Date]
Owner[Name]

Identification

Symptoms

  • Users report unexpected transaction requests
  • UI behaving differently than expected
  • Wallet drainer detected
  • Injected scripts in page source
  • DNS/domain issues
  • Community reports of phishing via official domain

Attack Vectors

VectorSigns
DNS hijackDomain pointing to wrong IP
CDN compromiseMalicious files served
Dependency attacknpm/yarn package compromised
Build pipelineCI/CD compromise
Hosting compromiseFiles modified on server

Immediate Actions

Step 1: Take Down or Redirect

Why: Stop users from interacting with compromised site

Options:

  • Point DNS to maintenance page
  • Disable CDN distribution
  • Remove site from hosting
  • Add banner/warning if partial control

Step 2: Warn Users

Why: Prevent further damage

  • Post on Twitter/X
  • Post in Discord/Telegram
  • Update status page

Message template:

Our website may be compromised. Do NOT interact with [domain] or approve any transactions until further notice. Your funds in the protocol are safe if you don't sign new transactions.

Step 3: Assess Scope

  • What was changed?
  • How long was it compromised?
  • How many users potentially affected?
  • Were any transactions signed?

Investigation

Priority: Identify Attack Vector

The first priority is understanding how the attacker gained access so you can close that vector:

  • How did attacker gain access? (DNS, CDN, dependencies, CI/CD, hosting)

Once identified, go to the specific runbook:

Post-Mitigation Investigation

After the threat is contained, investigate impact:

  • What was injected/changed?
  • Which users interacted during compromise window?
  • What were users tricked into signing?

Check These

ComponentHow to Check
DNS recordsdig or DNS provider console
CDN filesCompare to known good
Build artifactsCheck CI/CD logs
Dependenciesnpm audit, lockfile changes
Hosting filesCompare to repo

Mitigation

See the specific runbook for detailed mitigation steps:


Recovery

Before Restoring Service

  • Root cause identified
  • Vulnerability fixed
  • Fresh deployment from verified source
  • All credentials rotated
  • Additional security measures in place

Restoring Service

  1. Deploy verified build
  2. Verify deployment matches expected
  3. Test critical user flows
  4. Monitor for anomalies
  5. Announce service restored

Affected User Support

If users signed malicious transactions:

  • Compile list of affected addresses (from chain data)
  • Provide guidance on revoking approvals
  • Consider compensation if protocol at fault
  • Document for post-mortem

Escalation


Prevention Checklist

After resolving, review:

  • DNS provider security (2FA, lock)
  • Hosting access controls
  • CI/CD security
  • Dependency management
  • Subresource integrity
  • Content Security Policy

Related