मुख्य सामग्री पर जाएँ
Skillpedia
सिक्योरिटी8.0k · #12656

algorand-vulnerability-scanner

यह क्या करती है

Algorand स्मार्ट कॉन्ट्रैक्ट्स में ज्ञात सुरक्षा कमज़ोरियाँ जाँचती है, जैसे रीकीइंग हमले, फ़ील्ड की जाँच की कमी और एक्सेस कंट्रोल की समस्याएँ। यह उन ऑडिटर्स और डेवलपर्स के लिए है जो Algorand प्रोजेक्ट लिखते या जाँचते हैं।

कब इस्तेमाल करें

  • ✓जब कोई डेवलपर TEAL या PyTeal में लिखे Algorand प्रोजेक्ट की समीक्षा कर रहा हो।
  • ✓जब कोई ऑडिटर Algorand ऐप की ऑडिट से पहले सुरक्षा जाँच चाहता है।
  • ✓जब कोई टीम किसी रिपोर्ट की गई Algorand कमज़ोरी के सुधार की पुष्टि करना चाहती है।

Skill का लिंक

https://github.com/trailofbits/skills/blob/main/plugins/building-secure-contracts/skills/algorand-vulnerability-scanner/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/trailofbits/skills/blob/main/plugins/building-secure-contracts/skills/algorand-vulnerability-scanner/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“ऑडिटर को भेजने से पहले मेरे Algorand PyTeal कॉन्ट्रैक्ट में आम सुरक्षा समस्याएँ जाँचिए।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

यह स्किल Algorand के ट्रांज़ैक्शन मॉडल से जुड़े 11 ज्ञात पैटर्न खोजती है, और मिले मामलों को समझाकर बताती है। यह Trail of Bits के स्टैटिक एनालिसिस टूल Tealer को भी चला सकती है।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

Algorand Vulnerability Scanner

1. Purpose

Systematically scan Algorand smart contracts (TEAL and PyTeal) for platform-specific security vulnerabilities documented in Trail of Bits' "Not So Smart Contracts" database. This skill encodes 11 critical vulnerability patterns unique to Algorand's transaction model.

2. When to Use This Skill

  • Auditing Algorand smart contracts (stateful applications or smart signatures)
  • Reviewing TEAL assembly or PyTeal code
  • Pre-audit security assessment of Algorand projects
  • Validating fixes for reported Algorand vulnerabilities
  • Training team on Algorand-specific security patterns

3. Platform Detection

File Extensions & Indicators

  • TEAL files: .teal
  • PyTeal files: .py with PyTeal imports

Language/Framework Markers

# PyTeal indicators
from pyteal import *
from algosdk import *

# Common patterns
Txn, Gtxn, Global, InnerTxnBuilder
OnComplete, ApplicationCall, TxnType
@router.method, @Subroutine

Project Structure

  • approval_program.py / clear_program.py
  • contract.teal / signature.teal
  • References to Algorand SDK or Beaker framework

