DEV Community

Cover image for How I automated recon with LLMs + nmap?
gu1lh3rm3_x
gu1lh3rm3_x

Posted on

How I automated recon with LLMs + nmap?

Since diving into CTFs more seriously, I found myself stuck in the same loop:
πŸ” Run Nmap
πŸ“„ Read the results
πŸ€– Ask GPT for insights

One day I thought:
"Why not automate this?"
What if I could create a tool that runs Nmap in the background and feeds the output directly into an AI agent?

That was the spark. I started chatting with GPT to figure out how to approach it. My goal wasn’t to reinvent Nmap β€” I wanted to build on top of it, keeping all its power intact.

I chose Python to build the CLI, keeping things simple. The flow looked like this:

  • Run Nmap with some default parameters

  • Parse the results and organize them into a clean table

  • Send a prompt with context to an LLM (I used Gemini because it's free πŸ˜„)

  • Make an API call to Vulners to look up known vulnerabilities

  • Add a final touch: some ASCII art for fun 🎨

And that was it β€” I ended up with a tool that pulls recon data, enriches it with external sources, and asks an AI to help me interpret it.

It was a super fun project, and I learned a lot by building it from scratch.

πŸš€ Curious? Check it out at the link below!

Top comments (0)