Skip to content

Decentralized threat intelligence powered by Gemini 3

Notifications You must be signed in to change notification settings

mitmelon/zionic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Zionic Logo

πŸ›‘οΈ Zionic

Gemini 3-Powered Phishing Protection with Blockchain Rewards

Made with Rust Gemini 3 Cairo Starknet License: ISC Website


πŸ€– Gemini 3 AI Β· πŸ” Real-time Protection Β· πŸ’° Earn Rewards Β· 🌐 Community-Driven Β· ⚑ Multimodal Analysis

🌐 Visit Our Website | πŸ“– Documentation | πŸ’¬ Report Issues

⚠️ Work in Progress β€” Unstable

This project is under active development and may contain bugs or breaking changes.

Use for testing and development only. Do not rely on this for production protection.


🌟 About

Zionic is a next-generation browser security extension that harnesses Google's Gemini 3 AI to provide intelligent, real-time protection against phishing attacks, malware, and malicious websites. By combining Gemini 3's advanced reasoning capabilities with community-driven threat validation and blockchain-based incentives, Zionic creates a decentralized security ecosystem where users are both protected and rewarded.

Built specifically for the Gemini 3 1 million Context Window, Zionic showcases the power of Gemini 3's:

  • 🧠 Advanced reasoning for complex threat pattern recognition
  • πŸ–ΌοΈ Multimodal capabilities to analyze webpage visuals, text, and structure
  • ⚑ Low latency for real-time security decisions
  • 🎯 Context understanding to distinguish legitimate sites from sophisticated phishing attempts

Watch Zionic in action: Gemini 3-powered phishing detection, community voting, and blockchain rewards


πŸ“‘ Table of Contents


⚠️ The Problem

Online threats are evolving faster than traditional security solutions can adapt:

  • 🎣 Phishing attacks cost businesses and individuals billions annually
  • 🎭 Sophisticated scams use AI-generated content that fools traditional filters
  • ⚑ Zero-day threats appear before antivirus databases are updated
  • 🏒 Centralized security relies on single points of failure with slow response times
  • 🚫 No incentives exist for users to actively participate in threat detection
  • πŸ”’ Privacy concerns with cloud-based scanning services that track all browsing

Traditional security solutions can't keep pace with AI-powered phishing attacks, deepfake scams, and rapidly evolving threat vectors. Users need intelligent, adaptive protection that learns and responds in real-time.


πŸ’‘ Our Solution

Zionic leverages Gemini 3's advanced AI capabilities to create an intelligent, adaptive security layer that protects users while rewarding community participation:

  1. πŸ€– Gemini 3 AI Brain: Advanced multimodal analysis examines webpage content, visual elements, URL patterns, and behavioral signals to detect even the most sophisticated threats
  2. πŸ” Multi-Layer Validation: Gemini 3's reasoning works alongside Google Safe Browsing, AbuseIPDB, Brave Search, and ClamAV for comprehensive protection
  3. πŸ—³οΈ Community Intelligence: Users validate AI-detected threats, earning blockchain rewards for accurate assessments
  4. ⛓️ Decentralized Storage: Threat intelligence stored immutably on Starknet, creating a global security knowledge base
  5. πŸ“ Native File Scanning: Real-time malware detection through integrated ClamAV engine
  6. ⭐ Reputation System: Build credibility through consistent, accurate threat reporting

πŸ€– Why Gemini 3?

Zionic is built specifically to showcase Gemini 3's groundbreaking capabilities for cybersecurity:

🧠 Advanced Reasoning for Threat Detection

Gemini 3's enhanced reasoning allows Zionic to:

  • Understand context: Distinguish between legitimate financial sites and convincing phishing clones
  • Recognize patterns: Identify subtle indicators that signal malicious intent (unusual URL structures, mismatched branding, suspicious form fields)
  • Think multi-step: Analyze the entire attack chain, not just isolated elements
  • Adapt dynamically: Learn from new threat patterns without requiring database updates

Example: Traditional filters might block "paypa1.com" (obvious typo), but Gemini 3 can detect sophisticated attacks using legitimate-looking domains like "paypal-security-verification.com" by reasoning about intent, content alignment, and behavioral red flags.

πŸ–ΌοΈ Multimodal Analysis for Visual Threats

Gemini 3's vision capabilities enable Zionic to:

  • Analyze page layouts: Detect cloned login pages that look identical to legitimate sites
  • Examine images: Identify fake logos, manipulated screenshots, and deepfake content
  • Read embedded text: Extract text from images to catch hidden phishing messages
  • Evaluate design consistency: Spot subtle visual inconsistencies that signal fraud

Example: A phishing page might perfectly replicate a bank's HTML but use a slightly off-brand logo. Gemini 3's vision can catch these visual discrepancies that text-only analysis would miss.

⚑ Low Latency for Real-Time Protection

Gemini 3's speed ensures:

  • Instant threat assessment: Sub-second analysis that doesn't slow down browsing
  • Seamless user experience: Protection that works invisibly in the background
  • Real-time blocking: Stop threats before users can interact with malicious content
  • Continuous monitoring: Constant vigilance without performance impact

🎯 Contextual Understanding

Gemini 3's deep language understanding allows Zionic to:

  • Detect social engineering: Recognize manipulative language patterns and urgency tactics
  • Understand intent: Differentiate between legitimate security warnings and scare tactics
  • Analyze sentiment: Flag emotionally manipulative content designed to bypass rational thinking
  • Multilingual protection: Provide consistent security across languages and regions

Example: Gemini 3 can identify phishing emails that say "Your account will be suspended in 24 hours unless you verify immediately" as using classic urgency-based social engineering, even if the grammar and formatting are perfect.


✨ Why Zionic?

πŸ‘€ For Users

  • πŸ€– Gemini 3 Intelligence: Protection powered by Google's most capable AI model
  • πŸ’° Get paid to browse safely (earn STRK tokens for contributing to security)
  • ⚑ Real-time protection against phishing, malware, and emerging threats
  • πŸ” Privacy-first: Your browsing stays local; only threats are analyzed and reported
  • πŸ—³οΈ Community power: Your validation votes shape the global threat database
  • πŸ›‘οΈ Multi-layered security: Gemini 3 AI + community wisdom + traditional antivirus

🌐 For the Ecosystem

  • 🧠 AI-first security: Leverages Gemini 3's reasoning to stay ahead of evolving threats
  • πŸ”„ Decentralized threat intelligence that no single entity controls
  • πŸš€ Faster response to emerging threats through crowd wisdom and AI learning
  • πŸ’Ž Economic incentives align user behavior with network security
  • πŸ“Š Transparent records of all threats and validations on-chain
  • πŸ”“ Reduced dependence on centralized security vendors with outdated databases

πŸ’» For Developers

  • πŸ€– Gemini 3 API showcase: Demonstrates real-world AI application in cybersecurity
  • 🌍 Open-source: Full transparency and community contributions
  • πŸ”Œ Extensible: Add new AI models, scanners, or features
  • πŸ“š Well-documented: Clear setup and contribution guides
  • 🌈 Multi-platform: Works on Chrome, Edge, Brave, Firefox

πŸ‘₯ Who Benefits?

πŸ‘₯ Everyday Users

  • πŸ›‘οΈ Gemini 3-powered protection while browsing
  • πŸ’Έ Passive income through accurate threat reporting
  • πŸ” Control over their security data

🏒 Businesses

  • πŸ‘” AI-enhanced employee protection against sophisticated attacks
  • πŸ“‰ Reduced phishing success rates and security incident costs
  • 🌐 Decentralized security posture with global threat intelligence

πŸ” Security Researchers

  • πŸ“‘ Platform to share threat intelligence with AI validation
  • πŸ’° Rewards for valuable contributions to the security ecosystem
  • ⭐ Reputation building in the community

πŸ’» Web3 Enthusiasts

  • 🎯 Real-world utility for blockchain technology in security
  • πŸ—³οΈ Active participation in decentralized governance
  • πŸ’Ž Staking and earning opportunities

🌐 Internet at Large

  • 🀝 Collective immunity through shared, AI-validated threat data
  • ⚑ Faster detection of emerging threats with Gemini 3's reasoning
  • 🌍 Democratized security infrastructure accessible to everyone

βš™οΈ How It Works

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ 🌐 Browser  β”‚
β”‚ Extension   │◄─── πŸ‘€ User browses the web
β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
       β”‚
       β”œβ”€β–Ί πŸ€– Gemini 3 AI Analysis
       β”‚    β€’ Multimodal content analysis (text + images)
       β”‚    β€’ Advanced reasoning for threat detection
       β”‚    β€’ Context understanding and pattern recognition
       β”‚    β€’ Low-latency real-time decisions
       β”‚
       β”œβ”€β–Ί πŸ” API Checks (Safe Browsing, AbuseIPDB, Brave Search)
       β”œβ”€β–Ί 🦠 File Scanning (ClamAV via Rust Engine)
       β”‚
       β–Ό
   ⚠️ Threat Detected?
       β”‚
       β”œβ”€ βœ… No ──► Continue browsing
       β”‚
       └─ 🚨 Yes ──► Block & Report to Smart Contract
                      β”‚
                      β–Ό
              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
              β”‚ ⛓️ Starknet Contractβ”‚
              β”‚  (Pending State)   β”‚
              β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                       β”‚
                       β–Ό
              πŸ—³οΈ Community Votes (Validate/Reject)
                       β”‚
                60% Approve?
                       β”‚
         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
         β”‚                           β”‚
         βœ… Yes                      ❌ No
         β”‚                           β”‚
         β–Ό                           β–Ό
    🎯 Threat Confirmed      🚫 Rejected/Ignored
         β”‚
         β–Ό
    πŸ’° Rewards Distributed:
       β€’ Reporter: 10 points (0.1 STRK)
       β€’ Voters: 2 points each (0.02 STRK)
       β€’ Premium users: 2x rewards

Gemini 3's Role: The AI brain that analyzes every webpage for threats using advanced reasoning, multimodal understanding, and contextual awareness. All threat detection decisions are powered by Gemini 3's intelligence.


πŸ› οΈ Tech Stack

πŸ€– AI & Machine Learning

  • Gemini 3: Primary AI engine for threat detection and analysis (multimodal, reasoning-enhanced)
  • Local LLMs: Privacy-focused alternative for offline analysis

🎨 Frontend

  • 🌐 Extension: Vanilla JavaScript with Chrome Extension Manifest V3
  • πŸ’… UI: TailwindCSS for modern, responsive design
  • πŸ’Ύ Storage: Dexie.js (IndexedDB wrapper) for local caching

βš™οΈ Backend

  • πŸ“œ Smart Contract: Cairo 2.8.0 on Starknet (for reward distribution and threat storage)
  • πŸ¦€ Security Engine: Rust with Tokio async runtime
  • πŸ–₯️ Server: Fastify (Node.js) for contract write proxy
  • πŸ—„οΈ Database: MongoDB for event aggregation, SQLite for scan caching
  • πŸ”Œ APIs:
    • πŸ€– Gemini 3 for AI-powered threat analysis
    • πŸ” Google Safe Browsing
    • 🚫 AbuseIPDB
    • πŸ”Ž Brave Search

⛓️ Blockchain (Reward & Storage Layer)

  • 🌐 Network: Starknet (Sepolia testnet, Mainnet ready)
  • πŸ‘› Wallet Integration: ArgentX, Braavos via get-starknet
  • πŸ’Ž Token: STRK for staking and community rewards

πŸ” Security

  • 🦠 Antivirus: ClamAV for file scanning
  • πŸ” Hashing: SHA-256 for file integrity
  • πŸ”— Native Messaging: Secure browser-to-native communication

πŸš€ Getting Started

Prerequisites

Before you begin, ensure you have:

πŸ—οΈ Step 1: Deploy Smart Contract

The smart contract manages threat validation, voting, and reward distribution on Starknet.

⛓️ Detailed instructions: See contracts/README.md

Quick Start:

# Navigate to contracts directory
cd contracts

# Build the contract
scarb build

# Create deployment account
sncast account create --network sepolia --name deployer

# Fund account from faucet
# Visit: https://starknet-faucet.vercel.app/

# Deploy account
sncast account deploy --network sepolia --name deployer

# Declare contract
sncast declare --network sepolia --contract-name ZionicDB

# Deploy contract (save the contract address!)
sncast deploy --network sepolia \
  --class-hash YOUR_CLASS_HASH \
  --constructor-calldata YOUR_ADMIN_ADDRESS STRK_TOKEN_ADDRESS

Save your deployed contract address - you'll need it for the extension configuration!

Default Rewards (configurable by admin):

  • Insert threat: 10 points = 0.1 STRK
  • Vote on threat: 2 points = 0.02 STRK
  • Premium users: 2x multiplier
  • Minimum to claim: 1000 points = 10 STRK

πŸ”§ Step 2: Build Chrome Extension

The extension monitors browsing activity and uses Gemini 3 to scan for threats.

🌐 ```bash

Clone repository (if you haven't already)

git clone https://github.com/mitmelon/zionic.git cd zionic

Install dependencies

npm install

Build CSS with TailwindCSS

npm run build:css

Build extension for production

npm run build

Or for development with auto-rebuild

npm run dev


**Install in Browser:**

1. Open Chrome and navigate to `chrome://extensions/`
2. Enable **Developer mode** (top right toggle)
3. Click **Load unpacked**
4. Select the `dist` folder from your build output
5. Pin the extension to your toolbar for easy access

**Verify Installation:**
- You should see the Zionic icon in your browser toolbar
- Click it to open the dashboard
- You'll be prompted to complete setup on first launch

---

### πŸ¦€ Step 3: Install Rust Security Engine

The Rust engine provides native file scanning via ClamAV and local LLM access.

πŸ” **Detailed instructions**: See [`program/zionic_engine/README.md`](program/zionic_engine/README.md)

**Quick Start:**

```bash
# Navigate to engine directory
cd program/zionic_engine

# Build for production
cargo build --release

# Run first-time setup
./target/release/zionic_engine
# (Windows: .\target\release\zionic_engine.exe)

What Happens:

  1. Checks for ClamAV installation (auto-installs on Windows)
  2. Starts ClamAV daemon
  3. Updates virus definitions
  4. Registers native messaging with your browsers
  5. Creates SQLite database for scan caching
  6. Installs LLM model that fits your device
  7. Exposes completion endpoints for extension access

Verify Installation:

# Test the engine
echo '{"action":"ping"}' | ./target/release/zionic_engine
# Should return: {"result":"success",...}

The engine now runs automatically when the extension needs to scan files and access local LLM.


πŸ–₯️ Step 4: Start Backend Server

The backend server handles contract write operations and event aggregation.

πŸš€ Quick Start:

# Navigate to server directory
cd zionic-server

# Create .env file in root directory
cd ..
touch .env  # (Windows: type nul > .env)

Configure .env file (in root directory):

# MongoDB Connection
MONGODB_URI=mongodb://localhost:27017/zionic

# Starknet Configuration
STARKNET_RPC_URL=your_rpc_endpoint
WALLET_PRIVATE_KEY=your_private_key_here
WALLET_ADDRESS=your_account_address_here
CONTRACT_ADDRESS=your_deployed_contract_address_here
NETWORK=sepolia

# Server API Security
API_KEY=your_secret_api_key_here

# Server Configuration
PORT=3000

# STRK token contract address (Sepolia) - same for mainnet too
STRK_TOKEN_ADDRESS=0x04718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d

Start MongoDB (if running locally):

# Windows
mongod

# macOS (with Homebrew)
brew services start mongodb-community

# Linux
sudo systemctl start mongod

Start the Server:

# From root directory
npm start

# Or for development with auto-reload
npm run devServer

Verify Server:

# Should see:
# Server listening at http://0.0.0.0:3000
# Connected to MongoDB

⚑ Step 5: Configure Extension

Now connect everything together! 🎯

A. Initial Setup

  1. Open Extension: Click the Zionic icon in your browser
  2. Install Page: You'll see the installation welcome screen
  3. Click "Get Started": Proceed to login

B. Connect Wallet

  1. Choose Wallet: Select ArgentX or Braavos
  2. Connect: Authorize the connection request
  3. Sign In: Sign the authentication message
  4. Dashboard: You're now at the main dashboard

C. Configure Gemini 3 API (Required)

This is the most important step! Gemini 3 is the brain of zionic.

  1. Navigate to Settings: Click the gear icon
  2. Enter Gemini 3 API Key:
  3. Select LLM Type: Choose gemini (recommended for best protection)

D. Configure Optional APIs

Enhance protection with additional data sources:

E. Configure Server Connection

  1. Server URL: Enter your server URL (e.g., http://localhost:3000)
  2. Server API Key: Enter the API_KEY from your .env file

This enables blockchain reward distribution for validated threats.

F. Enter src/starknet.js

If you deployed your own contract:

  1. Open the extension's starknet.js
  2. Update the contract address to your deployed address and RPC
  3. Save and rebuild the extension

πŸ’° Earning Rewards

Once configured, Zionic automatically protects you with Gemini 3 AI and earns rewards! πŸŽ‰

🎯 How to Earn

  1. 🌐 Browse Normally: Zionic monitors in the background
  2. πŸ€– Gemini 3 Analysis: AI analyzes and blocks suspicious sites using advanced reasoning
  3. πŸ“ Auto-Report: Threats are submitted to the Starknet smart contract
  4. πŸ—³οΈ Community Votes: Other users validate your AI-detected findings
  5. πŸ’Ž Earn STRK: Get blockchain rewards when threats are confirmed

πŸ—³οΈ Voting on Threats

  1. πŸ“Š Dashboard: View pending threats requiring validation
  2. πŸ” Review: Check threat details, URLs, and Gemini 3 analysis
  3. βœ… Vote: Approve (valid threat) or Reject (false positive)
  4. πŸ’° Earn Points: 2 points per vote when you're in the majority

Reward Structure

Action Points STRK Value Requirements
Report threat 10 0.1 STRK Threat approved by community
Vote on threat 2 0.02 STRK Vote with majority
Stake tokens Varies - Unlock voting rights
Premium status 2x - Set by admin

Minimum to Claim: 1000 points (10 STRK)
Approval Threshold: 60% of votes must be positive

Staking for Access

To report threats and vote, you must stake STRK:

  1. Minimum Stake: 10 STRK
  2. Lock Period: 30 days
  3. Purpose: Prevents spam and malicious reports
  4. Withdrawal: Available after lock period

πŸ“ Project Structure

zionic/
β”œβ”€β”€ contracts/              # Starknet smart contract (reward distribution)
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   └── lib.cairo      # Main contract code
β”‚   β”œβ”€β”€ Scarb.toml         # Contract dependencies
β”‚   └── README.md          # Contract build & deploy guide
β”‚
β”œβ”€β”€ program/
β”‚   └── zionic_engine/    # Rust security engine
β”‚       β”œβ”€β”€ src/
β”‚       β”‚   └── main.rs    # Native messaging & ClamAV
β”‚       β”œβ”€β”€ Cargo.toml     # Rust dependencies
β”‚       └── README.md      # Engine build guide
β”‚
β”œβ”€β”€ src/                   # Chrome extension source
β”‚   β”œβ”€β”€ background.js      # Service worker
β”‚   β”œβ”€β”€ content.js         # Content script (page scanning orchestration)
β”‚   β”œβ”€β”€ dashboard.js       # Dashboard UI logic
β”‚   β”œβ”€β”€ starknet.js        # Blockchain interactions
β”‚   └── images/            # Icons and assets
β”‚
β”œβ”€β”€ dist/                  # Built extension (after npm run build)
β”œβ”€β”€ zionic-server/       # Backend server (contract write proxy)
β”‚   └── server.js
β”œβ”€β”€ manifest.json          # Extension manifest (Manifest V3)
β”œβ”€β”€ package.json           # Node dependencies
└── README.md              # This file

🀝 Contributing

We welcome contributions! Here's how:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Areas for Contribution

  • πŸ€– Enhanced Gemini 3 prompts for better threat detection
  • 🌐 Multi-language support
  • 🎨 UI/UX improvements
  • πŸ” New security scanner integrations
  • πŸ“– Documentation enhancements
  • πŸ› Bug fixes and optimizations

πŸ† Why Zionic for Gemini 3?

Gemini 3 is the core intelligence that makes Zionic revolutionary:

  1. 🧠 Advanced Reasoning: Gemini 3's enhanced reasoning capabilities power sophisticated threat pattern recognition that goes beyond simple keyword matching

  2. πŸ–ΌοΈ Multimodal Analysis: Combines text, visual, and structural analysis to detect threats that fool traditional single-mode scanners

  3. ⚑ Real-Time Performance: Low-latency analysis ensures protection without compromising browsing experience

  4. 🎯 Novel Application: Demonstrates Gemini 3 in a critical real-world use case (cybersecurity) beyond chat interfaces

  5. 🌍 Social Impact: Protects everyday users from financial fraud, identity theft, and malicious content

Starknet's Role: Provides decentralized storage for threat intelligence and reward distribution, creating economic incentives for community participation. The blockchain layer is purely for rewards and data persistenceβ€”Gemini 3 is the brain that makes all security decisions.


Troubleshooting

Extension Not Working

  • Check Gemini 3 API key: This is required! Go to Settings and verify your API key is saved
  • Check wallet connection: Ensure ArgentX/Braavos is installed and connected
  • Reload extension: Go to chrome://extensions/ and click reload

Gemini 3 API Issues

  • Rate limits: Free tier has limits, upgrade if needed
  • Invalid key: Regenerate key from Google AI Studio
  • API errors: Check browser console for detailed error messages

Rust Engine Issues

  • ClamAV not starting: Manually install ClamAV for your OS
  • Port 3310 busy: Another ClamAV instance is running, restart it
  • See program/zionic_engine/README.md for detailed troubleshooting

Roadmap

  • Gemini 3 integration for AI-powered threat detection
  • Multimodal analysis (text + visual content)
  • Real-time protection with low latency
  • Starknet smart contract for rewards
  • Chrome extension with wallet integration
  • Enhanced Gemini 3 prompts for even better accuracy
  • Gemini 3-powered deepfake detection in images/videos
  • Mobile app (React Native) with Gemini 3
  • Enterprise API for businesses
  • Threat intelligence marketplace

License

This project is licensed under the ISC License. See individual components for specific license details:

  • Smart Contract: MIT License
  • Rust Engine: Check source file headers
  • Extension: ISC License

πŸ’¬ Support & Community


πŸ™ Acknowledgments

Built with:

  • πŸ€– Gemini 3 (Google DeepMind) - The AI brain powering all threat detection
  • πŸ¦€ Rust & Tokio
  • πŸ›οΈ Cairo & Starknet (for decentralized rewards)
  • πŸ›‘οΈ ClamAV
  • ⚑ Node.js & Webpack
  • 🎨 TailwindCSS

🌐 Visit zionic.work.gd Β· Start protecting the web with Gemini 3 AI and earning rewards today! πŸš€

About

Decentralized threat intelligence powered by Gemini 3

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published