NTP Reflection/Amplification DDoS in the wild

  • Rebel Alliance Developer Netgate

    There is a DDoS going around that uses the NTP "monlist" command as a vector for a reflection/amplification type attack. An attacker can send a small query (ntpdc –n –c monlist x.x.x.x) and get back a ton of data. Spoof the source, and voila, people flood your target for you. We have received reports from customers that automated scans have been running and sending e-mails notifying administrators they have vulnerable NTP daemons.

    More info here:

    If you have appropriate WAN rules to stop the Internet from reaching your firewall's NTP server, then good news, you have nothing to do. However, if you have opened your NTP service up on purpose or if you have overly permissive rules (e.g. "allow all on WAN") and you don't want to change them, you can apply the following fix to change the behavior of the NTP daemon so it will no longer respond to the monlist command:


    That change may be applied using the System Patches package.

  • LAYER 8 Global Moderator

    Great info thanks!!

    So I would think people that participate in pool.ntp could be really open to this.. Now I run my ntp on a box behind pfsense that is member of pool vs using my pfsense.  Well for one pfsense is a VM.. and doesn't keep the greatest of time ;)

    But this info still very useful so thanks!!

    So example before got this

    C:\NTP>ntpdc -n -c monlist
    remote address          port local address      count m ver rstr avgint  lstint            123          43 3 4    190    205      7            123        2456 3 4    190    131      19          1024        117 3 4    190    68      29
    <snipped>LONG LIST!!!  LONG!!!

    now get this
    C:\NTP>ntpdc -n -c monlist
    ***Server reports data not found

    After editing my ntp.conf with
    disable monitor

    But then wait - I want to be able to see this.. So I just modified my default restrict to prevent ntpdc queries from internet, just added noquery – internet has no need to query my ntp.. But from my local network I do.. That should of been in there from get go.. just lazy ;)

    Now get from outside my network

    ntpdc -n -c monlist publicIP
    publicIP: timed out, nothing received
    ***Request timed out

    So thanks for bringing to attention - have googled ntp monitor and yup seeing lots of good reading info ;)</snipped>

  • I decided to look into this after reading this article:

    For those of us using pfSense and probably shouldn't be (i.e. it is way over our heads).

    1. log into your PFSense box.
    2. select "Diagnostics/Edit File"
    3. Browse to "etc/inc/system.inc"
    4. find the line:
          $ntpcfg .= "enable monitor\n";
    5. change to:
          $ntpcfg .= "disable monitor\n";
    6. save
    7. Diagnostics/reboot

  • Is there a solution to this? I edited the system.inc and added the disable monitor to the ntp.conf and that does seem to fix this issue

    C:\Windows\system32>ntpdc -n -c monlist a.b.c.d
    a.b.c.d: timed out, nothing received
    ***Request timed out

    but this still gets a response

    C:\Windows\system32>ntpq -c rv a.b.c.d
    associd=0 status=c011 leap_alarm, sync_unspec, 1 event, freq_not_set,
    version="ntpd 4.2.6p5@1.2349-o Wed Jul 24 14:36:48 UTC 2013 (1)",
    processor="i386", system="FreeBSD/8.3-RELEASE-p11", leap=11, stratum=16,
    precision=-20, rootdelay=0.000, rootdisp=0.075, refid=INIT,
    reftime=00000000.00000000  Thu, Feb  7 2036  1:28:16.000,
    clock=d6a6d2fc.07b21e61  Thu, Feb 13 2014  0:13:32.030, peer=0, tc=3,
    mintc=3, offset=0.000, frequency=0.000, sys_jitter=0.000,
    clk_jitter=0.001, clk_wander=0.000

    which according to http://openntpproject.org/ means my pfsense NTP server can be used in an attack… so what gives? I do run a public NTP server

  • LAYER 8 Global Moderator

    I would suggest you just edit to not allow query from the internet, and only allow it via your localhost or local network via your restrict command.  This is better than no monitor, since if your running a public server you might want to check that list out ;)

    So just set noquery in your ntp conf

    noquery – "Do not allow this host/subnet to query your ntpd status." The ntpd status query features provided by ntpq/ntpdc will reveal some information about the system running ntpd (e.g. OS version, ntpd version) that you many not wish others to know. You need to decide if concealing this information is more important than the possible benefits of allowing your clients to see synchronization information about your ntpd.

  • reading this


    gave me some suggestions… so I tried adding this... so lets see how this goes...

    $ntpcfg .= "disable monitor\n";
    $ntpcfg .= "discard minimum 10\n";
    $ntpcfg .= "restrict default kod nomodify notrap nopeer noquery\n";
    $ntpcfg .= "restrict -6 default kod nomodify notrap nopeer noquery\n";
    $ntpcfg .= "restrict\n";
    $ntpcfg .= "restrict -6 ::1\n";

Log in to reply