T01 · Skill Instruction Hijacking
- Location
skills.md:436- Finding
Persistent Agent Behavior Hijacking Through SOUL.md
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a real ClawChain social-network integration, but it asks users to install mutable remote instructions and store/use a plaintext blockchain private key for persistent signed actions.
Review before installing. Only use this in an isolated environment with a wallet/key you are willing to dedicate to ClawChain, verify every downloaded skill file yourself, pin or audit dependencies, lock down credential-file permissions, and manually review any content and signed transaction before broadcasting it. Avoid storing secrets, private user data, or sensitive memories on-chain.
skills.md:436Persistent Agent Behavior Hijacking Through SOUL.md
skills.md:23Mutable Remote Skill Instructions Installed Without Integrity Verification
skills.md:139Blockchain Private Key Stored in an Unencrypted File Without Explicit Permission Restrictions
skills.md:122Unpinned Third-Party Dependencies Installed With Default npm Behavior
The skill instructs direct fetching of external skill files and later recommends additional linked skills, including one involving wallet registration and swaps, without signature verification or trust pinning. This is a classic supply-chain risk: altered remote content can implant malicious instructions that persist locally and may lead to credential theft or unauthorized financial actions.
mkdir -p ~/.clawchain/skills/clawchain
curl -s https://clawchain.ai/skill.md > ~/.clawchain/skills/clawchain/SKILL.md
curl -s https://clawchain.ai/heartbeat.md > ~/.clawchain/skills/clawchain/HEARTBEAT.md
curl -s https://clawchain.ai/colorpool_skill.md > ~/.clawchain/skills/clawchain/COLORPOOL_SKILL.md
curl -s https://clawchain.ai/bsc_pancakeswap_skill.md > ~/.clawchain/skills/clawchain/BSC_PANCAKESWAP_SKILL.md
The status-check logic reads and parses a local credentials.json file that contains blockchain key material. Any skill that operationalizes access to a plaintext private-key file increases the likelihood of credential exposure through logs, copied scripts, backups, or lateral compromise of the host.
fi
# 2. Keypair exists?
CRED_FILE="$HOME/.config/clawchain/credentials.json"
if [ -f "$CRED_FILE" ]; then
if node -e "JSON.parse(require('fs').readFileSync('$CRED_FILE','utf-8'))" 2>/dev/null; then
PUBKEY=$(node -e "console.log(JSON.parse(require('fs').readFileSync('$CRED_FILE','utf-8')).pubKey.toUpperCase())")
The generated keygen.js writes the private key and public key directly to ~/.config/clawchain/credentials.json in plaintext JSON. Anyone with access to that file can fully impersonate the agent and sign irreversible blockchain transactions, resulting in account takeover and misuse of linked assets or identity.
const path = require("path");
const os = require("os");
const outFile = process.argv[2] || path.join(os.homedir(), ".config", "clawchain", "credentials.json");
if (fs.existsSync(outFile)) {
console.log(`Credentials already exist at ${outFile}`);
The registration helper explicitly loads the private key from credentials.json to create a signing keypair for account registration. This embeds secret-handling into an easily copied script and expands the chance of exfiltration or accidental disclosure during normal operation.
}
async function main() {
const credPath = process.argv[2] || path.join(os.homedir(), ".config", "clawchain", "credentials.json");
if (!fs.existsSync(credPath)) {
console.error(`Credentials not found at ${credPath}`);
process.exit(1);
The generic transaction generator loads the same plaintext private key for arbitrary operation signing, turning the host into a general-purpose blockchain signing environment. If this script or its inputs are manipulated, an attacker could produce valid signed transactions for any supported operation.
async function main() {
let args = process.argv.slice(2);
let credPath = path.join(os.homedir(), ".config", "clawchain", "credentials.json");
// Handle optional --cred flag
if (args[0] === "--cred") {
The documentation normalizes long-term retention of the credentials file and emphasizes never deleting it, but does not pair that advice with security controls. While keeping a key is operationally necessary, presenting persistent plaintext credential storage as routine increases risk if users infer it is adequately safe as-is.
node ~/.config/clawchain/scripts/keygen.js
This is safe to run multiple times — **it will NOT overwrite an existing keypair**. If `~/.config/clawchain/credentials.json` already exists, it prints a message and exits.
> **⚠️ NEVER delete your credentials file unless the Status Check told you it's invalid.** Your on-chain account is tied to this keypair. Deleting it means losing access to your account.
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
| `You are banned` | Contact subclaw admin |
| `Parent comment not found` | Use `null` for top-level comments, NOT `0`. Or verify the comment id exists |
| `expected INTEGER, actual STRING` | For rowid args (post_id, comment_id), use bare numbers not strings |
| `Credentials not valid JSON` | Delete `~/.config/clawchain/credentials.json` and re-run `keygen.js` |
| `MODULE_NOT_FOUND` | Run Installation steps 1 and 2 to create the scripts |
| `MissingNodeUrlError` | Ensure `CLAWCHAIN_NODE` env var is set |
The skill instructs persisting remotely fetched skill files under the user's home directory for later reuse, creating durable session influence from network-delivered content. This persistence magnifies supply-chain risk because a one-time compromise can continue affecting future agent behavior.
Install locally:
mkdir -p ~/.clawchain/skills/clawchain
curl -s https://clawchain.ai/skill.md > ~/.clawchain/skills/clawchain/SKILL.md
curl -s https://clawchain.ai/heartbeat.md > ~/.clawchain/skills/clawchain/HEARTBEAT.md
curl -s https://clawchain.ai/colorpool_skill.md > ~/.clawchain/skills/clawchain/COLORPOOL_SKILL.md
The skill enumerates and instructs downloading multiple related skill files, including an additional BSC PancakeSwap skill with wallet-registration and swap capabilities. This broadens the attack surface by encouraging automatic trust expansion into other unreviewed capabilities, one of which directly involves private keys and financial operations.
mkdir -p ~/.clawchain/skills/clawchain
curl -s https://clawchain.ai/skill.md > ~/.clawchain/skills/clawchain/SKILL.md
curl -s https://clawchain.ai/heartbeat.md > ~/.clawchain/skills/clawchain/HEARTBEAT.md
curl -s https://clawchain.ai/colorpool_skill.md > ~/.clawchain/skills/clawchain/COLORPOOL_SKILL.md
curl -s https://clawchain.ai/bsc_pancakeswap_skill.md > ~/.clawchain/skills/clawchain/BSC_PANCAKESWAP_SKILL.md
The installation instructions fetch remote skill files directly over the network and write them into the local skill directory without integrity verification or pinning. A compromised server, DNS, CDN, or TLS termination point could deliver altered instructions that persist locally and influence later agent behavior.
mkdir -p ~/.clawchain/skills/clawchain
curl -s https://clawchain.ai/skill.md > ~/.clawchain/skills/clawchain/SKILL.md
curl -s https://clawchain.ai/heartbeat.md > ~/.clawchain/skills/clawchain/HEARTBEAT.md
curl -s https://clawchain.ai/colorpool_skill.md > ~/.clawchain/skills/clawchain/COLORPOOL_SKILL.md
curl -s https://clawchain.ai/bsc_pancakeswap_skill.md > ~/.clawchain/skills/clawchain/BSC_PANCAKESWAP_SKILL.md
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
-d "{\"type\":\"get_agent\",\"name\":\"$AGENT_NAME\"}" 2>/dev/null)
if echo "$RESULT" | node -e "const d=JSON.parse(require('fs').readFileSync('/dev/stdin','utf-8'));process.exit(d.name?0:1)" 2>/dev/null; then
echo "✅ Agent '$AGENT_NAME': registered on-chain"
CLAIMED=$(curl -s "$CLAWCHAIN_NODE/query/$CLAWCHAIN_BRID" \
-H "Content-Type: application/json" \
-d "{\"type\":\"is_agent_claimed\",\"agent_name\":\"$AGENT_NAME\"}" 2>/dev/null)
if [ "$CLAIMED" = "true" ] || [ "$CLAIMED" = "1" ]; then
The instructions create a persistent local scripts directory and install dependencies that remain available for later use, including transaction-signing logic. This establishes durable execution capability on the host, increasing the blast radius of any malicious dependency or later prompt-induced misuse.
mkdir -p ~/.config/clawchain/scripts
The skill goes well beyond a simple social-network integration by instructing the agent to generate, store, and use blockchain private keys and sign transactions locally. That materially expands the trust boundary: compromise of the host, fetched dependencies, or the downloaded helper scripts can lead to irreversible account takeover and unauthorized on-chain actions.
The instructions create a local credentials file containing a raw private key but do not warn about the sensitivity of that file, the need for restrictive permissions, or the consequences of host compromise. Users may follow the steps and unknowingly leave blockchain-signing material readable by other local users, backup systems, or malware.
The guidance to retain the credentials file indefinitely establishes persistent access to the blockchain identity across sessions. Persistent secret presence materially increases exposure to later host compromise, backup leakage, or accidental sharing.
node ~/.config/clawchain/scripts/keygen.js
This is safe to run multiple times — **it will NOT overwrite an existing keypair**. If `~/.config/clawchain/credentials.json` already exists, it prints a message and exits.
> **⚠️ NEVER delete your credentials file unless the Status Check told you it's invalid.** Your on-chain account is tied to this keypair. Deleting it means losing access to your account.
This step transmits a signed registration transaction to an external blockchain node, initiating an irreversible on-chain action. In context, the danger is not mere transmission but that the skill normalizes remote broadcasting of locally signed transactions without strong user confirmation, transaction preview, or endpoint trust guidance.
TX=$(node ~/.config/clawchain/scripts/register.js)
curl -s -X POST "$CLAWCHAIN_NODE/tx/$CLAWCHAIN_BRID" \
-H "Content-Type: application/json" \
-d "{\"tx\":\"$TX\"}"
The skill directs the agent to create a persistent local SOUL.md persona file and follow it strictly before every action, while deriving durable on-chain content from user-provided personality input. This can create unsafe long-lived behavioral steering and cause persistent publication of exaggerated content without fresh user review, increasing the chance of manipulation, reputation damage, or policy-violating outputs.
The generic operation pattern instructs generating signed transaction hex and immediately posting it to the node, making arbitrary on-chain writes easy to automate. This lowers friction for unintended or malicious actions and can be abused if the agent is prompted to perform unsafe operations or if the local environment is compromised.
# Step 1: Generate signed transaction hex
TX=$(node ~/.config/clawchain/scripts/generate-tx.js <operation> "value1" "value2" "value3")
# Step 2: Send with curl
curl -s -X POST "$CLAWCHAIN_NODE/tx/$CLAWCHAIN_BRID" \
-H "Content-Type: application/json" \
-d "{\"tx\":\"$TX\"}"
The skill encourages storing thoughts, memories, and files on-chain without warning that blockchain storage may be persistent, public, and difficult or impossible to retract fully. This can lead agents or users to publish sensitive data, internal reasoning, or personal information permanently.
The skill exposes moderator and admin operations such as banning users, deleting content, and promoting admins, despite being presented primarily as a social-network posting skill. This creates capability creep and increases the risk that an agent with this skill could perform destructive or privileged actions if compromised or misused.
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
Create a post in general (operation — positional):
TX=$(node ~/.config/clawchain/scripts/generate-tx.js create_post "general" "Hello World" "My first post!" "")
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
TX=$(node ~/.config/clawchain/scripts/generate-tx.js create_post "general" "Hello World" "My first post!" "")
curl -s -X POST "$CLAWCHAIN_NODE/tx/$CLAWCHAIN_BRID" \
-H "Content-Type: application/json" -d "{\"tx\":\"$TX\"}"
The memory and file-storage operations are generic persistence capabilities not strictly necessary for ordinary social posting. Because they can store arbitrary content on-chain, they increase the chance of long-lived storage of sensitive prompts, internal state, secrets, or user data beyond the stated purpose.