Junos® OS Intrusion Detection and Prevention User Guide Copyright © 2021 Juniper Networks, Inc
Total Page:16
File Type:pdf, Size:1020Kb
Junos® OS Intrusion Detection and Prevention User Guide Published 2021-09-21 ii Juniper Networks, Inc. 1133 Innovation Way Sunnyvale, California 94089 USA 408-745-2000 www.juniper.net Juniper Networks, the Juniper Networks logo, Juniper, and Junos are registered trademarks of Juniper Networks, Inc. in the United States and other countries. All other trademarks, service marks, registered marks, or registered service marks are the property of their respective owners. Juniper Networks assumes no responsibility for any inaccuracies in this document. Juniper Networks reserves the right to change, modify, transfer, or otherwise revise this publication without notice. Junos® OS Intrusion Detection and Prevention User Guide Copyright © 2021 Juniper Networks, Inc. All rights reserved. The information in this document is current as of the date on the title page. YEAR 2000 NOTICE Juniper Networks hardware and software products are Year 2000 compliant. Junos OS has no known time-related limitations through the year 2038. However, the NTP application is known to have some difficulty in the year 2036. END USER LICENSE AGREEMENT The Juniper Networks product that is the subject of this technical documentation consists of (or is intended for use with) Juniper Networks software. Use of such software is subject to the terms and conditions of the End User License Agreement ("EULA") posted at https://support.juniper.net/support/eula/. By downloading, installing or using such software, you agree to the terms and conditions of that EULA. iii Table of Contents About This Guide | xxvi 1 Overview Intrusion Detection and Prevention Overview | 2 Understanding Intrusion Detection and Prevention | 2 2 Downloading and Updating the IDP Signature Database IDP Signature Database Overview | 5 Understanding the IDP Signature Database | 5 Updating the IDP Signature Database Overview | 7 Downloading the Junos OS IDP Signature Package through an Explicit Proxy Server Overview | 8 Example: Updating the Signature Database Automatically | 9 Requirements | 9 Overview | 9 Configuration | 9 Verification | 10 Updating the IDP Signature Database Manually Overview | 11 Example: Updating the IDP Signature Database Manually | 11 Requirements | 12 Overview | 12 Configuration | 12 Verification | 16 Example: Downloading and Installing the IDP Security Packages in Chassis Cluster Mode | 17 Requirements | 17 Overview | 17 Downloading and Installing the IDP Signature Database | 18 Downloading the Junos OS IDP Signature Package through an Explicit Proxy Server | 20 Requirements | 22 Overview | 22 iv Verification | 23 Understanding the IDP Signature Database Version | 25 Verifying the IDP Signature Database Version | 25 Understanding Snort IPS Signatures | 26 IDP Basic Configuration | 28 Download and Install IDP Licenses | 29 Checking Your Connection to the Update Server | 29 Download IDP Signature Package | 30 Install IDP Signature Package | 30 Download and install IDP Policy Templates | 31 Applying the Recommended IDP Policy | 32 Deactivate the Commit Script File | 34 Enabling IDP in a Security Policy | 34 IDP Signature Language Enhancements | 36 Understanding Signature Language Constructs | 36 3 Configuring IDP Policies IDP Policies | 46 IDP Policies Overview | 46 Understanding IDP Policy Support for Unified Policies | 48 Understanding Multiple IDP Policies for Unified Policies | 49 IDP Policy Selection for Unified Policies | 50 Example: Configuring Multiple IDP Policies and a Default IDP Policy for Unified Security Policies | 54 Requirements | 55 Overview | 55 Configuration | 56 Verification | 59 Example: Enabling IDP in a Traditional Security Policy | 60 v Requirements | 61 Overview | 61 Configuration | 62 Verification | 65 Verifying the IDP Policy Compilation and Load Status | 66 Predefined IDP Policy Templates | 70 Understanding Predefined IDP Policy Templates | 70 Downloading and Using Predefined IDP Policy Templates (CLI Procedure) | 73 IDP Policy Rules and IDP Rule Bases | 74 Understanding IDP Policy Rule Bases | 75 Understanding IDP Policy Rules | 75 Example: Inserting a Rule in the IDP Rulebase | 86 Requirements | 86 Overview | 86 Configuration | 86 Verification | 87 Example: Deactivating and Activating Rules in an IDP Rulebase | 87 Requirements | 87 Overview | 88 Configuration | 88 Verification | 89 Understanding IDP Application-Level DDoS Rulebases | 89 Understanding IDP IPS Rulebases | 90 Example: Defining Rules for an IDP IPS RuleBase | 91 Requirements | 91 Overview | 92 Configuration | 92 Verification | 95 Understanding IDP Exempt Rulebases | 96 Example: Defining Rules for an IDP Exempt Rulebase | 97 vi Requirements | 97 Overview | 97 Configuration | 98 Verification | 100 Understanding IDP Terminal Rules | 101 Example: Setting Terminal Rules in Rulebases | 101 Requirements | 102 Overview | 102 Configuration | 102 Verification | 105 Understanding DSCP Rules in IDP Policies | 105 Example: Configuring DSCP Rules in an IDP Policy | 106 Requirements | 106 Overview | 106 Configuration | 107 Verification | 109 Attack Objects and Object Groups for IDP Policies | 110 Understanding Our Approach to Addressing Known and Unknown Vulnerabilities | 112 Testing a Custom Attack Object | 113 Creating a Signature Attack Object | 114 Understanding Predefined IDP Attack Objects and Object Groups | 130 Understanding Custom Attack Objects | 132 Creating a Compound Attack Object | 150 Modifying Custom Attack Objects Due to Changes Introduced in Signature Update | 153 Example: Configuring Compound or Chain Attacks | 157 Requirements | 158 Overview | 158 Configuration | 158 Verification | 165 Example: Configuring Attack Groups with Dynamic Attack Groups and Custom Attack Groups | 166 vii Requirements | 166 Overview | 167 Configuration | 167 Verification | 175 Custom Attack Object DFA Expressions | 176 Example: Using Pattern Negation | 179 Example: Matching File Extensions | 179 Example: Apache Tomcat Denial-of-Service Attacks | 180 Listing IDP Test Conditions for a Specific Protocol | 181 Understanding IDP Protocol Decoders | 182 Example: UNIX CDE/dtlogin Vulnerability | 183 Example: Detecting a Worm | 185 Example: Compound Signature to Detect Exploitation of an HTTP Vulnerability | 186 Example: Using Time Binding Parameters to Detect a Brute Force Attack | 189 Reference: Custom Attack Object Protocol Numbers | 190 Reference: Nonprintable and Printable ASCII Characters | 199 Example: Configuring IDP Protocol Decoders | 217 Requirements | 217 Overview | 218 Configuration | 218 Verification | 219 Understanding Multiple IDP Detector Support | 219 Understanding Content Decompression | 220 Example: Configuring IDP Content Decompression | 220 Requirements | 221 Overview | 221 Configuration | 221 Verification | 222 Understanding IDP Signature-Based Attacks | 222 viii Example: Configuring IDP Signature-Based Attacks | 224 Requirements | 224 Overview | 224 Configuration | 225 Verification | 228 Understanding IDP Protocol Anomaly-Based Attacks | 228 Example: Configuring IDP Protocol Anomaly-Based Attacks | 229 Requirements | 229 Overview | 229 Configuration | 230 Verification | 232 IDP Policy Configuration Overview | 232 IPv6 Covert Channels Overview | 233 Applications and Application Sets for IDP Policies | 234 Understanding IDP Application Sets | 235 Example: Configuring IDP Applications Sets | 235 Requirements | 236 Overview | 236 Configuration | 236 Verification | 238 Example: Configuring IDP Applications and Services | 239 Requirements | 239 Overview | 240 Configuration | 240 Verification | 242 4 Understanding Custom Attacks Objects Service Contexts Understanding IDP Custom Attack Objects Service Contexts | 245 Network Protocol Contexts | 251 Service Contexts: BGP | 252 Service Contexts: DHCP | 255 ix Service Contexts: DNS | 256 Service Contexts: IKE | 264 Service Contexts: Modbus | 265 Service Contexts: MSRPC | 266 Service Contexts: NetBIOS | 269 Service Contexts: NTP | 271 Service Contexts: SNMP | 273 Database Contexts | 277 Service Contexts: MS-SQL | 277 Service Contexts: MYSQL | 282 Web Protocol Contexts | 286 Service Contexts: HTTP | 286 Service Contexts: SSL | 304 Email Contexts | 312 Service Contexts: IMAP | 313 Service Contexts: PoP3 | 321 Service Contexts: SMTP | 328 Remote Access Contexts | 336 Service Contexts: SSH | 336 Service Contexts: Telnet | 337 Service Contexts: VNC | 339 Identity and Access Contexts | 341 Service Contexts: LDAP | 341 Service Contexts: Radius | 353 File Transfer Contexts | 361 Service Contexts: FTP | 361 Service Contexts: NFS | 369 x Service Contexts: SMB | 371 Service Contexts: TFTP | 387 Voice-over-IP Contexts | 389 Service Contexts: H225 | 389 Service Contexts: MGCP | 393 Service Contexts: SIP | 395 Legacy Contexts | 401 Service Contexts: AIM | 401 Service Contexts: Finger | 405 Service Contexts: Gnutella | 406 Service Contexts: Gopher | 407 Service Contexts: IEC | 408 Service Contexts: IRC | 409 Service Contexts: LPR | 412 Service Contexts: MSN | 412 Service Contexts: NNTP | 415 Service Contexts: REXEC | 417 Service Contexts: RLOGIN | 417 Service Contexts: RSH | 418 Service Contexts: RUSERS | 419 Service Contexts: TNS | 420 Service Contexts: YMSG | 424 5 Configuring IDP Features IDP Application Identification | 432 Understanding IDP Application Identification | 432 Understanding IDP Service and Application Bindings by Attack Objects | 434 xi Understanding IDP Application Identification for Nested Applications | 436 Example: Configuring IDP Policies for Application Identification | 437 Requirements | 437 Overview | 437 Configuration | 437 Verification