SShortSingh.
Back to feed

How to Revoke Stolen AWS IAM Credentials in Real Time During an S3 Attack

0
·2 views

When an EC2 instance is compromised, attackers can extract temporary IAM credentials from the metadata service and begin bulk-downloading sensitive S3 data before a patch is ready. AWS GuardDuty can detect this via an Exfiltration:S3/AnomalousBehavior alert, triggering an urgent need to cut off access immediately. The fastest containment method is attaching an inline deny policy to the compromised IAM role using a timestamp condition, which invalidates all credentials issued before that moment — with no propagation delay. This approach blocks the attacker's stolen credentials across any network, while allowing the EC2 instance to automatically fetch new, valid credentials from the metadata service. Simply isolating the instance via a security group change is insufficient, as the attacker may already hold the credentials off-instance.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

14-Year-Old Indian Developer Ships 3 Web Projects Using Only a Budget Smartphone

Adrish, a 14-year-old developer from India, has built and deployed three web projects without access to a laptop or PC. His entire development setup runs on a Samsung M11 using free mobile code editors TrebEdit and Cxxdroid. His completed projects include a personal portfolio, a calculator, and a password generator, all hosted on Cloudflare. The calculator and password generator were collaborative efforts, with Adrish handling HTML and CSS while a friend contributed the JavaScript. He works with Vanilla HTML, Vanilla CSS, C, QB64, and is a beginner in Python.

0
ProgrammingDEV Community ·

Silent workflow bug reported 'success' 27 times daily while skipping all real work

A developer discovered that 27 workflow branches were being silently skipped every day, yet each run was marked as COMPLETED with no warnings. The root cause was an enum value, StepExecutionStatus.SKIPPED, that had existed in the codebase since the project's start but had never actually been written to the database. Skipped steps left no database rows, making them invisible in the UI and impossible to query without manually parsing a JSON blob. The fix involved writing real database rows for skipped steps and adding run-level counts for processed, skipped, and failed steps. The incident highlighted a broader problem: health checks and status indicators can appear green while the system silently does nothing meaningful.

0
ProgrammingDEV Community ·

Testcontainers Guide: Run Real Docker Dependencies in Automated Tests

Testcontainers is a multi-language library that programmatically starts and stops real Docker containers during automated test runs, supporting .NET, Java, Go, Python, Node.js, and more. It solves key problems with older approaches like docker-compose setups, where container lifecycles were decoupled from test execution and stale data or unready services caused flaky tests. The library provides genuine readiness detection to confirm a service is truly accepting connections, not just that its process has started, eliminating race-condition failures. It also handles dynamic port allocation, automatic cleanup via a Ryuk-based safety net, and supports a broad module ecosystem well beyond databases. Performance features like container reuse help make Testcontainers practical for routine use rather than an occasional, costly testing option.

0
ProgrammingDEV Community ·

Run AI Models Locally Using Docker Model Runner and Spring AI

Developers building Java applications with Spring AI can run large language models locally using Docker Model Runner, eliminating the need for cloud-hosted AI services like OpenAI or AWS Bedrock. Docker Model Runner exposes an OpenAI-compatible API endpoint, allowing Spring Boot applications to communicate with local models through standard Spring AI abstractions such as ChatClient and ChatModel. Running models locally helps developers avoid API costs during experimentation, keep sensitive data on-device, and work without an active internet connection. The setup requires Docker Desktop and the Spring AI OpenAI starter dependency, which connects to the local runtime rather than OpenAI's cloud infrastructure. This approach lets developers test prompts, RAG pipelines, and tool-calling logic without configuring cloud credentials each time.