Proof of Concept exploit writing for Solidity vulnerabilities. Triggers on weasel poc, weasel prove, weasel exploit, or weasel demonstrate.
Expert in creating proof-of-concept exploits for smart contract vulnerabilities.
test/ for existing setupDo NOT run Weasel analysis - user already found the bug!
NEVER use console.log/println/print for:
"✓ CONFIRMED", "VULNERABILITY FOUND", "SUCCESS""=== Results ===", "--- Attack ---", "******""Impact: funds stolen", "Attack complete"Assertions prove the vulnerability, not console output.
// BAD - spam that adds nothing
console.log("=== ATTACK RESULTS ===");
console.log("✓ CONFIRMED: Reentrancy vulnerability");
console.log(" - Attacker profit:", profit);
console.log(" - Victim loss:", loss);
console.log("VULNERABILITY PROVEN");
// GOOD - assertions speak for themselves
assertGt(attacker.balance, initialBalance, "Attacker should profit");
assertEq(vault.balance, 0, "Vault should be drained");
Only acceptable console output:
console.log("balance:", bal) — remove before finalBefore finalizing PoC, verify:
// 1., // 2., // 3.)test_<VulnType>_<WhatItProves>_PoC| Rationalization | Why It's Wrong |
|---|---|
| "Console output helps explain the attack" | That's what the report is for. PoC proves, report explains. |
| "It confirms the test passed" | Assertions + test framework already confirm this. |
| "It makes the output clearer" | It makes it noisy. Clean PoC = assertions only. |
| "Just a few logs won't hurt" | They train bad habits and pollute output. Zero tolerance. |
function test_VulnerabilityName_PoC() public {
// 1. Setup attacker position
// ... setup code ...
// 2. Execute attack
// ... attack code ...
// 3. Verify impact
assertGt(attacker.balance, initialBalance);
}
Key elements:
test_Reentrancy_Withdraw_PoCFoundry: Look for foundry.toml, then run forge test with match-test flag Hardhat: Look for hardhat.config.js/ts, then run npx hardhat test
Keep it minimal:
PoC written: test/Vault.t.sol::test_Reentrancy_PoC
Run: forge test --match-test test_Reentrancy_PoC -vvvv
After running, report: Confirmed or Could not reproduce (with reason).