Forge Cisco DTP Packets - Metasploit


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

Module Overview


Name: Forge Cisco DTP Packets
Module: auxiliary/spoof/cisco/dtp
Source code: modules/auxiliary/spoof/cisco/dtp.rb
Disclosure date: -
Last modification time: 2020-05-12 22:15:21 +0000
Supported architecture(s): -
Supported platform(s): -
Target service / protocol: -
Target network port(s): -
List of CVEs: -

This module forges DTP packets to initialize a trunk port.

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


msf > use auxiliary/spoof/cisco/dtp
msf auxiliary(dtp) > show targets
    ... a list of targets ...
msf auxiliary(dtp) > set TARGET target-id
msf auxiliary(dtp) > show options
    ... show and set options ...
msf auxiliary(dtp) > exploit

Go back to menu.

Msfconsole Usage


Here is how the spoof/cisco/dtp auxiliary module looks in the msfconsole:

msf6 > use auxiliary/spoof/cisco/dtp

msf6 auxiliary(spoof/cisco/dtp) > show info

       Name: Forge Cisco DTP Packets
     Module: auxiliary/spoof/cisco/dtp
    License: Metasploit Framework License (BSD)
       Rank: Normal

Provided by:
  Spencer McIntyre

Available actions:
  Name     Description
  ----     -----------
  Service  Run DTP forging service

Check supported:
  No

Basic options:
  Name       Current Setting  Required  Description
  ----       ---------------  --------  -----------
  FILTER                      no        The filter string for capturing traffic
  INTERFACE                   no        The name of the interface
  SMAC                        no        The spoofed mac (if unset, derived from netifaces)
  SNAPLEN    65535            yes       The number of bytes to capture
  TIMEOUT    500              yes       The number of seconds to wait for new data

Description:
  This module forges DTP packets to initialize a trunk port.

Module Options


This is a complete list of options available in the spoof/cisco/dtp auxiliary module:

msf6 auxiliary(spoof/cisco/dtp) > show options

Module options (auxiliary/spoof/cisco/dtp):

   Name       Current Setting  Required  Description
   ----       ---------------  --------  -----------
   FILTER                      no        The filter string for capturing traffic
   INTERFACE                   no        The name of the interface
   SMAC                        no        The spoofed mac (if unset, derived from netifaces)
   SNAPLEN    65535            yes       The number of bytes to capture
   TIMEOUT    500              yes       The number of seconds to wait for new data

Auxiliary action:

   Name     Description
   ----     -----------
   Service  Run DTP forging service

Advanced Options


Here is a complete list of advanced options supported by the spoof/cisco/dtp auxiliary module:

msf6 auxiliary(spoof/cisco/dtp) > show advanced

Module advanced options (auxiliary/spoof/cisco/dtp):

   Name                Current Setting  Required  Description
   ----                ---------------  --------  -----------
   GATEWAY_PROBE_HOST  8.8.8.8          yes       Send a TTL=1 random UDP datagram to this host to discover the default gateway's MAC
   GATEWAY_PROBE_PORT                   no        The port on GATEWAY_PROBE_HOST to send a random UDP probe to (random if 0 or unset)
   SECRET              1297303073       yes       A 32-bit cookie for probe requests.
   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 spoof/cisco/dtp module can do:

msf6 auxiliary(spoof/cisco/dtp) > show actions

Auxiliary actions:

   Name     Description
   ----     -----------
   Service  Run DTP forging service

Evasion Options


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

msf6 auxiliary(spoof/cisco/dtp) > 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.

Must specify SMAC or INTERFACE


Here is a relevant code snippet related to the "Must specify SMAC or INTERFACE" error message:

29:	  end
30:	
31:	  def setup
32:	    super
33:	    unless datastore['SMAC'] || datastore['INTERFACE']
34:	      raise ArgumentError, 'Must specify SMAC or INTERFACE'
35:	    end
36:	  end
37:	
38:	  def build_dtp_frame
39:	    p = PacketFu::EthPacket.new

Source MAC (SMAC) should be defined


Here is a relevant code snippet related to the "Source MAC (SMAC) should be defined" error message:

60:	    return @spoof_mac
61:	  end
62:	
63:	  def run
64:	    unless smac()
65:	      print_error 'Source MAC (SMAC) should be defined'
66:	    else
67:	      unless is_mac? smac
68:	        print_error "Source MAC (SMAC) `#{smac}' is badly formatted."
69:	      else
70:	        print_status "Starting DTP spoofing service..."

Source MAC (SMAC) `<SMAC>' is badly formatted.


Here is a relevant code snippet related to the "Source MAC (SMAC) `<SMAC>' is badly formatted." error message:

63:	  def run
64:	    unless smac()
65:	      print_error 'Source MAC (SMAC) should be defined'
66:	    else
67:	      unless is_mac? smac
68:	        print_error "Source MAC (SMAC) `#{smac}' is badly formatted."
69:	      else
70:	        print_status "Starting DTP spoofing service..."
71:	        open_pcap({'FILTER' => "ether host 01:00:0c:cc:cc:cc"})
72:	        interface = datastore['INTERFACE'] || Pcap.lookupdev
73:	        dtp = build_dtp_frame()

Go back to menu.


Go back to menu.

See Also


Check also the following modules related to this module:

Authors


  • Spencer McIntyre

Version


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

Go back to menu.