When an NTP client or server is enabled within the [edit system ntp] hierarchy level of the Junos configuration, REQ_MON_GETLIST and REQ_MON_GETLIST_1 control messages supported by the monlist feature within NTP may allow remote attackers to cause a denial of service. NTP is not enabled in Junos by default. Once NTP is enabled, an attacker can exploit these control messages in two different ways:
[edit system ntp]
host-inbound-traffic
protocol ntp
Response to monlist control messages has been disabled by default. The following software releases have been updated to resolve this specific issue: Junos OS 11.4R12, 12.1R10, 12.1X44-D35, 12.1X45-D25, 12.1X46-D15, 12.1X47-D10, 12.2R8, 12.3R7, 13.1R4-S2, 13.2R4, 13.3R2, 14.1R1, and all subsequent releases (i.e. all releases built after 14.1R1). This issue is being tracked as PR 931184 and is visible on the Customer Support website. KB16765 [juniper.net] - "In which releases are vulnerabilities fixed?" describes which release vulnerabilities are fixed as per our End of Engineering and End of Life support policies.
If a possible attack has been identified, or if the NTP process is occupying a large amount of CPU or memory resources, the most effective mitigation is to apply a firewall filter to allow only trusted addresses and networks, plus the router's loopback address, access to the NTP service on the device, rejecting all other requests. For example:
term allow-ntp { from { source-address { <trusted-addresses>; <router-loopback-address>; } protocol udp; port ntp; } then accept; } term block-ntp { from { protocol udp; port ntp; } then { discard; } }
show ntp
User@Router> show ntp status localhost: timed out, nothing received ***Request timed out
log
discard
term block-ntp { from { protocol udp; port ntp; } then { log; discard; } }
term allow-ntp { from { source-address { <trusted-addresses>; <router-loopback-address>; } protocol udp; port ntp; } then { log; accept; } }
port
source-port
destination-port
term allow_ntp_1 { from { source-address { <trusted-addresses>; <router-loopback-address>; } protocol udp; source-port ntp; } then accept; } term allow_ntp_2 { from { source-address { <trusted-addresses>; <router-loopback-address>; } protocol udp; destination-port ntp; } then accept; } term block_ntp_1 { from { protocol udp; destination-port ntp; } then { discard; } } term block_ntp_2 { from { protocol udp; source-port ntp; } then { discard; } } term default { then accept; }
2014-07-09: Initial publication 2021-04-09: Corrected EX Series example