Back to blog

Botnet Exploits AWS Outage to Attack 28 Countries Including Brazil

Hello HaWkers, a sophisticated botnet exploited the recent Amazon Web Services (AWS) outage to launch a series of coordinated attacks in 28 countries, including Brazil. This incident demonstrates how attackers are opportunistic and capable of exploiting moments of vulnerability in critical infrastructures.

Have you ever thought about how your application would behave during a cloud provider outage? What if that outage was accompanied by a coordinated attack?

What Happened

During a period of instability in AWS services, a large-scale botnet initiated simultaneous attacks against targets in dozens of countries. Brazil was one of the most affected in Latin America, with companies from various sectors reporting intrusion attempts.

Attack Anatomy

Incident Timeline:

The attack was carefully timed:

  • Hour 0: AWS outage begins in multiple regions
  • Hour +15min: First detections of anomalous traffic
  • Hour +30min: Attack scale increases significantly
  • Hour +2h: Peak of intrusion attempts
  • Hour +4h: AWS begins recovery, attacks continue
  • Hour +8h: Attack intensity decreases

Most Affected Countries:

Region Countries Main Sectors
North America USA, Canada, Mexico Financial, Tech
South America Brazil, Argentina, Colombia E-commerce, Financial
Europe Germany, UK, France, Spain Retail, Healthcare
Asia Japan, Singapore, India Manufacturing, Tech

How the Botnet Operated

Attack Strategy:

Attackers used multiple techniques:

  • Volumetric DDoS: Bandwidth overload during outage
  • Credential Stuffing: Massive login attempts
  • API Abuse: Exploitation of exposed endpoints
  • Vulnerability Scanning: Search for misconfigured systems

Context: During a cloud outage, many companies temporarily disable protections or make emergency changes that can create vulnerabilities.

Why Outages Are Opportunities For Attackers

Periods of instability in cloud providers create ideal conditions for attacks.

Vulnerability Factors

During an Outage:

  1. Distracted Teams: Focus on restoring services, not security
  2. Compromised Monitoring: Detection systems may be offline
  3. Emergency Changes: Configurations altered without proper review
  4. Misconfigured Failover: Secondary systems may have less protection
  5. Chaotic Communication: Response coordination impaired

Signs Attackers Look For:

  • Status pages indicating problems
  • Social media mentions about instability
  • Timeouts and errors in public APIs
  • Changes in DNS records (failover)

The Specific AWS Case

Why AWS is a Frequent Target:

  • Largest cloud market share (~32%)
  • Hosts millions of critical applications
  • Outages affect massive scale of services
  • High visibility ensures impact

Most Targeted Services:

  • EC2 (compute)
  • S3 (storage)
  • RDS (databases)
  • Lambda (serverless)
  • API Gateway

Impact in Brazil

Brazil was significantly affected by the coordinated attack.

Most Affected Sectors

E-commerce:

  • Fraud attempts at checkouts
  • Massive price scraping
  • Attacks on payment APIs
  • Credential stuffing on customer accounts

Financial Sector:

  • Internet banking access attempts
  • Open Banking API attacks
  • Mobile app exploitation
  • Coordinated phishing

Startups and Tech:

  • Attacks on Brazilian SaaS
  • Exposed API exploitation
  • Ransomware attempts
  • Data leaks

Estimated Numbers

Impact in Brazil:

  • More than 2 million attack attempts
  • ~500 companies reported incidents
  • 3 large retailers had services affected
  • Average response time: 45 minutes

What Developers Need to Know

This incident offers important lessons for resilient system architecture.

Preparing for Cloud Outages

Contingency Plan:

Every critical application should have:

// Example of circuit breaker for AWS services
class AWSCircuitBreaker {
  constructor(options = {}) {
    this.failureThreshold = options.failureThreshold || 5;
    this.resetTimeout = options.resetTimeout || 30000;
    this.failures = 0;
    this.state = 'CLOSED'; // CLOSED, OPEN, HALF_OPEN
    this.lastFailureTime = null;
  }

  async execute(awsOperation, fallback) {
    if (this.state === 'OPEN') {
      if (Date.now() - this.lastFailureTime > this.resetTimeout) {
        this.state = 'HALF_OPEN';
      } else {
        console.log('Circuit OPEN - executing fallback');
        return fallback();
      }
    }

    try {
      const result = await awsOperation();
      this.onSuccess();
      return result;
    } catch (error) {
      this.onFailure(error);

      if (this.isAWSOutage(error)) {
        console.log('AWS outage detected - using fallback');
        return fallback();
      }

      throw error;
    }
  }

  isAWSOutage(error) {
    const outageIndicators = [
      'ServiceUnavailable',
      'InternalError',
      'Throttling',
      'RequestTimeout',
      'ServiceException'
    ];

    return outageIndicators.some(indicator =>
      error.code?.includes(indicator) ||
      error.message?.includes(indicator)
    );
  }

  onSuccess() {
    this.failures = 0;
    this.state = 'CLOSED';
  }

  onFailure(error) {
    this.failures++;
    this.lastFailureTime = Date.now();

    if (this.failures >= this.failureThreshold) {
      this.state = 'OPEN';
      console.log(`Circuit opened after ${this.failures} failures`);
    }
  }
}

