DeepThreat Security
TECHNICAL DEEP DIVE

How DeepThreat Works
Under the Hood

Multi-stage vulnerability detection combining specialized scanners, intelligent orchestration, and local AI reasoning. No API costs. No external dependencies.

System Architecture

Five-layer architecture: Input โ†’ Scanners โ†’ Orchestrator โ†’ AI Reasoner โ†’ Report Generator

44 Specialized Scanners

Each scanner is purpose-built to detect specific vulnerability patterns. Together they provide comprehensive coverage across all major attack vectors.

๐Ÿ”

Access Control Analysis

Detects missing or improper access modifiers on critical functions

โœ…

Approval Pattern Detection

Identifies unsafe token approval patterns that could lead to fund theft

๐Ÿ“‹

CEI Pattern Validation

Ensures Check-Effects-Interactions pattern is properly implemented

๐Ÿ”—

Delegatecall Safety

Detects dangerous delegatecall usage that could compromise contract logic

๐Ÿ’ฐ

Economic Attack Surface

Identifies economic vulnerabilities like price manipulation and arbitrage risks

๐Ÿ“ž

External Call Analysis

Monitors external calls for reentrancy and trust assumptions

โšก

Flash Loan Detection

Identifies contracts vulnerable to flash loan attacks

โœ”๏ธ

Input Validation

Detects missing or insufficient input validation on public functions

๐Ÿ”ข

Integer Overflow/Underflow

Catches arithmetic operations that could overflow or underflow

๐Ÿ”’

Mutex Detection

Analyzes reentrancy guards and lock mechanisms

๐Ÿ”ฎ

Oracle Validation

Verifies proper oracle usage and freshness checks

๐Ÿ“ˆ

Price Manipulation

Detects vulnerable price feeds and DEX oracle manipulation vectors

๐Ÿ”„

Reentrancy Guard

Identifies classic and cross-function reentrancy vulnerabilities

๐Ÿ’ฃ

Selfdestruct Safety

Flags dangerous selfdestruct patterns and potential griefing attacks

๐Ÿ“Š

State Mutation Analysis

Tracks state changes for race conditions and inconsistencies

โฐ

Timestamp Dependence

Detects reliance on block.timestamp that could be manipulated

๐ŸŽฏ

Tx.origin Usage

Flags phishing-vulnerable tx.origin authentication

โŒ

Unchecked Return Values

Identifies ignored return values from external calls

๐Ÿ’พ

Transient Storage (EIP-1153)

Detects improper handling of transient storage (TSTORE/TLOAD), preventing authorization bypasses

๐Ÿง 

Storage Inference

Uses semantic inference to detect hidden state dependencies and storage collision risks

โ˜€๏ธ

Durable Nonce (Solana)

Detects improper handling of Solana durable nonces in multisig and privileged contexts

๐Ÿค–

AI-Fingerprint Scanner

Detects AI-generated code patterns (verbose comments, generic naming) that increase exploitability risks

๐Ÿ

Slither (Static Analysis)

Leverages the industry-standard static analysis framework for deep contract property checking

๐Ÿ”

Semgrep (Pattern Matching)

Custom lightweight rulesets for fast and effective code pattern matching and security linting

๐Ÿฆœ

Aderyn (Rust-based Static Analysis)

High-performance Rust-based analyzer for identifying Solidity-specific security anti-patterns

๐Ÿ›ก๏ธ

Trivy (Dependency Scanning)

Scans project dependencies and npm packages for known vulnerabilities and supply chain risks

๐ŸŒŠ

LP Manipulation Detection

Detects specialized risks related to liquidity pool manipulation and sandwich attack vectors

โ›“๏ธ

Cross-Chain Security

Validates bridge interactions and cross-chain message passing for logic and relay vulnerabilities

๐Ÿ”‘

Frontend Secrets Scanner

Detects hardcoded API keys, private keys, and sensitive configuration leaked in frontend assets

๐Ÿ“ฆ

Supply Chain Security

Analyzes the integrity of the build pipeline and external module dependencies for malicious code

๐Ÿค

ZK Circuit Safety

Identifies common pitfalls in Zero-Knowledge circuits and proof verification logic

๐Ÿ“

Precision & Rounding Analysis

Detects rounding errors and precision loss in fixed-point math that can lead to accounting bugs

๐Ÿ—๏ธ

Proxy Implementation Safety

Verifies upgradeable proxy patterns and initialization logic for storage collision risks

