Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add nuclei plugin #212

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ RUN wget -q -O - https://archive.kali.org/archive-key.asc | apt-key add -
RUN echo "deb http://http.kali.org/kali kali-rolling main contrib non-free" >> /etc/apt/sources.list
RUN apt-get update

RUN apt-get install -y python3 python3-pip git seclists curl dnsrecon enum4linux feroxbuster gobuster impacket-scripts nbtscan nikto nmap onesixtyone oscanner redis-tools smbclient smbmap snmp sslscan sipvicious tnscmd10g whatweb wkhtmltopdf
RUN apt-get install -y python3 python3-pip git seclists curl dnsrecon enum4linux feroxbuster gobuster impacket-scripts nbtscan nikto nmap nuclei onesixtyone oscanner redis-tools smbclient smbmap snmp sslscan sipvicious tnscmd10g whatweb wkhtmltopdf
RUN python3 -m pip install git+https://github.com/Tib3rius/AutoRecon.git


Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ impacket-scripts
nbtscan
nikto
nmap
nuclei
onesixtyone
oscanner
redis-tools
Expand All @@ -88,7 +89,7 @@ wkhtmltopdf
On Kali Linux, you can ensure these are all installed using the following commands:

```bash
sudo apt install seclists curl dnsrecon enum4linux feroxbuster gobuster impacket-scripts nbtscan nikto nmap onesixtyone oscanner redis-tools smbclient smbmap snmp sslscan sipvicious tnscmd10g whatweb wkhtmltopdf
sudo apt install seclists curl dnsrecon enum4linux feroxbuster gobuster impacket-scripts nbtscan nikto nmap nuclei onesixtyone oscanner redis-tools smbclient smbmap snmp sslscan sipvicious tnscmd10g whatweb wkhtmltopdf
```

### Installation Method #1: pipx (Recommended)
Expand Down
36 changes: 36 additions & 0 deletions autorecon/default-plugins/nuclei.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
from autorecon.plugins import ServiceScan
from shutil import which


class Nuclei(ServiceScan):
def __init__(self):
super().__init__()
self.name = "nuclei"
self.tags = ["default", "safe", "long"]

self.cmd = 'nuclei -disable-update-check -no-color -target {address}:{port} -scan-all-ips -o "{scandir}/{protocol}_{port}_nuclei.txt"'

def configure(self):
self.match_all_service_names(True)
self.add_pattern(
r"(.*\[(critical|high)\].*)",
description="Nuclei {match2} finding: {match1}",
)

def check(self):
if which("nuclei") is None:
self.error(
"The program nuclei could not be found. Make sure it is installed. (On Kali, run: sudo apt install nuclei)"
)
return False

async def run(self, service):
if service.target.ipversion == "IPv4":
await service.execute(self.cmd)

def manual(self, service, plugin_was_run):
if service.target.ipversion == "IPv4" and not plugin_was_run:
service.add_manual_command(
f"({self.name}) Fast and customizable vulnerability scanner based on simple YAML based DSL:",
self.cmd,
)