blockchain-security
Smart contract security testing and blockchain CTF exploitation.
Skill by transilienceai
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/transilienceai-blockchain-security
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: documents, testing, security
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/blockchain-security
What's inside
- Skill name
blockchain-security- Description
- 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 testing smart contract security.
- License
- MIT
- Instructions
- 97 lines in SKILL.md · view on GitHub
Before installing
- Instructions call the network
Files (4)
- SKILL.md
- create-address-prediction.md · reference/
- delegatecall-attacks.md · reference/
- storage-layout.md · reference/
SKILL.md (first lines)
# 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
```bash
# 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](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](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](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
| Vulnerability | Check |
|---|---|
| Reentrancy | External calls before state updates |
| Access control | Missing onlyOwner / msg.sender checks |
| Integer overflow | Solidity < 0.8.0 without SafeMath |
| Delegatecall injection | User-controlled delegatecall target |
| tx.origin auth | `tx.origin` instead of `msg.sender` |
| Selfdestruct | Force-send ETH, reset contract nonce |
| Weak randomness | blockhash/timestamp as entropy source |
| Empty array bypass | Loop validation with no min-length check |
| Signature malleability | Raw ecrecover without s-normalization |
## Tools
```python
# 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
- [Delegatecall Attacks](reference/delegatecall-attacks.md)
- [CREATE Address Prediction](reference/create-address-prediction.md)
- [Storage Layout](reference/storage-layout.md)
## 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 speedFrom transilienceai/communitytools, MIT.
More from transilienceai/communitytools
- 0.764score
firewall-review
transilienceai
Evidence-safe firewall ruleset audit reference specification — 22 documented detector patterns (17 vendor-agnostic plus 5 FortiGate-specific), a 15-check…
SkillBFreshness: B★ 591Claude Code +9 - 0.764score
pentest-engagement
transilienceai
Run a professional penetration engagement OR a network vulnerability scan from a scope.
SkillBFreshness: B★ 591Claude Code +9 - 0.764score
mobile-security
transilienceai
Mobile application security testing (Android + iOS) mapped to OWASP MASVS/MASTG — static reversing (Flutter AOT, Unity IL2CPP, React Native/Hermes, native…
SkillBFreshness: B★ 591Claude Code +9 - 0.761score
transilience-report-style
transilienceai
Generate a Transilience-branded PDF report (pentest, vuln assessment, compliance, threat intel) from a single findings JSON using the bundled ReportLab…
SkillBFreshness: B★ 591Claude Code +9 - 0.761score
coordination
transilienceai
Pentest coordination — orchestrates executor and validator agents with context-controlled spawning.
SkillBFreshness: B★ 591Claude Code +9 - 0.761score
ai-threat-testing
transilienceai
Offensive AI security testing and exploitation framework.
SkillBFreshness: B★ 591Claude Code +9 - 0.760score
skill-update
transilienceai
Skill creation, update and management — generates skill directory structure, validates against best practices, enforces line count limits.
SkillBFreshness: B★ 591Claude Code +9 - 0.757score
hackthebox
transilienceai
HackTheBox platform operations and automations to solve challenges, machines and capture the flags hacking competitions
SkillBFreshness: B★ 591Claude Code +9 - 0.757score
cloud-containers
transilienceai
Cloud and container security testing - AWS, Azure, GCP, Docker, and Kubernetes misconfigurations and exploitation.
SkillBFreshness: B★ 591Claude Code +9 - 0.707score
authenticated-session-acquisition
transilienceai
Acquire an authenticated session THROUGH MFA/OTP on an in-scope target and emit a reusable session artifact (Playwright storageState + Bearer) so executors…
SkillCFreshness: C★ 591Claude Code +9 - 0.707score
pci-secure-software
transilienceai
Automated PCI Secure Software Standard (SSS) v2.0 readiness gap-assessment of an application from its source code and documentation.
SkillCFreshness: C★ 591Claude Code +9 - 0.707score
protect-with-password
transilienceai
Generate ONE strong password and apply it to each referenced file (PDF, Word, Excel, PowerPoint, or any type).
SkillCFreshness: C★ 591Claude Code +9
Signals
- Stars
- 591
- Forks
- 83
- Open issues
- 10
- Last commit (this folder)
- May 11, 2026 (5 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/transilienceai/communitytools
- Website
- www.transilience.ai/
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
- 0.308score
blockchain-security
LeoWSY-hashblue
Smart contract security testing and blockchain CTF exploitation.
SkillCFreshness: C★ 3Claude Code +9 - 0.285score
blockchain-security
gohilrajbha0312
Smart contract security testing and blockchain CTF exploitation.
SkillCFreshness: CClaude Code +9 - 0.246score
blockchain-security
mdriscoll-ct
Smart contract security testing and blockchain CTF exploitation.
SkillDFreshness: DClaude Code +9
More from transilienceai
- 0.764score
mobile-security
transilienceai
Mobile application security testing (Android + iOS) mapped to OWASP MASVS/MASTG — static reversing (Flutter AOT, Unity IL2CPP, React Native/Hermes, native…
SkillBFreshness: B★ 591Claude Code +9 - 0.764score
firewall-review
transilienceai
Evidence-safe firewall ruleset audit reference specification — 22 documented detector patterns (17 vendor-agnostic plus 5 FortiGate-specific), a 15-check…
SkillBFreshness: B★ 591Claude Code +9 - 0.764score
pentest-engagement
transilienceai
Run a professional penetration engagement OR a network vulnerability scan from a scope.
SkillBFreshness: B★ 591Claude Code +9 - 0.761score
coordination
transilienceai
Pentest coordination — orchestrates executor and validator agents with context-controlled spawning.
SkillBFreshness: B★ 591Claude Code +9 - 0.761score
ai-threat-testing
transilienceai
Offensive AI security testing and exploitation framework.
SkillBFreshness: B★ 591Claude Code +9 - 0.761score
transilience-report-style
transilienceai
Generate a Transilience-branded PDF report (pentest, vuln assessment, compliance, threat intel) from a single findings JSON using the bundled ReportLab…
SkillBFreshness: B★ 591Claude Code +9
Cite this page
blockchain-security skill. Agent Mart. https://agentmart.dev/skills/transilienceai-blockchain-security (last updated 2026-10-24)