惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Engineering at Meta
Engineering at Meta
T
Threatpost
P
Palo Alto Networks Blog
NISL@THU
NISL@THU
O
OpenAI News
Project Zero
Project Zero
G
GRAHAM CLULEY
P
Privacy International News Feed
A
Arctic Wolf
Microsoft Azure Blog
Microsoft Azure Blog
H
Help Net Security
M
MIT News - Artificial intelligence
T
Threat Research - Cisco Blogs
S
Security @ Cisco Blogs
Google DeepMind News
Google DeepMind News
B
Blog RSS Feed
D
Docker
aimingoo的专栏
aimingoo的专栏
博客园 - 【当耐特】
N
Netflix TechBlog - Medium
云风的 BLOG
云风的 BLOG
雷峰网
雷峰网
W
WeLiveSecurity
P
Proofpoint News Feed
腾讯CDC
Cloudbric
Cloudbric
S
Secure Thoughts
C
Check Point Blog
博客园 - Franky
T
The Exploit Database - CXSecurity.com
T
Troy Hunt's Blog
GbyAI
GbyAI
Security Archives - TechRepublic
Security Archives - TechRepublic
Application and Cybersecurity Blog
Application and Cybersecurity Blog
月光博客
月光博客
C
Cyber Attacks, Cyber Crime and Cyber Security
I
Intezer
TaoSecurity Blog
TaoSecurity Blog
L
Lohrmann on Cybersecurity
V
Visual Studio Blog
F
Fortinet All Blogs
博客园 - 叶小钗
C
CXSECURITY Database RSS Feed - CXSecurity.com
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Recorded Future
Recorded Future
C
Cisco Blogs
博客园 - 司徒正美
Stack Overflow Blog
Stack Overflow Blog
Y
Y Combinator Blog
Apple Machine Learning Research
Apple Machine Learning Research

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
🚨 S3 Ransomware Response — What to Do in the First Critical Minutes
Python-T Poi · 2026-05-14 · via DEV Community

An attacker encrypts every object in your production S3 bucket and replaces them with ransom notes. The next 15 minutes determine whether you restore data in under an hour or face a six-figure payout. This is S3 ransomware response — a high-stakes race where speed, precision, and preparation decide the outcome.

📑 Table of Contents

  • ⏱ Minute 0-2 — Stop the Bleed
  • 🛡 Minute 2-10 — Contain and Assess
  • 🔀 Minute 10-X — Recovery Decision Tree
  • 🔐 Preventive Controls — Stop This From Happening Again
  • 🟩 Final Thoughts
  • ❓ Frequently Asked Questions
  • Can AWS help recover data after an S3 ransomware attack?
  • Does S3 Server-Side Encryption (SSE) protect against ransomware?
  • How can I test my S3 ransomware recovery plan?
  • 📚 References & Further Reading

⏱ Minute 0-2 — Stop the Bleed

The first two minutes must halt active damage. The objective is to disable write operations before further encryption or data exfiltration occurs.

Do not pay the ransom. Payment does not guarantee decryption and increases the likelihood of repeat targeting.

Do not delete the compromised IAM user or role. Deletion erases critical audit metadata. Preserve identities for forensic validation.

Do not click links in ransom notes. URLs may execute malicious payloads or signal attacker command-and-control infrastructure.

Immediately block write access to the affected bucket using a deny-all-writes bucket policy:

$ aws s3api put-bucket-policy \
    --bucket prod-backups-2024 \
    --policy file://deny-all-writes.json


{
    "ResponseMetadata": {
        "HTTPStatusCode": 204
    }
}

Enter fullscreen mode Exit fullscreen mode

This policy denies s3:PutObject, s3:DeleteObject, and s3:RestoreObject across all principals. The Deny effect overrides any Allow in IAM or resource policies due to AWS’s policy evaluation order — explicit deny wins, even for administrative users.

Here’s deny-all-writes.json:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "DenyWritesDuringIncident",
      "Effect": "Deny",
      "Principal": "*",
      "Action": [
        "s3:PutObject",
        "s3:DeleteObject",
        "s3:RestoreObject"
      ],
      "Resource": [
        "arn:aws:s3:::prod-backups-2024/*"
      ]
    }
  ]
}

Enter fullscreen mode Exit fullscreen mode

With versioning enabled, attackers cannot permanently erase data without first deleting the latest version — but they can still overwrite objects in place. Blocking new writes prevents encryption of live versions.


🛡 Minute 2-10 — Contain and Assess

Next, isolate the compromised identity and initiate forensic data collection.

Identify the IAM entity behind the malicious writes using CloudTrail. Filter for high-frequency PutObject operations on the affected bucket:

$ aws cloudtrail lookup-events \
    --lookup-attributes AttributeKey=ResourceName,AttributeValue=prod-backups-2024 \
    --start-time 2024-04-15T10:00:00Z \
    --max-results 30


{
    "Events": [
        {
            "EventName": "PutObject",
            "EventTime": "2024-04-15T10:03:12Z",
            "Username": "backup-agent-role",
            "EventSource": "s3.amazonaws.com",
            "Resources": [
                {
                    "ResourceType": "AWS::S3::Object",
                    "ResourceName": "prod-backups-2024/db-snapshot.enc"
                }
            ],
            "AccessKeyId": "ASIA5X2Y3Z4ABCDE5678"
        }
    ]
}

Enter fullscreen mode Exit fullscreen mode

Key indicators:

  • EventName is PutObject with extensions like .enc, .crypt, or random suffixes.
  • Username corresponds to non-human roles, especially those with broad S3 access.
  • AccessKeyId begins with ASIA — signs of assumed role compromise via exposed session tokens.

Disable the role’s permissions by detaching its policies:

$ aws iam detach-role-policy \
    --role-name backup-agent-role \
    --policy-arn arn:aws:iam::123456789012:policy/S3FullAccess


{
    "ResponseMetadata": {
        "HTTPStatusCode": 200
    }
}

Enter fullscreen mode Exit fullscreen mode

The role remains but loses active permissions. This is faster and more forensic-safe than deletion.

If using AWS Organizations, apply a service control policy (SCP) to block all S3 actions for the principal:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "BlockS3WritesForCompromisedAccount",
      "Effect": "Deny",
      "Action": "s3:*",
      "Resource": "*",
      "Condition": {
        "StringLike": {
          "aws:PrincipalArn": "arn:aws:iam::123456789012:role/backup-agent-role"
        }
      }
    }
  ]
}

Enter fullscreen mode Exit fullscreen mode

SCP enforcement occurs before IAM policy evaluation — meaning this deny takes precedence, regardless of local allow rules.

If S3 server access logging is enabled, retrieve logs to trace upload sources:

$ aws s3api get-bucket-logging --bucket prod-backups-2024


{
    "LoggingEnabled": {
        "TargetBucket": "s3-access-logs-bucket",
        "TargetPrefix": "prod-backups-2024/"
    }
}

Enter fullscreen mode Exit fullscreen mode

Download logs from s3-access-logs-bucket matching the incident window. Filter for PUT requests with status 200 and non-zero request size — confirming successful object uploads.

Containment isn’t just access revocation — it’s preserving forensic data while eliminating active attack pathways.


🔀 Minute 10-X — Recovery Decision Tree

Choose the recovery path based on bucket configuration and backup availability.

If versioning is enabled and MFA Delete is disabled: Roll back to the last known clean version.

List versions for affected objects:

$ aws s3api list-object-versions \
    --bucket prod-backups-2024 \
    --prefix db-snapshot.sql


{
    "Versions": [
        {
            "Key": "db-snapshot.sql",
            "VersionId": "ExmPLx.idK9BH4iC.EO8LdyX.aI0.PT",
            "IsLatest": true,
            "LastModified": "2024-04-15T10:05:00Z",
            "Size": 20971520
        },
        {
            "Key": "db-snapshot.sql",
            "VersionId": "L45.bXeQ8.jwMpaLshUOwieqz_vwzCw",
            "IsLatest": false,
            "LastModified": "2024-04-15T09:00:00Z",
            "Size": 20971520
        }
    ]
}

Enter fullscreen mode Exit fullscreen mode

Recover the prior version:

$ aws s3api copy-object \
    --bucket prod-backups-2024 \
    --copy-source prod-backups-2024/db-snapshot.sql?versionId=L45.bXeQ8.jwMpaLshUOwieqz_vwzCw \
    --key db-snapshot.sql

Enter fullscreen mode Exit fullscreen mode

If versioning is disabled but S3 Object Lock is active in Governance mode: You can delete the encrypted object if you have s3:BypassGovernanceRetention.

