Arivu Technologies
ENTERPRISE CYBERSECURITY CASE STUDYWhite-Label Cleared

Bharat Shield
Threat Intelligence Engine

Built overnight after a black-hat SEO malware injection silently defaced enterprise-packaging-client.internal. Bharat Shield is a full SOC/SIEM platform with an 8-module monitoring suite, 3-LLM consensus threat engine, and an Active IPS that auto-bans attackers in under 5 minutes.

BHARAT SHIELD LIVE SPECMONITORING ACTIVE
Target Domainenterprise-packaging-client.internal
VPS HostLinode Linux 172.105.60.233
Incident SLA184 seconds (< 5 min)
Monitoring Modules8 active background workers
AI Engine4-provider fallback chain
Database Tables11 SQLite tables (SQLAlchemy ORM)
Dashboard Tabs9 interactive sections
Alert ChannelTelegram Bot API + win10toast
01 / THE INCIDENT

A silent breach that destroyed search rankings overnight.

In 2026, an Enterprise Sustainable Packaging Manufacturer operating enterprise-packaging-client.internal suffered a sophisticated black-hat SEO malware injection. Attackers exploited a vulnerable WordPress plugin to silently inject hundreds of casino, pharma, and crypto spam links directly into rendered DOM nodes - hidden from admin views using display:none and opacity:0 CSS rules, but fully crawled by Googlebot.

The result was devastating: organic keyword rankings collapsed, Google flagged the domain as compromised, indexing status deteriorated, and six months of SEO equity was wiped out in days. Standard WordPress security plugins failed to detect DOM-level hidden injection. Standard admin views showed nothing.

The core vulnerability: visual attacks hide from code-level audits.

Standard security scanners inspect source code. The malware lived in rendered browser DOM - invisible to server-side tools, visible only via headless browser screenshot comparison.

184 Seconds
Verified incident containment SLA
4-Provider AI
Gemini → Groq → Cerebras → Mistral fallback
11 DB Tables
SQLAlchemy ORM - complete audit history
8 Modules
Autonomous 24×7 background monitoring
02 / HOW BHARAT SHIELD WAS BUILT

Three engineering decisions that contained the breach.

Phase 1 - Overnight Emergency Build

Playwright DOM visual diff as the detection core.

Standard security tools missed the attack entirely. The breakthrough insight: malware living in rendered DOM is detectable only via full-browser screenshot comparison. Arivu deployed Playwright Chromium headless to capture 1920×1080 full-page screenshots with 3-pass scroll for lazy-loaded content, then integrated OpenCV SSIM to compute structural similarity scores every hour. SSIM < 0.80 fires a CRITICAL alert.

1920×1080
Screenshot resolution
3-Pass Scroll
Lazy content loading
< 0.80 SSIM
Defacement threshold
Phase 2 - Multi-LLM Threat Intelligence

3-LLM consensus eliminates false positives.

Single-model AI threat analysis produces false positives that fatigue security operators. Bharat Shield routes every incident through a sequential 4-provider fallback chain: Gemini 2.5 Flash → Groq Llama-3.3-70B → Cerebras gpt-oss-120b → Mistral Large. Each provider produces structured Markdown incident reports covering root cause, risk assessment, immediate remediation steps, and long-term hardening.

4 AI Providers
Sequential fallback
100% Uptime
AI analysis SLA
Markdown Reports
Structured output
Phase 3 - Active IPS & Real-Time SIEM

Autonomous attacker IP banning via SSH.

Bharat Shield tails VPS access logs and auth logs in real-time via persistent Paramiko SSH sessions. Regex signatures detect SQL injection, XSS, and path traversal attacks. On HIGH/CRITICAL detection, Bharat Shield immediately SSH-executes a CSF or iptables DROP rule on the Linode VPS - banning the attacker's IP address before a human can review the alert. Total response time: 184 seconds.

Real-Time
SSH log tailing
Auto-Ban
CSF/iptables
184s SLA
Verified
03 / SYSTEM ARCHITECTURE

