ubuntu - snort 2.9.7.0 unable to load rule from local.conf while in test mode -
ubuntu - snort 2.9.7.0 unable to load rule from local.conf while in test mode -
i next 'snort 2.9.6.2 on ubuntu 12 lts , 14 lts' guide run snort in nids mode on ubuntu 12.04.
https://s3.amazonaws.com/snort-org-site/production/document_files/files/000/000/050/original/snort_2.9.6.2_on_ubuntu.pdf?awsaccesskeyid=akiaixacied2spmsc7ga&expires=1415002618&signature=ifhemzwyl%2bb1pulrndhcb7dkgtk%3d
to test snort, created simple rule cause snort generate alert whenever snort sees icmp \echo request" or \echo reply" messages. wrote next line empty /etc/snort/rules/local.conf:
alert icmp whatever -> $home_net (msg:"icmp test"; sid:10000001; rev:001;)
now tested configuration file 1 time again has not loaded rule local.conf. typed next command:
sudo snort -t -c /etc/snort/snort.conf
i should have got next output:
+-------------------[rule port counts]--------------------------------------- | tcp udp icmp ip | src 0 0 0 0 | dst 0 0 0 0 | 0 0 1 0 | nc 0 0 1 0 | s+d 0 0 0 0 +----------------------------------------------------------------------------
but instead got next output on terminal.both fields still 0.
running in test mode --== initializing snort ==-- initializing output plugins! initializing preprocessors! initializing plug-ins! parsing rules file "/etc/snort/snort.conf" portvar 'http_ports' defined : [ 80:81 311 383 591 593 901 1220 1414 1741 1830 2301 2381 2809 3037 3128 3702 4343 4848 5250 6988 7000:7001 7144:7145 7510 7777 7779 8000 8008 8014 8028 8080 8085 8088 8090 8118 8123 8180:8181 8243 8280 8300 8800 8888 8899 9000 9060 9080 9090:9091 9443 9999 11371 34443:34444 41080 50002 55555 ] portvar 'shellcode_ports' defined : [ 0:79 81:65535 ] portvar 'oracle_ports' defined : [ 1024:65535 ] portvar 'ssh_ports' defined : [ 22 ] portvar 'ftp_ports' defined : [ 21 2100 3535 ] portvar 'sip_ports' defined : [ 5060:5061 5600 ] portvar 'file_data_ports' defined : [ 80:81 110 143 311 383 591 593 901 1220 1414 1741 1830 2301 2381 2809 3037 3128 3702 4343 4848 5250 6988 7000:7001 7144:7145 7510 7777 7779 8000 8008 8014 8028 8080 8085 8088 8090 8118 8123 8180:8181 8243 8280 8300 8800 8888 8899 9000 9060 9080 9090:9091 9443 9999 11371 34443:34444 41080 50002 55555 ] portvar 'gtp_ports' defined : [ 2123 2152 3386 ] detection: search-method = ac-full-q split any/any grouping = enabled search-method-optimizations = enabled maximum pattern length = 20 tagged packet limit: 256 loading dynamic engine /usr/local/lib/snort_dynamicengine/libsf_engine.so... done loading dynamic detection libs /usr/local/lib/snort_dynamicrules... warning: no dynamic libraries found in directory /usr/local/lib/snort_dynamicrules. finished loading dynamic detection libs /usr/local/lib/snort_dynamicrules loading dynamic preprocessor libs /usr/local/lib/snort_dynamicpreprocessor/... loading dynamic preprocessor library /usr/local/lib/snort_dynamicpreprocessor//libsf_modbus_preproc.so... done loading dynamic preprocessor library /usr/local/lib/snort_dynamicpreprocessor//libsf_dce2_preproc.so... done loading dynamic preprocessor library /usr/local/lib/snort_dynamicpreprocessor//libsf_ssh_preproc.so... done loading dynamic preprocessor library /usr/local/lib/snort_dynamicpreprocessor//libsf_dns_preproc.so... done loading dynamic preprocessor library /usr/local/lib/snort_dynamicpreprocessor//libsf_gtp_preproc.so... done loading dynamic preprocessor library /usr/local/lib/snort_dynamicpreprocessor//libsf_ssl_preproc.so... done loading dynamic preprocessor library /usr/local/lib/snort_dynamicpreprocessor//libsf_smtp_preproc.so... done loading dynamic preprocessor library /usr/local/lib/snort_dynamicpreprocessor//libsf_dnp3_preproc.so... done loading dynamic preprocessor library /usr/local/lib/snort_dynamicpreprocessor//libsf_sdf_preproc.so... done loading dynamic preprocessor library /usr/local/lib/snort_dynamicpreprocessor//libsf_reputation_preproc.so... done loading dynamic preprocessor library /usr/local/lib/snort_dynamicpreprocessor//libsf_pop_preproc.so... done loading dynamic preprocessor library /usr/local/lib/snort_dynamicpreprocessor//libsf_imap_preproc.so... done loading dynamic preprocessor library /usr/local/lib/snort_dynamicpreprocessor//libsf_sip_preproc.so... done loading dynamic preprocessor library /usr/local/lib/snort_dynamicpreprocessor//libsf_ftptelnet_preproc.so... done finished loading dynamic preprocessor libs /usr/local/lib/snort_dynamicpreprocessor/ log directory = /var/log/snort warning: ip4 normalizations disabled because not inline. warning: tcp normalizations disabled because not inline. warning: icmp4 normalizations disabled because not inline. warning: ip6 normalizations disabled because not inline. warning: icmp6 normalizations disabled because not inline. frag3 global config: max frags: 65536 fragment memory cap: 4194304 bytes frag3 engine config: bound address: default target-based policy: windows fragment timeout: 180 seconds fragment min_ttl: 1 fragment anomalies: alert overlap limit: 10 min fragment length: 100 max expected streams: 768 stream global config: track tcp sessions: active max tcp sessions: 262144 tcp cache pruning timeout: 30 seconds tcp cache nominal timeout: 3600 seconds memcap (for reassembly packet storage): 8388608 track udp sessions: active max udp sessions: 131072 udp cache pruning timeout: 30 seconds udp cache nominal timeout: 180 seconds track icmp sessions: inactive track ip sessions: inactive log info if session memory consumption exceeds 1048576 send 2 active responses wait @ to the lowest degree 5 seconds between responses protocol aware flushing: active maximum flush point: 16000 stream tcp policy config: bound address: default reassembly policy: windows timeout: 180 seconds limit on tcp overlaps: 10 maximum number of bytes queue per session: 1048576 maximum number of segs queue per session: 2621 options: require 3-way handshake: yes 3-way handshake timeout: 180 observe anomalies: yes reassembly ports: 21 client (footprint) 22 client (footprint) 23 client (footprint) 25 client (footprint) 42 client (footprint) 53 client (footprint) 79 client (footprint) 80 client (footprint) server (footprint) 81 client (footprint) server (footprint) 109 client (footprint) 110 client (footprint) 111 client (footprint) 113 client (footprint) 119 client (footprint) 135 client (footprint) 136 client (footprint) 137 client (footprint) 139 client (footprint) 143 client (footprint) 161 client (footprint) additional ports configured not printed. stream udp policy config: timeout: 180 seconds httpinspect config: global config observe proxy usage: no iis unicode map filename: /etc/snort/unicode.map iis unicode map codepage: 1252 memcap used logging uri , hostname: 150994944 max gzip memory: 838860 max gzip sessions: 2723 gzip compress depth: 65535 gzip decompress depth: 65535 default server config: server profile: ports (paf): 80 81 311 383 591 593 901 1220 1414 1741 1830 2301 2381 2809 3037 3128 3702 4343 4848 5250 6988 7000 7001 7144 7145 7510 7777 7779 8000 8008 8014 8028 8080 8085 8088 8090 8118 8123 8180 8181 8243 8280 8300 8800 8888 8899 9000 9060 9080 9090 9091 9443 9999 11371 34443 34444 41080 50002 55555 server flow depth: 0 client flow depth: 0 max chunk length: 500000 little chunk length evasion: chunk size <= 10, threshold >= 5 times max header field length: 750 max number header fields: 100 max number of whitespaces allowed header folding: 200 inspect pipeline requests: yes uri discovery strict mode: no allow proxy usage: no disable alerting: no oversize dir length: 500 inspect uri: no normalize http headers: no inspect http cookies: yes inspect http responses: yes extract gzip responses: yes decompress response files: unlimited decompression of gzip info responses: yes normalize javascripts in http responses: yes max number of whitespaces allowed javascript obfuscation in http responses: 200 normalize http cookies: no enable xff , true client ip: no log http uri data: no log http hostname data: no extended ascii code back upwards in uri: no ascii: yes alert: no double decoding: yes alert: no %u encoding: yes alert: yes bare byte: yes alert: no utf 8: yes alert: no iis unicode: yes alert: no multiple slash: yes alert: no iis backslash: yes alert: no directory traversal: yes alert: no web root traversal: yes alert: no apache whitespace: yes alert: no iis delimiter: yes alert: no iis unicode map: global iis unicode map config non-rfc compliant characters: 0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 whitespace characters: 0x09 0x0b 0x0c 0x0d rpc_decode arguments: ports decode rpc on: 111 32770 32771 32772 32773 32774 32775 32776 32777 32778 32779 alert_fragments: inactive alert_large_fragments: inactive alert_incomplete: inactive alert_multiple_requests: inactive ftptelnet config: global config inspection type: stateful check encrypted traffic: yes alert: no go on check encrypted data: yes telnet config: ports: 23 there threshold: 20 normalize: yes observe anomalies: yes ftp config: ftp server: default ports (paf): 21 2100 3535 check telnet cmds: yes alert: yes ignore telnet cmd operations: yes alert: yes ignore open info channels: no ftp client: default check bounce attacks: yes alert: yes check telnet cmds: yes alert: yes ignore telnet cmd operations: yes alert: yes max response length: 256 smtp config: ports: 25 465 587 691 inspection type: stateful normalize: atrn auth bdat info debug ehlo emal esam esnd esom etrn evfy expn helo help ident mail service noop onex queu quit rcpt rset saml send starttls soml tick time turn turnme verb vrfy x-exps xadr xauth xcir xexch50 xgen xlicense x-link2state xque xsta xtrn xusr chunking x-adat x-drcp x-ercp x-exch50 ignore data: no ignore tls data: no ignore smtp alerts: no max command line length: 512 max specific command line length: atrn:255 auth:246 bdat:255 data:246 debug:255 ehlo:500 emal:255 esam:255 esnd:255 esom:255 etrn:246 evfy:255 expn:255 helo:500 help:500 ident:255 mail:260 noop:255 onex:246 queu:246 quit:246 rcpt:300 rset:246 saml:246 send:246 size:255 starttls:246 soml:246 tick:246 time:246 turn:246 turnme:246 verb:246 vrfy:255 x-exps:246 xadr:246 xauth:246 xcir:246 xexch50:246 xgen:246 xlicense:246 x-link2state:246 xque:246 xsta:246 xtrn:246 xusr:246 max header line length: 1000 max response line length: 512 x-link2state alert: yes drop on x-link2state alert: no alert on commands: none alert on unknown commands: no smtp memcap: 838860 mime max mem: 838860 base64 decoding: enabled base64 decoding depth: unlimited quoted-printable decoding: enabled quoted-printable decoding depth: unlimited unix-to-unix decoding: enabled unix-to-unix decoding depth: unlimited non-encoded mime attachment extraction: enabled non-encoded mime attachment extraction depth: unlimited log attachment filename: enabled log mail service address: enabled log rcpt addresses: enabled log email headers: enabled email hdrs log depth: 1464 ssh config: autodetection: enabled challenge-response overflow alert: enabled ssh1 crc32 alert: enabled server version string overflow alert: enabled protocol mismatch alert: enabled bad message direction alert: disabled bad payload size alert: disabled unrecognized version alert: disabled max encrypted packets: 20 max server version string length: 100 maxclientbytes: 19600 (default) ports: 22 dce/rpc 2 preprocessor configuration global configuration dce/rpc defragmentation: enabled memcap: 102400 kb events: co smb fingerprint policy: disabled server default configuration policy: winxp observe ports (paf) smb: 139 445 tcp: 135 udp: 135 rpc on http server: 593 rpc on http proxy: none autodetect ports (paf) smb: none tcp: 1025-65535 udp: 1025-65535 rpc on http server: 1025-65535 rpc on http proxy: none invalid smb shares: c$ d$ admin$ maximum smb command chaining: 3 commands smb file inspection: disabled dns config: dns client rdata txt overflow alert: active obsolete dns rr types alert: inactive experimental dns rr types alert: inactive ports: 53 sslpp config: encrypted packets: not inspected ports: 443 465 563 636 989 992 993 994 995 7801 7802 7900 7901 7902 7903 7904 7905 7906 7907 7908 7909 7910 7911 7912 7913 7914 7915 7916 7917 7918 7919 7920 server side info trusted maximum ssl heartbeat length: 0 sensitive info preprocessor config: global alert threshold: 25 masked output: disabled sip config: max number of sessions: 40000 max number of dialogs in session: 4 (default) status: enabled ignore media channel: disabled max uri length: 512 max phone call id length: 80 max request name length: 20 (default) max length: 256 (default) max length: 256 (default) max via length: 1024 (default) max contact length: 512 max content length: 2048 ports: 5060 5061 5600 methods: invite cancel ack bye register options refer subscribe update bring together info message notify benotify qauth sprack publish service unsubscribe prack imap config: ports: 143 imap memcap: 838860 mime max mem: 838860 base64 decoding: enabled base64 decoding depth: unlimited quoted-printable decoding: enabled quoted-printable decoding depth: unlimited unix-to-unix decoding: enabled unix-to-unix decoding depth: unlimited non-encoded mime attachment extraction: enabled non-encoded mime attachment extraction depth: unlimited pop config: ports: 110 pop memcap: 838860 mime max mem: 838860 base64 decoding: enabled base64 decoding depth: unlimited quoted-printable decoding: enabled quoted-printable decoding depth: unlimited unix-to-unix decoding: enabled unix-to-unix decoding depth: unlimited non-encoded mime attachment extraction: enabled non-encoded mime attachment extraction depth: unlimited modbus config: ports: 502 dnp3 config: memcap: 262144 check link-layer crcs: enabled ports: 20000 reputation config: warning: can't find whitelist/blacklist entries. reputation preprocessor disabled. +++++++++++++++++++++++++++++++++++++++++++++++++++ initializing rule chains... 0 snort rules read 0 detection rules 0 decoder rules 0 preprocessor rules 0 alternative chains linked 0 chain headers 0 dynamic rules +++++++++++++++++++++++++++++++++++++++++++++++++++ +-------------------[rule port counts]--------------------------------------- | tcp udp icmp ip | src 0 0 0 0 | dst 0 0 0 0 | 0 0 0 0 | nc 0 0 0 0 | s+d 0 0 0 0 +---------------------------------------------------------------------------- +-----------------------[detection-filter-config]------------------------------ | memory-cap : 1048576 bytes +-----------------------[detection-filter-rules]------------------------------- | none ------------------------------------------------------------------------------- +-----------------------[rate-filter-config]----------------------------------- | memory-cap : 1048576 bytes +-----------------------[rate-filter-rules]------------------------------------ | none ------------------------------------------------------------------------------- +-----------------------[event-filter-config]---------------------------------- | memory-cap : 1048576 bytes +-----------------------[event-filter-global]---------------------------------- +-----------------------[event-filter-local]----------------------------------- | none +-----------------------[suppression]------------------------------------------ | none ------------------------------------------------------------------------------- rule application order: activation->dynamic->pass->drop->sdrop->reject->alert->log verifying preprocessor configurations! --== initialization finish ==-- ,,_ -*> snort! <*- o" )~ version 2.9.7.0 gre (build 149) '''' martin roesch & snort team: http://www.snort.org/contact#team copyright (c) 2014 cisco and/or affiliates. rights reserved. copyright (c) 1998-2013 sourcefire, inc., et al. using libpcap version 1.1.1 using pcre version: 8.12 2011-01-15 using zlib version: 1.2.3.4 rules engine: sf_snort_detection_engine version 2.4 <build 1> preprocessor object: sf_ftptelnet version 1.2 <build 13> preprocessor object: sf_sip version 1.1 <build 1> preprocessor object: sf_imap version 1.0 <build 1> preprocessor object: sf_pop version 1.0 <build 1> preprocessor object: sf_reputation version 1.1 <build 1> preprocessor object: sf_sdf version 1.1 <build 1> preprocessor object: sf_dnp3 version 1.1 <build 1> preprocessor object: sf_smtp version 1.1 <build 9> preprocessor object: sf_sslpp version 1.1 <build 4> preprocessor object: sf_gtp version 1.1 <build 1> preprocessor object: sf_dns version 1.1 <build 4> preprocessor object: sf_ssh version 1.1 <build 3> preprocessor object: sf_dcerpc2 version 1.0 <build 3> preprocessor object: sf_modbus version 1.1 <build 1> snort validated configuration! snort exiting
you have write rule /etc/snort/rules/local.rules. guide has error instead of local.conf, have utilize local.rules. before step guide says uncomment line(545 if im right) containes include $rule_path/local.rules. thats why u have utilize local.rules because snort ll utilize file.
ubuntu networking ubuntu-12.04 snort network-security
Comments
Post a Comment