ARP Sweep Local Network Discovery - Metasploit


This page contains detailed information about how to use the auxiliary/scanner/discovery/arp_sweep metasploit module. For list of all metasploit modules, visit the Metasploit Module Library.

Module Overview


Name: ARP Sweep Local Network Discovery
Module: auxiliary/scanner/discovery/arp_sweep
Source code: modules/auxiliary/scanner/discovery/arp_sweep.rb
Disclosure date: -
Last modification time: 2017-10-31 04:53:14 +0000
Supported architecture(s): -
Supported platform(s): -
Target service / protocol: -
Target network port(s): -
List of CVEs: -

Enumerate alive Hosts in local network using ARP requests.

Module Ranking and Traits


Module Ranking:

  • normal: The exploit is otherwise reliable, but depends on a specific version and can't (or doesn't) reliably autodetect. More information about ranking can be found here.

Basic Usage


This module is a scanner module, and is capable of testing against multiple hosts.

msf > use auxiliary/scanner/discovery/arp_sweep
msf auxiliary(arp_sweep) > show options
    ... show and set options ...
msf auxiliary(arp_sweep) > set RHOSTS ip-range
msf auxiliary(arp_sweep) > exploit

Other examples of setting the RHOSTS option:

Example 1:

msf auxiliary(arp_sweep) > set RHOSTS 192.168.1.3-192.168.1.200 

Example 2:

msf auxiliary(arp_sweep) > set RHOSTS 192.168.1.1/24

Example 3:

msf auxiliary(arp_sweep) > set RHOSTS file:/tmp/ip_list.txt

Required Options


  • RHOSTS: The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'

Knowledge Base


Vulnerable Application


ARP (the Address Resolution Protocol) is a companion protocol to IPv4. Its purpose is to resolve internet layer addresses (as IPv4) of stations on the local network to their corresponding link layer addresses (for example, Ethernet).

(As a side note, in IPv6 this task is assolved by the Neighbour Discovery protocol.)

The discovery is limited to the broadcast domain of the local network; so you cannot discover hosts that aren't directly connected to your LAN.

Target Devices


All the devices on a network should reply to ARP requests for communication and duplicate address detection, so usually every device should be discoverable.

Verification Steps


Here we suppose the local network is 192.168.0.0/24:

  1. Start msfconsole
  2. Do use auxiliary/scanner/discovery/arp_sweep
  3. Set the RHOSTS according to your local network. For example, on a 192.168.0.0/24 network: set rhosts 192.168.0.0/24
  4. Do run

Scenarios


An example output on a home network:

    msf > use auxiliary/scanner/discovery/arp_sweep
    msf auxiliary(arp_sweep) > set RHOSTS 192.168.0.0/24
    RHOSTS => 192.168.0.0/24
    msf auxiliary(arp_sweep) > run

    [*] 192.168.0.1 appears to be up (D-Link International).
    [*] 192.168.0.2 appears to be up (UNKNOWN).
    [*] 192.168.0.4 appears to be up (ASUSTek COMPUTER INC.).
    [*] Scanned 256 of 256 hosts (100% complete)
    [*] Auxiliary module execution completed

Confirming using NMAP


