LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 05-28-2014, 01:13 AM   #16
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600

Quote:
Originally Posted by Suburban Errorist View Post
How do I do that?
By not specifying the "-D" and not "-q" switches when starting barnyard2.


Quote:
Originally Posted by Suburban Errorist View Post
(..) they suggested me to do use the -b and -k none arguments at the command line arguments
What does that achieve or do?
 
Old 05-28-2014, 02:20 AM   #17
Suburban Errorist
LQ Newbie
 
Registered: May 2014
Posts: 26

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by unSpawn View Post
By not specifying the "-D" and not "-q" switches when starting barnyard2.

So where do I do that? Because right now, I'm not running Snort as a daemon, but rather running it as a command from the console. Do I have to edit the barnyard2.conf file to do it?

Quote:
Originally Posted by unSpawn View Post
What does that achieve or do?
From the mailing list:

Quote:
If you want that your output directive work make sure that you do not
the the -b command line switch and also -A full is the default you can
skip that.

Also make sure that you do not have checksum error on the interface
your monitoring, you can add -k none to your snort command line
argument to disable
checksum validation to check if it can help.

Last edited by Suburban Errorist; 05-28-2014 at 02:22 AM.
 
Old 05-28-2014, 11:52 AM   #18
Suburban Errorist
LQ Newbie
 
Registered: May 2014
Posts: 26

Original Poster
Rep: Reputation: Disabled
So I edited my rc.local file to this:

Code:
ifconfig eth1 up
/usr/local/snort/bin/snort -D -k none -u snort -g snort \
-c /usr/local/snort/etc/snort.conf -i eth1
/usr/local/bin/barnyard2 -c /usr/local/snort/etc/barnyard2.conf \
-d /var/log/snort \
-f snort.u2 \
-w /var/log/snort/barnyard2.waldo \
exit 0
And the results remain the same:

Quote:
drwxr-xrwx 18 root root 4096 Mei 29 00:49 ..
-rw------- 1 snort snort 0 Mei 29 00:49 tcpdump.log.1401295761
-rw------- 1 snort snort 0 Mei 29 00:49 snort.u2.1401295761
-rw------- 1 snort snort 0 Mei 29 00:49 snort.log
-rw------- 1 snort snort 0 Mei 29 00:49 snort.alert
drwxr-xrwx 2 snort snort 4096 Mei 29 00:49 .
 
Old 05-29-2014, 06:37 AM   #19
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
I don't know what you've done and edited by now so I'll run these diagnostics by you one more time. Please post output of running these commands as root.
Code:
# Snort conf:
grep -v '#' /usr/local/snort/etc/snort.conf

Barnyard2 conf:
grep -v '#' /usr/local/snort/etc/barnyard2.conf

# Snort process:
pgrep -lf snort
# We need to see command line args. If they don't show then use:
pgrep -awlf snort

# Same for Barnyard2:
pgrep -lf barnyard2
# Remember we need args. If they don't show then use:
pgrep -awlf barnyard2

# What does your waldo file say? Note "odlaw" is part of the Barnyard2 package. If you don't have it see github.com/firnsy/barnyard2
odlaw -r /var/log/snort/barnyard2.waldo 2>&1

# Now run this nmap command from another host against 192.168.2.2:
nmap -P0 -n -O -A -sV -v 192.168.2.2

# Show which open files these processes use:
for ITEM in $( pgrep -f snort; pgrep -f barnyard2 ) ; do /usr/sbin/lsof -Pwlnp${ITEM} -a +D/var 2>&1; done

# Finally show the contents of your log directory (add the one Barnyard2 logs to):
\ls -altr /var/log/snort
*Please note that if you omit something crucial I won't be able to help.
 
Old 05-29-2014, 11:20 AM   #20
Suburban Errorist
LQ Newbie
 
Registered: May 2014
Posts: 26

Original Poster
Rep: Reputation: Disabled
Well, here are the results:

Code:
eeepc hadri # grep -v '#' /usr/local/snort/etc/snort.conf



var HOME_NET any

var EXTERNAL_NET any

var DNS_SERVERS $HOME_NET

var SMTP_SERVERS $HOME_NET

var HTTP_SERVERS $HOME_NET

var SQL_SERVERS $HOME_NET

var TELNET_SERVERS $HOME_NET

var SSH_SERVERS $HOME_NET

var FTP_SERVERS $HOME_NET

var SIP_SERVERS $HOME_NET

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] 

portvar SHELLCODE_PORTS !80

portvar ORACLE_PORTS 1024:

portvar SSH_PORTS 22

portvar FTP_PORTS [21,2100,3535]

portvar SIP_PORTS [5060,5061,5600]

portvar FILE_DATA_PORTS [$HTTP_PORTS,110,143]

portvar GTP_PORTS [2123,2152,3386]

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]

var RULE_PATH ../rules
var SO_RULE_PATH ../so_rules
var PREPROC_RULE_PATH ../preproc_rules

var WHITE_LIST_PATH /usr/local/snort/rules
var BLACK_LIST_PATH /usr/local/snort/rules


config disable_decode_alerts

config disable_tcpopt_experimental_alerts

config disable_tcpopt_obsolete_alerts

config disable_tcpopt_ttcp_alerts

config disable_tcpopt_alerts

config disable_ipopt_alerts



config checksum_mode: all











config pcre_match_limit: 3500
config pcre_match_limit_recursion: 1500

config detection: search-method ac-split search-optimize max-pattern-len 20

config event_queue: max_queue 8 log 5 order_events content_length








config paf_max: 16000


dynamicpreprocessor directory /usr/local/snort/lib/snort_dynamicpreprocessor/

dynamicengine /usr/local/snort/lib/snort_dynamicengine/libsf_engine.so

dynamicdetection directory /usr/local/snort/lib/snort_dynamicrules



preprocessor normalize_ip4
preprocessor normalize_tcp: ips ecn stream
preprocessor normalize_icmp4
preprocessor normalize_ip6
preprocessor normalize_icmp6

preprocessor frag3_global: max_frags 65536
preprocessor frag3_engine: policy windows detect_anomalies overlap_limit 10 min_fragment_length 100 timeout 180

preprocessor stream5_global: track_tcp yes, \
   track_udp yes, \
   track_icmp no, \ 
   max_tcp 262144, \
   max_udp 131072, \
   max_active_responses 2, \
   min_response_seconds 5
preprocessor stream5_tcp: policy windows, detect_anomalies, require_3whs 180, \
   overlap_limit 10, small_segments 3 bytes 150, timeout 180, \
    ports client 21 22 23 25 42 53 70 79 109 110 111 113 119 135 136 137 139 143 \
        161 445 513 514 587 593 691 1433 1521 1741 2100 3306 6070 6665 6666 6667 6668 6669 \
        7000 8181 32770 32771 32772 32773 32774 32775 32776 32777 32778 32779, \
    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 \
        7801 7900 7901 7902 7903 7904 7905 7906 7908 7909 7910 7911 7912 7913 7914 7915 7916 \
        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
preprocessor stream5_udp: timeout 180


preprocessor http_inspect: global iis_unicode_map unicode.map 1252 compress_depth 65535 decompress_depth 65535
preprocessor http_inspect_server: server default \
    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 } \
    chunk_length 500000 \
    server_flow_depth 0 \
    client_flow_depth 0 \
    post_depth 65495 \
    oversize_dir_length 500 \
    max_header_length 750 \
    max_headers 100 \
    max_spaces 200 \
    small_chunk_length { 10 5 } \
    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 } \
    non_rfc_char { 0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 } \
    enable_cookie \
    extended_response_inspection \
    inspect_gzip \
    normalize_utf \
    unlimited_decompress \
    normalize_javascript \
    apache_whitespace no \
    ascii no \
    bare_byte no \
    directory no \
    double_decode no \
    iis_backslash no \
    iis_delimiter no \
    iis_unicode no \
    multi_slash no \
    utf_8 no \
    u_encode yes \
    webroot no

preprocessor rpc_decode: 111 32770 32771 32772 32773 32774 32775 32776 32777 32778 32779 no_alert_multiple_requests no_alert_large_fragments no_alert_incomplete

preprocessor bo

preprocessor ftp_telnet: global inspection_type stateful encrypted_traffic no check_encrypted
preprocessor ftp_telnet_protocol: telnet \
    ayt_attack_thresh 20 \
    normalize ports { 23 } \
    detect_anomalies
preprocessor ftp_telnet_protocol: ftp server default \
    def_max_param_len 100 \
    ports { 21 2100 3535 } \
    telnet_cmds yes \
    ignore_telnet_erase_cmds yes \
    ftp_cmds { ABOR ACCT ADAT ALLO APPE AUTH CCC CDUP } \
    ftp_cmds { CEL CLNT CMD CONF CWD DELE ENC EPRT } \
    ftp_cmds { EPSV ESTA ESTP FEAT HELP LANG LIST LPRT } \
    ftp_cmds { LPSV MACB MAIL MDTM MIC MKD MLSD MLST } \
    ftp_cmds { MODE NLST NOOP OPTS PASS PASV PBSZ PORT } \
    ftp_cmds { PROT PWD QUIT REIN REST RETR RMD RNFR } \
    ftp_cmds { RNTO SDUP SITE SIZE SMNT STAT STOR STOU } \
    ftp_cmds { STRU SYST TEST TYPE USER XCUP XCRC XCWD } \
    ftp_cmds { XMAS XMD5 XMKD XPWD XRCP XRMD XRSQ XSEM } \
    ftp_cmds { XSEN XSHA1 XSHA256 } \
    alt_max_param_len 0 { ABOR CCC CDUP ESTA FEAT LPSV NOOP PASV PWD QUIT REIN STOU SYST XCUP XPWD } \
    alt_max_param_len 200 { ALLO APPE CMD HELP NLST RETR RNFR STOR STOU XMKD } \
    alt_max_param_len 256 { CWD RNTO } \
    alt_max_param_len 400 { PORT } \
    alt_max_param_len 512 { SIZE } \
    chk_str_fmt { ACCT ADAT ALLO APPE AUTH CEL CLNT CMD } \
    chk_str_fmt { CONF CWD DELE ENC EPRT EPSV ESTP HELP } \
    chk_str_fmt { LANG LIST LPRT MACB MAIL MDTM MIC MKD } \
    chk_str_fmt { MLSD MLST MODE NLST OPTS PASS PBSZ PORT } \
    chk_str_fmt { PROT REST RETR RMD RNFR RNTO SDUP SITE } \
    chk_str_fmt { SIZE SMNT STAT STOR STRU TEST TYPE USER } \
    chk_str_fmt { XCRC XCWD XMAS XMD5 XMKD XRCP XRMD XRSQ } \ 
    chk_str_fmt { XSEM XSEN XSHA1 XSHA256 } \
    cmd_validity ALLO < int [ char R int ] > \    
    cmd_validity EPSV < [ { char 12 | char A char L char L } ] > \
    cmd_validity MACB < string > \
    cmd_validity MDTM < [ date nnnnnnnnnnnnnn[.n[n[n]]] ] string > \
    cmd_validity MODE < char ASBCZ > \
    cmd_validity PORT < host_port > \
    cmd_validity PROT < char CSEP > \
    cmd_validity STRU < char FRPO [ string ] > \    
    cmd_validity TYPE < { char AE [ char NTC ] | char I | char L [ number ] } >
preprocessor ftp_telnet_protocol: ftp client default \
    max_resp_len 256 \
    bounce yes \
    ignore_telnet_erase_cmds yes \
    telnet_cmds yes


preprocessor smtp: ports { 25 465 587 691 } \
    inspection_type stateful \
    b64_decode_depth 0 \
    qp_decode_depth 0 \
    bitenc_decode_depth 0 \
    uu_decode_depth 0 \
    log_mailfrom \
    log_rcptto \
    log_filename \
    log_email_hdrs \
    normalize cmds \
    normalize_cmds { ATRN AUTH BDAT CHUNKING DATA DEBUG EHLO EMAL ESAM ESND ESOM ETRN EVFY } \
    normalize_cmds { EXPN HELO HELP IDENT MAIL NOOP ONEX QUEU QUIT RCPT RSET SAML SEND SOML } \
    normalize_cmds { STARTTLS TICK TIME TURN TURNME VERB VRFY X-ADAT X-DRCP X-ERCP X-EXCH50 } \
    normalize_cmds { X-EXPS X-LINK2STATE XADR XAUTH XCIR XEXCH50 XGEN XLICENSE XQUE XSTA XTRN XUSR } \
    max_command_line_len 512 \
    max_header_line_len 1000 \
    max_response_line_len 512 \
    alt_max_command_line_len 260 { MAIL } \
    alt_max_command_line_len 300 { RCPT } \
    alt_max_command_line_len 500 { HELP HELO ETRN EHLO } \
    alt_max_command_line_len 255 { EXPN VRFY ATRN SIZE BDAT DEBUG EMAL ESAM ESND ESOM EVFY IDENT NOOP RSET } \
    alt_max_command_line_len 246 { SEND SAML SOML AUTH TURN ETRN DATA RSET QUIT ONEX QUEU STARTTLS TICK TIME TURNME VERB X-EXPS X-LINK2STATE XADR XAUTH XCIR XEXCH50 XGEN XLICENSE XQUE XSTA XTRN XUSR } \
    valid_cmds { ATRN AUTH BDAT CHUNKING DATA DEBUG EHLO EMAL ESAM ESND ESOM ETRN EVFY } \ 
    valid_cmds { EXPN HELO HELP IDENT MAIL NOOP ONEX QUEU QUIT RCPT RSET SAML SEND SOML } \
    valid_cmds { STARTTLS TICK TIME TURN TURNME VERB VRFY X-ADAT X-DRCP X-ERCP X-EXCH50 } \
    valid_cmds { X-EXPS X-LINK2STATE XADR XAUTH XCIR XEXCH50 XGEN XLICENSE XQUE XSTA XTRN XUSR } \
    xlink2state { enabled }



preprocessor ssh: server_ports { 22 } \
                  autodetect \
                  max_client_bytes 19600 \
                  max_encrypted_packets 20 \
                  max_server_version_len 100 \
                  enable_respoverflow enable_ssh1crc32 \
                  enable_srvoverflow enable_protomismatch

preprocessor dcerpc2: memcap 102400, events [co ]
preprocessor dcerpc2_server: default, policy WinXP, \
    detect [smb [139,445], tcp 135, udp 135, rpc-over-http-server 593], \
    autodetect [tcp 1025:, udp 1025:, rpc-over-http-server 1025:], \
    smb_max_chain 3, smb_invalid_shares ["C$", "D$", "ADMIN$"]

preprocessor dns: ports { 53 } enable_rdata_overflow

preprocessor ssl: 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 }, trustservers, noinspect_encrypted

preprocessor sensitive_data: alert_threshold 25

preprocessor sip: max_sessions 40000, \
   ports { 5060 5061 5600 }, \
   methods { invite \
             cancel \
             ack \
             bye \
             register \
             options \
             refer \
             subscribe \
             update \
             join \
             info \
             message \
             notify \
             benotify \
             do \
             qauth \
             sprack \
             publish \
             service \
             unsubscribe \
             prack }, \
   max_uri_len 512, \
   max_call_id_len 80, \
   max_requestName_len 20, \
   max_from_len 256, \
   max_to_len 256, \
   max_via_len 1024, \
   max_contact_len 512, \
   max_content_len 2048 

preprocessor imap: \
   ports { 143 } \
   b64_decode_depth 0 \
   qp_decode_depth 0 \
   bitenc_decode_depth 0 \
   uu_decode_depth 0

preprocessor pop: \
   ports { 110 } \
   b64_decode_depth 0 \
   qp_decode_depth 0 \
   bitenc_decode_depth 0 \
   uu_decode_depth 0

preprocessor modbus: ports { 502 }

preprocessor dnp3: ports { 20000 } \
   memcap 262144 \
   check_crc

preprocessor reputation: \
   memcap 500, \
   priority whitelist, \
   nested_ip inner, \
   whitelist $WHITE_LIST_PATH/white_list.rules, \
   blacklist $BLACK_LIST_PATH/black_list.rules 


output unified2: filename snort.u2, limit 128
output alert_unified2: filename snort.alert, limit 128, nostamp
output log_unified2: filename snort.log, limit 128, nostamp 

output alert_syslog: LOG_AUTH LOG_ALERT

output log_tcpdump: tcpdump.log

include classification.config
include reference.config



include $RULE_PATH/local.rules

include $RULE_PATH/app-detect.rules
include $RULE_PATH/attack-responses.rules
include $RULE_PATH/backdoor.rules
include $RULE_PATH/bad-traffic.rules
include $RULE_PATH/blacklist.rules
include $RULE_PATH/botnet-cnc.rules
include $RULE_PATH/browser-chrome.rules
include $RULE_PATH/browser-firefox.rules
include $RULE_PATH/browser-ie.rules
include $RULE_PATH/browser-other.rules
include $RULE_PATH/browser-plugins.rules
include $RULE_PATH/browser-webkit.rules
include $RULE_PATH/chat.rules
include $RULE_PATH/content-replace.rules
include $RULE_PATH/ddos.rules
include $RULE_PATH/dns.rules
include $RULE_PATH/dos.rules
include $RULE_PATH/experimental.rules
include $RULE_PATH/exploit-kit.rules
include $RULE_PATH/exploit.rules
include $RULE_PATH/file-executable.rules
include $RULE_PATH/file-flash.rules
include $RULE_PATH/file-identify.rules
include $RULE_PATH/file-image.rules
include $RULE_PATH/file-java.rules
include $RULE_PATH/file-multimedia.rules
include $RULE_PATH/file-office.rules
include $RULE_PATH/file-other.rules
include $RULE_PATH/file-pdf.rules
include $RULE_PATH/finger.rules
include $RULE_PATH/ftp.rules
include $RULE_PATH/icmp-info.rules
include $RULE_PATH/icmp.rules
include $RULE_PATH/imap.rules
include $RULE_PATH/indicator-compromise.rules
include $RULE_PATH/indicator-obfuscation.rules
include $RULE_PATH/indicator-scan.rules
include $RULE_PATH/indicator-shellcode.rules
include $RULE_PATH/info.rules
include $RULE_PATH/malware-backdoor.rules
include $RULE_PATH/malware-cnc.rules
include $RULE_PATH/malware-other.rules
include $RULE_PATH/malware-tools.rules
include $RULE_PATH/misc.rules
include $RULE_PATH/multimedia.rules
include $RULE_PATH/mysql.rules
include $RULE_PATH/netbios.rules
include $RULE_PATH/nntp.rules
include $RULE_PATH/oracle.rules
include $RULE_PATH/os-linux.rules
include $RULE_PATH/os-mobile.rules
include $RULE_PATH/os-other.rules
include $RULE_PATH/os-solaris.rules
include $RULE_PATH/os-windows.rules
include $RULE_PATH/other-ids.rules
include $RULE_PATH/p2p.rules
include $RULE_PATH/phishing-spam.rules
include $RULE_PATH/policy-multimedia.rules
include $RULE_PATH/policy-other.rules
include $RULE_PATH/policy.rules
include $RULE_PATH/policy-social.rules
include $RULE_PATH/policy-spam.rules
include $RULE_PATH/pop2.rules
include $RULE_PATH/pop3.rules
include $RULE_PATH/protocol-dns.rules
include $RULE_PATH/protocol-finger.rules
include $RULE_PATH/protocol-ftp.rules
include $RULE_PATH/protocol-icmp.rules
include $RULE_PATH/protocol-imap.rules
include $RULE_PATH/protocol-nntp.rules
include $RULE_PATH/protocol-pop.rules
include $RULE_PATH/protocol-rpc.rules
include $RULE_PATH/protocol-scada.rules
include $RULE_PATH/protocol-services.rules
include $RULE_PATH/protocol-snmp.rules
include $RULE_PATH/protocol-telnet.rules
include $RULE_PATH/protocol-tftp.rules
include $RULE_PATH/protocol-voip.rules
include $RULE_PATH/pua-adware.rules
include $RULE_PATH/pua-other.rules
include $RULE_PATH/pua-p2p.rules
include $RULE_PATH/pua-toolbars.rules
include $RULE_PATH/rpc.rules
include $RULE_PATH/rservices.rules
include $RULE_PATH/scada.rules
include $RULE_PATH/scan.rules
include $RULE_PATH/server-apache.rules
include $RULE_PATH/server-iis.rules
include $RULE_PATH/server-mail.rules
include $RULE_PATH/server-mssql.rules
include $RULE_PATH/server-mysql.rules
include $RULE_PATH/server-oracle.rules
include $RULE_PATH/server-other.rules
include $RULE_PATH/server-samba.rules
include $RULE_PATH/server-webapp.rules
include $RULE_PATH/shellcode.rules
include $RULE_PATH/smtp.rules
include $RULE_PATH/snmp.rules
include $RULE_PATH/specific-threats.rules
include $RULE_PATH/spyware-put.rules
include $RULE_PATH/sql.rules
include $RULE_PATH/telnet.rules
include $RULE_PATH/tftp.rules
include $RULE_PATH/virus.rules
include $RULE_PATH/voip.rules
include $RULE_PATH/web-activex.rules
include $RULE_PATH/web-attacks.rules
include $RULE_PATH/web-cgi.rules
include $RULE_PATH/web-client.rules
include $RULE_PATH/web-coldfusion.rules
include $RULE_PATH/web-frontpage.rules
include $RULE_PATH/web-iis.rules
include $RULE_PATH/web-misc.rules
include $RULE_PATH/web-php.rules
include $RULE_PATH/x11.rules





include threshold.conf
Code:
eeepc hadri # grep -v '#' /usr/local/snort/etc/barnyard2.conf





config reference_file:      /usr/local/snort/etc/reference.config
config classification_file: /usr/local/snort/etc/classification.config
config gen_file:            /usr/local/snort/etc/gen-msg.map
config sid_file:            /usr/local/snort/etc/sid-msg.map








config hostname:   localhost
config interface:  eth1


























input unified2





output alert_fast: stdout













output database: log, mysql, user=snort password=YOURPASSWORD dbname=snort \
host=localhost
Code:
eeepc hadri # pgrep -lf snort
2070 /usr/local/snort/bin/snort -D -k none -u snort -g snort -c /usr/local/snort/etc/snort.conf -i eth1

eeepc hadri # pgrep -awlf snort
pgrep: invalid option -- 'a'

Usage:
 pgrep [options] <pattern>

Options:
 -c, --count               count of matching processes
 -d, --delimeter <string>  specify output delimeter
 -l, --list-name           list PID and process name
 -v, --inverse             negates the matching
 -f, --full                use full process name to match
 -g, --pgroup <id,...>     match listed process group IDs
 -G, --group <gid,...>     match real group IDs
 -n, --newest              select most recently started
 -o, --oldest              select least recently started
 -P, --parent <ppid,...>   match only childs of given parent
 -s, --session <sid,...>   match session IDs
 -t, --terminal <tty,...>  match by controlling terminal
 -u, --euid <id,...>       match by effective IDs
 -U, --uid <id,...>        match by real IDs
 -x, --exact               match exectly with command name
 -F, --pidfile <file>      read PIDs from file
 -L, --logpidfile          fail if PID file is not locked

 -h, --help     display this help and exit
 -V, --version  output version information and exit

For more details see pgrep(1).
 
Old 05-29-2014, 11:21 AM   #21
Suburban Errorist
LQ Newbie
 
Registered: May 2014
Posts: 26

Original Poster
Rep: Reputation: Disabled
Code:
eeepc hadri # pgrep -lf barnyard2
eeepc hadri # pgrep -awlf barnyard2
pgrep: invalid option -- 'a'

Usage:
 pgrep [options] <pattern>

Options:
 -c, --count               count of matching processes
 -d, --delimeter <string>  specify output delimeter
 -l, --list-name           list PID and process name
 -v, --inverse             negates the matching
 -f, --full                use full process name to match
 -g, --pgroup <id,...>     match listed process group IDs
 -G, --group <gid,...>     match real group IDs
 -n, --newest              select most recently started
 -o, --oldest              select least recently started
 -P, --parent <ppid,...>   match only childs of given parent
 -s, --session <sid,...>   match session IDs
 -t, --terminal <tty,...>  match by controlling terminal
 -u, --euid <id,...>       match by effective IDs
 -U, --uid <id,...>        match by real IDs
 -x, --exact               match exectly with command name
 -F, --pidfile <file>      read PIDs from file
 -L, --logpidfile          fail if PID file is not locked

 -h, --help     display this help and exit
 -V, --version  output version information and exit

For more details see pgrep(1).
Code:
eeepc hadri # odlaw -r /var/log/snort/barnyard2.waldo 2>&1
odlaw: command not found
(I downloaded the odlaw.pl file from barnyard2's github site but it doesn't seem to work)

Code:
Starting Nmap 6.40 ( http://nmap.org ) at 2014-05-29 23:58 Malay Peninsula Standard Time

NSE: Loaded 110 scripts for scanning.

NSE: Script Pre-scanning.

NSE: Starting runlevel 1 (of 2) scan.

NSE: Starting runlevel 2 (of 2) scan.

Initiating ARP Ping Scan at 23:58

Scanning 192.168.2.2 [1 port]

Completed ARP Ping Scan at 23:58, 0.48s elapsed (1 total hosts)

Initiating SYN Stealth Scan at 23:58

Scanning 192.168.2.2 [1000 ports]

Discovered open port 139/tcp on 192.168.2.2

Discovered open port 80/tcp on 192.168.2.2

Discovered open port 445/tcp on 192.168.2.2

Completed SYN Stealth Scan at 23:58, 0.17s elapsed (1000 total ports)

Initiating Service scan at 23:58

Scanning 3 services on 192.168.2.2

Completed Service scan at 23:59, 11.03s elapsed (3 services on 1 host)

Initiating OS detection (try #1) against 192.168.2.2

Failed to resolve "nmap".

Retrying OS detection (try #2) against 192.168.2.2

Retrying OS detection (try #3) against 192.168.2.2

Retrying OS detection (try #4) against 192.168.2.2

Retrying OS detection (try #5) against 192.168.2.2

NSE: Script scanning 192.168.2.2.

NSE: Starting runlevel 1 (of 2) scan.

Initiating NSE at 23:59

NSE Timing: About 93.33% done; ETC: 23:59 (0:00:02 remaining)

Completed NSE at 23:59, 32.26s elapsed

NSE: Starting runlevel 2 (of 2) scan.

Nmap scan report for 192.168.2.2

Host is up (0.0023s latency).

Scanned at 2014-05-29 23:58:58 Malay Peninsula Standard Time for 56s

Not shown: 997 closed ports

PORT    STATE SERVICE     VERSION

80/tcp  open  http        Apache httpd 2.4.6 ((Ubuntu))

|_http-methods: GET HEAD POST OPTIONS

|_http-title: Site doesn't have a title (text/html).

139/tcp open  netbios-ssn Samba smbd 3.X (workgroup: WORKGROUP)

445/tcp open  netbios-ssn Samba smbd 3.X (workgroup: WORKGROUP)

MAC Address: 00:80:8E:8F:8E:1F (Radstone Technology)

No exact OS matches for host (If you know what OS is running on it, see http://nmap.org/submit/ ).

TCP/IP fingerprint:

OS:SCAN(V=6.40%E=4%D=5/29%OT=80%CT=1%CU=31635%PV=Y%DS=1%DC=D%G=Y%M=00808E%T

OS:M=5387597A%P=i686-pc-windows-windows)SEQ(SP=104%GCD=1%ISR=10C%TI=Z%CI=Z%

OS:II=I%TS=8)SEQ(CI=Z%II=I)OPS(O1=M5B4ST11NW7%O2=M5B4ST11NW7%O3=M5B4NNT11NW

OS:7%O4=M5B4ST11NW7%O5=M5B4ST11NW7%O6=M5B4ST11)WIN(W1=7120%W2=7120%W3=7120%

OS:W4=7120%W5=7120%W6=7120)ECN(R=Y%DF=Y%T=40%W=7210%O=M5B4NNSNW7%CC=Y%Q=)T1

OS:(R=Y%DF=Y%T=40%S=O%A=S+%F=AS%RD=0%Q=)T2(R=N)T3(R=N)T4(R=Y%DF=Y%T=40%W=0%

OS:S=A%A=Z%F=R%O=%RD=0%Q=)T5(R=Y%DF=Y%T=40%W=0%S=Z%A=S+%F=AR%O=%RD=0%Q=)T6(

OS:R=Y%DF=Y%T=40%W=0%S=A%A=Z%F=R%O=%RD=0%Q=)T7(R=Y%DF=Y%T=40%W=0%S=Z%A=S+%F

OS:=AR%O=%RD=0%Q=)U1(R=Y%DF=N%T=40%IPL=164%UN=0%RIPL=G%RID=G%RIPCK=G%RUCK=G

OS:%RUD=G)IE(R=Y%DFI=N%T=40%CD=S)



Network Distance: 1 hop



Host script results:

| nbstat: 

|   NetBIOS name: EEEPC, NetBIOS user: <unknown>, NetBIOS MAC: <unknown>

|   Names

|     EEEPC<00>            Flags: <unique><active>

|     EEEPC<03>            Flags: <unique><active>

|     EEEPC<20>            Flags: <unique><active>

|     \x01\x02__MSBROWSE__\x02<01>  Flags: <group><active>

|     WORKGROUP<1d>        Flags: <unique><active>

|     WORKGROUP<1e>        Flags: <group><active>

|     WORKGROUP<00>        Flags: <group><active>

|   Statistics

|     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 

|     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 

|_    00 00 00 00 00 00 00 00 00 00 00 00 00 00 

| p2p-conficker: 

|   Checking for Conficker.C or higher...

|   Check 1 (port 51869/tcp): CLEAN (Timeout)

|   Check 2 (port 10102/tcp): CLEAN (Timeout)

|   | Check 3 (port 61137/udp): CLEAN (Timeout)

|   | Check 4 (port 49114/udp): CLEAN (Timeout)

|_  0/4 checks are positive: Host is CLEAN or ports are blocked

| smb-os-discovery: 

|   OS: Unix (Samba 3.6.18)

|   Computer name: eeepc

|   NetBIOS computer name: 

|   Domain name: 

|   FQDN: eeepc

|_  System time: 2014-05-29T23:59:28+08:00

| smb-security-mode: 

|   Account that was used for smb scripts: guest

|   User-level authentication

|   SMB Security: Challenge/response passwords supported

|_  Message signing disabled (dangerous, but default)

|_smbv2-enabled: Server doesn't support SMBv2 protocol



TRACEROUTE

HOP RTT     ADDRESS

1   2.29 ms 192.168.2.2



NSE: Script Post-scanning.

NSE: Starting runlevel 1 (of 2) scan.

NSE: Starting runlevel 2 (of 2) scan.

Read data files from: C:\Program Files\Nmap

OS and Service detection performed. Please report any incorrect results at http://nmap.org/submit/ .

Nmap done: 1 IP address (1 host up) scanned in 62.21 seconds

           Raw packets sent: 1108 (52.762KB) | Rcvd: 1097 (47.502KB)
Code:
eeepc snort # for ITEM in $( pgrep -f snort; pgrep -f barnyard2 ) ; do /usr/sbin/lsof -Pwlnp${ITEM} -a +D/var 2>&1; done
bash: /usr/sbin/lsof: No such file or directory
Code:
eeepc snort # \ls -altr /var/log/snort
total 16
-rw-------  1 snort snort    0 Mei   7 11:25 snort.u2.1399433121
-rw-------  1 snort snort    0 Mei   7 12:15 snort.u2.1399436129
-rw-------  1 snort snort    0 Mei   9 11:08 snort.u2.1399604929
-rw-------  1 snort snort    0 Mei  12 12:26 snort.u2.1399868773
-rw-------  1 snort snort    0 Mei  12 12:39 snort.u2.1399869560
-rw-------  1 snort snort    0 Mei  12 13:39 snort.u2.1399873141
-rw-------  1 snort snort    0 Mei  12 14:16 snort.u2.1399875366
-rw-------  1 snort snort    0 Mei  12 14:23 snort.u2.1399875801
-rw-------  1 snort snort    0 Mei  12 14:28 snort.u2.1399876082
-rw-------  1 snort snort    0 Mei  12 15:10 snort.u2.1399878638
-rw-------  1 snort snort    0 Mei  12 15:28 snort.u2.1399879707
-rw-------  1 snort snort    0 Mei  12 15:43 snort.u2.1399880584
-rw-------  1 snort snort    0 Mei  12 20:43 snort.u2.1399898592
-rw-------  1 snort snort    0 Mei  12 20:59 snort.u2.1399899578
-rw-------  1 snort snort    0 Mei  12 21:28 snort.u2.1399901320
-rw-------  1 snort snort    0 Mei  12 21:32 snort.u2.1399901576
-rw-------  1 snort snort    0 Mei  12 21:57 snort.u2.1399903053
-rw-------  1 snort snort    0 Mei  12 23:06 snort.u2.1399907202
-rw-------  1 snort snort    0 Mei  12 23:20 snort.u2.1399908023
-rw-------  1 snort snort    0 Mei  12 23:26 snort.u2.1399908381
-rw-r--r--  1 root  root     0 Mei  12 23:52 alert
-rw-------  1 snort snort    0 Mei  13 08:58 snort.log.1399942704
-rw-------  1 snort snort    0 Mei  13 09:00 snort.log.1399942834
-rw-------  1 snort snort    0 Mei  13 21:02 snort.log.1399986140
-rw-------  1 snort snort    0 Mei  13 22:46 snort.u2.1399992363
-rw-------  1 snort snort    0 Mei  14 09:55 snort.u2.1400032546
-rw-------  1 snort snort    0 Mei  14 10:02 snort.u2.1400032925
-rw-------  1 snort snort    0 Mei  14 11:49 snort.u2.1400039340
-rw-------  1 snort snort    0 Mei  14 11:58 snort.u2.1400039917
-rw-------  1 snort snort    0 Mei  14 12:09 snort.u2.1400040581
-rw-------  1 snort snort    0 Mei  14 15:22 snort.u2.1400052166
-rw-------  1 snort snort    0 Mei  14 15:28 snort.u2.1400052519
-rw-------  1 snort snort    0 Mei  14 15:59 snort.u2.1400054345
-rw-------  1 snort snort    0 Mei  16 12:11 snort.u2.1400213471
-rw-------  1 snort snort    0 Mei  16 21:27 snort.u2.1400246859
-rw-------  1 snort snort    0 Mei  18 12:43 snort.u2.1400388202
-rw-------  1 snort snort    0 Mei  18 21:51 snort.u2.1400421074
-rw-------  1 snort snort    0 Mei  18 22:27 snort.u2.1400423234
-rw-------  1 snort snort    0 Mei  20 00:32 snort.u2.1400517178
-rw-r--r--  1 root  root     0 Mei  21 21:39 alert_barnyard
-rw-------  1 snort snort    0 Mei  22 10:30 snort.u2.1400725851
-rw-------  1 snort snort    0 Mei  22 21:31 snort.u2.1400765507
-rw-------  1 snort snort    0 Mei  24 12:42 snort.u2.1400906568
-rw-------  1 snort snort    0 Mei  25 11:32 test.log
-rw-------  1 snort snort    0 Mei  25 11:32 snort.u2.1400988730
-rw-------  1 snort snort    0 Mei  25 12:30 snort.u2.1400992207
-rw-r--r--  1 snort snort    0 Mei  25 20:56 barnyard2.waldo
-rw-------  1 snort snort    0 Mei  25 21:31 snort.u2.1401024712
-rw-------  1 snort snort    0 Mei  26 11:55 snort.u2.1401076528
-rw-------  1 snort snort    0 Mei  26 12:08 snort.u2.1401077324
-rw-------  1 snort snort    0 Mei  26 12:14 snort.u2.1401077699
-rw-------  1 snort snort    0 Mei  26 12:41 snort.u2.1401079276
-rw-------  1 snort snort    0 Mei  26 13:15 snort.u2.1401081344
-rw-------  1 snort snort    0 Mei  26 13:15 merged.log
-rw-------  1 snort snort    0 Mei  26 13:32 snort.u2.1401082370
-rw-------  1 snort snort    0 Mei  26 17:19 tcpdump.log.1401095960
-rw-------  1 snort snort    0 Mei  26 17:19 snort.u2.1401095960
-rw-------  1 snort snort    0 Mei  26 17:30 snort.u2.1401096625
-rw-------  1 snort snort    0 Mei  27 14:18 snort.u2.1401171492
-rw-------  1 snort snort    0 Mei  28 13:33 snort.u2.1401255225
-rw-------  1 snort snort    0 Mei  28 13:36 snort.u2.1401255383
-rw-------  1 snort snort    0 Mei  29 00:35 snort.u2.1401294902
-rw-------  1 snort snort    0 Mei  29 00:41 snort.u2.1401295287
-rw-------  1 snort snort    0 Mei  29 00:49 snort.u2.1401295761
-rw-------  1 snort snort    0 Mei  29 01:00 snort.u2.1401296449
-rw-------  1 snort snort    0 Mei  29 01:14 snort.u2.1401297288
-rw-------  1 snort snort    0 Mei  29 01:20 snort.u2.1401297645
-rw-------  1 snort snort    0 Mei  29 01:38 snort.u2.1401298702
-rw-------  1 snort snort    0 Mei  29 20:47 snort.u2.1401367646
-rwxrwxrwx  1 hadri hadri 4531 Mei  29 21:45 odlaw.pl
drwxr-xrwx 18 root  root  4096 Mei  29 22:45 ..
-rw-------  1 snort snort    0 Mei  29 22:45 tcpdump.log.1401374740
-rw-------  1 snort snort    0 Mei  29 22:45 snort.u2.1401374740
-rw-------  1 snort snort    0 Mei  29 22:45 snort.log
-rw-------  1 snort snort    0 Mei  29 22:45 snort.alert
drwxr-xrwx  2 snort snort 4096 Mei  29 22:45 .
 
Old 05-29-2014, 02:02 PM   #22
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
No idea what's going on but I'll just list my setup for you to check against:

Code:
# Snort conf:
]# grep -v '#' /etc/snort.conf
ipvar HOME_NET  10.0.0.0/24
var RULE_PATH /etc/snort/rules
var SO_RULE_PATH ../so_rules
var WHITE_LIST_PATH /etc/snort/rules
var BLACK_LIST_PATH /etc/snort/rules
# Skip ipvars and portvars as they are stock values
var RULE_PATH /etc/snort/rules
var SO_RULE_PATH ../so_rules
var PREPROC_RULE_PATH ../preproc_rules
config disable_decode_alerts
config disable_tcpopt_experimental_alerts
config disable_tcpopt_obsolete_alerts
config disable_tcpopt_ttcp_alerts
config disable_tcpopt_alerts
config disable_ipopt_alerts
config checksum_mode: all
config set_gid: snort
config set_uid: snort
config logdir: /var/log/snort
# Skip preprocessors and dynlibs as they are stock values
output unified2: filename unified2_merged.log
output alert_unified2: filename unified2_alert.log
output log_unified2: filename unified2_log.log
include classification.config
include reference.config
# Note I'm using (part of) the Emerging Threats rule set:
include $RULE_PATH/emerging-attack_response.rules
include $RULE_PATH/emerging-compromised.rules
include $RULE_PATH/emerging-current_events.rules
include $RULE_PATH/emerging-exploit.rules
include $RULE_PATH/emerging-malware.rules
include $RULE_PATH/emerging-mobile_malware.rules
include $RULE_PATH/emerging-policy.rules
include $RULE_PATH/emerging-rbn-malvertisers.rules
include $RULE_PATH/emerging-rbn.rules
include $RULE_PATH/emerging-scan.rules
include $RULE_PATH/emerging-trojan.rules
include $RULE_PATH/emerging-web_client.rules
include $RULE_PATH/emerging-web_server.rules
include $RULE_PATH/emerging-web_specific_apps.rules
include $RULE_PATH/emerging-worm.rules
include threshold.conf
Code:
Barnyard2 conf:
]# grep -v '#' /etc/barnyard2.conf
config reference_file: /etc/snort/reference.config
config classification_file: /etc/snort/classification.config
config gen_file: /etc/snort/gen-msg.map
config sid_file: /etc/snort/sid-msg.map
config logdir: /var/log/barnyard2
config hostname: localhost
config interface: eth0
config waldo_file: /var/tmp/by2.waldo
input unified2
output alert_fast: alert.log
Code:
# Snort and Barnyard2 run as:
]# pgrep -alf snort
1016 /usr/sbin/snort -q -D -i eth0 -u snort -g snort -c /etc/snort/snort.conf -l /var/log/snort
2042 /usr/bin/barnyard2 -c /etc/snort/barnyard2.conf -w /var/tmp/by2.waldo -d /var/log/snort -f unified2_* -l /var/log/barnyard2/ -q -D
Code:
]# odlaw -r /var/tmp/by2.waldo 2>&1
waldo: /var/tmp/by2.waldo
{
  directory = /var/log/snort/
  filebase  = unified2_merged.log
  timestamp = 1401361277
  record    = 460
}
Code:
# Show which open files these processes use:
]# for ITEM in $( pgrep -f snort; pgrep -f barnyard2 ) ; do /usr/sbin/lsof -Pwlnp${ITEM} -a +D/var 2>&1; done|sort -u|column -t
COMMAND    PID     USER   FD   TYPE DEVICE SIZE/OFF    NODE    NAME
barnyard2  2042    0      4w   REG  0,1    14082       1460144 /var/log/barnyard2/alert.log
barnyard2  2042    0      7r   REG  0,1     2056       1460145 /var/tmp/by2.waldo
barnyard2  2042    0      8r   REG  0,1    68726       1460146 /var/log/snort/unified2_merged.log.1401386172
barnyard2  2042    0      9w   REG  0,1     2056       1460147 /var/tmp/by2.waldo
snort      1016    1041   7w   REG  0,1    68726       1460148 /var/log/snort/unified2_merged.log.1401386172
snort      1016    1041   8w   REG  0,1    45341       1460149 /var/log/snort/unified2_alert.log.1401386172
snort      1016    1041   9w   REG  0,1    23385       1460150 /var/log/snort/unified2_log.log.1401386172
snort      1016    1041   cwd  DIR  0,1     4096       1460151 /var/log/snort
Code:
# Snort and Barnyard2 user and group:
]# getent passwd 1041
snort:x:1041:1041:Snort:/var/log/snort:/bin/false

]# getent group 1041
snort:x:1041:
Code:
# Files and modi:
]# ( echo "file user group perms size"; find /etc/snort /var/log/snort /var/log/barnyard2 -printf "%p %U %G %m %s\n" ) | column -t
file                                               user  group  perms  size
/etc/snort                                         0     0      755    4096
/etc/snort/barnyard2.conf                          0     0      640    732
/etc/snort/classification.config                   0     0      644    2638
/etc/snort/unicode.map                             0     0      644    53841
/etc/snort/rules                                   0     0      755    4096
/etc/snort/sid-msg.map                             0     0      644    2798897
/etc/snort/gen-msg.map                             0     0      644    18273
/etc/snort/snort.conf.orig                         0     0      640    27621
/etc/snort/reference.config                        0     0      644    1377
/etc/snort/snort.conf                              0     0      644    22619
/etc/snort/threshold.conf                          0     0      644    2556

/var/log/snort                                     1041  1041   755    4096
/var/log/snort/unified2_alert.log.1401361277       1041  1041   600    101164
/var/log/snort/unified2_merged.log                 1041  1041   600    20980
/var/log/snort/unified2_alert.log                  1041  1041   600    4560
/var/log/snort/unified2_log.log                    1041  1041   600    16420
/var/log/snort/unified2_log.log.1401361277         1041  1041   600    98478
/var/log/snort/unified2_merged.log.1401361277      1041  1041   600    199642
/var/log/snort/unified2_alert.log.1401386172       1041  1041   600    45341
/var/log/snort/unified2_merged.log.1401386172      1041  1041   600    68726
/var/log/snort/unified2_log.log.1401386172         1041  1041   600    23385

/var/log/barnyard2                                 1041  1041   750    4096
/var/log/barnyard2/alert.log                       0     0      640    12261
/var/log/barnyard2/tcpdump.log.1401361201          0     0      600    24
/var/log/barnyard2/tcpdump.log.1401361486          0     0      600    7474
/var/log/barnyard2/tcpdump.log.1401361427          0     0      600    24
/var/log/barnyard2/tcpdump.log.1401361609          0     0      600    7474
/var/log/barnyard2/tcpdump.log.1401361455          0     0      600    24
/var/log/barnyard2/tcpdump.log.1401361297          0     0      600    7474
/var/log/barnyard2/tcpdump.log.1401361413          0     0      600    24
/var/log/barnyard2/tcpdump.log.1401361474          0     0      600    24
*Files left out: Snort rule sets and waldo file.
*Note 24 byte files are actually empty.

So that's what I run. From /var/log/snort/unified2_*log* and /var/log/barnyard2/alert.log you can see it works. Good luck.

Last edited by unSpawn; 05-30-2014 at 01:47 PM. Reason: //correct paths
 
Old 05-30-2014, 12:03 PM   #23
Suburban Errorist
LQ Newbie
 
Registered: May 2014
Posts: 26

Original Poster
Rep: Reputation: Disabled
I ran the commands you showed, and I found this:

*the output for grep -v '#' for both Snort and Barnyard2 are omitted since there's no difference.

Code:
eeepc hadri # pgrep -lf snort
1703 /usr/local/snort/bin/snort -D -k none -u snort -g snort -c /usr/local/snort/etc/snort.conf -i eth1
Code:
eeepc hadri # odlaw -r /var/tmp/by2.waldo 2>&1
odlaw: command not found
(I'm not sure why this doesn't work, even searching for it yields no results)

Code:
eeepc hadri #  for ITEM in $( pgrep -f snort; pgrep -f barnyard2 ) ; do /usr/bin/lsof -Pwlnp${ITEM} -a +D/var 2>&1; done|sort -u|column -t
COMMAND  PID   USER  FD   TYPE  DEVICE  SIZE/OFF  NODE    NAME
snort    1703  1001  10w  REG   8,5     0         923328  /var/log/snort/tcpdump.log.1401467276
snort    1703  1001  7w   REG   8,5     0         923234  /var/log/snort/snort.u2.1401467276
snort    1703  1001  8w   REG   8,5     0         940453  /var/log/snort/snort.alert
snort    1703  1001  9w   REG   8,5     0         940489  /var/log/snort/snort.log
Code:
eeepc hadri # getent passwd 1703
eeepc hadri # getent group 1703
Code:
eeepc hadri # ( echo "file user group perms size"; find /etc/snort /var/log/snort /var/log/barnyard2 -printf "%p %U %G %m %s\n" ) | column -t
find: `/etc/snort': No such file or directory
file                                   user  group  perms  size
/var/log/snort                         1001  1001   757    4096
/var/log/snort/snort.u2.1399898592     1001  1001   600    0
/var/log/snort/snort.log.1399942704    1001  1001   600    0
/var/log/snort/snort.u2.1399903053     1001  1001   600    0
/var/log/snort/snort.u2.1401295287     1001  1001   600    0
/var/log/snort/snort.u2.1401422784     1001  1001   600    0
/var/log/snort/snort.u2.1401374740     1001  1001   600    0
/var/log/snort/snort.u2.1400988730     1001  1001   600    0
/var/log/snort/snort.u2.1400039340     1001  1001   600    0
/var/log/snort/snort.u2.1401024712     1001  1001   600    0
/var/log/snort/snort.u2.1399879707     1001  1001   600    0
/var/log/snort/snort.u2.1400032925     1001  1001   600    0
/var/log/snort/snort.u2.1401297645     1001  1001   600    0
/var/log/snort/snort.u2.1401077324     1001  1001   600    0
/var/log/snort/snort.u2.1399876082     1001  1001   600    0
/var/log/snort/snort.u2.1401255225     1001  1001   600    0
/var/log/snort/snort.u2.1399433121     1001  1001   600    0
/var/log/snort/snort.u2.1400765507     1001  1001   600    0
/var/log/snort/snort.log.1399942834    1001  1001   600    0
/var/log/snort/snort.u2.1399436129     1001  1001   600    0
/var/log/snort/snort.u2.1400992207     1001  1001   600    0
/var/log/snort/snort.u2.1399901576     1001  1001   600    0
/var/log/snort/snort.u2.1400213471     1001  1001   600    0
/var/log/snort/snort.u2.1401467276     1001  1001   600    0
/var/log/snort/snort.u2.1399868773     1001  1001   600    0
/var/log/snort/snort.u2.1400517178     1001  1001   600    0
/var/log/snort/snort.u2.1400052166     1001  1001   600    0
/var/log/snort/snort.u2.1400906568     1001  1001   600    0
/var/log/snort/snort.u2.1400040581     1001  1001   600    0
/var/log/snort/snort.u2.1400423234     1001  1001   600    0
/var/log/snort/snort.u2.1401295761     1001  1001   600    0
/var/log/snort/alert                   0     0      644    0
/var/log/snort/snort.u2.1399875366     1001  1001   600    0
/var/log/snort/alert_barnyard          0     0      644    0
/var/log/snort/snort.u2.1400246859     1001  1001   600    0
/var/log/snort/snort.u2.1399880584     1001  1001   600    0
/var/log/snort/snort.u2.1401076528     1001  1001   600    0
/var/log/snort/snort.u2.1401096625     1001  1001   600    0
/var/log/snort/snort.u2.1401077699     1001  1001   600    0
/var/log/snort/snort.u2.1399901320     1001  1001   600    0
/var/log/snort/snort.u2.1399908023     1001  1001   600    0
/var/log/snort/snort.log               1001  1001   600    0
/var/log/snort/snort.u2.1400052519     1001  1001   600    0
/var/log/snort/snort.alert             1001  1001   600    0
/var/log/snort/snort.u2.1400032546     1001  1001   600    0
/var/log/snort/tcpdump.log.1401095960  1001  1001   600    0
/var/log/snort/snort.u2.1399908381     1001  1001   600    0
/var/log/snort/snort.u2.1400054345     1001  1001   600    0
/var/log/snort/snort.u2.1400421074     1001  1001   600    0
/var/log/snort/snort.u2.1401095960     1001  1001   600    0
/var/log/snort/snort.u2.1401296449     1001  1001   600    0
/var/log/snort/snort.u2.1400388202     1001  1001   600    0
/var/log/snort/snort.u2.1401298702     1001  1001   600    0
/var/log/snort/snort.u2.1401457970     1001  1001   600    0
/var/log/snort/snort.u2.1401433538     1001  1001   600    0
/var/log/snort/snort.u2.1400039917     1001  1001   600    0
/var/log/snort/snort.u2.1399992363     1001  1001   600    0
/var/log/snort/tcpdump.log.1401467276  1001  1001   600    0
/var/log/snort/merged.log              1001  1001   600    0
/var/log/snort/snort.u2.1401082370     1001  1001   600    0
/var/log/snort/snort.u2.1401079276     1001  1001   600    0
/var/log/snort/snort.u2.1401081344     1001  1001   600    0
/var/log/snort/snort.u2.1399878638     1001  1001   600    0
/var/log/snort/test.log                1001  1001   600    0
/var/log/snort/snort.u2.1399869560     1001  1001   600    0
/var/log/snort/snort.u2.1401297288     1001  1001   600    0
/var/log/snort/snort.u2.1399899578     1001  1001   600    0
/var/log/snort/barnyard2.waldo         1001  1001   644    0
/var/log/snort/snort.u2.1399873141     1001  1001   600    0
/var/log/snort/snort.u2.1399875801     1001  1001   600    0
/var/log/snort/snort.log.1399986140    1001  1001   600    0
/var/log/snort/snort.u2.1401367646     1001  1001   600    0
/var/log/snort/snort.u2.1400725851     1001  1001   600    0
/var/log/snort/snort.u2.1399604929     1001  1001   600    0
/var/log/snort/snort.u2.1401171492     1001  1001   600    0
/var/log/snort/snort.u2.1399907202     1001  1001   600    0
/var/log/snort/snort.u2.1401294902     1001  1001   600    0
/var/log/snort/snort.u2.1401255383     1001  1001   600    0
/var/log/barnyard2                     0     0      666    4096
Even changing it to /usr/local/snort/etc/snort yields the same results.

I think the issue here might be caused by barnyard2 itself.
 
Old 05-30-2014, 01:58 PM   #24
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
- On your box the 'odlaw' PERL script resides in /var/log/snort (should be /usr/local/sbin IMHO but anywho) so you should run it as 'perl /var/log/snort/odlaw'.
- Your waldo file isn't "/var/tmp/by2.waldo" but "/var/log/snort/barnyard2.waldo".
- Running 'getent passwd 1703' makes no sense because that's the PID. Your UID to use is 1001.
- Your /var/log/snort directory has permissions 0757. Should be 0750 IMHO.
- Your /var/log/snort/alert and /var/log/snort/alert_barnyard files are both owned by root (not UID 1001) and have read permissions for other (0644).
- Your /var/log/barnyard2 directory has permissions 0666 instead of 0750.

You could try to use my snort.conf and barnyard2.conf configuration files (do adapt paths and file names) and run both Snort and Barnyard2 with the "-T" switches to test, capture the output (add w/o quotes and to the end of your command line '2>&1 | tee -a /tmp/logfile.txt') and attach the /tmp/logfile.txt as plain text file.
 
Old 05-30-2014, 08:47 PM   #25
Suburban Errorist
LQ Newbie
 
Registered: May 2014
Posts: 26

Original Poster
Rep: Reputation: Disabled
Here's the results of the commands you gave me just now:

Code:
eeepc bin # perl /var/log/snort/odlaw.pl -r /var/log/snort/barnyard2.waldo 2>&1
Use of uninitialized value $waldo_raw in unpack at /var/log/snort/odlaw.pl line 72.
waldo: /var/log/snort/barnyard2.waldo
{
  directory = 
  filebase  = 
Use of uninitialized value in concatenation (.) or string at /var/log/snort/odlaw.pl line 101.
  timestamp = 
Use of uninitialized value in concatenation (.) or string at /var/log/snort/odlaw.pl line 102.
  record    = 
}
[!] Read waldo data is incomplete or corrupted.
Code:
eeepc bin # getent passwd 1001
snort:x:1001:1001::/home/snort:/bin/sh
eeepc bin # getent group 1001
snort:x:1001:
Code:
sudo chown -R snort:snort /var/log/snort/alert
sudo chown -R snort:snort /var/log/snort/alert_barnyard

chmod 750 /var/log/snort/alert
chmod 750 /var/log/snort/alert_barnyard
chmod 750 /var/log/snort
chmod 750 /var/log/barnyard2
Code:
eeepc bin # ( echo "file user group perms size"; find /etc/snort /var/log/snort /var/log/barnyard2 -printf "%p %U %G %m %s\n" ) | column -t
find: `/etc/snort': No such file or directory
file                                   user  group  perms  size
/var/log/snort                         1001  1001   750    4096
/var/log/snort/snort.u2.1399898592     1001  1001   600    0
/var/log/snort/snort.log.1399942704    1001  1001   600    0
/var/log/snort/odlaw.pl                1000  1000   777    4533
/var/log/snort/snort.u2.1399903053     1001  1001   600    0
/var/log/snort/snort.u2.1401295287     1001  1001   600    0
/var/log/snort/snort.u2.1401422784     1001  1001   600    0
/var/log/snort/snort.u2.1401374740     1001  1001   600    0
/var/log/snort/snort.u2.1400988730     1001  1001   600    0
/var/log/snort/snort.u2.1400039340     1001  1001   600    0
/var/log/snort/snort.u2.1401024712     1001  1001   600    0
/var/log/snort/snort.u2.1399879707     1001  1001   600    0
/var/log/snort/snort.u2.1400032925     1001  1001   600    0
/var/log/snort/snort.u2.1401297645     1001  1001   600    0
/var/log/snort/snort.u2.1401077324     1001  1001   600    0
/var/log/snort/snort.u2.1399876082     1001  1001   600    0
/var/log/snort/tcpdump.log.1401490435  1001  1001   600    0
/var/log/snort/snort.u2.1401255225     1001  1001   600    0
/var/log/snort/snort.u2.1399433121     1001  1001   600    0
/var/log/snort/snort.u2.1400765507     1001  1001   600    0
/var/log/snort/snort.log.1399942834    1001  1001   600    0
/var/log/snort/snort.u2.1399436129     1001  1001   600    0
/var/log/snort/snort.u2.1400992207     1001  1001   600    0
/var/log/snort/snort.u2.1399901576     1001  1001   600    0
/var/log/snort/snort.u2.1400213471     1001  1001   600    0
/var/log/snort/snort.u2.1401467276     1001  1001   600    0
/var/log/snort/snort.u2.1399868773     1001  1001   600    0
/var/log/snort/snort.u2.1400517178     1001  1001   600    0
/var/log/snort/snort.u2.1400052166     1001  1001   600    0
/var/log/snort/snort.u2.1400906568     1001  1001   600    0
/var/log/snort/snort.u2.1400040581     1001  1001   600    0
/var/log/snort/snort.u2.1400423234     1001  1001   600    0
/var/log/snort/snort.u2.1401295761     1001  1001   600    0
/var/log/snort/alert                   1001  1001   750    0
/var/log/snort/snort.u2.1399875366     1001  1001   600    0
/var/log/snort/alert_barnyard          1001  1001   750    0
/var/log/snort/snort.u2.1400246859     1001  1001   600    0
/var/log/snort/snort.u2.1399880584     1001  1001   600    0
/var/log/snort/snort.u2.1401076528     1001  1001   600    0
/var/log/snort/snort.u2.1401096625     1001  1001   600    0
/var/log/snort/snort.u2.1401077699     1001  1001   600    0
/var/log/snort/snort.u2.1399901320     1001  1001   600    0
/var/log/snort/snort.u2.1399908023     1001  1001   600    0
/var/log/snort/snort.log               1001  1001   600    0
/var/log/snort/snort.u2.1400052519     1001  1001   600    0
/var/log/snort/snort.u2.1401490435     1001  1001   600    0
/var/log/snort/snort.alert             1001  1001   600    0
/var/log/snort/snort.u2.1400032546     1001  1001   600    0
/var/log/snort/tcpdump.log.1401095960  1001  1001   600    0
/var/log/snort/snort.u2.1399908381     1001  1001   600    0
/var/log/snort/snort.u2.1400054345     1001  1001   600    0
/var/log/snort/snort.u2.1400421074     1001  1001   600    0
/var/log/snort/snort.u2.1401095960     1001  1001   600    0
/var/log/snort/snort.u2.1401296449     1001  1001   600    0
/var/log/snort/snort.u2.1400388202     1001  1001   600    0
/var/log/snort/snort.u2.1401298702     1001  1001   600    0
/var/log/snort/snort.u2.1401457970     1001  1001   600    0
/var/log/snort/snort.u2.1401433538     1001  1001   600    0
/var/log/snort/snort.u2.1400039917     1001  1001   600    0
/var/log/snort/snort.u2.1399992363     1001  1001   600    0
/var/log/snort/snort.u2.1401479591     1001  1001   600    0
/var/log/snort/merged.log              1001  1001   600    0
/var/log/snort/snort.u2.1401082370     1001  1001   600    0
/var/log/snort/snort.u2.1401079276     1001  1001   600    0
/var/log/snort/snort.u2.1401081344     1001  1001   600    0
/var/log/snort/snort.u2.1399878638     1001  1001   600    0
/var/log/snort/test.log                1001  1001   600    0
/var/log/snort/snort.u2.1399869560     1001  1001   600    0
/var/log/snort/snort.u2.1401297288     1001  1001   600    0
/var/log/snort/snort.u2.1399899578     1001  1001   600    0
/var/log/snort/barnyard2.waldo         1001  1001   644    0
/var/log/snort/snort.u2.1399873141     1001  1001   600    0
/var/log/snort/snort.u2.1399875801     1001  1001   600    0
/var/log/snort/snort.log.1399986140    1001  1001   600    0
/var/log/snort/snort.u2.1401367646     1001  1001   600    0
/var/log/snort/snort.u2.1400725851     1001  1001   600    0
/var/log/snort/snort.u2.1399604929     1001  1001   600    0
/var/log/snort/snort.u2.1401171492     1001  1001   600    0
/var/log/snort/snort.u2.1399907202     1001  1001   600    0
/var/log/snort/snort.u2.1401294902     1001  1001   600    0
/var/log/snort/snort.u2.1401255383     1001  1001   600    0
/var/log/barnyard2                     1001  1001   750    4096
I'll edit the snort and barnyard2 config files now and see how it goes.
 
Old 05-30-2014, 10:40 PM   #26
Suburban Errorist
LQ Newbie
 
Registered: May 2014
Posts: 26

Original Poster
Rep: Reputation: Disabled
Okay, so I've configured both my Snort and Barnyard2 configuration files:

Code:
 grep -v '#' /usr/local/snort/etc/snort.conf

var HOME_NET any

var EXTERNAL_NET any

var DNS_SERVERS $HOME_NET

var SMTP_SERVERS $HOME_NET

var HTTP_SERVERS $HOME_NET

var SQL_SERVERS $HOME_NET

var TELNET_SERVERS $HOME_NET

var SSH_SERVERS $HOME_NET

var FTP_SERVERS $HOME_NET

var SIP_SERVERS $HOME_NET

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] 

portvar SHELLCODE_PORTS !80

portvar ORACLE_PORTS 1024:

portvar SSH_PORTS 22

portvar FTP_PORTS [21,2100,3535]

portvar SIP_PORTS [5060,5061,5600]

portvar FILE_DATA_PORTS [$HTTP_PORTS,110,143]

portvar GTP_PORTS [2123,2152,3386]

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]

var RULE_PATH /usr/local/snort/rules
var SO_RULE_PATH /usr/local/snort/so_rules
var PREPROC_RULE_PATH /usr/local/snort/preproc_rules

var WHITE_LIST_PATH /usr/local/snort/rules
var BLACK_LIST_PATH /usr/local/snort/rules

config disable_decode_alerts

config disable_tcpopt_experimental_alerts

config disable_tcpopt_obsolete_alerts

config disable_tcpopt_ttcp_alerts

config disable_tcpopt_alerts

config disable_ipopt_alerts

config checksum_mode: all

config set_gid: snort
config set_uid: snort

config logdir: /var/log/snort

config pcre_match_limit: 3500
config pcre_match_limit_recursion: 1500

config detection: search-method ac-split search-optimize max-pattern-len 20

config event_queue: max_queue 8 log 5 order_events content_length

config paf_max: 16000

dynamicpreprocessor directory /usr/local/snort/lib/snort_dynamicpreprocessor/

dynamicengine /usr/local/snort/lib/snort_dynamicengine/libsf_engine.so

dynamicdetection directory /usr/local/snort/lib/snort_dynamicrules

preprocessor normalize_ip4
preprocessor normalize_tcp: ips ecn stream
preprocessor normalize_icmp4
preprocessor normalize_ip6
preprocessor normalize_icmp6

preprocessor frag3_global: max_frags 65536
preprocessor frag3_engine: policy windows detect_anomalies overlap_limit 10 min_fragment_length 100 timeout 180

preprocessor stream5_global: track_tcp yes, \
   track_udp yes, \
   track_icmp no, \ 
   max_tcp 262144, \
   max_udp 131072, \
   max_active_responses 2, \
   min_response_seconds 5
preprocessor stream5_tcp: policy windows, detect_anomalies, require_3whs 180, \
   overlap_limit 10, small_segments 3 bytes 150, timeout 180, \
    ports client 21 22 23 25 42 53 70 79 109 110 111 113 119 135 136 137 139 143 \
        161 445 513 514 587 593 691 1433 1521 1741 2100 3306 6070 6665 6666 6667 6668 6669 \
        7000 8181 32770 32771 32772 32773 32774 32775 32776 32777 32778 32779, \
    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 \
        7801 7900 7901 7902 7903 7904 7905 7906 7908 7909 7910 7911 7912 7913 7914 7915 7916 \
        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
preprocessor stream5_udp: timeout 180

preprocessor http_inspect: global iis_unicode_map unicode.map 1252 compress_depth 65535 decompress_depth 65535
preprocessor http_inspect_server: server default \
    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 } \
    chunk_length 500000 \
    server_flow_depth 0 \
    client_flow_depth 0 \
    post_depth 65495 \
    oversize_dir_length 500 \
    max_header_length 750 \
    max_headers 100 \
    max_spaces 200 \
    small_chunk_length { 10 5 } \
    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 } \
    non_rfc_char { 0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 } \
    enable_cookie \
    extended_response_inspection \
    inspect_gzip \
    normalize_utf \
    unlimited_decompress \
    normalize_javascript \
    apache_whitespace no \
    ascii no \
    bare_byte no \
    directory no \
    double_decode no \
    iis_backslash no \
    iis_delimiter no \
    iis_unicode no \
    multi_slash no \
    utf_8 no \
    u_encode yes \
    webroot no

preprocessor rpc_decode: 111 32770 32771 32772 32773 32774 32775 32776 32777 32778 32779 no_alert_multiple_requests no_alert_large_fragments no_alert_incomplete

preprocessor bo

preprocessor ftp_telnet: global inspection_type stateful encrypted_traffic no check_encrypted
preprocessor ftp_telnet_protocol: telnet \
    ayt_attack_thresh 20 \
    normalize ports { 23 } \
    detect_anomalies