Tool Support

  • Tealer: Trail of Bits static analyzer for Algorand
  • Installation: uv tool install tealer (ensure uv's tool bin dir is on PATH)
  • Usage: tealer contract.teal --detect all

4. How This Skill Works

When invoked, I will:

  1. Search your codebase for TEAL/PyTeal files
  2. Analyze each file for the 11 vulnerability patterns
  3. Report findings with file references and severity, above them a coverage table carrying a verdict for every pattern
  4. Provide fixes for each identified issue
  5. Run Tealer (if installed) for automated detection

5. Example Output

When vulnerabilities are found, you'll get a report like this:

=== ALGORAND VULNERABILITY SCAN RESULTS ===

Project: my-algorand-dapp
Files Scanned: 3 (.teal, .py)
Vulnerabilities Found: 2

Coverage: 11/11 patterns reported
 1 Rekeying Attack ................... found   approval.py:45
 2 Unchecked Transaction Fee ......... n/a     stateful app, fees paid by sender
 3 Closing Account ................... clear   Assert(Txn.close_remainder_to() == Global.zero_address())
 ... one row per pattern, all 11 present ...

---

[CRITICAL] Rekeying Attack
File: contracts/approval.py:45
Pattern: Missing RekeyTo validation

Code:
    If(Txn.type_enum() == TxnType.Payment,
        Seq([
            # Missing: Assert(Txn.rekey_to() == Global.zero_address())
            App.globalPut(Bytes("balance"), balance + Txn.amount()),
            Approve()
        ])
    )

Issue: The contract doesn't validate the RekeyTo field, allowing attackers
to change account authorization and bypass restrictions.

6. Vulnerability Patterns (11 Patterns)

I check for 11 critical vulnerability patterns unique to Algorand. For detailed detection patterns, code examples, mitigations, and testing strategies, see VULNERABILITY_PATTERNS.md.

Pattern Summary:

  1. Rekeying Attack ⚠️ CRITICAL - Unchecked RekeyTo field
  2. Unchecked Transaction Fee ⚠️ HIGH - Fee not validated in smart signatures
  3. Closing Account (CloseRemainderTo) ⚠️ CRITICAL - Unchecked CloseRemainderTo drains the account
  4. Closing Asset (AssetCloseTo) ⚠️ CRITICAL - Unchecked AssetCloseTo drains the asset holding
  5. Group Size Check ⚠️ HIGH - No Global.group_size() validation on atomic groups
  6. Time-Based Replay Attack ⚠️ MEDIUM - No lease or round-range bound
  7. Access Controls ⚠️ CRITICAL - Update/delete and privileged calls unprotected
  8. Asset ID Verification ⚠️ HIGH - Asset ID not validated in asset operations
  9. Denial of Service (Asset Opt-In) ⚠️ MEDIUM - Push transfers strand on un-opted accounts
  10. Inner Transaction Fee ⚠️ MEDIUM - Inner fee not explicitly set to 0
  11. Clear State Transaction ⚠️ HIGH - Clear state program cannot reject, state left inconsistent

For complete vulnerability patterns with code examples, see VULNERABILITY_PATTERNS.md.

7. Scanning Workflow

Step 1: Platform Identification

  1. Confirm file extensions (.teal, .py)
  2. Identify framework (PyTeal, Beaker, pure TEAL)
  3. Determine contract type (stateful application vs smart signature)
  4. Locate approval and clear state programs

Step 2: Static Analysis with Tealer

# Run Tealer on contract
tealer contract.teal --d
अक्सर पूछे जाने वाले सवाल

यह कौन-सा कोड पढ़ती है?

यह TEAL असेंबली फ़ाइलें और PyTeal Python कोड पढ़ती है।

क्या यह पेशेवर ऑडिट की जगह ले सकती है?

यह स्किल ऑडिट से पहले की जाँच के रूप में बनी है, इसलिए यह एक उपयोगी पहला चरण है, पूरी समीक्षा नहीं।

Tealer क्या है?

Tealer, Trail of Bits का एक स्टैटिक एनालिसिस टूल है, जिसे यह स्किल Algorand कॉन्ट्रैक्ट्स पर चला सकती है।

जानकारी

लेखक का मूल विवरण

Scans Algorand smart contracts for 11 common vulnerabilities including rekeying attacks, unchecked transaction fees, missing field validations, and access control issues. Use when auditing Algorand projects (TEAL/PyTeal).

repo: trailofbits/skills

लोकप्रियता

GitHub स्टार
8.0k
रैंकिंग में स्थान
#12656
लाइसेंस
CC-BY-SA-4.0
अपडेट की गई
2/11/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

audit-context-building

8.0k

यह आपके एजेंट को सुरक्षा जाँच से पहले किसी अनजान कोड को समझने में मदद करती है, हर फ़ंक्शन की मान्यताएँ और निर्भरताएँ नक्शे में दिखाकर।

कोडिंगसिक्योरिटी

audit-prep-assistant

8.0k

यह आपके एजेंट को बाहरी सुरक्षा समीक्षा के लिए कोड तैयार करने में मदद करती है, जैसे स्टैटिक एनालिसिस, टेस्ट कवरेज और दस्तावेज़ीकरण।

कोडिंगसिक्योरिटी

cairo-vulnerability-scanner

8.0k

यह आपके एजेंट को StarkNet के Cairo कॉन्ट्रैक्ट्स में 6 गंभीर समस्याएँ जाँचने में मदद करती है, जैसे ओवरफ़्लो और सिग्नेचर रीप्ले।

कोडिंगसिक्योरिटी

code-maturity-assessor

8.0k

यह आपके एजेंट को स्मार्ट कॉन्ट्रैक्ट या ब्लॉकचेन कोडबेस को 9 परिपक्वता क्षेत्रों में आँकने में मदद करती है, सबूतों और सुधारों की प्राथमिकता सूची के साथ।

कोडिंगसामान्य कोडिंग

मिलती-जुलती skills