Skip to content
Baza wiedzy

Cyberattack Scenario on an Online Store — Case Study

A realistic cyberattack scenario on an e-commerce platform. From reconnaissance to data exfiltration — learn the anatomy of an attack and lessons for your store.

Context: Profile of the Attacked Store

MegaShop (name changed) is a mid-sized Polish online store:

  • Platform: WooCommerce on WordPress 6.x
  • 45,000 active customers, 800 orders/day
  • 12 plugins, including 3 premium (payment gateway, ERP, marketing automation)
  • IT team: 2 developers, 1 server admin (no dedicated security personnel)
  • Revenue: EUR 8 million/year
  • No dedicated SOC or security monitoring

Day 0: Reconnaissance

The attacker begins with passive reconnaissance — gathering information without directly contacting the store:

  • Wappalyzer/BuiltWith reveals: WordPress 6.4.2, WooCommerce 8.5, PHP 8.1, Nginx server
  • Subdomain enumeration discovers: staging.megashop.pl (production copy with test data)
  • Google dorking (site:megashop.pl filetype:sql OR filetype:log) — no results, but site:staging.megashop.pl reveals directory listing with log files
  • Shodan shows open port 3306 (MySQL) on the staging server
  • LinkedIn — profiles of 2 developers with technology stack information

The attacker already knows that staging is the weakest link. Active recon begins.

Days 1-3: Staging Server Exploitation

The staging server has:

  • WordPress with default admin/admin login (unchanged after cloning from production)
  • WP File Manager plugin version 6.8 with a critical RCE vulnerability (CVE-2024-XXXX)
  • A database with a copy of 45,000 customer records from production (addresses, phone numbers, order history)

The attacker:

  1. Logs into the staging WordPress panel with default credentials
  2. Exploits the WP File Manager vulnerability to upload a web shell
  3. Gains database access on staging — copies 45,000 customer records
  4. Analyzes wp-config.php configuration — finds payment gateway API keys (same as production!)
  5. Discovers that the SSH key on staging allows access to the production server (shared key)

Days 4-7: Lateral Movement to Production

With the SSH key, the attacker gains access to the production server:

  1. Persistence installation — a backdoor in the form of a modified theme functions.php file (hard to detect as it looks like legitimate WordPress code)
  2. Privilege escalation — from the www-data account to root via an outdated kernel exploit
  3. Web skimmer installation — malicious JavaScript injected into the WooCommerce checkout file

The skimmer is advanced:

  • Activates only on the checkout page
  • Captures card data as it is typed (before tokenization)
  • Sends data to cdn-analytics-megashop.com (looking like a legitimate domain)
  • Obfuscated code resembles an analytics fragment
  • Does not activate for IPs from the company range (anti-detection)

Days 8-30: Data Exfiltration

For 22 days, the skimmer operates undetected:

  • 8,200 payment card numbers intercepted
  • Personal data (names, addresses, phone numbers) stolen with every transaction
  • Password hashes exported from the database (bcrypt, but the attacker will recover ~15% of weak passwords)
  • Order logs with complete customer data

Simultaneously, the attacker:

  • Uses stolen API keys for test refunds (small amounts to avoid suspicion)
  • Installs a cryptominer on the staging server (additional revenue)
  • Sells the 45,000 customer database on the dark web for $2,000

Day 31: Incident Detection

A MegaShop customer reports an unauthorized transaction to their bank. The bank identifies MegaShop as a Common Point of Purchase (CPP) — multiple store customers report fraud.

The bank notifies the payment processor, which:

  1. Informs MegaShop about suspected compromise
  2. Requires an immediate PCI Forensic Investigation
  3. Threatens to disable payment terminals

MegaShop learns about the attack not from its own monitoring, but from the bank — 22 days after the skimmer became active.

Analysis: What Went Wrong

VulnerabilityImpactPrevention
Staging with production data45,000 records leakedData anonymization on staging
Default admin passwords on stagingAttack entry pointStrong passwords + MFA everywhere
Shared SSH keyLateral movementSeparate keys per environment
No file integrity monitoringSkimmer undetected for 22 daysFIM + CSP + SOC
No staging/production segmentationFull access from one pointEnvironment isolation
Outdated plugin with RCEStaging exploitRegular updates + vulnerability scanning

Consequences and Costs

Financial (total ~EUR 500,000):

  • PCI Forensic Investigation: EUR 42,000
  • PCI DSS fines: EUR 95,000
  • Chargebacks: EUR 75,000
  • Notification of 45,000 customers: EUR 21,000
  • Supervisory authority fine (GDPR): EUR 120,000
  • Lost revenue (3 months reduced sales): EUR 140,000

Operational:

  • 2 weeks of emergency operations
  • Complete server infrastructure replacement
  • Migration to payment tokenization
  • Implementation of 24/7 security monitoring

Reputational:

  • 35% of customers did not return after the incident
  • Negative media and social media coverage
  • Loss of business partner trust

Cybersecurity for Your Industry

Learn more about cybersecurity in your industry:

Share:

Talk to an expert

Have questions about this topic? Get in touch with our specialist.

Sales Representative
Grzegorz Gnych

Grzegorz Gnych

Sales Representative

Response within 24 hours
Free consultation
Individual approach

Providing your phone number will speed up contact.

Want to Reduce IT Risk and Costs?

Book a free consultation - we respond within 24h

Response in 24h Free quote No obligations

Or download free guide:

Download NIS2 Checklist