T05 · Unauthorized Access and Privilege Escalation
- Location
scripts/export-credentials.sh:220- Finding
Unrestricted Admin Macaroon Is Exported to the Less-Trusted Agent Machine
- Content
View full analysis
&2 exit 1 fi cp "$MACAROONPATH" "$BUNDLE_DIR/admin.macaroon" elif [ -n "$CONTAINER" ]; then MACAROON="$LND_SIGNER_DIR/data/chain/bitcoin/$NETWORK/admin.macaroon" docker cp "$CONTAINER:$MACAROON" "$BUNDLE_DIR/admin.macaroon" 2>/dev/null if [ ! -f "$BUNDLE_DIR/admin.macaroon" ]; then echo "Error: Admin macaroon not found at $MACAROON in container '$CONTAINER'" >&2 exit 1 fi else MACAROON="$LND_SIGNER_DIR/data/chain/bitcoin/$NETWORK/admin.macaroon" if [ ! -f "$MACAROON" ]; then echo "Error: Admin macaroon not found at $MACAROON" >&2 exit 1 fi cp "$MACAROON" "$BUNDLE_DIR/admin.macaroon" fi echo " admin.macaroon copied." echo "" # Create portable base64-encoded tar.gz bundle. BUNDLE_ARCHIVE="$LNGET_SIGNER_DIR/credentials-bundle.tar.gz.b64" echo "Creating portable bundle..." tar -czf - -C "$BUNDLE_DIR" accounts.json tls.cert admin.macaroon | base64 > "$BUNDLE_ARCHIVE" ``` ### Technical Analysis The Skill's legitimate requirement is to authorize the watch-only node to invoke a limited set of remote-signing and key-derivation operations. Instead, the default workflow copies the signer's unrestricted `admin.macaroon` and transfers it to the agent machine. An LND admin macaroon authorizes substantially more RPC operations than the signing workflow requires. Transferring it across the signer trust boundary ther ...[truncated 1471 chars]- Remediation
View remediation
