Skip to content

Nmap '-e' switch not always use the specyfied interface. #2122

@cloudziu

Description

@cloudziu

Hello everyone

The case

Topology:

+--------------------------+   ETH0
|                          |   NETWORKS 192.168.X.X/16  (NO 10.X.X.X/8 CIDR)
|  HOST A   +----+         +--+
|           |nmap+---------------->
|           +----+         +--+
|                          |
|                          |
|                          |
|                          |
|                          |
|                          |    ETH1
|                          +--+ NETWORKS 10.1.93.X/24
|                          |  |
|                          +--+
+--------------------------+

From host A I want to regularly scan for addresses within every private CIDR at eth0, by using nmap -e param.

  • 10.0.0.0/8
  • 172.16.0.0/16
  • 192.168.0.0/16

BUT not the hosts from eth1
To ensure that this is working correctly, I intentionally configured a script that will search for CIDR from eth1 ( 10.1.93.0/24 ), but enforce nmap to use eth0. It is executed every 10 minutes.
nmap command:

sudo nmap -sT -O -T4 --script smb-os-discovery.nse --dns-servers 192.168.2.1 -e eth0 -oX - 10.1.93.0/24

Script was running for last two weeks. Every nmap result showed

Total: 256
Up: 0
Down: 256 

except one... That perfectly scanned endpoints from "eth0"

The worst part is that I have no idea what caused it. I was searching for something abnormal in Linux logs, and found nothing.
I can't reproduce this in any way. Can ARP generated by nmap somehow ignore the -e param ?

thank you in advance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions