|
FAQ | Calendário | Postagens do dia | Buscapé | Search |
|
Thread Tools |
Trooper
|
LOG: Pra quem manja de Snort e análise de log
28-03-06, 20:01
#1
Bom, já havia tentado na seção de Linux ( http://forum.darkside.com.br/vb/showthread.php?t=5558 ), mas não consegui as informações que preciso. A questão não é simples...
Possuo ao todo 120 GB de LOG de TELNET, divididos em arquivos de 2 GB cada, tudo gerado pelo Snort num servidor Unix. Estou usando um software chamado T-Sight para reconstruir as telas e analisar o que cada usuário do sistema anda aprontando. O T-Sight abre um arquivo de LOG por vez, processa e gera uma lista de acessos de Telnet com data e hora iniciais, data e hora do término, IP e porta de quem abrir a conexão. Cada arquivo de log desse possui informações de 12 dias de trabalho em média. Tenho usado vários softwares como EnCase, T-Sight e Salamander, mas o que estou precisando é de um software que faça a leitura do LOG e gere um sub LOG de um determinado IP de modo que possa acelerar o processo. Alguém conhece algum script/software pra Windows que gere um LOG reduzido só com as informações que preciso? |
||||
fagmin
|
28-03-06, 20:32
#2
Tem o IP repetido em cada linha do log, tipo log de servidor web? um grep resolve. Posta um trecho do log pra podermos ver o formato, altere os dados pra evitar rolos, obviamente.
|
🌀 Trooper
|
28-03-06, 20:44
#3
imagina a seguinte situação de log:
20-02-2006 - 12:07:10 - 10.10.2.7 - TELNETSERVER - Receiving connection 20-02-2006 - 12:07:10 - 10.10.2.7 - TELNETSERVER - Connection accept 20-02-2006 - 12:07:11 - 10.10.2.7 - TELNETSERVER - Sent balblb 20-02-2006 - 12:08:10 - 10.14.2.242 - TELNETSERVER - Connection reset by peer so fazer grep 'accept' telnetserver.log | awk '{print $6,2}' | sort -rn Se quiser um sumário, | head -10 no final de tudo. |
Trooper
|
29-03-06, 03:12
#4
|
Trooper
|
29-03-06, 03:21
#5
OMFG
LOG DO PROTOCOLO Dá replay e salva log de verdade :/ |
The Alpha Male
|
29-03-06, 06:44
#6
PARA NEH
que tipo de pessoa salva o log do protocolo HAERUIhaer |
Trooper
|
29-03-06, 10:01
#7
Não deixa de ser um arquivo texto, cert? Então basta fazer um GREP como disseram acima, porém com a expression (ip de origem) em hexa invés de decimal...
|
Trooper
|
29-03-06, 19:51
#8
Vou procurar um GREP pra Windows XP. Oooh vida!
|
Trooper
|
29-03-06, 20:10
#9
Achei um Grep meia boca... só preciso descobrir como é que vou conseguir filtrar o LOG e geral um 'mini-log' só com os pacotes de um determinado IP.
Code:
D:\Arquivos de programas\GnuWin32\bin>grep --help Usage: grep [OPTION]... PATTERN [FILE] ... Search for PATTERN in each FILE or standard input. Example: grep -i 'hello world' menu.h main.c Regexp selection and interpretation: -E, --extended-regexp PATTERN is an extended regular expression -F, --fixed-strings PATTERN is a set of newline-separated strings -G, --basic-regexp PATTERN is a basic regular expression -P, --perl-regexp PATTERN is a Perl regular expression -e, --regexp=PATTERN use PATTERN as a regular expression -f, --file=FILE obtain PATTERN from FILE -i, --ignore-case ignore case distinctions -w, --word-regexp force PATTERN to match only whole words -x, --line-regexp force PATTERN to match only whole lines -z, --null-data a data line ends in 0 byte, not newline Miscellaneous: -s, --no-messages suppress error messages -v, --invert-match select non-matching lines -V, --version print version information and exit --help display this help and exit --mmap use memory-mapped input if possible Output control: -m, --max-count=NUM stop after NUM matches -b, --byte-offset print the byte offset with output lines -n, --line-number print line number with output lines --line-buffered flush output on every line -H, --with-filename print the filename for each match -h, --no-filename suppress the prefixing filename on output --label=LABEL print LABEL as filename for standard input -o, --only-matching show only the part of a line matching PATTERN -q, --quiet, --silent suppress all normal output --binary-files=TYPE assume that binary files are TYPE TYPE is 'binary', 'text', or 'without-match' -a, --text equivalent to --binary-files=text -I equivalent to --binary-files=without-match -d, --directories=ACTION how to handle directories ACTION is 'read', 'recurse', or 'skip' -D, --devices=ACTION how to handle devices, FIFOs and sockets ACTION is 'read' or 'skip' -R, -r, --recursive equivalent to --directories=recurse --include=PATTERN files that match PATTERN will be examined --exclude=PATTERN files that match PATTERN will be skipped. --exclude-from=FILE files that match PATTERN in FILE will be skipped. -L, --files-without-match only print FILE names containing no match -l, --files-with-matches only print FILE names containing matches -c, --count only print a count of matching lines per FILE -Z, --null print 0 byte after FILE name Context control: -B, --before-context=NUM print NUM lines of leading context -A, --after-context=NUM print NUM lines of trailing context -C, --context=NUM print NUM lines of output context -NUM same as --context=NUM --color[=WHEN], --colour[=WHEN] use markers to distinguish the matching string WHEN may be `always', `never' or `auto'. -U, --binary do not strip CR characters at EOL (MSDOS) -u, --unix-byte-offsets report offsets as if CRs were not there (MSDOS) `egrep' means `grep -E'. `fgrep' means `grep -F'. With no FILE, or when FILE is -, read standard input. If less than two FILEs given, assume -h. Exit status is 0 if match, 1 if no match, and 2 if trouble. Report bugs to <[email protected]>. D:\Arquivos de programas\GnuWin32\bin> |
Trooper
|
29-03-06, 20:28
#10
D:\Arquivos de programas\GnuWin32\bin\grep.exe 10.0.1.192 snort.log.1115657942 >> processado.log
Gerou o arquivo processado.log vazio. Qual o valor HEXA desse IP?!?! UHAsuhAShu!! |
Trooper
|
29-03-06, 20:36
#11
3130.30.31.313932 ou 31302E302E312E313932
???? HEEEEEEEEEEEEELP ME |
Trooper
|
29-03-06, 20:45
#12
Ou 10E202E12EC0 ???
|
Trooper
|
29-03-06, 21:01
#13
E se o LOG estiver em binário?!
00110001001100000010111000110000001011100011000100101110001100010011100100110010 |
Trooper
|
29-03-06, 21:02
#14
00110001001100000010111000110000001011100011000100101110001100010011100100110010
|
Master Chief
|
29-03-06, 21:06
#15
deixa os usuarios em paz!!
|
Trooper
|
29-03-06, 21:09
#16
Não é usuário não, são empregados!
[SPOILER]01000011011000010110110001100001001000000110000100100000011000100110111101100011011000010010000001010011011001010111001001101010011000010111010101101101001000000111011001101001011000010110010001101111001000010010000100100001001000000011101001000100 Last edited by PIT BULL; 29-03-06 at 21:12.. |
Trooper
|
29-03-06, 21:34
#17
Esse log FDP não é texto não. Essa merda é BINÁRIO.
|
Trooper
|
29-03-06, 21:40
#18
Provavelmente o IP vai ser algo do tipo FF EE DD AA ou AA DD EE FF
Vai ser chato fazer com grep por causa da parada dos newlines.. Ih... Grava log em texto mesmo :/ |
Trooper
|
29-03-06, 21:54
#19
Eluan, não fui eu que instalei o serviço do snort... O log tá pronto, tá gravado e tem 120GB pra analisar. Por isso tô usando o EnCase.
|
Trooper
|
29-03-06, 22:17
#20
|
Banned
|
29-03-06, 23:05
#21
|
The Alpha Male
|
30-03-06, 06:48
#22
como o rocka é burro
snort nao tem nada a ver com snorkel |
Trooper
|
30-03-06, 11:18
#23
Quote:
eu odeio gente de auditoria auhueahue |
|
Trooper
|
30-03-06, 12:28
#24
WinDump is the solution!!
|
Trooper
|
30-03-06, 12:50
#25
Code:
M:\Snort>WinDump -r snort.log.1115657942 host 10.0.1.192 |more reading from file snort.log.1115657942, link-type EN10MB (Ethernet) 14:31:56.898281 IP 10.0.1.192.3987 > 10.0.0.1.23: P 2803563909:2803563910(1) ack 3420914534 win 17098 14:31:56.898404 IP 10.0.0.1.23 > 10.0.1.192.3987: P 1:2(1) ack 1 win 5840 14:31:56.962166 IP 10.0.1.192.3987 > 10.0.0.1.23: P 1:2(1) ack 2 win 17097 14:31:56.962251 IP 10.0.0.1.23 > 10.0.1.192.3987: P 2:3(1) ack 2 win 5840 14:31:57.142073 IP 10.0.1.192.3987 > 10.0.0.1.23: . ack 3 win 17096 14:31:57.193963 IP 10.0.1.192.3987 > 10.0.0.1.23: P 2:3(1) ack 3 win 17096 14:31:57.194044 IP 10.0.0.1.23 > 10.0.1.192.3987: P 3:4(1) ack 3 win 5840 14:31:57.257988 IP 10.0.1.192.3987 > 10.0.0.1.23: P 3:5(2) ack 4 win 17095 14:31:57.258100 IP 10.0.0.1.23 > 10.0.1.192.3987: P 4:6(2) ack 5 win 5840 14:31:57.442513 IP 10.0.1.192.3987 > 10.0.0.1.23: . ack 6 win 17093 14:31:57.442557 IP 10.0.0.1.23 > 10.0.1.192.3987: P 6:8(2) ack 5 win 5840 14:31:57.449930 IP 10.0.1.192.3987 > 10.0.0.1.23: P 5:6(1) ack 8 win 17091 14:31:57.450101 IP 10.0.0.1.23 > 10.0.1.192.3987: P 8:9(1) ack 6 win 5840 14:31:57.513988 IP 10.0.1.192.3987 > 10.0.0.1.23: P 6:7(1) ack 9 win 17090 14:31:57.514108 IP 10.0.0.1.23 > 10.0.1.192.3987: P 9:10(1) ack 7 win 5840 14:31:57.545910 IP 10.0.1.192.3987 > 10.0.0.1.23: P 7:8(1) ack 10 win 17089 14:31:57.546018 IP 10.0.0.1.23 > 10.0.1.192.3987: P 10:11(1) ack 8 win 5840 14:31:57.625884 IP 10.0.1.192.3987 > 10.0.0.1.23: P 8:9(1) ack 11 win 17088 14:31:57.626545 IP 10.0.0.1.23 > 10.0.1.192.3987: P 11:12(1) ack 9 win 5840 14:31:57.742936 IP 10.0.1.192.3987 > 10.0.0.1.23: . ack 12 win 17087 14:31:57.801806 IP 10.0.1.192.3987 > 10.0.0.1.23: P 9:10(1) ack 12 win 17087 14:31:57.801944 IP 10.0.0.1.23 > 10.0.1.192.3987: P 12:13(1) ack 10 win 5840 14:31:57.849886 IP 10.0.1.192.3987 > 10.0.0.1.23: P 10:11(1) ack 13 win 17086 14:31:57.849973 IP 10.0.0.1.23 > 10.0.1.192.3987: P 13:14(1) ack 11 win 5840 14:31:57.913866 IP 10.0.1.192.3987 > 10.0.0.1.23: P 11:12(1) ack 14 win 17085 14:31:57.913960 IP 10.0.0.1.23 > 10.0.1.192.3987: P 14:15(1) ack 12 win 5840 14:31:58.043372 IP 10.0.1.192.3987 > 10.0.0.1.23: . ack 15 win 17084 14:31:58.113777 IP 10.0.1.192.3987 > 10.0.0.1.23: P 12:13(1) ack 15 win 17084 14:31:58.113893 IP 10.0.0.1.23 > 10.0.1.192.3987: P 15:16(1) ack 13 win 5840 14:31:58.193680 IP 10.0.1.192.3987 > 10.0.0.1.23: P 13:15(2) ack 16 win 17083 14:31:58.193787 IP 10.0.0.1.23 > 10.0.1.192.3987: P 16:18(2) ack 15 win 5840 14:31:58.343739 IP 10.0.1.192.3987 > 10.0.0.1.23: . ack 18 win 17081 14:31:58.344002 IP 10.0.0.1.23 > 10.0.1.192.3987: P 18:1298(1280) ack 15 win 5840 14:31:58.544065 IP 10.0.1.192.3987 > 10.0.0.1.23: . ack 1298 win 17520 14:32:01.217166 IP 10.0.1.192.3986 > 10.0.0.1.23: P 2672414562:2672414563(1) ack 3408185694 win 16386 14:32:01.217205 IP 10.0.0.1.23 > 10.0.1.192.3986: . ack 1 win 5840 14:32:01.218978 IP 10.0.0.1.23 > 10.0.1.192.3986: P 1:41(40) ack 1 win 5840 14:32:01.347953 IP 10.0.1.192.3986 > 10.0.0.1.23: . ack 41 win 16346 14:32:01.348021 IP 10.0.0.1.23 > 10.0.1.192.3986: P 41:182(141) ack 1 win 5840 -- Mais -- |
Trooper
|
30-03-06, 12:56
#26
|
Banned
|
30-03-06, 13:01
#27
Quote:
|
|
The Alpha Male
|
30-03-06, 13:13
#28
ban
|
Trooper
|
30-03-06, 23:04
#29
bun
|
Trooper
|
11-05-06, 10:48
#30
PitBull e/ou outros que trabalham e fazem de tudo pra complicar a vida dos usuários:
tenho um log nesse aspecto: Quote:
anyway... o log está nesse aspecto quero organizar essa bagaça, por IP ou por nome da máquina, esse windump faz esse serviço? Senão alguém me dá uma solução. |
|
Banned
|
11-05-06, 11:09
#31
putz,tem um script que separa os logs do postfix, deixa muito organizado... vou ver se da pra adaptar
|
Quagmire
|
11-05-06, 21:25
#32
Snort exige que você remova as regras que geram falsas afirmativas...
Nenhum sistema que faz log é eficiente se você não diferencia o que é alerta de informativo, só serve pra encher a sua partição e confundir o administrador. SKAN, windump é um sniffer para windows, é similar ao TCPDump, ele só audita o que passa na rede em tempo real, é muito bom por sinal. O que você precisa é de um sistema para interpretar o LOG e gerar relatório, no caso do Squid a melhor solução é o SARG (GPL/Projeto Brasileiro) http://sarg.sourceforge.net/ Abraços |
Quagmire
|
11-05-06, 21:29
#33
PS: Telnet !?!?! WTF ?! http://www.openssh.org
|
Trooper
|
12-05-06, 10:32
#35
_j5 - love u
ps: já tava trabalhando no sarg =) |
inativo
|
12-05-06, 17:53
#36
credo... implementa um log de gente do outro lado.. muito mais facil que ficar logando protocolo
|
Trooper
|
13-05-06, 11:56
#37
Quote:
|
|
|
|