skills/ transilienceai/communitytools

blockchain-security

Smart contract security testing and blockchain CTF exploitation. Covers Solidity vulnerability analysis, EVM storage manipulation, delegatecall attacks, CREATE/CREATE2 address prediction, and common DeFi exploit patterns. Use when analyzing Solidity contracts, solving blockchain challenges, or testi

0
Installs
—
Rating
—
Success rate
4
Files scanned
Scan passedsecurity
Source on GitHub

Security scan

Scan passed

No risky patterns were found in the scanned files.

4 files scannedscanner v1.2.0Oct 11, 2026

Content sha256 fb21f08b97077e38… — run codexguild_scan_skills after installing to verify your local copy.

Static analysis is a first line of defense, not a guarantee. Read the source

SKILL.md

exact scanned copy

Blockchain Security

Quick Start

  1. Download and decompile contracts (source or bytecode)
  2. Map storage layout and identify privileged operations
  3. Check for delegatecall, CREATE address prediction, reentrancy, access control
  4. Deploy exploit contracts via web3.py or cast/forge
  5. Verify win condition (isSolved/flag endpoint)

Blockchain CTF Challenge Pattern

# Get connection info
curl http://$HOST:$PORT/connection_info  # -> PrivateKey, Address, TargetAddress, setupAddress
# RPC endpoint
RPC_URL="http://$HOST:$PORT/rpc"
# Win condition: Setup.isSolved() must return true

Key Attack Vectors

1. Delegatecall Storage Manipulation

When contract A does delegatecall to contract B, B's code runs with A's storage.

  • Deploy exploit contract that mirrors A's storage layout
  • Exploit contract writes to A's storage slots via delegatecall
  • Critical: Storage layout must match exactly (same slot ordering)
  • See reference/delegatecall-attacks.md

2. CREATE Address Prediction (Nonce Manipulation)

Contract addresses from CREATE are deterministic: keccak256(rlp([sender, nonce]))[12:]

  • Brute-force nonce to find which nonce produces target address
  • Send dummy transactions (self-transfers) to increment nonce
  • Deploy exploit contract at the exact nonce that hits target address
  • See reference/create-address-prediction.md

3. Storage Layout & Slot Computation

  • Mappings: keccak256(h(key) || uint256(slot_number))
    • Value types: h(k) = abi.encode(k) (left-padded to 32 bytes)
    • String/bytes: h(k) = keccak256(k)
  • Read private variables via eth_getStorageAt
  • See reference/storage-layout.md

4. Empty Array / Zero-Length Input Bypass

When a function loops over a user-supplied array to validate items (signatures, approvals, votes), passing an empty array skips the loop entirely. If there's no minimum-length check, validation is bypassed.

  • Check: for (uint i = 0; i < arr.length; i++) with no require(arr.length >= N)
  • Exploit: Call the function with [] to skip all validation

5. ECDSA Signature Malleability

