A versatile, containerized framework for replicating diverse attack scenarios and capturing artifacts for security analysis and defensive system development, featuring modular definitions of scenarios and built-in network packet capture capabilities.
RAS revolves around scenarios that define the environment and attack vectors. Each scenario consists of:
- Containers: Docker images for services (e.g., nginx, Juice Shop)
- Networks: Docker networks for communication
- Configurations: Nginx and ModSecurity configurations
- Artifacts: Output directories for logs and packet captures
We provide two example scenarios:
- Vanilla: Basic setup with nginx proxying to Juice Shop, no WAF.
- WAF: Same setup with ModSecurity WAF enabled, preventing suspicious payloads from reaching the application.
- Docker and Docker Compose
- sudo access (for packet capture)
# Start vanilla scenario
./ras.sh vanilla start
# Stop scenario and cleanup
./ras.sh vanilla stop
# Start WAF scenario with packet capture
./ras.sh waf start --sniff edge
./ras.sh waf stop./ras.sh <scenario> <command> [options]Scenarios:
vanilla- No WAF protectionwaf- ModSecurity WAF enabled
Commands:
start [--sniff BRIDGE]- Start containers (optionally with packet capture)stop- Stop containers and packet capturerestart- Restart containerslogs- Show container logsbridges- Show available network bridgesclean- Remove all containers and data
Use --sniff with start command:
edge- Capture attacker/shopper β nginx trafficappnet- Capture nginx β web service trafficboth- Capture both networks
scenario-vanilla/
βββ out/
βββ nginx/ # Nginx access/error logs
βββ pcap/ # Packet captures (timestamped)
scenario-waf/
βββ out/
βββ nginx/ # Nginx logs
βββ waf/ # ModSecurity logs
βββ pcap/ # Packet captures (timestamped)
Must be enabled with --sniff option. Captures are stored in:
scenario-<name>/out/pcap/- Timestamped PCAP files (YYYYMMDD-HHMMSS format)
- Automatic cleanup when stopping containers
# Start vanilla with full network capture
./ras.sh vanilla start --sniff both
# View WAF scenario logs in real-time
./ras.sh waf logs
# Check available bridges for waf scenario
./ras.sh waf bridges
# Clean everything for vanilla scenario
./ras.sh vanilla clean
# Restart waf scenario with edge capture
./ras.sh waf restart
./ras.sh waf start --sniff edgeContainers won't start:
./ras.sh <scenario> clean
./ras.sh <scenario> startPermission issues:
./ras.sh <scenario> fix-permissionsCan't find networks:
- Ensure containers are running before using
--snifforbridgescommands