Platform topology.

LAYER 01 - LOCAL WINDOWS MONITORING HOST
Streamlit Dashboard
Port 8501 · Executive SOC interface with 9 interactive tabs, Plotly charts, glassmorphism UI
FastAPI Backend
Port 8001 · RESTful API server, SIEM thread spawner, APScheduler background jobs
LAYER 02 - MONITORING ENGINES (8 BACKGROUND MODULES)
Playwright Visual Diff
Paramiko SSH SIEM
Google Search Console
Multi-LLM AI Engine
LAYER 03 - EXTERNAL TARGETS & INTEGRATIONS
Linode VPS
172.105.60.233 · CyberPanel/OLS · WordPress · Live access.log + auth.log
enterprise-packaging-client.internal
Target domain · 50-URL monitoring · Full-page screenshots · SEO health
AI Providers
Gemini 2.5 Flash, Groq, Cerebras, Mistral · 4-provider fallback chain
04 / TECHNOLOGY STACK

Every layer, documented.

LayerTechnologyPurpose
Backend APIPython 3.12, FastAPI, UvicornRESTful server, background job engine, SIEM thread spawning
Dashboard UIStreamlit + Custom Glassmorphism CSS + PlotlyExecutive dashboard, interactive incident management, SIEM feed, live charts
DatabaseSQLite (bharat_shield.db), SQLAlchemy ORM, PyYAMLPersistent storage across 11 tables: scans, alerts, SIEM events, file hashes, rankings
Browser AutomationPlaywright (Chromium Headless)Headless DOM rendering, multi-scroll execution, element hiding, full-page screenshots
Computer VisionOpenCV (cv2), Pillow, scikit-image SSIMImage comparison, height padding, Structural Similarity Index, heatmap generation
SSH MonitoringParamikoRemote SSH command execution, server health checks, real-time log tailing
Task SchedulingAPScheduler (BackgroundScheduler)Cron-like interval jobs: 5-min, 15-min, 30-min, 1-hr, daily
AI Threat EngineGemini 2.5 Flash → Groq Llama-3.3-70B → Cerebras → Mistral4-provider fallback chain for incident root cause analysis and multimodal security chat
NotificationsTelegram Bot API, win10toastReal-time push alerts, deduplication, periodic executive health summaries
05 / 8-MODULE MONITORING SUITE

Every module, every interval.

8 autonomous background monitoring modules run continuously at intervals from real-time SSH tailing down to 5-minute health pulses.

MODULE 01Every 5 min

Uptime & Availability

Parallel HTTP probes across up to 50 monitored URLs. Any HTTP ≥ 400 or connection failure triggers CRITICAL Telegram alert instantly.

MODULE 02Every 15 min

Client-Side Security & Malware

Fetches rendered HTML, scans for blackhat SEO keywords (casino, viagra, crypto), hidden DOM elements with spam links, and obfuscated JS (eval, base64_decode, String.fromCharCode).

MODULE 03Every 30 min

WordPress File Integrity

SHA256 fingerprints of wp-config.php, .htaccess, index.php, wp-cron.php, wp-settings.php compared against stored baselines via Paramiko SSH to Linode VPS.

MODULE 04Every 1 hr

Visual Integrity Engine

Playwright Chromium headless renders 1920×1080 screenshots with 3-pass scroll, then OpenCV SSIM computes structural similarity. SSIM < 0.80 = CRITICAL defacement alert.

MODULE 05Every 1 hr

SEO Health Engine

13 automated checks: indexability, robots.txt, cloaking detection (Googlebot vs. visitor response comparison), title/meta tags, H1 structure, TTFB, HTTPS enforcement, sitemap.

MODULE 06Daily 02:00 AM

Google Search Console

Service account API pulls clicks, impressions, CTR, avg position. Tracks 6 strategic commercial keywords for rank recovery. Detects spam terms in GSC impressions.

MODULE 07Every 5 min

SSH Server Health Monitor

