ReconnAI

ReconnAI is a python framework that integrates AI with the Reconnaissance phase of Penetration Testing.
It was developed for my University Dissertation entitled:

'Integrating Artificial Intelligence and CyberSecurity:
A Comprehensive Exploration of Automated Vulnerability Analysis and Penetration Testing.'

Welcome to ReconnAI

Use Penetration Testing tools, with AI on your shoulder! Comes out the box with a selection of poplular and useful tools ready to be spun up. NMAP, Masscan, SQLMap, Recon-NG, Nikto - All in the CLI! Flexible enough to reliably run ANY binary from CLI, integration with user supplied binaries

AI Integration

ReconnAI utilises the OpenAI GPT API. Takes a modular approach to allowing the user to run their scans without interruption, until the scan comes to a close, then the results are piped in to be analysed by GPT, in the aim to present any findings and give relevant details to how to approach an attack.

The AI generation is obliged to assess:
- Host Info
- Services
- Vulnerabilities
- Public exploits / PoC's available
- Mitigations of risk

Development

Development of ReconnAI has primarily been Python3 focussed. During development, i realised there were a number of external dependencies that would be required. As a method to automating this for the user, i developed a bash script that will be prompted to run on launch of tool to check existence of dependencies, and install those that aren't met.

During the initial stages of development, the idea was to utilise the pre-defined tools with their respective API's. However, due to a lack of available and useful API's for ALL tools used, i took the path of subprocess calls to execute the binaries directly. Despite this meaning users have to have the tool installed, it allowed me to use a 'catch-all' approach rather than using both API's & subprocessing.

Interesting Features

As this has been a huge passion project for me, there are some features i decided to add for my own educational benefit, improving user experience, or just for fun.

- Output results to styled HTML page:

I was getting tired of wasting the beautiful styling in the terminal from the rich python library, so decided to add a condition to add some simple styling to any .html exports created. Always keeping the user experience in mind ;)

- Q&A Tool:

I'm a big fan of learning, and learning is a big part of Cyber Security. I thought it would be a well taken addition if i could add some oppurtunity to expand your knowledge in the tool.

The Q&A tool can be found in the main menu, named AI Assistant. Will have a context driven conversation with you for as long as you'd like.

Context parameters are set to Cyber Security focussed Q&A, but can also take questions and give answers to anything you'd like. Have fun :)

- Bring your own binary:

This idea was a very late stage implementation, mainly a lightbulb idea for quick testing of the ai responses when doing some prompt engineering. Which turned to me realising how flexible it makes the tool

With the use of this feature, you can run any binary as if it were a new shell. From 'ip a' to spinning up a docker. The potential of this i haven't been able to comprehensively test, however it seems faultless in my small testing so far

May be useful for more experienced Pen Testers, i certaintly found it nice to be able to just punch in my CLA's as if it were a regular shell. But now with AI!

- Cleanup:

Digital garbage remover.

With enough use, you'll find that the tool can produce quite a few log files of each scan saved. This feature is here to give the user an intuitive way to get rid of what they don't want

Specifically searches for log-style files, will ommit anything that shouldn't be deleted.

Exclusion method - The user chooses the file they DON'T want deleted, rather than vice versa.