Nmap
Nmap Agent Setup for Scan Open Ports

Nmap Command

Using {{domain}} ReconNess replace {{domain}} for the subdomain.
1
nmap -T4 {{domain}}
Copied!
This Agent run in each subdomain.

Nmap Script

1
using ReconNess.Core.Models;
2
3
if (lineInputCount < 5)
4
{
5
return new ScriptOutput();
6
}
7
8
var match = System.Text.RegularExpressions.Regex.Match(lineInput, @"(.*?)\/tcp\s*open\s*(.*?)quot;);
9
if (match.Success && match.Groups.Count == 3)
10
{
11
var scriptOutput = new ScriptOutput { Service = match.Groups[2].Value, Port = int.Parse(match.Groups[1].Value), IsAlive = true };
12
if (scriptOutput.Service == "http" || scriptOutput.Service == "https")
13
{
14
scriptOutput.HasHttpOpen = true;
15
}
16
17
return scriptOutput;
18
}
19
20
return new ScriptOutput();
Copied!
Check the Readme on GitHub to know more about the Script.

Nmap Dockerfile Entry

1
# -------- Agents dependencies --------
2
3
# To allow run nmap inside the docker
4
5
RUN apt-get update && apt-get install -y nmap
6
7
# -------- End Agents dependencies --------
Copied!
Last modified 1yr ago