Vihaan Jain
← Work

AI agents for cyber attack and threat analysis

Organization
Johns Hopkins APL
Role
ASPIRE intern, cyber-physical systems
When
Summer 2026
Tools
Langflow, Python, SSH, Kali Linux, Raspberry Pi, Nmap, Hydra, Metasploit

A lot of cyber work still means an analyst running attacks by hand, then reading through system logs to piece together what happened. Over the summer, Emmanuel Osei, Josiah Wheeler and I automated both halves with AI agents.

We built an isolated cyber range: two Kali Linux machines to attack from and two Raspberry Pis to attack. First we ran the attacks manually with Nmap, Hydra, SSH and Metasploit to set a baseline. Then we built the agents in Langflow. The attack agent takes a request in plain English, picks the tool and runs it. On defense, a logging agent pulls logs off the targets over SSH and an analysis agent classifies what it finds. I wrote the custom Python tools and SSH capabilities that let the agents run commands on real machines instead of a simulation.

Across 20 runs, the analyzer caught 90% of attacks, and we cut a full run from 135 seconds to 23. We were one of 40 teams, out of 92, selected for APL's in-person ASPIRE showcase, and presented to more than 200 APL engineers and community members.

The next step is countermeasures for what the analyzer detects, and a single workflow that runs offense and defense together. For the school year I've joined APL's electronic warfare group, where I work on radio frequency machine learning. That work stays at APL.

MeasureResult
Attacks caught, 20 runs90%
Time for one full run135 s → 23 s
Teams selected for the showcase40 of 92
Vihaan Jain standing next to the team's poster at the ASPIRE showcase
At the ASPIRE showcase, Johns Hopkins APL, summer 2026.
Poster: Leveraging Agentic AI for Cyber Attack Execution and Threat Analysis
The poster. Approved for public release; the cracked test credentials in Fig. 1 are blurred here.
The attack agent in Langflow, wired to a Hydra tool and a command-execution tool
The attack agent. It picks a tool and runs it from a Kali machine.
Table of attack types the analysis agent identified in the logs
Attacks the analysis agent picked out of the target's logs.
The defensive pipeline in Langflow: an SSH tool, a logging agent and an analysis agent
Defense. The logging agent pulls logs over SSH and hands them to the analysis agent.
NextHow often LLMs misread government contracts →