CPU/RAM/Disk metrics via Paramiko SSH. Monitors top 5 processes, web server status, active TCP connections, failed SSH login count (brute-force detection).

MODULE 08Real-Time

SIEM & Active IPS

Persistent SSH tail -F on VPS access.log + auth.log. Regex patterns for SQLi, XSS, path traversal. On HIGH/CRITICAL: auto-ban via CSF or iptables, Telegram push.

06 / INSPECTABLE CODE

Real production code from Bharat Shield.

security/evaluator.py

FastAPI endpoint routing threat payloads to a multi-LLM consensus pipeline and triggering automated containment via background tasks.

1from fastapi import FastAPI, BackgroundTasks
2from core.multi_llm import multi_llm_evaluator
3from core.ips import contain_incident
4
5app = FastAPI(title="Bharat Shield SIEM v2")
6
7@app.post("/v1/incidents/evaluate")
8async def evaluate_threat(payload: dict, bg: BackgroundTasks):
9 result = await multi_llm_evaluator(payload)
10 if result.severity in ("HIGH", "CRITICAL"):
11 bg.add_task(contain_incident, payload["asset_id"])
12 bg.add_task(send_telegram_alert, result)
13 return {"severity": result.severity, "sla_seconds": 184}
07 / DATABASE SCHEMA

11 SQLite tables. Complete audit trail.

Every monitoring module writes to its own dedicated SQLAlchemy ORM table. Full history is retained: scan results, alerts, SIEM events, file hashes, screenshots, keyword rankings, and GSC data.

Storage Engine
SQLite · bharat_shield.db
ORM: SQLAlchemy (models.py)
11 tables · Full foreign key integrity
alertsCentral alert deduplication store
id, severity, module, message, timestamp, resolved, notified
security_scansDOM security scan results
url, status_code, malware_detected, hidden_content_detected, script_injection_detected, details
seo_scans13-point SEO audit data
robots_blocked, noindex_detected, cloaking_detected, title_length, gsc_clicks, gsc_impressions, gsc_ctr, seo_score
visual_scansSSIM visual integrity data
url_slug, viewport, similarity_score, status, difference_heatmap_path, baseline_approved
server_metricsVPS health telemetry
cpu_usage, ram_usage, disk_usage, load_avg_1m/5m/15m, failed_ssh_logins, active_connections
security_eventsRaw SIEM log events
timestamp, source_ip, event_type, payload, severity, log_source
file_hashesWordPress core file SHA256 baselines
file_path, hash_value, timestamp
rankingsCommercial keyword rank tracker
keyword, position, best_position, timestamp
search_console_dataGSC daily organic performance
date, clicks, impressions, ctr, position, pages_json
incidentsIncident management lifecycle
title, description, severity, status, timestamp
screenshotsVisual snapshot archive
url, viewport, file_path, is_baseline, timestamp
08 / 4-PROVIDER AI FALLBACK CHAIN

100% AI analysis uptime, guaranteed.

Threat incidents are routed through a sequential provider waterfall. If any provider errors or times out, the next provider handles the request immediately - ensuring AI analysis never fails, even during provider outages.

1
Google Gemini 2.5 FlashPRIMARY

Primary provider. Multimodal capability: can analyze pasted screenshots, raw attack payloads, and security logs.

2
Groq (Llama-3.3-70B)FALLBACK 1

First fallback. Ultra-fast inference via Groq LPU hardware. Handles high-volume threat analysis at sub-second speeds.

3
Cerebras (gpt-oss-120B)FALLBACK 2

Second fallback. Cerebras Wafer-Scale Engine delivers near-instantaneous 120B parameter inference.

4
Mistral AI (mistral-large-latest)FALLBACK 3

Final fallback. European-hosted AI ensuring multi-geography redundancy for critical incident analysis.

AI-Generated Incident Reports Include:

🔍 Root Cause - Attack vector explanation
⚠️ Risk Assessment - Impact severity rating
🛠️ Immediate Actions - CyberPanel/OLS/WP remediation steps
🛡️ Long-term Hardening - Infrastructure defense strategies

