惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Application and Cybersecurity Blog
Application and Cybersecurity Blog
H
Help Net Security
罗磊的独立博客
博客园 - Franky
小众软件
小众软件
博客园 - 三生石上(FineUI控件)
博客园 - 叶小钗
爱范儿
爱范儿
月光博客
月光博客
博客园 - 聂微东
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
量子位
GbyAI
GbyAI
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
大猫的无限游戏
大猫的无限游戏
Y
Y Combinator Blog
Martin Fowler
Martin Fowler
Hugging Face - Blog
Hugging Face - Blog
The GitHub Blog
The GitHub Blog
T
Threat Research - Cisco Blogs
Spread Privacy
Spread Privacy
Hacker News: Ask HN
Hacker News: Ask HN
B
Blog RSS Feed
Know Your Adversary
Know Your Adversary
T
Troy Hunt's Blog
I
InfoQ
L
Lohrmann on Cybersecurity
Recent Announcements
Recent Announcements
H
Hacker News: Front Page
Scott Helme
Scott Helme
Jina AI
Jina AI
云风的 BLOG
云风的 BLOG
Engineering at Meta
Engineering at Meta
The Register - Security
The Register - Security
C
CERT Recently Published Vulnerability Notes
MongoDB | Blog
MongoDB | Blog
Help Net Security
Help Net Security
MyScale Blog
MyScale Blog
F
Fortinet All Blogs
Project Zero
Project Zero
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
J
Java Code Geeks
AWS News Blog
AWS News Blog
阮一峰的网络日志
阮一峰的网络日志
T
Threatpost
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Apple Machine Learning Research
Apple Machine Learning Research
B
Blog
Cloudbric
Cloudbric

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
Neuro-Morph: Building a Living Defense System with Autonomous Moving Target Defense and MongoDB
K. NIHAL · 2026-05-01 · via DEV Community

Authors: Kaipu Nihal reddy, Dev Rajeev, Mahendra

What Neuro-Morph Actually Is
The core idea behind Neuro-Morph is that a cyberattack is not a single event—it is a process of reconnaissance. A single port scan or an invalid API request tells you something, but what tells you much more is how the attacker reacts when the ground beneath them starts to shift.

That is what the Autonomous Mutation Layer does. Every "Environment" in the system has a living digital profile—a state vector that tracks the frequency of failed logins, the number of honeypot triggers, the current request rate, and a rolling threat score. Every time a packet enters the gateway, that profile updates itself in real-time.

So when the PPO AI Engine decides to "Morph" the system, it isn't just a random scramble. It is a strategic verdict based on a continuously evolving baseline of the current threat landscape. The system observes the attacker, calculates the risk, and chooses exactly how much "chaos" to introduce to invalidate the attacker's progress.

That framing—a Digital Twin of the Infrastructure—is what made MongoDB the right call for Neuro-Morph. A system state isn't a collection of scattered logs across multiple tables; it is one coherent, high-velocity document that the AI reads and writes as a single unit to make split-second defense decisions.

The Two Collections That Run Everything
We kept the data model simple on purpose. Two collections: attack_events and ai_decisions.

attack_events is the pulse of the system. Every request that hits our FastAPI gateway lands here as a document—the source IP, the targeted endpoint, the timestamp, and whether it tripped a "Deep Honeypot." Once the threat analyzer finishes, we write the raw threat score and the classification (RECON, BRUTE_FORCE, or DDOS). Everything is in one place, so the SOC dashboard never has to run a join to show recent incursions.

ai_decisions is where the Digital Twin of the Infrastructure lives. This collection is never static; it records the "mental state" of the PPO agent after every observation. It tracks the 8-dimensional state vector (failed logins, honey-trips, etc.), the action taken (NONE, LIGHT, or AGGRESSIVE), and the resulting reward. The twin... keeps learning.


{
  "eventId": "evt_982",
  "sourceIp": "192.168.1.105",
  "timestamp": "2026-04-30T14:22:10Z",
  "targetEndpoint": "/api/v1/auth/login",
  "honeypotTriggered": true,
  "requestVelocity": 45.2,
  "authFailures": 12,
  "threatScore": 0.82,
  "classification": "BRUTE_FORCE",
  "isHighThreat": true
}

Enter fullscreen mode Exit fullscreen mode

The *attack_events * Collection
This is the "Pulse" of your system. Every incoming request is logged with its security context. Instead of transaction amounts, it tracks threat metrics.

{
  "stateId": "state_active_042",
  "avgRequestRate": 1250.50,
  "maxThreatLevel": 0.88,
  "minReward": -10.00,
  "activePorts": [8080, 8081, 9000],
  "lureEndpoints": ["/admin", "/.env", "/config"],
  "totalMorphCount": 45,
  "currentAction": "AGGRESSIVE_MORPH",
  "lastReward": 0.94,
  "overallSystemHealth": 0.98
}

Enter fullscreen mode Exit fullscreen mode

This is where the "Brain" of the system lives. It represents the Digital Twin of your Attack Surface. Rather than user profiles, it tracks the state of your infrastructure and the AI's response to it.

Why This Wouldn't Have Worked as Well in a Relational DB
Take our activePorts and lureEndpoints. In a relational database like MySQL, these would have required their own lookup tables with foreign keys linked to a SystemState ID. Every time our FastAPI gateway needed to verify if an incoming request was hitting a legitimate port or a trap, we would be running an INNER JOIN. Every time the AI triggered a morph, we would be performing multiple** DELETE** and INSERT operations across several tables just to update the infrastructure map.

In MongoDB, these are simply arrays within the Infrastructure Twin document. We read the entire system state, verify the request against the arrays, and—if a morph is triggered—update the entire map in a single atomic operation, touching exactly one document.

That simplicity adds up fast when you’re defending against a multi-threaded brute-force attack in real time.

And then there's the schema flexibility thing. Midway through development, we realized we needed to track X-Inference-Latency to monitor how much delay the AI was adding to the gateway. In MongoDB, we simply added the field to our Python class and started writing. Existing documents in the ai_decisions collection didn't break; they just returned null until their next update. No migration scripts, no ALTER TABLE locks on a live security gateway, and zero downtime. That happened three or four times as we refined our Reinforcement Learning reward function. Each time: zero overhead.

The Repository Layer: Python-Mongo Synergy
Because we leveraged Motor (Async MongoDB driver for Python) alongside FastAPI, the repository layer for Neuro-Morph remained exceptionally lean. There is no complex Object-Relational Mapping (ORM) overhead or "annotation soup". Instead, we use simple Python dictionaries and Pydantic models that map directly to MongoDB documents. It reads almost like pseudocode, which made the high-speed gateway logic much easier to reason about during a cyberattack.

The AI Engine: Proximal Policy Optimization (PPO)
For autonomous defense, we chose PPO (Proximal Policy Optimization) from the Stable-Baselines3 library. The engine runs as a dedicated service that the FastAPI gateway queries to determine the next "Morph" action.

The intuition behind PPO is mathematically elegant: it ensures the defense agent learns an optimal policy without making "catastrophic" updates that could accidentally lock out legitimate users. In the context of AMTD, this is vital. The system measures how effectively a mutation disrupts an attacker's reconnaissance, and that feedback becomes the reward that trains the brain. For cybersecurity, this is the perfect fit—security is an outlier-detection game where the system must learn to isolate malicious patterns from a sea of normal traffic.

The Six Features We Feed It
We don't pass raw logs to the agent. We engineer a State Vector consisting of six key security features first:

Request Velocity: Measuring hits per second.

Honeypot Delta: Recent triggers on lure endpoints.

Auth Failure Spike: Detecting brute-force signatures.

IP Entropy: Calculating the diversity of source origins.

Path Uniqueness: Identifying attempts to access sensitive internal routes.

Current Defense State: The system's active morph depth.

The raw output from the PPO model is normalized to a 0–1 scale. A score above 0.65 triggers a LIGHT_MORPH, while a score above 0.85 initiates an AGGRESSIVE_MORPH.

The Fallback: Adaptive Resilience
One thing we were deliberate about is that the AI inference service is a separate process. If the AI engine stalls or the model service hangs, we didn't want the whole gateway to fail. So, inside the FastAPI backend, we built a Heuristic Rule Engine as a fallback:

When the AI call fails, the backend catches the exception and routes through this instead. The system degrades gracefully rather than going down. We’d rather have a slightly less "intelligent" defense than a broken gateway.

The Simulation Engine
We built a simulation engine that injects four types of attack patterns on demand:

The Crawler: Methodical scanning of all API endpoints.

The Brute: Rapid-fire authentication attempts.

The Ghost: Attempting to use "Stale" routes after a morph.

Combined Surge: A multi-vector attack to overwhelm the gateway.

Every simulated attack runs through the exact same pipeline as a real one. The AI scores it, MongoDB stores it, and the Infrastructure Twin updates. Seeing the system detect a combined surge in real-time was far more convincing than static logs. Demos matter.

The Dashboard: Real-Time SOC
The React frontend polls the Security Operations Center (SOC) summary endpoint. A single API call returns the total attack event count, active morph status, and threat levels. For the detailed view, we pull all ai_decisions where the threat level has pushed the system into aggressive defensive states—showing exactly where the Infrastructure Twin has drifted from its secure baseline. It’s live, and watching the threat score climb after a simulated attack is oddly satisfying.

What We Actually Learned
The biggest shift was thinking about infrastructure as documents rather than static rows. Once you make that switch, the Moving Target Defense concept clicks into place. A system’s attack surface is a coherent thing—you want to read it whole, rotate it whole, and mutate it as a unit.

The schema flexibility of MongoDB was a lifesaver mid-project when we needed to add X-Inference-Latency tracking. We weren't writing migration scripts; we were building features. If you're building any system involving real-time scoring or autonomous modeling, the document model is essential.

What's Next
Aggregation Pipelines: Replacing polling with MongoDB Change Streams for real-time time-series threat trends.

Vector Defense: Exploring Atlas Vector Search to identify semantic similarities in past attack payloads.

Automated Retraining: A pipeline that pulls fresh MongoDB data to update the PPO agent automatically.

Special Thanks
A huge thank you to our mentor @chanda_rajkumar at KL University for the guidance, the critical feedback, and for pushing us to think more carefully about the AMTD architecture at every stage. This project is significantly better because of that involvement

Resources
GitHub Repository: https://github.com/N1hal-tech/Neuro-Morph
AI Framework (Stable-Baselines3): stable-baselines3.readthedocs.io
The core library used for implementing the Proximal Policy Optimization (PPO) agent.

Infrastructure (FastAPI): fastapi.tiangolo.com
The high-performance, asynchronous web framework powering the Neuro-Morph Gateway.

Database (MongoDB Atlas): mongodb.com/atlas
Used for high-velocity document storage of State Vectors and Infrastructure Twins.

Training Environment (Gymnasium): gymnasium.farama.org
The standard API for reinforcement learning environments used to train our defense agent.

Security Research: nist.gov (Moving Target Defense)