T05 · Unauthorized Access and Privilege Escalation
- Location
scripts/monitor.py:115- Finding
Supervised monitoring can execute unauthorized token sales
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is for crypto trading, but its default supervised monitoring path can still execute wallet sales without a fresh user confirmation.
Install only after reviewing the trading scripts and using a dedicated low-value wallet. Do not enable cron until the monitor path is made read-only by default or requires an explicit execution flag and fresh approval before signing. Treat remote-built transactions as high risk unless the decoded instructions are independently validated before signing.
scripts/monitor.py:115Supervised monitoring can execute unauthorized token sales
scripts/swap.py:132Server-provided opaque transactions are signed without validating their instructions
scripts/setup.py:64Setup automatically installs unpinned Python packages from an uncontrolled package index
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
"""Fetches token overview to get total supply and other metadata."""
headers = {"Authorization": f"Bearer {API_KEY}"}
url = f"{API_BASE}/token-overview?address={token_mint}&chain_id={chain_id}"
response = requests.get(url, headers=headers)
if response.status_code != 200:
die(f"Failed to get token overview: {response.status_code} {response.text}")
data = response.json()
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
"""Fetches token overview to get total supply and other metadata."""
headers = {"Authorization": f"Bearer {API_KEY}"}
url = f"{API_BASE}/token-overview?address={token_mint}&chain_id={chain_id}"
response = requests.get(url, headers=headers)
if response.status_code != 200:
die(f"Failed to get token overview: {response.status_code} {response.text}")
data = response.json()
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
"after": after_timestamp,
}
response = requests.post(url, json=payload, headers=headers)
if response.status_code != 200:
# API might fail if the list of wallets is too long.
# In a real implementation, this should be batched.
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
def get_token_overview(token_address):
"""Get token metadata: name, price, market cap, holders, risk level."""
resp = requests.get(
f"{API_BASE}/token-overview",
params={"address": token_address},
headers=HEADERS,
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
def analyze_token(token_mint):
"""Get full cluster analysis: clusters, top holders, address metadata."""
resp = requests.get(f"{API_BASE}/analyze/{token_mint}", headers=HEADERS)
resp.raise_for_status()
return resp.json()
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
def get_cluster_changes(token_mint, include_top_holders=True):
"""Get cluster holding ratio and changes across time periods."""
resp = requests.get(
f"{API_BASE}/analyze-cluster-change/{token_mint}",
params={"include_top_holders": str(include_top_holders).lower()},
headers=HEADERS,
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
def get_wallet_labels(token_mint, wallets):
"""Get behavior labels for wallets: smart_money, whale, blue_chip_profit, high_frequency."""
resp = requests.post(
f"{API_BASE}/wallet-labels",
json={"token_mint": token_mint, "wallets": wallets},
headers=HEADERS,
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
def get_token_wallet_labels(token_mint):
"""Get token-specific labels: developer, sniper, bundle, new_wallet."""
resp = requests.post(
f"{API_BASE}/token-wallet-labels",
json={"token_mint": token_mint},
headers=HEADERS,
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
Always passes wallet_address so the returned transaction uses the agent's
wallet as fee payer / signer (required for local signing).
"""
resp = requests.post(
f"{API_BASE}/agent/swap",
headers=HEADERS,
json={
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
def submit_transaction(signed_tx_b64):
"""Submit a signed transaction to the Solana network."""
resp = requests.post(
f"{API_BASE}/agent/submit",
headers=HEADERS,
json={"signed_transaction": signed_tx_b64},
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
params = {}
if wallet_address:
params["wallet_address"] = wallet_address
resp = requests.get(f"{API_BASE}/agent/portfolio", headers=HEADERS, params=params)
resp.raise_for_status()
return resp.json()
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
"page_size": str(scan_count),
**filters,
}
resp = requests.get(f"{API_BASE}/agent/trending-tokens", headers=HEADERS, params=params)
resp.raise_for_status()
return resp.json()["tokens"]
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
def check_account_tier():
"""Check agent account tier."""
try:
resp = requests.get(f"{API_BASE}/agent/account", headers=HEADERS, timeout=5)
if resp.status_code == 200:
return resp.json().get("tier", "free").lower()
except Exception:
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
"page_size": str(scan_count)
}
try:
resp = requests.get(f"{API_BASE}/signal-dashboard", headers=HEADERS, params=params)
resp.raise_for_status()
# Adapt response to match trending tokens structure if needed
data = resp.json()
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
try:
import requests
headers = {"Authorization": f"Bearer {os.getenv('KRYPTOGO_API_KEY')}"}
resp = requests.get(
f"https://wallet-data.kryptogo.app/token-overview",
params={"address": token_mint},
headers=headers
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
# Use quicknode or kryptogo api to get decimals
# We'll try KryptoGO token-overview first as it's used elsewhere
print(f"Fetching decimals for {token_mint} to prepare SELL...")
resp = requests.get(
"https://wallet-data.kryptogo.app/token-overview",
params={"address": token_mint},
headers=headers,
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
# Fetch Portfolio
try:
resp = requests.get(
"https://wallet-data.kryptogo.app/agent/portfolio",
headers={"Authorization": f"Bearer {API_KEY}"},
params={"wallet_address": WALLET},
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
# CLUSTER DUMP CHECK
try:
cluster_resp = requests.get(
f"https://wallet-data.kryptogo.app/analyze-cluster-change/{mint}",
headers={"Authorization": f"Bearer {API_KEY}"},
timeout=5
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
# Fetch token info for journal
token_info = {}
try:
resp = requests.get(
f"{API_BASE}/token-overview",
params={"address": args.token_mint},
headers=HEADERS,
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
print(f"=== BUY: {args.amount} SOL ({amount_raw} lamports) → {token_symbol} (price: ${current_price}) ===")
print("\nStep 1: Building swap transaction...")
swap_resp = requests.post(
f"{API_BASE}/agent/swap",
headers=HEADERS,
json={
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
# ---------------------------------------------------------------------------
print("\nStep 3: Submitting signed transaction...")
submit_resp = requests.post(
f"{API_BASE}/agent/submit",
headers=HEADERS,
json={"signed_transaction": signed_tx_b64},
The public description focuses on trading/analysis but the skill also handles local wallet generation, secret storage, package installation, and environment modification. Those are sensitive setup operations that expand the attack surface; omitting them from the primary description reduces informed consent and may lead users to grant risky permissions they did not anticipate.
The public description focuses on trading/analysis but the skill also handles local wallet generation, secret storage, package installation, and environment modification. Those are sensitive setup operations that expand the attack surface; omitting them from the primary description reduces informed consent and may lead users to grant risky permissions they did not anticipate.
The public description focuses on trading/analysis but the skill also handles local wallet generation, secret storage, package installation, and environment modification. Those are sensitive setup operations that expand the attack surface; omitting them from the primary description reduces informed consent and may lead users to grant risky permissions they did not anticipate.
The public description focuses on trading/analysis but the skill also handles local wallet generation, secret storage, package installation, and environment modification. Those are sensitive setup operations that expand the attack surface; omitting them from the primary description reduces informed consent and may lead users to grant risky permissions they did not anticipate.
No suspicious patterns detected.