Links

Nmap

Nmap Agent Setup for Scan Open Ports

Nmap Command

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

Nmap Script

using ReconNess.Core.Models;
if (lineInputCount < 5)
{
return new ScriptOutput();
}
var match = System.Text.RegularExpressions.Regex.Match(lineInput, @"(.*?)\/tcp\s*open\s*(.*?)$");
if (match.Success && match.Groups.Count == 3)
{
var scriptOutput = new ScriptOutput { Service = match.Groups[2].Value, Port = int.Parse(match.Groups[1].Value), IsAlive = true };
if (scriptOutput.Service == "http" || scriptOutput.Service == "https")
{
scriptOutput.HasHttpOpen = true;
}
return scriptOutput;
}
return new ScriptOutput();
Check the Readme on GitHub to know more about the Script.

Nmap Dockerfile Entry

# -------- Agents dependencies --------
# To allow run nmap inside the docker
RUN apt-get update && apt-get install -y nmap
# -------- End Agents dependencies --------