Advertisement
Guest User

snortconfig

a guest
Jul 18th, 2014
462
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.45 KB | None | 0 0
  1. ###################################################
  2. # Step #1: Set the network variables. For more information, see README.variables
  3. ###################################################
  4.  
  5. # Setup the network addresses you are protecting
  6. ipvar HOME_NET any
  7.  
  8. # Set up the external network addresses. Leave as "any" in most situations
  9. ipvar EXTERNAL_NET any
  10.  
  11. # List of DNS servers on your network
  12. ipvar DNS_SERVERS $HOME_NET
  13.  
  14. # List of SMTP servers on your network
  15. ipvar SMTP_SERVERS $HOME_NET
  16.  
  17. # List of web servers on your network
  18. ipvar HTTP_SERVERS $HOME_NET
  19.  
  20. # List of sql servers on your network
  21. ipvar SQL_SERVERS $HOME_NET
  22.  
  23. # List of telnet servers on your network
  24. ipvar TELNET_SERVERS $HOME_NET
  25.  
  26. # List of ssh servers on your network
  27. ipvar SSH_SERVERS $HOME_NET
  28.  
  29. # List of ftp servers on your network
  30. ipvar FTP_SERVERS $HOME_NET
  31.  
  32. # List of sip servers on your network
  33. ipvar SIP_SERVERS $HOME_NET
  34.  
  35. # List of ports you run web servers on
  36. portvar HTTP_PORTS [36,80,81,82,83,84,85,86,87,88,89,90,311,383,555,591,593,631,801,808,818,901,972,1158,1220,1414,1533,1741,1830,2231,2301,2381,2809,3029,3037,3057,3128,3443,3702,4000,4343,4848,5117,5250,6080,6173,6988,7000,7001,7071,7144,7145,7510,7770,7777,7779,8000,8008,8014,8028,8080,8081,8082,8085,8088,8090,8118,8123,8180,8181,8222,8243,8280,8300,8500,8509,8800,8888,8899,9000,9060,9080,9090,9091,9111,9443,9999,10000,11371,12601,15489,29991,33300,34412,34443,34444,41080,44449,50000,50002,51423,53331,55252,55555,56712]
  37.  
  38. # List of ports you want to look for SHELLCODE on.
  39. portvar SHELLCODE_PORTS !80
  40. # List of ports you might see oracle attacks on
  41. portvar ORACLE_PORTS 1024:
  42.  
  43. # List of ports you want to look for SSH connections on:
  44. portvar SSH_PORTS 22
  45.  
  46. # List of ports you run ftp servers on
  47. portvar FTP_PORTS [21,2100,3535]
  48.  
  49. # List of ports you run SIP servers on
  50. portvar SIP_PORTS [5060,5061,5600]
  51.  
  52. # List of file data ports for file inspection
  53. portvar FILE_DATA_PORTS [$HTTP_PORTS,110,143]
  54.  
  55. # List of GTP ports for GTP preprocessor
  56. portvar GTP_PORTS [2123,2152,3386]
  57.  
  58. # other variables, these should not be modified
  59. ipvar AIM_SERVERS [64.12.24.0/23,64.12.28.0/23,64.12.161.0/24,64.12.163.0/24,64.12.200.0/24,205.188.3.0/24,205.188.5.0/24,205.188.7.0/24,205.188.9.0/24,205.188.153.0/24,205.188.179.0/24,205.188.248.0/24]
  60.  
  61. # Path to your rules files (this can be a relative path)
  62. # Note for Windows users: You are advised to make this an absolute path,
  63. # such as: c:\snort\rules
  64. var RULE_PATH ../rules
  65. var SO_RULE_PATH ../so_rules
  66. var PREPROC_RULE_PATH ../preproc_rules
  67.  
  68. # If you are using reputation preprocessor set these
  69. var WHITE_LIST_PATH ../rules
  70. var BLACK_LIST_PATH ../rules
  71.  
  72. ###################################################
  73. # Step #2: Configure the decoder. For more information, see README.decode
  74. ###################################################
  75.  
  76. # Stop generic decode events:
  77. config disable_decode_alerts
  78.  
  79. # Stop Alerts on experimental TCP options
  80. config disable_tcpopt_experimental_alerts
  81.  
  82. # Stop Alerts on obsolete TCP options
  83. config disable_tcpopt_obsolete_alerts
  84.  
  85. # Stop Alerts on T/TCP alerts
  86. config disable_tcpopt_ttcp_alerts
  87.  
  88. # Stop Alerts on all other TCPOption type events:
  89. config disable_tcpopt_alerts
  90. # Stop Alerts on invalid ip options
  91. config disable_ipopt_alerts
  92.  
  93. # Alert if value in length field (IP, TCP, UDP) is greater th elength of the packet
  94. # config enable_decode_oversized_alerts
  95.  
  96. # Same as above, but drop packet if in Inline mode (requires enable_decode_oversized_alerts)
  97. # config enable_decode_oversized_drops
  98.  
  99. # Configure IP / TCP checksum mode
  100. config checksum_mode: all
  101.  
  102. # Configure maximum number of flowbit references. For more information, see README.flowbits
  103. # config flowbits_size: 64
  104.  
  105. # Configure ports to ignore
  106. # config ignore_ports: tcp 21 6667:6671 1356
  107. # config ignore_ports: udp 1:17 53
  108.  
  109.  
  110. # Configure active response for non inline operation. For more information, see REAMDE.active
  111. # config response: eth0 attempts 2
  112.  
  113. # Configure DAQ related options for inline operation. For more information, see README.daq
  114. #
  115. # config daq: <type>
  116. # config daq_dir: <dir>
  117. # config daq_mode: <mode>
  118. # config daq_var: <var>
  119. #
  120. # <type> ::= pcap | afpacket | dump | nfq | ipq | ipfw
  121. # <mode> ::= read-file | passive | inline
  122. # <var> ::= arbitrary <name>=<value passed to DAQ
  123. # <dir> ::= path as to where to look for DAQ module so's
  124.  
  125. # Configure specific UID and GID to run snort as after dropping privs. For more information see snort -h command line options
  126. #
  127. # config set_gid:
  128. # config set_uid:
  129.  
  130. # Configure default snaplen. Snort defaults to MTU of in use interface. For more information see README
  131. #
  132. # config snaplen:
  133. #
  134.  
  135. # Configure default bpf_file to use for filtering what traffic reaches snort. For more information see snort -h command line options (-F)
  136. #
  137. # config bpf_file:
  138. #
  139.  
  140. # Configure default log directory for snort to log to. For more information see snort -h command line options (-l)
  141. #
  142. # config logdir:
  143.  
  144.  
  145. ###################################################
  146. # Step #3: Configure the base detection engine. For more information, see README.decode
  147. ###################################################
  148.  
  149. # Configure PCRE match limitations
  150. config pcre_match_limit: 3500
  151. config pcre_match_limit_recursion: 1500
  152.  
  153. # Configure the detection engine See the Snort Manual, Configuring Snort - Includes - Config
  154. config detection: search-method ac-split search-optimize max-pattern-len 20
  155.  
  156. # Configure the event queue. For more information, see README.event_queue
  157. config event_queue: max_queue 8 log 5 order_events content_length
  158.  
  159. ###################################################
  160. ## Configure GTP if it is to be used.
  161. ## For more information, see README.GTP
  162. ####################################################
  163.  
  164. # config enable_gtp
  165.  
  166. ###################################################
  167. # Per packet and rule latency enforcement
  168. # For more information see README.ppm
  169. ###################################################
  170.  
  171. # Per Packet latency configuration
  172. #config ppm: max-pkt-time 250, \
  173. # fastpath-expensive-packets, \
  174. # pkt-log
  175.  
  176. # Per Rule latency configuration
  177. #config ppm: max-rule-time 200, \
  178. # threshold 3, \
  179. # suspend-expensive-rules, \
  180. # suspend-timeout 20, \
  181. # rule-log alert
  182.  
  183. ###################################################
  184. # Configure Perf Profiling for debugging
  185. # For more information see README.PerfProfiling
  186. ###################################################
  187.  
  188. config profile_rules: print all, sort avg_ticks
  189. config profile_preprocs: print all, sort avg_ticks
  190.  
  191. ###################################################
  192. # Configure protocol aware flushing
  193. # For more information see README.stream5
  194. config paf_max: 16000
  195.  
  196. ###################################################
  197. # Step #4: Configure dynamic loaded libraries.
  198. # For more information, see Snort Manual, Configuring Snort - Dynamic Modules
  199. ###################################################
  200.  
  201. # path to dynamic preprocessor libraries
  202. #dynamicpreprocessor directory /usr/local/lib/snort_dynamicpreprocessor/
  203.  
  204. # path to base preprocessor engine
  205. #dynamicengine /usr/local/lib/snort_dynamicengine/libsf_engine.so
  206.  
  207. # path to dynamic rules libraries
  208. #dynamicdetection directory /usr/local/lib/snort_dynamicrules
  209.  
  210. ###################################################
  211. # Step #5: Configure preprocessors
  212. # For more information, see the Snort Manual, Configuring Snort - Preprocessors
  213. ###################################################
  214.  
  215. # GTP Control Channle Preprocessor. For more information, see README.GTP
  216. # preprocessor gtp: ports { 2123 3386 2152 }
  217.  
  218. # Inline packet normalization. For more information, see README.normalize
  219. # Does nothing in IDS mode
  220. preprocessor normalize_ip4
  221. preprocessor normalize_tcp: ips ecn stream
  222. preprocessor normalize_icmp4
  223. #preprocessor normalize_ip6
  224. #preprocessor normalize_icmp6
  225.  
  226. # Target-based IP defragmentation. For more inforation, see README.frag3
  227. preprocessor frag3_global: max_frags 65536
  228. preprocessor frag3_engine: policy windows detect_anomalies overlap_limit 10 min_fragment_length 100 timeout 180
  229.  
  230. # Target-Based stateful inspection/stream reassembly. For more inforation, see README.stream5
  231. preprocessor stream5_global: track_tcp yes, \
  232. track_udp yes, \
  233. track_icmp no, \
  234. max_tcp 262144, \
  235. max_udp 131072, \
  236. max_active_responses 2, \
  237. min_response_seconds 5
  238. preprocessor stream5_tcp: policy windows, detect_anomalies, require_3whs 180, \
  239. overlap_limit 10, small_segments 3 bytes 150, timeout 180, \
  240. ports client 21 22 23 25 42 53 70 79 109 110 111 113 119 135 136 137 139 143 \
  241. 161 445 513 514 587 593 691 1433 1521 1741 2100 3306 6070 6665 6666 6667 6668 6669 \
  242. 7000 8181 32770 32771 32772 32773 32774 32775 32776 32777 32778 32779, \
  243.  
  244. ports both 36 80 81 82 83 84 85 86 87 88 89 90 110 311 383 443 465 563 555 591 593 631 636 801 808 818 901 972 989 992 993 994 995 1158 1220 1414 1533 1741 1830 2231 2301 2381 2809 3029 3037 3057 3128 3443 3702 4000 4343 4848 5117 5250 6080 6173 6988 7907 7000 7001 7071 7144 7145 7510 7802 7770 7777 7779 \
  245. 7801 7900 7901 7902 7903 7904 7905 7906 7908 7909 7910 7911 7912 7913 7914 7915 7916 \
  246. 7917 7918 7919 7920 8000 8008 8014 8028 8080 8081 8082 8085 8088 8090 8118 8123 8180 8181 8222 8243 8280 8300 8500 8509 8800 8888 8899 9000 9060 9080 9090 9091 9111 9443 9999 10000 11371 12601 15489 29991 33300 34412 34443 34444 41080 44449 50000 50002 51423 53331 55252 55555 56712
  247. preprocessor stream5_udp: timeout 180
  248.  
  249. # performance statistics. For more information, see the Snort Manual, Configuring Snort - Preprocessors - Performance Monitor
  250. #preprocessor perfmonitor: time 300 file /var/snort/snort.stats pktcnt 10000
  251.  
  252. # HTTP normalization and anomaly detection. For more information, see README.http_inspect
  253. preprocessor http_inspect: global iis_unicode_map unicode.map 1252 compress_depth 65535 decompress_depth 65535
  254.  
  255. preprocessor http_inspect_server: server default \
  256. http_methods { GET POST PUT SEARCH MKCOL COPY MOVE LOCK UNLOCK NOTIFY POLL BCOPY BDELETE BMOVE LINK UNLINK OPTIONS HEAD DELETE TRACE TRACK CONNECT SOURCE SUBSCRIBE UNSUBSCRIBE PROPFIND PROPPATCH BPROPFIND BPROPPATCH RPC_CONNECT PROXY_SUCCESS BITS_POST CCM_POST SMS_POST RPC_IN_DATA RPC_OUT_DATA RPC_ECHO_DATA } \
  257. chunk_length 500000 \
  258. server_flow_depth 10 \
  259. client_flow_depth 10 \
  260. post_depth 65495 \
  261. oversize_dir_length 500 \
  262. max_header_length 750 \
  263. max_headers 100 \
  264. max_spaces 200 \
  265. small_chunk_length { 10 5 } \
  266. ports { 36 80 81 82 83 84 85 86 87 88 89 90 311 383 555 591 593 631 801 808 818 901 972 1158 1220 1414 1741 1830 2231 2301 2381 2809 3029 3037 3057 3128 3443 3702 4000 4343 4848 5117 5250 6080 6173 6988 7000 7001 7071 7144 7145 7510 7770 7777 7779 8000 8008 8014 8028 8080 8081 8082 8085 8088 8090 8118 8123 8180 8181 8222 8243 8280 8300 8500 8509 8800 8888 8899 9000 9060 9080 9090 9091 9111 9443 9999 10000 11371 12601 15489 29991 33300 34412 34443 34444 41080 44449 50000 50002 51423 53331 55252 55555 56712 } \
  267. normalize_headers \
  268. # non_rfc_char { 0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 } \
  269. # enable_cookie \
  270. extended_response_inspection \
  271. inspect_gzip \
  272. normalize_utf \
  273. unlimited_decompress \
  274. normalize_javascript \
  275. apache_whitespace no \
  276. ascii no \
  277. bare_byte no \
  278. directory no \
  279. double_decode no \
  280. iis_backslash no \
  281. iis_delimiter no \
  282. iis_unicode no \
  283. multi_slash no \
  284. utf_8 no \
  285. u_encode yes \
  286. webroot no
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement