Back to Articles

ShadowClone: Weaponizing AWS Lambda's Free Tier for Massively Parallel Reconnaissance

[ View on GitHub ]

ShadowClone: Weaponizing AWS Lambda’s Free Tier for Massively Parallel Reconnaissance

Hook

What if you could run DNS enumeration on 43MB of wordlists in 34 seconds without paying for a single VPS? A bug bounty hunter did exactly that by exploiting the architectural quirks of serverless computing.

Context

Security researchers face a scaling problem: reconnaissance tasks like subdomain enumeration, DNS bruteforcing, and HTTP probing are embarrassingly parallel but traditionally require expensive infrastructure. Running tools on hundreds of thousands of targets takes hours on a laptop. Spinning up a VPS fleet with tools like Axiom works, but you’re paying per-minute for compute time even when idle, and most cloud providers cap you at 10-15 instances without manual approval requests.

The serverless computing model presents an elegant arbitrage opportunity. AWS Lambda, Google Cloud Functions, and Azure Functions each offer 1-2 million free invocations monthly, startup in 2-3 seconds rather than the 4-5 minutes required for VPS provisioning, scale to 1000 concurrent executions, and charge nothing when idle. ShadowClone exploits this model by transforming any command-line tool into a distributed system that runs across hundreds of ephemeral containers. For bursty reconnaissance workloads where you need massive parallelization for minutes rather than hours, it’s nearly free computing at scale.

Technical Insight

Serverless Cloud (AWS/GCP/Azure)

Input file + Command

Split into chunks

N chunks based on split factor

Spawn N instances

Spawn N instances

Spawn N instances

Pull runtime image

Pull runtime image

Pull runtime image

Execute command on chunk 1

Execute command on chunk 2

Execute command on chunk N

Merged output

User CLI

ShadowClone Core

File Chunker

Lithops Orchestrator

Function Instance 1

Function Instance 2

Function Instance N

Container Registry

Result Aggregator

Output File

System architecture — auto-generated

ShadowClone’s architecture centers on file chunking, container orchestration, and result aggregation. During initial setup (detailed in the project wiki), you create a container image with your reconnaissance tools and register it as a runtime for serverless functions in AWS, GCP, or Azure. When you execute ShadowClone, it splits your input file based on the --split parameter, dynamically calculates how many function invocations to spawn, distributes chunks across those instances, and merges the output.

The basic command syntax follows this pattern:

python shadowclone.py -i INPUT -s SPLITNUM -c COMMAND -o OUTPUT

The -s parameter controls chunking granularity. If your input file contains 50,000 lines and you set -s 100, ShadowClone creates 500 chunks of 100 lines each and spawns 500 function invocations. Each container executes your specified command independently on its chunk, writes output, and terminates. The tool supports up to 1000 parallel invocations.

The README demonstrates DNS bruteforcing with a 43MB wordlist completing in 34 seconds, and running httpx on 94,000 subdomains in 1 minute. The comparison table shows startup time of 2-3 seconds versus 4-5 minutes for VPS-based solutions like Axiom.

The tool appears to use the Lithops framework (referenced in the README documentation links) to provide cloud-agnostic abstraction. The same script works across AWS Lambda, Google Cloud Functions, and Azure Functions, allowing you to switch providers to stay within free tier limits—once you exhaust AWS’s 1 million monthly invocations, you can pivot to GCP’s 2 million allocation.

The 15-minute execution time limit per invocation is a hard constraint imposed by serverless platforms. Your split factor must create chunks that complete well under this limit. The tool also includes a --no-split argument for files that should be used without splitting, though its specific use cases are not detailed in the README.

The README confirms the tool supports piping output to other tools as a feature, enabling integration with standard Unix workflows for filtering and post-processing results.

Gotcha

The 15-minute execution time limit per function invocation is a hard wall enforced by Lambda, Google Cloud Functions, and Azure Functions. If you miscalculate your split factor and individual chunks exceed this limit, those invocations terminate mid-execution with partial or lost results.

Setup complexity is significantly higher than initially apparent. The README directs you to a wiki for installation and initial configuration, but based on the architecture described, you’re likely configuring container registries, cloud provider credentials, and runtime environments. If you haven’t worked with serverless platforms before, expect substantial setup time before your first successful execution.

Network-bound tools expose a fundamental tradeoff: you’re trading consistent local network performance for distributed but variable cloud network performance. Each function invocation originates from a different outbound IP address. For reconnaissance tasks that trigger rate limiting or IP-based blocking, you might see inconsistent results compared to a single VPS with a stable IP.

For small input files where actual processing takes less time than the startup overhead, you’ll see worse performance than local execution—parallelization overhead exceeds parallelization benefit. The tool is optimized for high-volume workloads, not small quick tasks.

Verdict

Use ShadowClone if you’re a bug bounty hunter or security researcher running periodic high-volume reconnaissance scans (DNS enumeration, subdomain probing, port scanning) where you need to process tens of thousands of targets and your tools can complete individual chunks in under 10 minutes. The economics are unbeatable for bursty workloads—you’re essentially getting free distributed computing by exploiting cloud provider free tiers, and the 2-3 second startup time beats waiting 4-5 minutes for VPS fleet provisioning. It shines when you need hundreds of parallel workers for a task that runs periodically, where maintaining persistent infrastructure would cost significantly in idle time. Skip if your reconnaissance tasks require more than 15 minutes per chunk, need stateful processing across chunks, or involve small input sets where local execution would finish faster than the parallelization overhead. Also skip if the initial setup complexity (detailed in the wiki) feels like overkill for your use case. For teams that need unlimited execution time or full control over worker instances, Axiom’s VPS approach remains superior despite the higher cost, but for free tier exploitation and massive on-demand scalability, ShadowClone delivers on its promise.

// ADD TO YOUR README
[![Featured on Starlog](https://starlog.is/api/badge/infrastructure/fyoorer-shadowclone.svg)](https://starlog.is/api/badge-click/infrastructure/fyoorer-shadowclone)