The -PR flags are utilized to perform ARP/Neighbor Discovery scans.

    nmap -n -sn -PR 192.168.0.0/24

    Starting Nmap 7.40 ( https://nmap.org ) at 2017-05-19 00:33 CEST
    Nmap scan report for 192.168.0.1
    Host is up (0.041s latency).
    MAC Address: CC:B2:55:14:CO:FE (D-Link International)
    Nmap scan report for 192.168.0.4
    Host is up (0.076s latency).
    MAC Address: C8:85:50:4C:BE:EF (ASUSTek COMPUTER INC.)
    Host is up (0.052s latency).
    Nmap done: 256 IP addresses (2 hosts up) scanned in 2.76 seconds

Go back to menu.

Msfconsole Usage


Here is how the scanner/discovery/arp_sweep auxiliary module looks in the msfconsole:

msf6 > use auxiliary/scanner/discovery/arp_sweep

msf6 auxiliary(scanner/discovery/arp_sweep) > show info

       Name: ARP Sweep Local Network Discovery
     Module: auxiliary/scanner/discovery/arp_sweep
    License: Metasploit Framework License (BSD)
       Rank: Normal

Provided by:
  belch

Check supported:
  No

Basic options:
  Name       Current Setting  Required  Description
  ----       ---------------  --------  -----------
  INTERFACE                   no        The name of the interface
  RHOSTS                      yes       The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
  SHOST                       no        Source IP Address
  SMAC                        no        Source MAC Address
  THREADS    1                yes       The number of concurrent threads (max one per host)
  TIMEOUT    5                yes       The number of seconds to wait for new data

Description:
  Enumerate alive Hosts in local network using ARP requests.

Module Options


This is a complete list of options available in the scanner/discovery/arp_sweep auxiliary module:

msf6 auxiliary(scanner/discovery/arp_sweep) > show options

Module options (auxiliary/scanner/discovery/arp_sweep):

   Name       Current Setting  Required  Description
   ----       ---------------  --------  -----------
   INTERFACE                   no        The name of the interface
   RHOSTS                      yes       The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
   SHOST                       no        Source IP Address
   SMAC                        no        Source MAC Address
   THREADS    1                yes       The number of concurrent threads (max one per host)
   TIMEOUT    5                yes       The number of seconds to wait for new data

Advanced Options


Here is a complete list of advanced options supported by the scanner/discovery/arp_sweep auxiliary module:

msf6 auxiliary(scanner/discovery/arp_sweep) > show advanced

Module advanced options (auxiliary/scanner/discovery/arp_sweep):

   Name                 Current Setting  Required  Description
   ----                 ---------------  --------  -----------
   ShowProgress         true             yes       Display progress messages during a scan
   ShowProgressPercent  10               yes       The interval in percent that progress should be shown
   VERBOSE              false            no        Enable detailed status messages
   WORKSPACE                             no        Specify the workspace for this module

Auxiliary Actions


This is a list of all auxiliary actions that the scanner/discovery/arp_sweep module can do:

msf6 auxiliary(scanner/discovery/arp_sweep) > show actions

Auxiliary actions:

   Name  Description
   ----  -----------

Evasion Options


Here is the full list of possible evasion options supported by the scanner/discovery/arp_sweep auxiliary module in order to evade defenses (e.g. Antivirus, EDR, Firewall, NIDS etc.):

msf6 auxiliary(scanner/discovery/arp_sweep) > show evasion

Module evasion options:

   Name  Current Setting  Required  Description
   ----  ---------------  --------  -----------

Go back to menu.

Error Messages


This module may fail with the following error messages:

Check for the possible causes from the code snippets below found in the module source code. This can often times help in identifying the root cause of the problem.

WARNING : NetworkInterface is not up-to-date, some functionality will not be available


Here is a relevant code snippet related to the "WARNING : NetworkInterface is not up-to-date, some functionality will not be available" error message:

37:	  def run_batch(hosts)
38:	    open_pcap({'SNAPLEN' => 68, 'FILTER' => "arp[6:2] == 0x0002"})
39:	
40:	    @netifaces = true
41:	    if not netifaces_implemented?
42:	      print_error("WARNING : NetworkInterface is not up-to-date, some functionality will not be available")
43:	      @netifaces = false
44:	    end
45:	
46:	    @interface = datastore['INTERFACE'] || Pcap.lookupdev
47:	    shost = datastore['SHOST']

Go back to menu.


Go back to menu.

See Also


Check also the following modules related to this module:

Authors


belch

Version


This page has been produced using Metasploit Framework version 6.1.24-dev. For more modules, visit the Metasploit Module Library.

Go back to menu.