Authors:
- Soumya Sourav Das (@celestial317)
- Sudhanshu Shekhar (@Sudhanshu727)
- Devyanshi Bansal (@DevyanshiBansal)
Built for Shield 1.0 Hackathon
Organized by CDTI Jaipur under BPRD, Govt of India
NarcoLinkAI is an advanced intelligence system designed to detect and analyze drug trafficking activities on social media and the dark web. Traditional keyword-based detection fails against evolving drug slang and multimodal content (text + images). NarcoLinkAI bridges this gap using Vector Alchemy for slang deciphering, Multimodal LLMs for context-aware risk assessment, and an Autonomous Agent (Zoro) for dark web OSINT.
- Vector Alchemy & Slang Decoding: Unlike static dictionaries, our "Vector Alchemy" approach treats words as vectors. By subtracting "innocent" semantic properties and adding "drug" properties, the system can dynamically uncover hidden meanings in new slang (e.g., detecting "snow" as Cocaine based on context).
- Multimodal Detection (Text + Image): We utilize Gemma and Image Embeddings to analyze posts containing both text and images. This allows the system to understand context that text-alone models miss (e.g., a photo of white powder with the caption "Fresh snow").
- Zoro (Agentic Dark Web OSINT): An autonomous AI agent that navigates the dark web using Tor. It iteratively refines its search queries, filters results using an LLM, and recursively crawls .onion sites to generate actionable intelligence reports.
- Privacy-First & Local First: The core analysis runs efficiently with local components, minimizing external data leakage.
- Backend: FastAPI (Python), Uvicorn
- AI/ML: PyTorch, LangChain, Gemma (via OpenRouter/Local), OpenAI/OpenRouter API
- Vector Database/Embeddings: Torch (Vector operations), Custom Bloom Filter Engine
- Dark Web: Tor (SOCKS5 Proxy), Requests, BeautifulSoup
- Frontend: React, Vite, TailwindCSS
- Python 3.9+
- Node.js & npm
- Tor Browser (Must be running for Dark Web extraction to work)
- OpenRouter API Key (for LLM capabilities)
-
Clone the repository:
git clone https://github.com/celestial317/drugDealerDetection_BPRD_Shield.git cd drugDealerDetection_BPRD_Shield -
Install Python dependencies:
pip install fastapi uvicorn torch transformers nltk yaspin beautifulsoup4 requests python-dotenv langchain_openai langchain_core
(Note: Ensure you have PyTorch installed appropriately for your system hardware)
-
Configure Environment: Create a
.envfile in the root directory and add your key:OPENROUTER_API_KEY=your_api_key_here -
Start the Backend:
python main.py
The API will run at
http://0.0.0.0:8000.
-
Navigate to the frontend directory:
cd frontend -
Install dependencies:
npm install
-
Start the Development Server:
npm run dev
The application will launch at
http://localhost:5173.
- Input: Users upload a screenshot, image, or text caption.
- Processing:
- Image: Processed via
ImageEmbedderandGemmaIntaketo extract visual context. - Text:
DrugDecoderanalyzes text using Vector Alchemy to detect hidden slang. - Fusion: Data is fused in the
DrugDetectionEngineto assign a Risk Level (High/Low).
- Image: Processed via
- Output: A detailed breakdown of detected entities, slang meanings, and overall risk.
- Input: A target query (e.g., specific drug name or vendor alias).
- Agentic Loop:
- Refine: The Agent refines the query into effective dark web search terms.
- Search: Queries multiple Tor search engines (Ahmia, OnionLand, etc.).
- Filter: Uses LLM to select the most relevant results.
- Crawl: Recursively visits .onion links to depth
Nto scrape content.
- Output: Generates a comprehensive Intelligence Report in Markdown.
Built for a safer society.