Dynamic Risk Score (0–100):

Computed in real-time from total alert volume, critical alert count, unique attacker IP count, and unresolved incident backlog. Displayed as a color-coded risk ring: SECURE (0–30) → ELEVATED (31–60) → HIGH RISK (61–80) → CRITICAL (81–100).

09 / EXECUTIVE DASHBOARD - 9 TABS

One dashboard. Full-spectrum SOC visibility.

📊

Overview Tab

Security Score, SEO Score, Visual Integrity Score, Server Health Score
Overall Risk Ring (SECURE / ELEVATED / HIGH RISK / CRITICAL)
Active Incident Feed with log traces, IP geolocation flags, remediation playbooks
10 / SECURITY & RELIABILITY POSTURE

Built for zero false negatives.

Active IPS Auto-Banning

Detected threat IPs are autonomously blocked via CSF or iptables on the Linode VPS - no human review required for initial containment.

SSIM Visual Defacement Detection

Playwright headless screenshots compared via OpenCV SSIM every hour. Any visual change > 20% triggers CRITICAL alert - catches DOM injection invisible to code scanners.

Telegram Push + Desktop Toast

Multi-channel alert delivery: Telegram Bot API push with deduplication logic prevents alert storms. Win10toast desktop notifications for offline SOC operator monitoring.

WordPress File Integrity (SHA256)

wp-config.php, .htaccess, index.php, wp-cron.php, wp-settings.php fingerprinted every 30 minutes. Hash mismatch = immediate CRITICAL alert.

13-Point SEO Cloaking Detection

Dual HTTP requests: Googlebot UA vs. visitor UA. Detects cloaking via title mismatch, canonical discrepancy, HTML content length variance > 15%, or spam keyword injection to bots.

Alert Deduplication Engine

Before dispatching, the notification engine queries the DB for unresolved alerts from the same module and URL. Identical alerts within recent runs are suppressed to prevent operator fatigue.

11 / REMEDIATION PLAYBOOKS

Embedded, step-by-step response procedures.

Bharat Shield includes pre-built remediation playbooks tailored specifically for CyberPanel / OpenLiteSpeed / Linode VPS / WordPress environments - no manual research required during an incident.

SQL Injection
  1. 1.Verify attacker IP auto-ban status in Active IPS
  2. 2.Inspect request parameters in raw SIEM log trace
  3. 3.Deactivate and delete vulnerable WordPress plugin
  4. 4.Run WP Integrity Check to ensure database/core integrity
Black-Hat SEO Injection
  1. 1.Run immediate Visual Integrity scan at 1920×1080
  2. 2.Inspect hidden DOM elements via Playwright devtools
  3. 3.Remove malicious plugin, run WP malware scanner
  4. 4.Submit clean-site reconsideration request to Google Search Console
SSH Brute Force
  1. 1.Verify active SSH key connection to Linode VPS
  2. 2.Set PasswordAuthentication no in /etc/ssh/sshd_config
  3. 3.Restart SSHD service, confirm CSF active IP ban list
  4. 4.Review journalctl -u sshd for attacker IP diversity
Cross-Site Scripting (XSS)
  1. 1.Verify attacker IP auto-ban status in IPS
  2. 2.Install Wordfence, run full malware scan
  3. 3.Add X-XSS-Protection and X-Content-Type-Options security headers via .htaccess
  4. 4.Audit all user-input fields for unescaped output
12 / CASE STUDY FAQS

Questions about Bharat Shield?

Why is the client name anonymized on this case study?

What was the root cause of the original malware attack?

How does the 3-LLM consensus model reduce false positives?

What is the SSIM threshold for visual defacement detection?

Can Bharat Shield be deployed for other clients?

ARIVU SECURITY ENGINEERING · BENGALURU

Is your website defenseless against DOM-level attacks?

Standard WordPress security plugins do not catch DOM-level malware injection. Schedule a 30-minute security assessment with Arivu's engineers in Bengaluru - no NDAs required to begin.