Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
0a7a732
test: add comprehensive unit and integration tests for all modules (#…
l50 Apr 23, 2026
e311aae
feat: add automation for noPac, PrintNightmare, NTLM relay, and Zerol…
l50 Apr 22, 2026
eb1ae8f
feat: add automation for share coercion and smb signing detection
l50 Apr 22, 2026
0028a5c
feat: add automation for mssql coercion, ntlmv1, password policy, gpp…
l50 Apr 22, 2026
e4f9874
feat: add automation for spooler, MAQ, DFS, PetitPotam, and WinRM lat…
l50 Apr 22, 2026
edfa052
feat: add new automation modules for comprehensive AD attack surface …
l50 Apr 22, 2026
8aef097
feat: add dacl abuse and authenticated smbclient enum automation tasks
l50 Apr 23, 2026
06e9128
feat: implement tiered priorities for comprehensive strategy and fix …
l50 Apr 23, 2026
dda20bf
feat: add acl discovery and cross-forest enum automation with test co…
l50 Apr 23, 2026
1c06c03
test: add comprehensive unit and integration tests for all modules (#…
l50 Apr 23, 2026
76d3025
test: add comprehensive unit tests for automation modules
l50 Apr 23, 2026
8c6d094
refactor: extract pure work collection logic for automation steps
l50 Apr 23, 2026
dd2e703
feat: add cross-domain support and new smb_login_check tool with disc…
l50 Apr 23, 2026
7dde96a
feat: enhance timeline events, discovery hygiene, and checklist coverage
l50 Apr 23, 2026
36ce70c
fix: prevent duplicate 'CRITICAL:' prefix in attack path output
l50 Apr 23, 2026
845b794
feat: robust cross-domain DC resolution and trust credential fallback…
l50 Apr 23, 2026
30973bb
feat: improve automation reliability and cross-domain AD attack coverage
l50 Apr 24, 2026
eff413b
fix: propagate task metadata and ensure host ownership for secretsdum…
l50 Apr 24, 2026
f132d05
feat: inject structured findings and add new discovery types to repor…
l50 Apr 24, 2026
c97989c
feat: add ACL binary parser and full ADCS exploitation chain, expand …
l50 Apr 25, 2026
3da29e9
feat: improve ADCS ESC7 automation and update GOAD checklist status
l50 Apr 25, 2026
d738af0
feat: add ADCS ESC10/ESC11/ESC15 support and update GOAD checklist co…
l50 Apr 26, 2026
296906e
feat: improve trust exploitation reliability, evidence grounding, and…
l50 Apr 27, 2026
82f7c94
```
l50 Apr 27, 2026
d273905
docs: expand and restructure goad-checklist for clarity and operation…
l50 Apr 27, 2026
883429f
fix: enforce domain-matching credentials for certifried and mssql aut…
l50 Apr 27, 2026
0e916d9
feat: add composite ESC8 relay_and_coerce tool and forge_inter_realm_…
l50 Apr 28, 2026
507a3bf
feat: improve AD domain/FQDN mapping, SID caching, coercion, and trus…
l50 Apr 29, 2026
a27c8f8
fix: adjust trust handling logic for auth method and correct getST pr…
l50 Apr 29, 2026
c0987c0
feat: improve SID extraction logic
l50 Apr 29, 2026
c8ca64b
feat: add host-wide relay lock to serialize ntlmrelayx invocations
l50 Apr 30, 2026
0569807
feat: support domain SID extraction from rpcclient lsaquery output
l50 Apr 30, 2026
dc4b0d8
feat: add cross-forest SID enumeration fallback with null session ins…
l50 Apr 30, 2026
b7ec0a3
fix: prevent state pollution from LLM-supplied domain typos and harde…
l50 Apr 30, 2026
60c3118
feat: add cross-forest MSSQL pivot support and memory/resource controls
l50 Apr 30, 2026
3f03ea9
feat: add golden certificate automation and credential selection impr…
l50 Apr 30, 2026
efe412a
fix: restrict ADCS credential selection to same forest as target CA host
l50 Apr 30, 2026
8fd8e1a
fix: conditionally include aws agents based on cloud provider
l50 May 1, 2026
91331a4
feat: add azure variant of ares golden image and improve loki endpoin…
l50 May 1, 2026
976a079
feat: implement active credential resolver and domain discovery valid…
l50 May 2, 2026
3a556f0
feat: add GPU-based NVIDIA driver and CUDA install for attack box AMI
l50 May 3, 2026
e87113f
fix: correct ansible collection overlay and cleanup order in ares-gol…
l50 May 3, 2026
9d9b48c
refactor: isolate ansible galaxy deps and enforce local nimbus_range …
l50 May 3, 2026
69c2f61
fix: prevent credential inflight slot leaks on task timeout or comple…
l50 May 3, 2026
79f4782
feat: add debug logging for linux.yml overlay in provisioner script
l50 May 3, 2026
0f72830
fix: improve operation request validation and logging robustness
l50 May 3, 2026
c5e5c3d
fix: remove asyncio from pip dependencies to prevent import conflicts
l50 May 3, 2026
1c38e45
fix: improve pip install error visibility and prevent site-packages c…
l50 May 3, 2026
725bab0
fix: update pip install to use --ignore-installed for apt-managed pyt…
l50 May 3, 2026
2753390
fix: update ruby gem update method to reduce memory usage during install
l50 May 3, 2026
3f05eed
fix: restrict ruby gem update task to ubuntu and handle failures grac…
l50 May 3, 2026
9075ccb
fix: update nvidia opencl package for cracking tools role
l50 May 3, 2026
d012abf
feat: improve NVIDIA driver install logging and error handling on Debian
l50 May 3, 2026
03d6725
fix: update nvidia driver package to use cloud kernel headers for com…
l50 May 3, 2026
6a7de2c
Testing
l50 May 3, 2026
d1d16e9
feat: add NVIDIA CUDA repo support for kernel 6.19+ and update driver…
l50 May 3, 2026
b280e69
Merge branch 'testing' into feat/more-attack-cov
l50 May 3, 2026
1d96c84
fix: update cuda repository url to debian 13 for cracking tools role
l50 May 3, 2026
fa04dde
fix: correct nvidia driver package name in cracking_tools defaults
l50 May 3, 2026
6e10039
fix: update nvidia driver packages for compatibility with modern kernels
l50 May 4, 2026
8fbb400
fix: install kernel headers and dkms before nvidia driver on debian
l50 May 4, 2026
725143a
fix: improve nvidia dkms troubleshooting and ensure build tools are i…
l50 May 4, 2026
3a52689
fix: improve domain fallback logic in credential access prompt genera…
l50 May 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
131 changes: 0 additions & 131 deletions .claude/agents/python-ares-expert.md

This file was deleted.

75 changes: 66 additions & 9 deletions .taskfiles/ec2/Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -161,21 +161,32 @@ tasks:
"aws s3 cp s3://" + $bucket + "/" + $prefix + "/ares-src.tar.gz /tmp/ares-src.tar.gz",
"tar -xzf /tmp/ares-src.tar.gz -C " + $build_dir,
"cd " + $build_dir + " && cargo build --profile dev-deploy -p ares-cli 2>&1",
"cp " + $build_dir + "/target/dev-deploy/ares /usr/local/bin/ares && chmod +x /usr/local/bin/ares",
"SRC=" + $build_dir + "/target/dev-deploy/ares",
"if [ ! -f \"$SRC\" ]; then echo ERROR: build artifact missing at $SRC; exit 1; fi",
"BUILD_RAW=$(sha256sum \"$SRC\"); BUILD_SHA=${BUILD_RAW%% *}",
"echo Build SHA: $BUILD_SHA",
"install -m 755 \"$SRC\" /usr/local/bin/ares",
"DEPLOY_RAW=$(sha256sum /usr/local/bin/ares); DEPLOY_SHA=${DEPLOY_RAW%% *}",
"echo Deploy SHA: $DEPLOY_SHA",
"if [ \"$BUILD_SHA\" != \"$DEPLOY_SHA\" ]; then echo ERROR: deployed sha differs from build artifact build=$BUILD_SHA deploy=$DEPLOY_SHA; exit 1; fi",
"echo Deployed: && ls -lh /usr/local/bin/ares"
]}' > "$PARAMS_FILE"

# Clean cargo builds on a t3.medium can run 15-25 min — pre-EC2-reboot
# cache may be wiped, and incremental builds still need to relink.
# Allow 30 min total for both the SSM command itself and the local
# polling loop so we don't bail mid-build with a "InProgress" report.
CMD_ID=$(aws ssm send-command \
--profile "{{.EC2_PROFILE}}" \
--region "{{.EC2_REGION}}" \
--instance-ids "$INSTANCE_ID" \
--document-name "AWS-RunShellScript" \
--parameters "file://$PARAMS_FILE" \
--timeout-seconds 600 \
--timeout-seconds 1800 \
--query "Command.CommandId" --output text)

# Poll for completion (up to 10 minutes)
for i in $(seq 1 300); do
# Poll for completion (up to 30 minutes)
for i in $(seq 1 900); do
STATUS=$(aws ssm get-command-invocation \
--profile "{{.EC2_PROFILE}}" \
--region "{{.EC2_REGION}}" \
Expand Down Expand Up @@ -291,11 +302,25 @@ tasks:
fi
ls -lh "$BIN_PATH"

# Pin sha256 of what we're about to ship so the SSM deploy step can
# verify the binary that lands on /usr/local/bin/ares matches exactly.
# Without this, the cp can silently fail to overwrite (ETXTBSY, immutable
# attribute, symlink redirection, prior deploy race) and the task still
# reports success.
if command -v sha256sum >/dev/null 2>&1; then
BUILD_SHA=$(sha256sum "$BIN_PATH" | awk '{print $1}')
else
BUILD_SHA=$(shasum -a 256 "$BIN_PATH" | awk '{print $1}')
fi
echo -e "{{.INFO}} Build SHA: $BUILD_SHA"
mkdir -p target/.deploy
echo "$BUILD_SHA" > target/.deploy/ares.sha256

echo -e "{{.INFO}} Uploading binary to s3://{{.BCP_BUCKET}}/{{.S3_DEPLOY_PREFIX}}/..."
aws s3 cp "$BIN_PATH" "s3://{{.BCP_BUCKET}}/{{.S3_DEPLOY_PREFIX}}/ares" \
--profile "{{.EC2_PROFILE}}" --region "{{.EC2_REGION}}"

echo -e "{{.SUCCESS}} Binary staged in S3"
echo -e "{{.SUCCESS}} Binary staged in S3 (sha=$BUILD_SHA)"

# Pull from S3 on EC2 via SSM + verify (skip for remote builds)
- |
Expand All @@ -316,11 +341,30 @@ tasks:

echo -e "{{.INFO}} Pulling binaries from S3 to $INSTANCE_ID..."

EXPECTED_SHA=""
if [ -f target/.deploy/ares.sha256 ]; then
EXPECTED_SHA=$(cat target/.deploy/ares.sha256)
fi

PARAMS_FILE=$(mktemp)
trap "rm -f $PARAMS_FILE" EXIT
jq -n --arg bucket "{{.BCP_BUCKET}}" --arg prefix "{{.S3_DEPLOY_PREFIX}}" \
'{"commands": ["set -e; aws s3 cp s3://" + $bucket + "/" + $prefix + "/ares /usr/local/bin/ares; chmod +x /usr/local/bin/ares; echo Deployed:; ls -lh /usr/local/bin/ares"]}' \
> "$PARAMS_FILE"
jq -n \
--arg bucket "{{.BCP_BUCKET}}" \
--arg prefix "{{.S3_DEPLOY_PREFIX}}" \
--arg expected_sha "$EXPECTED_SHA" \
'{"commands": [
"set -ex",
"aws s3 cp s3://" + $bucket + "/" + $prefix + "/ares /tmp/ares.staged",
"STAGED_RAW=$(sha256sum /tmp/ares.staged); STAGED_SHA=${STAGED_RAW%% *}",
"echo Staged SHA: $STAGED_SHA",
"if [ -n \"" + $expected_sha + "\" ] && [ \"$STAGED_SHA\" != \"" + $expected_sha + "\" ]; then echo ERROR: S3 staged binary sha mismatch expected=" + $expected_sha + " staged=$STAGED_SHA; exit 1; fi",
"install -m 755 /tmp/ares.staged /usr/local/bin/ares",
"DEPLOY_RAW=$(sha256sum /usr/local/bin/ares); DEPLOY_SHA=${DEPLOY_RAW%% *}",
"echo Deploy SHA: $DEPLOY_SHA",
"if [ \"$STAGED_SHA\" != \"$DEPLOY_SHA\" ]; then echo ERROR: deployed sha differs from staged staged=$STAGED_SHA deploy=$DEPLOY_SHA; exit 1; fi",
"rm -f /tmp/ares.staged",
"echo Deployed: && ls -lh /usr/local/bin/ares"
]}' > "$PARAMS_FILE"

CMD_ID=$(aws ssm send-command \
--profile "{{.EC2_PROFILE}}" \
Expand Down Expand Up @@ -966,6 +1010,7 @@ tasks:
SECRETS_ID: '{{.SECRETS_ID | default "ares/api-keys"}}'
LLM_MODEL: '{{.LLM_MODEL | default ""}}'
FLUSH_REDIS: '{{.FLUSH_REDIS | default "true"}}'
OPERATION_ID: '{{.OPERATION_ID | default ""}}'
cmds:
- |
INSTANCE_ID=$(aws ec2 describe-instances \
Expand All @@ -981,7 +1026,11 @@ tasks:
exit 1
fi

OP_ID="op-$(date -u +%Y%m%d-%H%M%S)"
if [ -n "{{.OPERATION_ID}}" ]; then
OP_ID="{{.OPERATION_ID}}"
else
OP_ID="op-$(date -u +%Y%m%d-%H%M%S)"
fi
echo -e "{{.INFO}} Operation ID: $OP_ID"

# Build target IPs JSON array
Expand Down Expand Up @@ -1018,6 +1067,10 @@ tasks:
ANTHROPIC_KEY=$(echo "$SECRETS" | jq -r .ANTHROPIC_API_KEY)
GRAFANA_URL_VAL=$(echo "$SECRETS" | jq -r '.GRAFANA_URL // empty')
GRAFANA_TOKEN_VAL=$(echo "$SECRETS" | jq -r '.GRAFANA_SERVICE_ACCOUNT_TOKEN // empty')
LOKI_URL_VAL=$(echo "$SECRETS" | jq -r '.LOKI_URL // empty')
if [ -z "$LOKI_URL_VAL" ]; then
LOKI_URL_VAL="{{.LOKI_URL}}"
fi
DREADNODE_API_KEY=$(echo "$SECRETS" | jq -r '.DREADNODE_API_KEY // empty')
OTEL_TRACES_ENDPOINT="{{.OTEL_TRACES_ENDPOINT}}"

Expand All @@ -1035,6 +1088,9 @@ tasks:
ENV_FILE_CMD="$ENV_FILE_CMD; echo 'GRAFANA_SERVICE_ACCOUNT_TOKEN=${GRAFANA_TOKEN_VAL}' >> /etc/ares/env"
fi
fi
if [ -n "$LOKI_URL_VAL" ]; then
ENV_FILE_CMD="$ENV_FILE_CMD; echo 'LOKI_URL=${LOKI_URL_VAL}' >> /etc/ares/env"
fi
ENV_FILE_CMD="$ENV_FILE_CMD; echo 'ARES_DEPLOYMENT={{.EC2_DEPLOYMENT}}' >> /etc/ares/env"
# OTEL: send traces to Alloy OTLP gateway → Tempo via HTTP/protobuf
ENV_FILE_CMD="$ENV_FILE_CMD; echo 'OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=${OTEL_TRACES_ENDPOINT}' >> /etc/ares/env"
Expand All @@ -1053,6 +1109,7 @@ tasks:
export ANTHROPIC_API_KEY='${ANTHROPIC_KEY}'
export GRAFANA_URL='${GRAFANA_URL_VAL}'
export GRAFANA_SERVICE_ACCOUNT_TOKEN='${GRAFANA_TOKEN_VAL}'
export LOKI_URL='${LOKI_URL_VAL}'
export ARES_REDIS_URL=redis://127.0.0.1:6379
{{- if .LLM_MODEL}}
export ARES_LLM_MODEL='{{.LLM_MODEL}}'
Expand Down
58 changes: 54 additions & 4 deletions .taskfiles/ec2/scripts/launch-orchestrator.sh.tmpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
#!/bin/bash
# Launch ares orchestrator with environment variables
# Placeholders are substituted by the calling task via envsubst/sed
# Launch ares orchestrator in its own systemd transient unit so it (and any
# tool subprocesses it spawns) gets its own cgroup, separate from
# amazon-ssm-agent.service. Otherwise everything launched by SSM
# RunShellScript inherits SSM's cgroup and competes with it for memory —
# resulting in CONSTRAINT_MEMCG OOM-kills regardless of OOMScoreAdjust.
set -euo pipefail

export ARES_REDIS_URL=redis://127.0.0.1:6379
export RUST_LOG=info
export ARES_OPERATION_ID='__ARES_PAYLOAD__'
Expand All @@ -13,6 +18,7 @@ export DREADNODE_WORKSPACE='__DREADNODE_WORKSPACE__'
export DREADNODE_PROJECT='__DREADNODE_PROJECT__'
export GRAFANA_SERVICE_ACCOUNT_TOKEN='__GRAFANA_TOKEN__'
export GRAFANA_URL='__GRAFANA_URL__'
export LOKI_URL='__LOKI_URL__'
_llm_model='__ARES_LLM_MODEL__'
if [ -n "$_llm_model" ] && [ "$_llm_model" = "${_llm_model#__}" ]; then
export ARES_LLM_MODEL="$_llm_model"
Expand All @@ -25,13 +31,57 @@ if [ -n "$_blue_model" ] && [ "$_blue_model" = "${_blue_model#__}" ]; then
fi
export ARES_DEPLOYMENT='__ARES_DEPLOYMENT__'
export ARES_CONFIG=/etc/ares/config.yaml
export ARES_MAX_CONCURRENT_TASKS=8
_otel_endpoint='__OTEL_TRACES_ENDPOINT__'
if [ -n "$_otel_endpoint" ] && [ "$_otel_endpoint" = "${_otel_endpoint#__}" ]; then
export OTEL_EXPORTER_OTLP_TRACES_ENDPOINT="$_otel_endpoint"
export OTEL_EXPORTER_OTLP_PROTOCOL='http/protobuf'
export OTEL_RESOURCE_ATTRIBUTES='deployment.environment=staging,attack.team=red'
fi

mkdir -p /var/log/ares

# Stop any prior orchestrator (transient unit or stray nohup process).
systemctl stop ares-orchestrator.service 2>/dev/null || true
systemctl reset-failed ares-orchestrator.service 2>/dev/null || true
pkill -f 'ares orchestrator' 2>/dev/null || true
sleep 1
nohup /usr/local/bin/ares orchestrator >/var/log/ares/orchestrator.log 2>&1 &
echo "Orchestrator started (PID: $!)"

# Spawn as a transient systemd service in system-ares.slice. --setenv=NAME
# (no value) inherits from current environment, preserving quoting that
# would otherwise be mangled by EnvironmentFile parsing of JSON payloads.
exec systemd-run \
--unit=ares-orchestrator.service \
--slice=system-ares.slice \
--description="Ares Orchestrator (transient)" \
--collect \
--setenv=ARES_REDIS_URL \
--setenv=RUST_LOG \
--setenv=ARES_OPERATION_ID \
--setenv=OPENAI_API_KEY \
--setenv=ANTHROPIC_API_KEY \
--setenv=DREADNODE_API_KEY \
--setenv=DREADNODE_SERVER_URL \
--setenv=DREADNODE_ORGANIZATION \
--setenv=DREADNODE_WORKSPACE \
--setenv=DREADNODE_PROJECT \
--setenv=GRAFANA_SERVICE_ACCOUNT_TOKEN \
--setenv=GRAFANA_URL \
--setenv=LOKI_URL \
--setenv=ARES_LLM_MODEL \
--setenv=ARES_TOOL_DISPATCH \
--setenv=ARES_BLUE_ENABLED \
--setenv=ARES_BLUE_LLM_MODEL \
--setenv=ARES_DEPLOYMENT \
--setenv=ARES_CONFIG \
--setenv=ARES_MAX_CONCURRENT_TASKS \
--setenv=OTEL_EXPORTER_OTLP_TRACES_ENDPOINT \
--setenv=OTEL_EXPORTER_OTLP_PROTOCOL \
--setenv=OTEL_RESOURCE_ATTRIBUTES \
--property=StandardOutput=append:/var/log/ares/orchestrator.log \
--property=StandardError=append:/var/log/ares/orchestrator.log \
--property=OOMScoreAdjust=-500 \
--property=TasksMax=4096 \
--property=MemoryHigh=8G \
--property=MemoryMax=10G \
/usr/local/bin/ares orchestrator
Loading
Loading