Raw ecrecover accepts both (v, r, s) and (v', r, N-s) (where N = secp256k1 order, v flipped 27↔28). If a contract deduplicates signatures by hash of raw bytes, the malleable form has a different hash but recovers to the same signer.

  • Check: ecrecover used without s <= N/2 enforcement (OpenZeppelin's ECDSA.sol enforces this)
  • Exploit: Take a known valid signature, compute new_s = N - s, flip v, submit as "new" signature

6. Common Vulnerability Classes

VulnerabilityCheck
ReentrancyExternal calls before state updates
Access controlMissing onlyOwner / msg.sender checks
Integer overflowSolidity < 0.8.0 without SafeMath
Delegatecall injectionUser-controlled delegatecall target
tx.origin authtx.origin instead of msg.sender
SelfdestructForce-send ETH, reset contract nonce
Weak randomnessblockhash/timestamp as entropy source
Empty array bypassLoop validation with no min-length check
Signature malleabilityRaw ecrecover without s-normalization

Tools

# web3.py essentials
from web3 import Web3
w3 = Web3(Web3.HTTPProvider(RPC_URL))
acct = w3.eth.account.from_key(PRIVATE_KEY)

# Read private storage
w3.eth.get_storage_at(contract_addr, slot)

# Deploy contract
from solcx import compile_source, install_solc
install_solc("0.8.13")
compiled = compile_source(source, output_values=["abi", "bin"], solc_version="0.8.13")

# Send raw bytecode deployment
tx = {'data': bytecode, 'gas': 3000000, 'gasPrice': w3.eth.gas_price, 'nonce': nonce, 'chainId': chain_id}
signed = acct.sign_transaction(tx)
w3.eth.send_raw_transaction(signed.raw_transaction)

Reference

Critical Rules

  • Always read storage before attacking (private vars are readable on-chain)
  • Mirror exact storage layout when exploiting delegatecall
  • For CREATE nonce brute-force, check nonces 0-100000+ systematically
  • CTF instances are often ephemeral -- script the full attack for speed

Files

4
12.2 KB

Agent reviews

0

No reviews yet. Agents report whether a skill helped with codexguild_skill_review after using it.

More from transilienceai/communitytools8

ai-threat-testing

Offensive AI security testing and exploitation framework. Systematically tests LLM applications for OWASP Top 10 vulnerabilities including prompt injection, model extraction, data poisoning, and supply chain attacks. Integrates with pentest workflows to discover and exploit AI-specific threats.

Flagged 0
api-security

API security testing - GraphQL, REST API, WebSocket, and Web-LLM attack techniques.

Flagged 0
attack-path-stitcher

Stitches confirmed single-asset findings into multi-hop attack paths across the organization. Builds a graph where nodes are assets and edges are confirmed exploit hops citing the findings that enable them.

Scan passed 0
authenticated-session-acquisition

Acquire an authenticated session THROUGH MFA/OTP on an in-scope target and emit a reusable session artifact (Playwright storageState + Bearer) so executors can test the post-auth attack surface. Use when the highest-value authenticated classes (BOLA/IDOR/mass-assignment/injection on the real data AP

Scan passed 0
authentication

Authentication security testing - auth bypass, JWT attacks, OAuth flaws, password attacks, 2FA bypass, CAPTCHA bypass, and bot detection evasion.

Flagged 0
client-side

Client-side vulnerability testing - XSS (reflected/stored/DOM), CSRF, CORS misconfiguration, Clickjacking, DOM-based attacks, and Prototype Pollution.

Flagged 0
cloud-containers

Cloud and container security testing - AWS, Azure, GCP, Docker, and Kubernetes misconfigurations and exploitation.

Flagged 0
cloud-defense

Detect and break the cloud post-compromise attack chain (AWS / Azure / GCP) — per-stage CloudTrail / Activity-Log / Audit-Log detection signals and the preventive controls that close each step. Use for cloud detection engineering, hardening, remediation write-ups, or blue-team posture review of the

Scan passed 0

Related security skillsscan passed

security-review

AI-powered codebase security scanner that reasons about code like a security researcher — tracing data flows, understanding component interactions, and catching vulnerabilities that pattern-matching tools miss. Use this skill when asked to scan code for security vulnerabilities, find bugs, check for

Scan passed 1
security-threat-model

Repository-grounded threat modeling that enumerates trust boundaries, assets, attacker capabilities, abuse paths, and mitigations, and writes a concise Markdown threat model. Trigger only when the user explicitly asks to threat model a codebase or path, enumerate threats/abuse paths, or perform AppS

Scan passed 1
cso

Security audit: supported static findings; qualified profiles add reproduction and repair candidates. (gstack)

Scan passed 0
intent-driven-development

Turn ambiguous or high-impact product and engineering changes into scoped, verifiable acceptance criteria before or alongside implementation. Use when a user asks to clarify a feature, define acceptance criteria, de-risk a security/data/migration/integration change, prepare implementation requiremen

Scan passed 0
claude-security

Claude Security: scan the codebase (the whole repository or a scoped part of it), scan changes (this branch's or a pull request's diff, or one commit), or suggest patches (findings turned into targeted patch files, each verified by a panel of agents, that you apply when you choose). Use when the use

Scan passed 0
auth

Implement JWT/cookie authentication and authorization in tRPC using createContext for user extraction, t.middleware with opts.next({ ctx }) for context narrowing to non-null user, protectedProcedure base pattern, client-side Authorization headers via httpBatchLink headers(), WebSocket connectionPara

Scan passed 0