Nmap Development mailing list archives

Re: dev Digest, Vol 142, Issue 33


From: Akash Das <akash210197 () gmail com>
Date: Mon, 30 Jan 2017 21:39:23 +0530

@Steven Shiau, the problem is in the usage. You are using it in a wrong way.
The correct way to use the script with -e option is like the following :-

nmap -d -e <interface_name> --script broadcast-dhcp-discover

and the out put will be like this :-

Starting Nmap 7.40SVN ( https://nmap.org ) at 2017-01-30 21:33 IST
Warning: File ./nmap-services exists, but Nmap is using
/usr/local/bin/../share/nmap/nmap-services for security and consistency
reasons.  set NMAPDIR=. to give priority to files in your local directory
(may affect the other data files too).
PORTS: Using top 1000 ports found open (TCP:1000, UDP:0, SCTP:0)
--------------- Timing report ---------------
  hostgroups: min 1, max 100000
  rtt-timeouts: init 1000, min 100, max 10000
  max-scan-delay: TCP 1000, UDP 1000, SCTP 1000
  parallelism: min 0, max 0
  max-retries: 10, host-timeout: 0
  min-rate: 0, max-rate: 0
---------------------------------------------
NSE: Using Lua 5.3.
NSE: Arguments from CLI:
NSE: Loaded 1 scripts for scanning.
NSE: Script Pre-scanning.
NSE: Starting runlevel 1 (of 1) scan.
Initiating NSE at 21:33
NSE: Starting broadcast-dhcp-discover.
NSE: Finished broadcast-dhcp-discover.
NSE: Finished broadcast-dhcp-discover.
Completed NSE at 21:33, 0.05s elapsed
Pre-scan script results:
| broadcast-dhcp-discover:
|   Response 1 of 1:
|     IP Offered: 10.0.4.252
|     DHCP Message Type: DHCPOFFER
|     Server Identifier: 10.0.4.1
|     IP Address Lease Time: 5m00s
|     Subnet Mask: 255.255.254.0
|     Router: 10.0.4.1
|     Domain Name Server: 10.0.1.2, 8.8.8.8, 8.8.4.4
|     Broadcast Address: 10.0.5.255
|_    NetBIOS Node Type: 8
NSE: Script Post-scanning.
NSE: Starting runlevel 1 (of 1) scan.
Initiating NSE at 21:33
Completed NSE at 21:33, 0.00s elapsed
Read from /usr/local/bin/../share/nmap: nmap-services.
WARNING: No targets were specified, so 0 hosts scanned.
Nmap done: 0 IP addresses (0 hosts up) scanned in 0.72 seconds

you can also use it without the -e argument, it will work fine.


  <https://mailtrack.io/>Sent with Mailtrack
<https://mailtrack.io/install?source=signature&lang=en&referral=akash210197 () gmail com&idSignature=22>

On Mon, Jan 30, 2017 at 1:30 AM, <dev-request () nmap org> wrote:

Send dev mailing list submissions to
        dev () nmap org

To subscribe or unsubscribe via the World Wide Web, visit
        https://nmap.org/mailman/listinfo/dev
or, via email, send a message with subject or body 'help' to
        dev-request () nmap org

You can reach the person managing the list at
        dev-owner () nmap org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of dev digest..."


Today's Topics:

   1. Nmap 7.40 broadcast-dhcp-discover issue (Steven Shiau)


----------------------------------------------------------------------

Message: 1
Date: Sun, 29 Jan 2017 19:01:15 +0800
From: Steven Shiau <steven () nchc org tw>
To: dev () nmap org
Subject: Nmap 7.40 broadcast-dhcp-discover issue
Message-ID: <57f3640f-a59a-1c15-76ee-952feeea5ace () nchc org tw>
Content-Type: text/plain; charset=utf-8

Dear Nmap developers,

I am using Nmap to detect DHCP service. However, there is an issue so it
detects no DHCP service, but actually the service exists on my LAN. The
testing environment is on Debian Sid with nmap version 7.40.
# dpkg -l nmap
Desired=Unknown/Install/Remove/Purge/Hold
|
Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/
trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                   Version          Architecture     Description
+++-======================-================-================
-=================================================
ii  nmap                   7.40-1           amd64            The Network
Mapper

I have a macvlan virtual network device device "macvlan0" :

~# ip -d link show macvlan0
5: macvlan0@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc
noqueue state UP mode DEFAULT group default qlen 1000
    link/ether 02:f7:d9:5e:6d:34 brd ff:ff:ff:ff:ff:ff promiscuity 0

    macvlan mode bridge addrgenmode eui64 numtxqueues 1 numrxqueues 1
gso_max_size 65536 gso_max_segs 65535

Then run nmap and it gives the results:
~# nmap -d --script broadcast-dhcp-discover -e macvlan0
===================================
Starting Nmap 7.40 ( https://nmap.org ) at 2017-01-29 17:34 CST
PORTS: Using top 1000 ports found open (TCP:1000, UDP:0, SCTP:0)
--------------- Timing report ---------------
  hostgroups: min 1, max 100000
  rtt-timeouts: init 1000, min 100, max 10000
  max-scan-delay: TCP 1000, UDP 1000, SCTP 1000
  parallelism: min 0, max 0
  max-retries: 10, host-timeout: 0
  min-rate: 0, max-rate: 0
---------------------------------------------
NSE: Using Lua 5.3.
NSE: Arguments from CLI:
NSE: Loaded 1 scripts for scanning.
NSE: Script Pre-scanning.
NSE: Starting runlevel 1 (of 1) scan.
Initiating NSE at 17:34
NSE: Starting broadcast-dhcp-discover.
NSE: broadcast-dhcp-discover threw an error!
/usr/bin/../share/nmap/nselib/stdnse.lua:87: bad argument #2 to 'format'
(number expected, got nil)
stack traceback:
        [C]: in function 'string.format'
        /usr/bin/../share/nmap/nselib/stdnse.lua:87: in function
'stdnse.debug'
        (...tail calls...)
        /usr/bin/../share/nmap/nselib/dhcp.lua:525: in function
'dhcp.dhcp_parse'
        /usr/bin/../share/nmap/scripts/broadcast-dhcp-discover.nse:132:
in function </usr/bin/../share/nmap/scripts/broadcast-dhcp-
discover.nse:113>

NSE: Finished broadcast-dhcp-discover.
Completed NSE at 17:34, 1.03s elapsed
NSE: Script Post-scanning.
NSE: Starting runlevel 1 (of 1) scan.
Initiating NSE at 17:34
Completed NSE at 17:34, 0.00s elapsed
Read from /usr/bin/../share/nmap: nmap-services.
WARNING: No targets were specified, so 0 hosts scanned.
Nmap done: 0 IP addresses (0 hosts up) scanned in 1.34 seconds
           Raw packets sent: 0 (0B) | Rcvd: 0 (0B)
===================================

This issue also exists on Nmap 7.31, but not on Nmap 7.12.
Please let me know if you need more info.
Thanks.

Steven

--
Steven Shiau <steven _at_ stevenshiau org>
Public Key Server PGP Key ID: 4096R/47CF935C
Fingerprint: 0240 1FEB 695D 7112 62F0  8796 11C1 12DA 47CF 935C



------------------------------

Subject: Digest Footer

_______________________________________________
dev mailing list
dev () nmap org
https://nmap.org/mailman/listinfo/dev


------------------------------

End of dev Digest, Vol 142, Issue 33
************************************




-- 

*Akash Das*

*Student Systems admin*

*Indian Institute Of Information Technology*
*Sricity*
_______________________________________________
Sent through the dev mailing list
https://nmap.org/mailman/listinfo/dev
Archived at http://seclists.org/nmap-dev/

Current thread: