PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Snort & mySQL



[oETTi]
12.03.03, 08:39
Hallo zusammen,

ich habe Snort ganz normal wie in vielen Anleitungen beschrieben installiert und konfiguriert.
mySQL läuft, und sowohl die Datenbank als auch der User "snort" existieren inkl. Berechtigungen.

Wenn ich jetzt allerdings snort startet erhalte ich folgende Fehlermeldung:



WARNING: unknown output plugin: 'database'1310 Snort rules read...
1310 Option Chains linked into 139 Chain Headers
0 Dynamic rules


Die betreffende Zeile meiner snort.conf sieht folgendermaßen aus:



output database: log, mysql, user=snortuser password=**** dbname=snort host=localhost


Konfiguriert und installiert habe ich es eigentlich ganz normal.


./configure --with-mysql=/usr/include/mysql
make
make install


Das ganze lief auch ohne Problem durch. Nur mit der o.g. Fehlermeldung komme ich nicht so richtig klar. Vielleicht hat jemand von euch eine Idee woran das liegen könnte. :(

[oETTi]

HangLoose
12.03.03, 08:46
moin moin

die fehlermeldung bekommst du die, wenn du snort mit der option -T startest? wenn nicht starte snort mal mit

snort -T -u snortuser -i ethx -c /etc/snort/snort.conf

und poste mal die ausgabe


Gruß HL

[oETTi]
12.03.03, 09:34
bitte schön:



snort -T -u snortuser -i eth0 -c /etc/snort/snort.conf
Log directory = /var/log/snort

Initializing Network Interface eth0

--== Initializing Snort ==--
Initializing Output Plugins!
Decoding Ethernet on interface eth0
Initializing Preprocessors!
Initializing Plug-ins!
Parsing Rules file /etc/snort/snort.conf

++++++++++++++++++++++++++++++++++++++++++++++++++ +
Initializing rule chains...
No arguments to frag2 directive, setting defaults to:
Fragment timeout: 60 seconds
Fragment memory cap: 4194304 bytes
Fragment min_ttl: 0
Fragment ttl_limit: 5
Fragment Problems: 0
Stream4 config:
Stateful inspection: ACTIVE
Session statistics: INACTIVE
Session timeout: 30 seconds
Session memory cap: 8388608 bytes
State alerts: INACTIVE
Evasion alerts: INACTIVE
Scan alerts: ACTIVE
Log Flushed Streams: INACTIVE
MinTTL: 1
TTL Limit: 5
Async Link: 0
State Protection: 0
Self preservation threshold: 0
Self preservation period: 0
Suspend threshold: 0
Suspend period: 0
Stream4_reassemble config:
Server reassembly: INACTIVE
Client reassembly: ACTIVE
Reassembler alerts: ACTIVE
Ports: 21 23 25 53 80 110 111 143 513 1433
Emergency Ports: 21 23 25 53 80 110 111 143 513 1433
http_decode arguments:
Unicode decoding
IIS alternate Unicode decoding
IIS double encoding vuln
Flip backslash to slash
Include additional whitespace separators
Ports to decode http on: 80
rpc_decode arguments:
Ports to decode RPC on: 111 32771
alert_fragments: INACTIVE
alert_large_fragments: ACTIVE
alert_incomplete: ACTIVE
alert_multiple_requests: ACTIVE
telnet_decode arguments:
Ports to decode telnet on: 21 23 25 119
Conversation Config:
KeepStats: 0
Conv Count: 32000
Timeout : 60
Alert Odd?: 0
Allowed IP Protocols: All

database: compiled support for ( )
database: configured to use mysql
database: 'mysql' support is not compiled into this build of snort

If this build of snort was obtained as a binary distribution (e.g., rpm,
or Windows), then check for alternate builds that contains the necessary
'mysql' support.

If this build of snort was compiled by you, then re-run the
the ./configure script using the '--with-mysql' switch.
For non-standard installations of a database, the '--with-mysql=DIR'
syntax may need to be used to specify the base directory of the DB install.

See the database documentation for cursory details (doc/README.database).
and the URL to the most recent database plugin documentation.
Fatal Error, Quitting..


Mmmh, ich dachte eigentlich mit der Option --with-mysql hätte ich das mit einkompiliert :confused:

HangLoose
12.03.03, 09:39
Mmmh, ich dachte eigentlich mit der Option --with-mysql hätte ich das mit einkompiliert

tja anscheinend ist da was schief gelaufen. möglicherweise hattest du mysql noch nicht installiert beim compilieren von snort. dir wird also nichts weiter übrigbleiben als snort nochmal zu compilieren.


Gruß HL

[oETTi]
12.03.03, 10:32
Ok, läuft jetzt soweit. Habe nochmal alles runtergeschmissen und neu compiliert.
Danke dir. :)

[oETTi]

HangLoose
12.03.03, 10:35
bidde schön ;)


Gruß HL

[oETTi]
12.03.03, 14:00
Hi HL,

da ich gelesen habe das du auch Startprobleme mit snort & ACID hattest ;)
könntest du mir vielleicht jetzt auf die Sprünge helfen.

Wie schaff ich es denn, daß snort/ACID mich jedesmal per E-Mail informiert, wenn jemand einen Portscan durchführt? Ist snort überhaupt dazu geeignet?

Ich bekomme zwar alles in die Datenbank geschrieben, nur eine richtig sinnvolle Auswertung habe ich bis jetzt noch nicht hinbekommen. :(
Liegt wahrscheinlich auch daran, daß ich gerade mal 'n halben Tag am tüffteln bin.

Aber was lange währt, wird gut.

[oETTi]

HangLoose
12.03.03, 14:29
hi


Wie schaff ich es denn, daß snort/ACID mich jedesmal per E-Mail informiert, wenn jemand einen Portscan durchführt? Ist snort überhaupt dazu geeignet?

gratuliere hast mich voll auf'm falschen fuß erwischt ;). es gibt zwar die möglichkeit bei acid die möglichkeit emails zu verschicken. allerdings geht das ganze nicht automatisch, ist mir jedenfalls nicht bekannt. ich muss aber zugeben, das ich mich damit noch nie richtig beschäftigt habe, da mir so ein feature nicht fehlt.

ich habe acid grundsätzlich nebenbei laufen und werfe ab und an mal einen blick rein. es gibt aber bei snort die möglichkeit popup nachrichten zu verschicken. näheres müßtest du dann aber der doku entnehmen => http://www.snort.org/docs/writing_rules/ stichwort alert_smb


Gruß HL

[oETTi]
12.03.03, 14:58
Ne Ne, da liest man und liest man und das wichtige überliest man :D

Snort FAQ (http://www.snort.org/docs/faq.html#5.7)



Q: How do I get snort to e-mail me alerts?

A: Log to syslog and use swatch or logcheck.


Na bitte, werd ich doch gleich mal probieren. Wenn es wieder nennbare Erfolge geben sollte, werde ich diese hier posten. Vielleicht bau ich auch ein Mini-HowTo dazu :rolleyes:

[oETTi]

HangLoose
12.03.03, 15:07
Ne Ne, da liest man und liest man und das wichtige überliest man :D

kenne ich irgendwie ;)



Vielleicht bau ich auch ein Mini-HowTo dazu


mein fall ist das nicht HowTo's schreiben ;). ich hab bisher eins geschrieben => Snort&Acid, ist momentan aber nicht erreichbar, da harrys homepage noch down ist.



Gruß HL

linuxhanz
13.03.03, 14:33
Hier gibts ein Link zu einem Snort Skript

http://home.fhtw-berlin.de/~s0504791/derpraktikant.txt

Einfach nach "Check-Snort" suchen.

HangLoose
13.03.03, 14:47
@linuxhanz

thx


ich kopier das script einfach mal hier rein ;)

Eine verbesserte Version von Check-Snort von Dave Dittrich:

# I have been toying with (I think it was) Andrew's "check-snort" script
# to automate log handling, and taking it a step further, and I've run
# into several issues in the process.

#!/bin/bash

NOTIFY=root
DATE=`date --date=yesterday +%Y.%m.%d`
NOW=`date`

cd /var/log/snort

# Rotate and mail copies of log files (the "right" way)
if [ -s snort.alert ]; then
ln snort.alert snort.alert.$DATE
rm snort.alert
touch snort.alert
chmod 644 snort.alert
(echo "To: $NOTIFY"; \
echo "Subject: SNORT: snort.alert.$DATE"; \
echo "Date: $NOW"; \
echo ""; \
cat snort.alert.$DATE) | /usr/lib/sendmail -t
fi
if [ -s portscan.log ]; then
ln portscan.log portscan.log.$DATE
rm portscan.log
touch portscan.log
chmod 644 portscan.log
(echo "To: $NOTIFY"; \
echo "Subject: SNORT: portscan.log.$DATE"; \
echo "Date: $NOW"; \
echo ""; \
cat portscan.log.$DATE) | /usr/lib/sendmail -t
fi

# Restart snort
/etc/rc.d/init.d/snort restart



Gruß HL

linuxhanz
13.03.03, 15:41
OK ;)

Und wenn Snort nicht loggt dann mal auf den User achten.
Und für alle dies noch nicht wissen: Snort 1.9.0 is vuln...

*grunz *grunz