$ aws s3api delete-object \
    --bucket prod-backups-2024 \
    --key db-snapshot.sql \
    --version-id ExmPLx.idK9BH4iC.EO8LdyX.aI0.PT \
    --bypass-governance-retention

Enter fullscreen mode Exit fullscreen mode

After deletion, restore from an external backup source.

If Cross-Region Replication (CRR) is configured: Check the target bucket in the secondary region:

$ aws s3api list-objects-v2 \
    --bucket prod-backups-2024-euwest1 \
    --prefix db-snapshot.sql

Enter fullscreen mode Exit fullscreen mode

If objects exist, copy them back:

$ aws s3 cp s3://prod-backups-2024-euwest1/db-snapshot.sql s3://prod-backups-2024/

Enter fullscreen mode Exit fullscreen mode

If no versioning or replication, but backups exist elsewhere (e.g., Glacier, EBS snapshots, third-party systems): Initiate restore workflows. Do not attempt re-upload until data is verified and staging is ready.

If none of the above apply: Recovery is not possible from AWS storage layers. Open a Priority Support Case with AWS. Request forensic support and preservation of CloudTrail logs. Concurrently assess regulatory reporting requirements. Do not engage with attackers.


🔐 Preventive Controls — Stop This From Happening Again

Prevention relies on immutable backups, strict least-privilege policies, and automated guardrails.

  1. Enable S3 Versioning on all production buckets — enables rollback to pre-attack state. This is the minimum viable recovery mechanism.
  2. Enable MFA Delete for critical buckets — requires multi-factor authentication to delete or suspend versioning, blocking automated destruction.
  3. Apply S3 Block Public Access at the account level — prevents public exposure that attackers scan for and exploit.
  4. Use S3 Object Lock in Compliance mode for regulated data — prevents deletion or modification even by root users until retention expires.
  5. Restrict S3 write access usingaws:SourceArn and aws:SourceVpc conditions — binds PutObject to specific services or VPCs, reducing risk from compromised credentials.

Example: limit PutObject to requests originating from a specific VPC:

{
  "Effect": "Allow",
  "Action": "s3:PutObject",
  "Resource": "arn:aws:s3:::prod-backups-2024/*",
  "Condition": {
    "ArnEquals": {
      "aws:SourceVpc": "vpc-1a2b3c4d"
    }
  }
}

Enter fullscreen mode Exit fullscreen mode

This uses the request’s network context during policy evaluation — a stronger control than identity alone.

Enable S3 access logging and CloudTrail with log file integrity validation. These logs are append-only and signed, making them admissible for post-incident review.

Monitor configuration drift using AWS Config:

$ aws config list-discovered-resources --resource-type AWS::S3::Bucket

Enter fullscreen mode Exit fullscreen mode

Define custom rules to flag buckets missing versioning, public access, or encryption at rest.

🟩 Final Thoughts

S3 ransomware response is defined by pre-incident configuration. Recovery speed depends on whether versioning was enabled, whether Object Lock was set, and whether least-privilege policies were enforced.

No operational tooling or debugging skill compensates for missing backups or permissive policies. Your infrastructure as code — Terraform, CloudFormation, CI/CD pipelines — is the frontline of resilience.

When an attack occurs, the system responds to what was built, not what was intended. The recovery window starts long before the first encrypted object appears.

Prepare for the attack that bypasses assumptions. Build systems that survive the playbook’s failure.

❓ Frequently Asked Questions

Can AWS help recover data after an S3 ransomware attack?

AWS can assist with forensic analysis and account recovery through AWS Support, but they cannot decrypt files or restore data unless it’s available in versioned, replicated, or backed-up states. Recovery relies on your configuration.

Does S3 Server-Side Encryption (SSE) protect against ransomware?

No. SSE encrypts data at rest, but attackers with write access can still overwrite objects with their own encrypted content. Encryption protects confidentiality, not integrity or availability.

How can I test my S3 ransomware recovery plan?

Run controlled chaos engineering drills: simulate an attack by encrypting a test object, then execute your playbook. Verify version restore, policy rollbacks, and communication workflows. Test quarterly.

📚 References & Further Reading

  • Amazon S3 Versioning documentation — how to enable and manage object versions: docs.aws.amazon.com
  • AWS IAM Policy Evaluation Logic — deep dive into how Deny, Allow, and conditions are processed: docs.aws.amazon.com
  • Amazon S3 Object Lock guide — enforce write-once-read-many (WORM) compliance: docs.aws.amazon.com