// Usage
const circuitBreaker = new AWSCircuitBreaker({
  failureThreshold: 3,
  resetTimeout: 60000
});

async function getS3Object(bucket, key) {
  return circuitBreaker.execute(
    // Primary operation (AWS)
    async () => {
      const s3 = new AWS.S3();
      return s3.getObject({ Bucket: bucket, Key: key }).promise();
    },
    // Fallback (local cache or alternative CDN)
    async () => {
      return localCache.get(`${bucket}/${key}`);
    }
  );
}

Security During Incidents

Security Checklist During Outage:

// Security verification system during incidents
class IncidentSecurityChecker {
  constructor() {
    this.checks = [];
    this.alerts = [];
  }

  addCheck(name, checkFn, priority = 'medium') {
    this.checks.push({ name, checkFn, priority });
  }

  async runAllChecks() {
    const results = {
      timestamp: new Date().toISOString(),
      status: 'OK',
      checks: []
    };

    for (const check of this.checks) {
      try {
        const passed = await check.checkFn();
        results.checks.push({
          name: check.name,
          passed,
          priority: check.priority
        });

        if (!passed && check.priority === 'critical') {
          results.status = 'CRITICAL';
          this.triggerAlert(check.name);
        }
      } catch (error) {
        results.checks.push({
          name: check.name,
          passed: false,
          error: error.message,
          priority: check.priority
        });
      }
    }

    return results;
  }

  triggerAlert(checkName) {
    this.alerts.push({
      timestamp: new Date(),
      check: checkName,
      message: `Critical security check failed: ${checkName}`
    });
    // Implement notification
    console.error(`ALERT: ${checkName} failed during incident`);
  }
}

// Check configuration
const securityChecker = new IncidentSecurityChecker();

// Check if WAF is active
securityChecker.addCheck('WAF Status', async () => {
  const waf = new AWS.WAFV2();
  const webACLs = await waf.listWebACLs({ Scope: 'REGIONAL' }).promise();
  return webACLs.WebACLs.length > 0;
}, 'critical');

// Check rate limiting
securityChecker.addCheck('Rate Limiting', async () => {
  // Verify rate limiting is configured
  return checkRateLimitingEnabled();
}, 'critical');

// Check active logs
securityChecker.addCheck('Logging Active', async () => {
  // Check CloudWatch Logs
  return checkLoggingEnabled();
}, 'high');

// Check recent backups
securityChecker.addCheck('Recent Backups', async () => {
  // Verify backup from last 24h exists
  return checkRecentBackups();
}, 'medium');

// Execute during incident
async function incidentResponse() {
  console.log('Running security checks during incident...');
  const results = await securityChecker.runAllChecks();
  console.log('Security check results:', JSON.stringify(results, null, 2));
  return results;
}

Multi-Cloud and Redundancy

Resilience Strategies:

For critical applications, consider:

1. Multi-Region on AWS:

  • Replicas in multiple regions
  • Route 53 health checks
  • Automatic failover

2. Multi-Cloud:

  • Critical workloads on multiple providers
  • DNS with failover between clouds
  • Cross-cloud replicated data

3. Hybrid:

  • Critical components on-premise
  • CDN as first line
  • Distributed cache

Protection Against Botnets

Specific measures to protect yourself during coordinated attacks.

Malicious Traffic Detection

Botnet Attack Signs:

Indicator Description Action
Traffic spike Sudden increase in requests Activate rate limiting
Uniform patterns Very similar requests Block by fingerprint
IPs on lists Known malicious addresses Block automatically
Suspicious user-agents Poorly disguised bots Verify with CAPTCHA
Anomalous geolocation Traffic from unexpected regions Temporary geo-blocking

Protection Layers

Defense in Depth:

  1. Edge (CDN/WAF):

    • Rate limiting by IP
    • Geo-blocking if necessary
    • Bot detection
    • DDoS protection
  2. Application:

    • Rigorous input validation
    • Rate limiting by user
    • CAPTCHA for sensitive operations
    • Anomaly monitoring
  3. Database:

    • Limited connection pooling
    • Query timeouts
    • Continuous backups
    • Read replicas to distribute load

Lessons Learned

This incident reinforces fundamental security practices.

For Companies

Recommended Actions:

  • Review disaster recovery plan
  • Test failover regularly
  • Keep security team on standby during outages
  • Document response procedures

For Developers

Essential Practices:

  • Implement circuit breakers
  • Configure proper fallbacks
  • Monitor security continuously
  • Don't relax protections during emergencies

For the Industry

Trends:

  • Coordinated attacks with infrastructure events
  • Need for automated response
  • Importance of threat intelligence
  • Inter-company collaboration for defense

Conclusion

The coordinated attack that exploited the AWS outage demonstrates the increasing sophistication of cyber threats. Attackers are increasingly attentive to opportunities created by infrastructure failures, and the only effective defense is advance preparation.

For Brazilian developers and companies, the lesson is clear: security cannot be suspended during emergencies - on the contrary, that's exactly when it needs to be most active. Investing in resilient architecture, response automation, and continuous monitoring is no longer optional.

If you're interested in development security, also check out our article about OpenAI Security Incident to understand how major AI companies handle security issues.

Let's go! 🦅

Comments (0)

This article has no comments yet 😢. Be the first! 🚀🦅

Add comments