โš™๏ธ

Config Validation

Validates system parameters and administrative configurations for unsafe edge cases

๐Ÿ‘ค

Shadow Contagion Risk

Analyzes systemic risk where failure in one protocol component can compromise the entire system

๐Ÿ›‘

Circuit Breaker Analysis

Evaluates the robustness and security of emergency pause and circuit breaker mechanisms

โŒš

VWAP Window Analysis

Detects vulnerabilities in Volume Weighted Average Price implementations and oracle windowing

๐Ÿ“‰

Attacker Economics

Models the economic feasibility of attacks to prioritize vulnerabilities with high ROI for attackers

โ˜ฃ๏ธ

Toxic Skills Defense

Identifies and flags code patterns often used in malicious 'toxic' smart contract designs

๐Ÿค

Social Engineering / Multisig Proximity Scanner

Analyzes multisig setups and privileged roles for centralization and social engineering risks

๐Ÿ—ณ๏ธ

Ensemble LLM Voting

Implements a multi-persona consensus mechanism using Auditor, Exploit Dev, and Security Researcher agents to validate findings and reduce false positives.

๐Ÿ”ช

SCALM-Style Semantic Slicing

Performs deep semantic slicing using SCALM techniques to isolate complex vulnerability paths across large codebases for focused LLM reasoning.

๐Ÿ—๏ธ

CI/CD & Infra Security Audit

Analyzes build scripts, GitHub Actions, and deployment infrastructure for security misconfigurations, credential leaks, and supply chain risks.

๐Ÿ•ต๏ธ

Autonomous Bounty Hunter Mode

Enables continuous, autonomous scanning and exploitation simulation on targeted bug bounty programs with automated proof-of-concept generation.

Detection Methodology

82.6% EVMbench Detection Rate

DeepThreat achieves industry-leading detection on the EVMbench test suite by combining static analysis with AI-powered semantic reasoning. Our multi-stage approach catches both obvious vulnerabilities and subtle logical flaws that traditional tools miss.

850/856
Tests Passing
82.6%
Detection Rate
+10.4%
vs GPT-5.3-Codex

Pattern Correlation Engine

Individual scanner findings are correlated by our orchestrator to identify complex, multi-vector attacks. A single reentrancy finding combined with missing access control becomes a critical vulnerability, prioritized for immediate review.

Context-Aware Validation

DeepThreat understands the difference between a false positive and a real vulnerability by analyzing code context, developer intent, and project dependencies. This reduces alert fatigue and focuses your attention on exploitable issues.

AI Reasoning with VulnLLM-R

Zero-Cost Local Reasoning

VulnLLM-R runs entirely on your machine using optimized local LLMs. No API keys, no rate limits, no external dependencies. Your code never leaves your infrastructure.

  • โœ“Runs on CPU or GPU (optimized for Apple Silicon)
  • โœ“No internet required after initial setup
  • โœ“Complete privacy โ€” code stays local

Multi-Model Consensus

DeepThreat can optionally use multiple reasoning models in parallel to cross-verify findings and reduce false positives. Consensus voting ensures only high-confidence vulnerabilities reach your report.

  • โœ“Parallel model inference
  • โœ“Weighted consensus voting
  • โœ“Configurable confidence thresholds

Semantic Analysis Capabilities

Intent Detection
Understands developer intent vs implementation bugs
Attack Path Modeling
Maps multi-step exploitation sequences
Business Logic Flaws
Catches logical errors beyond code patterns

Output Formats

JSON

Structured JSON output for programmatic consumption, CI/CD pipelines, and custom tooling.

deepthreat scan
--format json
> results.json

Markdown

Human-readable reports with syntax highlighting, perfect for GitHub issues and documentation.

deepthreat scan
--format markdown
> SECURITY.md

SARIF

Industry-standard Static Analysis Results Interchange Format for IDE and CI/CD integration.

deepthreat scan
--format sarif
> results.sarif

Integration Options

CLI

Command-line interface for local development and ad-hoc scans.

npm install -g deepthreat
deepthreat scan ./contracts

GitHub Action

Automated scanning on every pull request with inline annotations.

- uses: deepthreat/action@v1
ย ย with:
ย ย ย ย path: ./contracts

API

RESTful API for custom integrations and enterprise workflows.

POST /api/v1/scan
{ "code": "..." }
โ†’ vulnerability report

Ready to See It in Action?

Start scanning your smart contracts in under 5 minutes. No signup required.