preprocessor ftp_telnet_protocol: ftp server default \
    def_max_param_len 100 \
    ports { 21 2100 3535 } \
    telnet_cmds yes \
    ignore_telnet_erase_cmds yes \
    ftp_cmds { ABOR ACCT ADAT ALLO APPE AUTH CCC CDUP } \
    ftp_cmds { CEL CLNT CMD CONF CWD DELE ENC EPRT } \
    ftp_cmds { EPSV ESTA ESTP FEAT HELP LANG LIST LPRT } \
    ftp_cmds { LPSV MACB MAIL MDTM MIC MKD MLSD MLST } \
    ftp_cmds { MODE NLST NOOP OPTS PASS PASV PBSZ PORT } \
    ftp_cmds { PROT PWD QUIT REIN REST RETR RMD RNFR } \
    ftp_cmds { RNTO SDUP SITE SIZE SMNT STAT STOR STOU } \
    ftp_cmds { STRU SYST TEST TYPE USER XCUP XCRC XCWD } \
    ftp_cmds { XMAS XMD5 XMKD XPWD XRCP XRMD XRSQ XSEM } \
    ftp_cmds { XSEN XSHA1 XSHA256 } \
    alt_max_param_len 0 { ABOR CCC CDUP ESTA FEAT LPSV NOOP PASV PWD QUIT REIN STOU SYST XCUP XPWD } \
    alt_max_param_len 200 { ALLO APPE CMD HELP NLST RETR RNFR STOR STOU XMKD } \
    alt_max_param_len 256 { CWD RNTO } \
    alt_max_param_len 400 { PORT } \
    alt_max_param_len 512 { SIZE } \
    chk_str_fmt { ACCT ADAT ALLO APPE AUTH CEL CLNT CMD } \
    chk_str_fmt { CONF CWD DELE ENC EPRT EPSV ESTP HELP } \
    chk_str_fmt { LANG LIST LPRT MACB MAIL MDTM MIC MKD } \
    chk_str_fmt { MLSD MLST MODE NLST OPTS PASS PBSZ PORT } \
    chk_str_fmt { PROT REST RETR RMD RNFR RNTO SDUP SITE } \
    chk_str_fmt { SIZE SMNT STAT STOR STRU TEST TYPE USER } \
    chk_str_fmt { XCRC XCWD XMAS XMD5 XMKD XRCP XRMD XRSQ } \ 
    chk_str_fmt { XSEM XSEN XSHA1 XSHA256 } \
    cmd_validity ALLO < int [ char R int ] > \    
    cmd_validity EPSV < [ { char 12 | char A char L char L } ] > \
    cmd_validity MACB < string > \
    cmd_validity MDTM < [ date nnnnnnnnnnnnnn[.n[n[n]]] ] string > \
    cmd_validity MODE < char ASBCZ > \
    cmd_validity PORT < host_port > \
    cmd_validity PROT < char CSEP > \
    cmd_validity STRU < char FRPO [ string ] > \    
    cmd_validity TYPE < { char AE [ char NTC ] | char I | char L [ number ] } >
preprocessor ftp_telnet_protocol: ftp client default \
    max_resp_len 256 \
    bounce yes \
    ignore_telnet_erase_cmds yes \
    telnet_cmds yes

preprocessor smtp: ports { 25 465 587 691 } \
    inspection_type stateful \
    b64_decode_depth 0 \
    qp_decode_depth 0 \
    bitenc_decode_depth 0 \
    uu_decode_depth 0 \
    log_mailfrom \
    log_rcptto \
    log_filename \
    log_email_hdrs \
    normalize cmds \
    normalize_cmds { ATRN AUTH BDAT CHUNKING DATA DEBUG EHLO EMAL ESAM ESND ESOM ETRN EVFY } \
    normalize_cmds { EXPN HELO HELP IDENT MAIL NOOP ONEX QUEU QUIT RCPT RSET SAML SEND SOML } \
    normalize_cmds { STARTTLS TICK TIME TURN TURNME VERB VRFY X-ADAT X-DRCP X-ERCP X-EXCH50 } \
    normalize_cmds { X-EXPS X-LINK2STATE XADR XAUTH XCIR XEXCH50 XGEN XLICENSE XQUE XSTA XTRN XUSR } \
    max_command_line_len 512 \
    max_header_line_len 1000 \
    max_response_line_len 512 \
    alt_max_command_line_len 260 { MAIL } \
    alt_max_command_line_len 300 { RCPT } \
    alt_max_command_line_len 500 { HELP HELO ETRN EHLO } \
    alt_max_command_line_len 255 { EXPN VRFY ATRN SIZE BDAT DEBUG EMAL ESAM ESND ESOM EVFY IDENT NOOP RSET } \
    alt_max_command_line_len 246 { SEND SAML SOML AUTH TURN ETRN DATA RSET QUIT ONEX QUEU STARTTLS TICK TIME TURNME VERB X-EXPS X-LINK2STATE XADR XAUTH XCIR XEXCH50 XGEN XLICENSE XQUE XSTA XTRN XUSR } \
    valid_cmds { ATRN AUTH BDAT CHUNKING DATA DEBUG EHLO EMAL ESAM ESND ESOM ETRN EVFY } \ 
    valid_cmds { EXPN HELO HELP IDENT MAIL NOOP ONEX QUEU QUIT RCPT RSET SAML SEND SOML } \
    valid_cmds { STARTTLS TICK TIME TURN TURNME VERB VRFY X-ADAT X-DRCP X-ERCP X-EXCH50 } \
    valid_cmds { X-EXPS X-LINK2STATE XADR XAUTH XCIR XEXCH50 XGEN XLICENSE XQUE XSTA XTRN XUSR } \
    xlink2state { enabled }

preprocessor ssh: server_ports { 22 } \
                  autodetect \
                  max_client_bytes 19600 \
                  max_encrypted_packets 20 \
                  max_server_version_len 100 \
                  enable_respoverflow enable_ssh1crc32 \
                  enable_srvoverflow enable_protomismatch

preprocessor dcerpc2: memcap 102400, events [co ]
preprocessor dcerpc2_server: default, policy WinXP, \
    detect [smb [139,445], tcp 135, udp 135, rpc-over-http-server 593], \
    autodetect [tcp 1025:, udp 1025:, rpc-over-http-server 1025:], \
    smb_max_chain 3, smb_invalid_shares ["C$", "D$", "ADMIN$"]

preprocessor dns: ports { 53 } enable_rdata_overflow

preprocessor ssl: 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 }, trustservers, noinspect_encrypted

preprocessor sensitive_data: alert_threshold 25

preprocessor sip: max_sessions 40000, \
   ports { 5060 5061 5600 }, \
   methods { invite \
             cancel \
             ack \
             bye \
             register \
             options \
             refer \
             subscribe \
             update \
             join \
             info \
             message \
             notify \
             benotify \
             do \
             qauth \
             sprack \
             publish \
             service \
             unsubscribe \
             prack }, \
   max_uri_len 512, \
   max_call_id_len 80, \
   max_requestName_len 20, \
   max_from_len 256, \
   max_to_len 256, \
   max_via_len 1024, \
   max_contact_len 512, \
   max_content_len 2048 

preprocessor imap: \
   ports { 143 } \
   b64_decode_depth 0 \
   qp_decode_depth 0 \
   bitenc_decode_depth 0 \
   uu_decode_depth 0

preprocessor pop: \
   ports { 110 } \
   b64_decode_depth 0 \
   qp_decode_depth 0 \
   bitenc_decode_depth 0 \
   uu_decode_depth 0

preprocessor modbus: ports { 502 }

preprocessor dnp3: ports { 20000 } \
   memcap 262144 \
   check_crc

preprocessor reputation: \
   memcap 500, \
   priority whitelist, \
   nested_ip inner, \
   whitelist $WHITE_LIST_PATH/white_list.rules, \
   blacklist $BLACK_LIST_PATH/black_list.rules 

output unified2: filename unified2_merged.log
output alert_unified2: filename unified2_alert.log
output log_unified2: filename unified2_log.log 

output alert_syslog: LOG_AUTH LOG_ALERT

output log_tcpdump: tcpdump.log

include classification.config
include reference.config

include $RULE_PATH/local.rules

include $RULE_PATH/app-detect.rules
include $RULE_PATH/attack-responses.rules
include $RULE_PATH/backdoor.rules
include $RULE_PATH/bad-traffic.rules
include $RULE_PATH/blacklist.rules
include $RULE_PATH/botnet-cnc.rules
include $RULE_PATH/browser-chrome.rules
include $RULE_PATH/browser-firefox.rules
include $RULE_PATH/browser-ie.rules
include $RULE_PATH/browser-other.rules
include $RULE_PATH/browser-plugins.rules
include $RULE_PATH/browser-webkit.rules
include $RULE_PATH/chat.rules
include $RULE_PATH/content-replace.rules
include $RULE_PATH/ddos.rules
include $RULE_PATH/dns.rules
include $RULE_PATH/dos.rules
include $RULE_PATH/experimental.rules
include $RULE_PATH/exploit-kit.rules
include $RULE_PATH/exploit.rules
include $RULE_PATH/file-executable.rules
include $RULE_PATH/file-flash.rules
include $RULE_PATH/file-identify.rules
include $RULE_PATH/file-image.rules
include $RULE_PATH/file-java.rules
include $RULE_PATH/file-multimedia.rules
include $RULE_PATH/file-office.rules
include $RULE_PATH/file-other.rules
include $RULE_PATH/file-pdf.rules
include $RULE_PATH/finger.rules
include $RULE_PATH/ftp.rules
include $RULE_PATH/icmp-info.rules
include $RULE_PATH/icmp.rules
include $RULE_PATH/imap.rules
include $RULE_PATH/indicator-compromise.rules
include $RULE_PATH/indicator-obfuscation.rules
include $RULE_PATH/indicator-scan.rules
include $RULE_PATH/indicator-shellcode.rules
include $RULE_PATH/info.rules
include $RULE_PATH/malware-backdoor.rules
include $RULE_PATH/malware-cnc.rules
include $RULE_PATH/malware-other.rules
include $RULE_PATH/malware-tools.rules
include $RULE_PATH/misc.rules
include $RULE_PATH/multimedia.rules
include $RULE_PATH/mysql.rules
include $RULE_PATH/netbios.rules
include $RULE_PATH/nntp.rules
include $RULE_PATH/oracle.rules
include $RULE_PATH/os-linux.rules
include $RULE_PATH/os-mobile.rules
include $RULE_PATH/os-other.rules
include $RULE_PATH/os-solaris.rules
include $RULE_PATH/os-windows.rules
include $RULE_PATH/other-ids.rules
include $RULE_PATH/p2p.rules
include $RULE_PATH/phishing-spam.rules
include $RULE_PATH/policy-multimedia.rules
include $RULE_PATH/policy-other.rules
include $RULE_PATH/policy.rules
include $RULE_PATH/policy-social.rules
include $RULE_PATH/policy-spam.rules
include $RULE_PATH/pop2.rules
include $RULE_PATH/pop3.rules
include $RULE_PATH/protocol-dns.rules
include $RULE_PATH/protocol-finger.rules
include $RULE_PATH/protocol-ftp.rules
include $RULE_PATH/protocol-icmp.rules
include $RULE_PATH/protocol-imap.rules
include $RULE_PATH/protocol-nntp.rules
include $RULE_PATH/protocol-pop.rules
include $RULE_PATH/protocol-rpc.rules
include $RULE_PATH/protocol-scada.rules
include $RULE_PATH/protocol-services.rules
include $RULE_PATH/protocol-snmp.rules
include $RULE_PATH/protocol-telnet.rules
include $RULE_PATH/protocol-tftp.rules
include $RULE_PATH/protocol-voip.rules
include $RULE_PATH/pua-adware.rules
include $RULE_PATH/pua-other.rules
include $RULE_PATH/pua-p2p.rules
include $RULE_PATH/pua-toolbars.rules
include $RULE_PATH/rpc.rules
include $RULE_PATH/rservices.rules
include $RULE_PATH/scada.rules
include $RULE_PATH/scan.rules
include $RULE_PATH/server-apache.rules
include $RULE_PATH/server-iis.rules
include $RULE_PATH/server-mail.rules
include $RULE_PATH/server-mssql.rules
include $RULE_PATH/server-mysql.rules
include $RULE_PATH/server-oracle.rules
include $RULE_PATH/server-other.rules
include $RULE_PATH/server-samba.rules
include $RULE_PATH/server-webapp.rules
include $RULE_PATH/shellcode.rules
include $RULE_PATH/smtp.rules
include $RULE_PATH/snmp.rules
include $RULE_PATH/specific-threats.rules
include $RULE_PATH/spyware-put.rules
include $RULE_PATH/sql.rules
include $RULE_PATH/telnet.rules
include $RULE_PATH/tftp.rules
include $RULE_PATH/virus.rules
include $RULE_PATH/voip.rules
include $RULE_PATH/web-activex.rules
include $RULE_PATH/web-attacks.rules
include $RULE_PATH/web-cgi.rules
include $RULE_PATH/web-client.rules
include $RULE_PATH/web-coldfusion.rules
include $RULE_PATH/web-frontpage.rules
include $RULE_PATH/web-iis.rules
include $RULE_PATH/web-misc.rules
include $RULE_PATH/web-php.rules
include $RULE_PATH/x11.rules

include threshold.conf
Code:
eeepc hadri # grep -v '#' /usr/local/snort/etc/barnyard2.conf

config reference_file:      /usr/local/snort/etc/reference.config
config classification_file: /usr/local/snort/etc/classification.config
config gen_file:            /usr/local/snort/etc/gen-msg.map
config sid_file:            /usr/local/snort/etc/sid-msg.map

config logdir: /var/log/barnyard2

config hostname:   localhost
config interface:  eth1

config waldo_file: /tmp/waldo

input unified2

output alert_fast: alert.log

output database: log, mysql, user=snort password=YOURPASSWORD dbname=snort \
host=localhost
 
Old 05-30-2014, 10:40 PM   #27
Suburban Errorist
LQ Newbie
 
Registered: May 2014
Posts: 26

Original Poster
Rep: Reputation: Disabled
And this is the test output for both of Snort and Barnyard2:

Code:
eeepc hadri # /usr/local/snort/bin/snort -T -u snort -g snort -c /usr/local/snort/etc/snort.conf -i eth1 2>&1 | tee -a /home/hadri/Documents/result.txt
Running in Test mode

        --== Initializing Snort ==--
Initializing Output Plugins!
Initializing Preprocessors!
Initializing Plug-ins!
Parsing Rules file "/usr/local/snort/etc/snort.conf"
PortVar 'HTTP_PORTS' defined :  [ 36 80: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: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 ]
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 :  [ 36 80:90 110 143 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: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 ]
PortVar 'GTP_PORTS' defined :  [ 2123 2152 3386 ]
Detection:
   Search-Method = AC-Full-Q
    Split Any/Any group = enabled
    Search-Method-Optimizations = enabled
    Maximum pattern length = 20
Tagged Packet Limit: 256
Loading dynamic engine /usr/local/snort/lib/snort_dynamicengine/libsf_engine.so... done
Loading all dynamic detection libs from /usr/local/snort/lib/snort_dynamicrules...
  Loading dynamic detection library /usr/local/snort/lib/snort_dynamicrules/misc.so... done
  Loading dynamic detection library /usr/local/snort/lib/snort_dynamicrules/web-activex.so... done
  Loading dynamic detection library /usr/local/snort/lib/snort_dynamicrules/bad-traffic.so... done
  Loading dynamic detection library /usr/local/snort/lib/snort_dynamicrules/web-iis.so... done
  Loading dynamic detection library /usr/local/snort/lib/snort_dynamicrules/multimedia.so... done
  Loading dynamic detection library /usr/local/snort/lib/snort_dynamicrules/snmp.so... done
  Loading dynamic detection library /usr/local/snort/lib/snort_dynamicrules/p2p.so... done
  Loading dynamic detection library /usr/local/snort/lib/snort_dynamicrules/icmp.so... done
  Loading dynamic detection library /usr/local/snort/lib/snort_dynamicrules/web-client.so... done
  Loading dynamic detection library /usr/local/snort/lib/snort_dynamicrules/netbios.so... done
  Loading dynamic detection library /usr/local/snort/lib/snort_dynamicrules/chat.so... done
  Loading dynamic detection library /usr/local/snort/lib/snort_dynamicrules/specific-threats.so... done
  Loading dynamic detection library /usr/local/snort/lib/snort_dynamicrules/imap.so... done
  Loading dynamic detection library /usr/local/snort/lib/snort_dynamicrules/nntp.so... done
  Loading dynamic detection library /usr/local/snort/lib/snort_dynamicrules/dos.so... done
  Loading dynamic detection library /usr/local/snort/lib/snort_dynamicrules/exploit.so... done
  Loading dynamic detection library /usr/local/snort/lib/snort_dynamicrules/smtp.so... done
  Loading dynamic detection library /usr/local/snort/lib/snort_dynamicrules/web-misc.so... done
  Finished Loading all dynamic detection libs from /usr/local/snort/lib/snort_dynamicrules
Loading all dynamic preprocessor libs from /usr/local/snort/lib/snort_dynamicpreprocessor/...
  Loading dynamic preprocessor library /usr/local/snort/lib/snort_dynamicpreprocessor//libsf_modbus_preproc.so... done
  Loading dynamic preprocessor library /usr/local/snort/lib/snort_dynamicpreprocessor//libsf_gtp_preproc.so... done
  Loading dynamic preprocessor library /usr/local/snort/lib/snort_dynamicpreprocessor//libsf_imap_preproc.so... done
  Loading dynamic preprocessor library /usr/local/snort/lib/snort_dynamicpreprocessor//libsf_dns_preproc.so... done
  Loading dynamic preprocessor library /usr/local/snort/lib/snort_dynamicpreprocessor//libsf_dnp3_preproc.so... done
  Loading dynamic preprocessor library /usr/local/snort/lib/snort_dynamicpreprocessor//libsf_ftptelnet_preproc.so... done
  Loading dynamic preprocessor library /usr/local/snort/lib/snort_dynamicpreprocessor//libsf_ssh_preproc.so... done
  Loading dynamic preprocessor library /usr/local/snort/lib/snort_dynamicpreprocessor//libsf_sdf_preproc.so... done
  Loading dynamic preprocessor library /usr/local/snort/lib/snort_dynamicpreprocessor//libsf_dce2_preproc.so... done
  Loading dynamic preprocessor library /usr/local/snort/lib/snort_dynamicpreprocessor//libsf_ssl_preproc.so... done
  Loading dynamic preprocessor library /usr/local/snort/lib/snort_dynamicpreprocessor//libsf_sip_preproc.so... done
  Loading dynamic preprocessor library /usr/local/snort/lib/snort_dynamicpreprocessor//libsf_reputation_preproc.so... done
  Loading dynamic preprocessor library /usr/local/snort/lib/snort_dynamicpreprocessor//libsf_smtp_preproc.so... done
  Loading dynamic preprocessor library /usr/local/snort/lib/snort_dynamicpreprocessor//libsf_pop_preproc.so... done
  Finished Loading all dynamic preprocessor libs from /usr/local/snort/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
Stream5 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 up to 2 active responses
    Wait at least 5 seconds between responses
    Protocol Aware Flushing: ACTIVE
        Maximum Flush Point: 16000
      Max Expected Streams: 768
Stream5 TCP Policy config:
    Bound Address: default
    Reassembly Policy: WINDOWS
    Timeout: 180 seconds
    Limit on TCP Overlaps: 10
    Maximum number of bytes to queue per session: 1048576
    Maximum number of segs to queue per session: 2621
    Options:
        Require 3-Way Handshake: YES
        3-Way Handshake Timeout: 180
        Detect Anomalies: YES
    Reassembly Ports:
      21 client (Footprint) 
      22 client (Footprint) 
      23 client (Footprint) 
      25 client (Footprint) 
      36 client (Footprint) server (Footprint)
      42 client (Footprint) 
      53 client (Footprint) 
      70 client (Footprint) 
      79 client (Footprint) 
      80 client (Footprint) server (Footprint)
      81 client (Footprint) server (Footprint)
      82 client (Footprint) server (Footprint)
      83 client (Footprint) server (Footprint)
      84 client (Footprint) server (Footprint)
      85 client (Footprint) server (Footprint)
      86 client (Footprint) server (Footprint)
      87 client (Footprint) server (Footprint)
      88 client (Footprint) server (Footprint)
      89 client (Footprint) server (Footprint)
      90 client (Footprint) server (Footprint)
      additional ports configured but not printed.
Stream5 UDP Policy config:
    Timeout: 180 seconds
HttpInspect Config:
    GLOBAL CONFIG
      Max Pipeline Requests:    0
      Inspection Type:          STATELESS
      Detect Proxy Usage:       NO
      IIS Unicode Map Filename: /usr/local/snort/etc/unicode.map
      IIS Unicode Map Codepage: 1252
      Memcap used for logging URI and Hostname: 150994944
      Max Gzip Memory: 838860
      Max Gzip Sessions: 9532
      Gzip Compress Depth: 65535
      Gzip Decompress Depth: 65535
    DEFAULT SERVER CONFIG:
      Server profile: All
      Ports (PAF): 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 
      Server Flow Depth: 0
      Client Flow Depth: 0
      Max Chunk Length: 500000
      Small Chunk Length Evasion: chunk size <= 10, threshold >= 5 times
      Max Header Field Length: 750
      Max Number Header Fields: 100
      Max Number of WhiteSpaces allowed with header folding: 200
      Inspect Pipeline Requests: YES
      URI Discovery Strict Mode: NO
      Allow Proxy Usage: NO
      Disable Alerting: NO
      Oversize Dir Length: 500
      Only inspect URI: NO
      Normalize HTTP Headers: NO
      Inspect HTTP Cookies: YES
      Inspect HTTP Responses: YES
      Extract Gzip from responses: YES
      Unlimited decompression of gzip data from responses: YES
      Normalize Javascripts in HTTP Responses: YES
      Max Number of WhiteSpaces allowed with Javascript Obfuscation in HTTP responses: 200
      Normalize HTTP Cookies: NO
      Enable XFF and True Client IP: NO
      Log HTTP URI data: NO
      Log HTTP Hostname data: NO
      Extended ASCII code support 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 to 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 for Encrypted Traffic: YES alert: NO
      Continue to check encrypted data: YES
    TELNET CONFIG:
      Ports: 23 
      Are You There Threshold: 20
      Normalize: YES
      Detect Anomalies: YES
    FTP CONFIG:
      FTP Server: default
        Ports (PAF): 21 2100 3535 
        Check for Telnet Cmds: YES alert: YES
        Ignore Telnet Cmd Operations: YES alert: YES
        Ignore open data channels: NO
      FTP Client: default
        Check for Bounce Attacks: YES alert: YES
        Check for 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 DATA DEBUG EHLO EMAL ESAM ESND ESOM ETRN EVFY EXPN HELO HELP IDENT MAIL 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 FROM Address: Enabled
    Log RCPT TO 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
    Detect ports (PAF)
      SMB: 139 445 
      TCP: 135 
      UDP: 135 
      RPC over HTTP server: 593 
      RPC over HTTP proxy: None
    Autodetect ports (PAF)
      SMB: None
      TCP: 1025-65535 
      UDP: 1025-65535 
      RPC over HTTP server: 1025-65535 
      RPC over 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 data is trusted
Sensitive Data preprocessor config: 
    Global Alert Threshold: 25
    Masked Output: DISABLED
SIP config: 
    Max number of sessions: 40000  
    Max number of dialogs in a session: 4 (Default) 
    Status: ENABLED
    Ignore media channel: DISABLED
    Max URI length: 512  
    Max Call ID length: 80  
    Max Request name length: 20 (Default) 
    Max From length: 256 (Default) 
    Max To 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 join info message notify benotify do 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 any whitelist/blacklist entries. Reputation Preprocessor disabled.

+++++++++++++++++++++++++++++++++++++++++++++++++++
Initializing rule chains...
4516 Snort rules read
    4516 detection rules
    0 decoder rules
    0 preprocessor rules
4516 Option Chains linked into 182 Chain Headers
0 Dynamic rules
+++++++++++++++++++++++++++++++++++++++++++++++++++

+-------------------[Rule Port Counts]---------------------------------------
|             tcp     udp    icmp      ip
|     src    1619       7       0       0
|     dst    2340     456       0       0
|     any      91       1       3       0
|      nc      14       0       0       0
|     s+d       1       1       0       0
+----------------------------------------------------------------------------

+-----------------------[detection-filter-config]------------------------------
| memory-cap : 1048576 bytes
+-----------------------[detection-filter-rules]-------------------------------
-------------------------------------------------------------------------------

+-----------------------[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!
ICMP tracking disabled, no ICMP sessions allocated
IP tracking disabled, no IP sessions allocated
WARNING: flowbits key 'file.hhk' is set but not ever checked.
WARNING: flowbits key 'file.wri' is set but not ever checked.
WARNING: flowbits key 'file.nab' is set but not ever checked.
WARNING: flowbits key 'file.xps' is set but not ever checked.
WARNING: flowbits key 'file.lanman' is set but not ever checked.
WARNING: flowbits key 'imap.cram_md5' is set but not ever checked.
WARNING: flowbits key 'file.msi' is set but not ever checked.
WARNING: flowbits key 'kit.blackhole' is set but not ever checked.
WARNING: flowbits key 'file.fon' is set but not ever checked.
WARNING: flowbits key 'hplogin' is set but not ever checked.
WARNING: flowbits key 'file.xfdl' is set but not ever checked.
WARNING: flowbits key 'file.xwd' is set but not ever checked.
WARNING: flowbits key 'file.ram' is checked but not ever set.
WARNING: flowbits key 'file.vwr' is set but not ever checked.
WARNING: flowbits key 'file.fpx' is set but not ever checked.
122 out of 1024 flowbits in use.

[ Port Based Pattern Matching Memory ]
+- [ Aho-Corasick Summary ] -------------------------------------
| Storage Format    : Full-Q 
| Finite Automaton  : DFA
| Alphabet Size     : 256 Chars
| Sizeof State      : Variable (1,2,4 bytes)
| Instances         : 152
|     1 byte states : 141
|     2 byte states : 11
|     4 byte states : 0
| Characters        : 81936
| States            : 63417
| Transitions       : 6661563
| State Density     : 41.0%
| Patterns          : 4545
| Match States      : 5063
| Memory (MB)       : 31.69
|   Patterns        : 0.36
|   Match Lists     : 0.60
|   DFA
|     1 byte states : 0.88
|     2 byte states : 29.70
|     4 byte states : 0.00
+----------------------------------------------------------------
[ Number of patterns truncated to 20 bytes: 289 ]
pcap DAQ configured to passive.
Acquiring network traffic from "eth1".
Set gid to 1001
Set uid to 1001

        --== Initialization Complete ==--

   ,,_     -*> Snort! <*-
  o"  )~   Version 2.9.6.0 GRE (Build 47) 
   ''''    By Martin Roesch & The Snort Team: http://www.snort.org/snort/snort-team
           Copyright (C) 2014 Cisco and/or its affiliates. All rights reserved.
           Copyright (C) 1998-2013 Sourcefire, Inc., et al.
           Using libpcap version 1.4.0
           Using PCRE version: 8.31 2012-07-06
           Using ZLIB version: 1.2.8

           Rules Engine: SF_SNORT_DETECTION_ENGINE  Version 2.1  <Build 1>
           Rules Object: web-misc  Version 1.0  <Build 1>
           Rules Object: smtp  Version 1.0  <Build 1>
           Rules Object: exploit  Version 1.0  <Build 1>
           Rules Object: dos  Version 1.0  <Build 1>
           Rules Object: nntp  Version 1.0  <Build 1>
           Rules Object: imap  Version 1.0  <Build 1>
           Rules Object: specific-threats  Version 1.0  <Build 1>
           Rules Object: chat  Version 1.0  <Build 1>
           Rules Object: netbios  Version 1.0  <Build 1>
           Rules Object: web-client  Version 1.0  <Build 1>
           Rules Object: icmp  Version 1.0  <Build 1>
           Rules Object: p2p  Version 1.0  <Build 1>
           Rules Object: snmp  Version 1.0  <Build 1>
           Rules Object: multimedia  Version 1.0  <Build 1>
           Rules Object: web-iis  Version 1.0  <Build 1>
           Rules Object: bad-traffic  Version 1.0  <Build 1>
           Rules Object: web-activex  Version 1.0  <Build 1>
           Rules Object: misc  Version 1.0  <Build 1>
           Preprocessor Object: SF_POP  Version 1.0  <Build 1>
           Preprocessor Object: SF_SMTP  Version 1.1  <Build 9>
           Preprocessor Object: SF_REPUTATION  Version 1.1  <Build 1>
           Preprocessor Object: SF_SIP  Version 1.1  <Build 1>
           Preprocessor Object: SF_SSLPP  Version 1.1  <Build 4>
           Preprocessor Object: SF_DCERPC2  Version 1.0  <Build 3>
           Preprocessor Object: SF_SDF  Version 1.1  <Build 1>
           Preprocessor Object: SF_SSH  Version 1.1  <Build 3>
           Preprocessor Object: SF_FTPTELNET  Version 1.2  <Build 13>
           Preprocessor Object: SF_DNP3  Version 1.1  <Build 1>
           Preprocessor Object: SF_DNS  Version 1.1  <Build 4>
           Preprocessor Object: SF_IMAP  Version 1.0  <Build 1>
           Preprocessor Object: SF_GTP  Version 1.1  <Build 1>
           Preprocessor Object: SF_MODBUS  Version 1.1  <Build 1>

Snort successfully validated the configuration!
Snort exiting
Code:
eeepc hadri # sudo /usr/local/bin/barnyard2 -c /usr/local/snort/etc/barnyard2.conf -d /var/log/snort -f snort.log -w /var/log/barnyard2/barnyard2.waldo 2>&1 | tee -a /home/hadri/Documents/result2.txt
Running in Continuous mode

        --== Initializing Barnyard2 ==--
Initializing Input Plugins!
Initializing Output Plugins!
Parsing config file "/usr/local/snort/etc/barnyard2.conf"


+[ Signature Suppress list ]+
----------------------------
+[No entry in Signature Suppress List]+
----------------------------
+[ Signature Suppress list ]+

Barnyard2 spooler: Event cache size set to [2048] 
Log directory = /var/log/barnyard2
INFO database: Defaulting Reconnect/Transaction Error limit to 10 
INFO database: Defaulting Reconnect sleep time to 5 second 
database mysql_error: Access denied for user 'snort'@'localhost' (using password: YES)
Barnyard2 exiting
database: Closing connection to database "snort"
===============================================================================
Record Totals:
   Records:           0
   Events:           0 (0.000%)
   Packets:           0 (0.000%)
   Unknown:           0 (0.000%)
   Suppressed:           0 (0.000%)
===============================================================================
Packet breakdown by protocol (includes rebuilt packets):
      ETH: 0          (0.000%)
  ETHdisc: 0          (0.000%)
     VLAN: 0          (0.000%)
     IPV6: 0          (0.000%)
  IP6 EXT: 0          (0.000%)
  IP6opts: 0          (0.000%)
  IP6disc: 0          (0.000%)
      IP4: 0          (0.000%)
  IP4disc: 0          (0.000%)
    TCP 6: 0          (0.000%)
    UDP 6: 0          (0.000%)
    ICMP6: 0          (0.000%)
  ICMP-IP: 0          (0.000%)
      TCP: 0          (0.000%)
      UDP: 0          (0.000%)
     ICMP: 0          (0.000%)
  TCPdisc: 0          (0.000%)
  UDPdisc: 0          (0.000%)
  ICMPdis: 0          (0.000%)
     FRAG: 0          (0.000%)
   FRAG 6: 0          (0.000%)
      ARP: 0          (0.000%)
    EAPOL: 0          (0.000%)
  ETHLOOP: 0          (0.000%)
      IPX: 0          (0.000%)
    OTHER: 0          (0.000%)
  DISCARD: 0          (0.000%)
InvChkSum: 0          (0.000%)
   S5 G 1: 0          (0.000%)
   S5 G 2: 0          (0.000%)
    Total: 0         
===============================================================================
However, the results remain the same:

Code:
ls -lart /var/log/snort

drwxr-xrwx 18 root  root  4096 Mei  31 11:44 ..
-rw-------  1 snort snort    0 Mei  31 11:44 unified2_merged.log.1401507885
-rw-------  1 snort snort    0 Mei  31 11:44 unified2_log.log.1401507885
-rw-------  1 snort snort    0 Mei  31 11:44 unified2_alert.log.1401507885
-rw-------  1 snort snort    0 Mei  31 11:44 tcpdump.log.1401507885
drwxr-x---  2 snort snort 4096 Mei  31 11:44 .

Last edited by Suburban Errorist; 05-30-2014 at 10:51 PM.
 
Old 05-31-2014, 02:53 AM   #28
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Some files now seem to have 777 or 750 access but anyway, did you nmap the host from a remote location after switching configuration files?
 
Old 05-31-2014, 04:52 AM   #29
Suburban Errorist
LQ Newbie
 
Registered: May 2014
Posts: 26

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by unSpawn View Post
Some files now seem to have 777 or 750 access but anyway, did you nmap the host from a remote location after switching configuration files?
Yeah, in fact I did another scan just now and the logfiles still appear to be blank. (Mind you, the way I set it up is there are two computers, one running Windows, and another one running Linux, and they're connected to each other using a switch. And since they're not connected to a router, I used static IPs to establish a connection.)

Code:
C:\Program Files\Nmap>nmap -P0 -n -O -A -sV -v 192.168.2.2

Starting Nmap 6.40 ( http://nmap.org ) at 2014-05-31 17:33 Malay Peninsula Stand
ard Time
NSE: Loaded 110 scripts for scanning.
NSE: Script Pre-scanning.
Initiating ARP Ping Scan at 17:33
Scanning 192.168.2.2 [1 port]
Completed ARP Ping Scan at 17:33, 0.46s elapsed (1 total hosts)
Initiating SYN Stealth Scan at 17:33
Scanning 192.168.2.2 [1000 ports]
Discovered open port 80/tcp on 192.168.2.2
Discovered open port 139/tcp on 192.168.2.2
Discovered open port 445/tcp on 192.168.2.2
Completed SYN Stealth Scan at 17:33, 0.17s elapsed (1000 total ports)
Initiating Service scan at 17:33
Scanning 3 services on 192.168.2.2
Completed Service scan at 17:33, 11.05s elapsed (3 services on 1 host)
Initiating OS detection (try #1) against 192.168.2.2
Retrying OS detection (try #2) against 192.168.2.2
Retrying OS detection (try #3) against 192.168.2.2
Retrying OS detection (try #4) against 192.168.2.2
Retrying OS detection (try #5) against 192.168.2.2
NSE: Script scanning 192.168.2.2.
Initiating NSE at 17:33
Completed NSE at 17:34, 32.07s elapsed
Nmap scan report for 192.168.2.2
Host is up (0.0012s latency).
Not shown: 997 closed ports
PORT    STATE SERVICE     VERSION
80/tcp  open  http        Apache httpd 2.4.6 ((Ubuntu))
|_http-methods: OPTIONS GET HEAD POST
|_http-title: Site doesn't have a title (text/html).
139/tcp open  netbios-ssn Samba smbd 3.X (workgroup: WORKGROUP)
445/tcp open  netbios-ssn Samba smbd 3.X (workgroup: WORKGROUP)
MAC Address: 00:80:8E:8F:8E:1F (Radstone Technology)
No exact OS matches for host (If you know what OS is running on it, see http://n
map.org/submit/ ).
TCP/IP fingerprint:
OS:SCAN(V=6.40%E=4%D=5/31%OT=80%CT=1%CU=37194%PV=Y%DS=1%DC=D%G=Y%M=00808E%T
OS:M=5389A20E%P=i686-pc-windows-windows)SEQ(SP=101%GCD=2%ISR=105%TI=Z%CI=Z%
OS:II=I%TS=8)SEQ(TI=Z%CI=Z%II=I%TS=9)SEQ(CI=Z%II=I)OPS(O1=M5B4ST11NW7%O2=M5
OS:B4ST11NW7%O3=M5B4NNT11NW7%O4=M5B4ST11NW7%O5=M5B4ST11NW7%O6=M5B4ST11)WIN(
OS:W1=7120%W2=7120%W3=7120%W4=7120%W5=7120%W6=7120)ECN(R=Y%DF=Y%T=40%W=7210
OS:%O=M5B4NNSNW7%CC=Y%Q=)T1(R=Y%DF=Y%T=40%S=O%A=S+%F=AS%RD=0%Q=)T2(R=N)T3(R
OS:=N)T4(R=Y%DF=Y%T=40%W=0%S=A%A=Z%F=R%O=%RD=0%Q=)T5(R=Y%DF=Y%T=40%W=0%S=Z%
OS:A=S+%F=AR%O=%RD=0%Q=)T6(R=Y%DF=Y%T=40%W=0%S=A%A=Z%F=R%O=%RD=0%Q=)T7(R=Y%
OS:DF=Y%T=40%W=0%S=Z%A=S+%F=AR%O=%RD=0%Q=)U1(R=Y%DF=N%T=40%IPL=164%UN=0%RIP
OS:L=G%RID=G%RIPCK=G%RUCK=G%RUD=G)IE(R=Y%DFI=N%T=40%CD=S)

Network Distance: 1 hop

Host script results:
| nbstat:
|   NetBIOS name: EEEPC, NetBIOS user: <unknown>, NetBIOS MAC: <unknown>
|   Names
|     EEEPC<00>            Flags: <unique><active>
|     EEEPC<03>            Flags: <unique><active>
|     EEEPC<20>            Flags: <unique><active>
|     \x01\x02__MSBROWSE__\x02<01>  Flags: <group><active>
|     WORKGROUP<1d>        Flags: <unique><active>
|     WORKGROUP<1e>        Flags: <group><active>
|_    WORKGROUP<00>        Flags: <group><active>
| smb-os-discovery:
|   OS: Unix (Samba 3.6.18)
|   Computer name: eeepc
|   NetBIOS computer name:
|   Domain name:
|   FQDN: eeepc
|_  System time: 2014-05-31T17:33:40+08:00
| smb-security-mode:
|   Account that was used for smb scripts: guest
|   User-level authentication
|   SMB Security: Challenge/response passwords supported
|_  Message signing disabled (dangerous, but default)
|_smbv2-enabled: Server doesn't support SMBv2 protocol

TRACEROUTE
HOP RTT     ADDRESS
1   1.22 ms 192.168.2.2

NSE: Script Post-scanning.
Read data files from: C:\Program Files\Nmap
OS and Service detection performed. Please report any incorrect results at http:
//nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 59.24 seconds
           Raw packets sent: 1108 (52.762KB) | Rcvd: 1094 (47.382KB)
 
Old 05-31-2014, 05:29 AM   #30
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
OK. Then we'll try something else. On the machine that runs Snort run this command:
Code:
sudo tcpdump -i eth1 -s0 -w /tmp/packets.pcap
then do another nmap scan. When finished kill tcpdump and run:
Code:
mkdir /tmp/snorttest; sudo cp /tmp/packets.pcap /tmp/snorttest/
sudo tar -cjf /tmp/snorttest.tbz2 /tmp/snorttest/ /usr/local/snort/etc/snort.conf /usr/local/snort/etc/barnyard2.conf
and then contact me by email so I can tell you where to send the tar ball to. I'll see if I can tweak things to work. If I can't then you'll better get on the snort users mailing list.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
snort logs issue rajat83 Linux - Server 3 04-21-2008 04:36 AM
Reading SNORT Logs WarlockofVirgo Linux - Networking 1 08-13-2004 09:24 AM
Snort ?config? problem: empty alert file Gyuszko Linux - Security 4 01-06-2004 03:41 PM
What do these snort logs mean? tarballedtux Linux - Security 1 08-31-2002 10:15 PM
Explain these Snort logs... the theorist Linux - Security 9 04-27-2002 09:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 05:06 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration