Skip to content

Commit

Permalink
fix(nmap): resolve -sS tcp syn stealth issue (#376)
Browse files Browse the repository at this point in the history
  • Loading branch information
ocervell committed May 3, 2024
1 parent 0c63c02 commit a3efc65
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion secator/tasks/nmap.py
Expand Up @@ -51,7 +51,8 @@ class nmap(VulnMulti):

# Nmap opts
PORTS: '-p',
'output_path': '-oX'
'output_path': '-oX',
'tcp_syn_stealth': '-sS'
}
opt_value_map = {
PORTS: lambda x: ','.join([str(p) for p in x]) if isinstance(x, list) else x
Expand All @@ -73,6 +74,10 @@ def on_init(self):
output_path = f'{self.reports_folder}/.outputs/{self.unique_name}.xml'
self.output_path = output_path
self.cmd += f' -oX {self.output_path}'
tcp_syn_stealth = self.get_opt_value('tcp_syn_stealth')
if tcp_syn_stealth:
self.cmd = f'sudo {self.cmd}'
self.cmd = self.cmd.replace('-sT', '')

def yielder(self):
yield from super().yielder()
Expand Down

0 comments on commit a3efc65

Please sign in to comment.