Unconfigured Ad Widget

Collapse

Anúncio

Collapse
No announcement yet.

PSAD (Linux) detectar e bloquear ataques port scan em tempo real - Parte 2

Collapse
X
 
  • Filter
  • Tempo
  • Show
Clear All
new posts

  • Font Size
    #1

    Matéria PSAD (Linux) detectar e bloquear ataques port scan em tempo real - Parte 2

    Como posso ver o relatório de verificação de porta(s)?

    Basta digitar o comando a seguir:

    # psad -S

    Exemplo de saída (alguns dados sensíveis foram removidos por questões de segurança do autor): [+] psadwatchd (pid: 2540) %CPU: 0.0 %MEM: 0.0
    Running since: Sun Jul 27 07:14:56 2008

    [+] kmsgsd (pid: 2528) %CPU: 0.0 %MEM: 0.0
    Running since: Sun Jul 27 07:14:55 2008

    [+] psad (pid: 2524) %CPU: 0.0 %MEM: 0.8
    Running since: Sun Jul 27 07:14:55 2008
    Command line arguments: -c /etc/psad/psad.conf
    Alert email address(es): xxxxxx.xxx@xxxxxxxx.com.br

    src: dst: chain: intf: tcp: udp: icmp: dl: alerts: os_guess:
    117.32.xxx.149 xx.22.zz.121 INPUT eth0 1 0 0 2 2 -
    118.167.xxx.219 xx.22.zz.121 INPUT eth0 1 0 0 2 2 -
    118.167.xxx.250 xx.22.zz.121 INPUT eth0 1 0 0 2 2 -
    118.167.xxx.5 xx.22.zz.121 INPUT eth0 1 0 0 2 2 -
    122.167.xx.11 xx.22.zz.121 INPUT eth0 4642 0 0 4 50 -
    122.167.xx.80 xx.22.zz.121 INPUT eth0 0 11 0 1 2 -
    123.134.xx.34 xx.22.zz.121 INPUT eth0 20 0 0 2 9 -
    125.161.xx.3 xx.22.zz.121 INPUT eth0 0 9 0 1 4 -
    125.67.xx.7 xx.22.zz.121 INPUT eth0 1 0 0 2 2 -
    190.159.xxx.220 xx.22.zz.121 INPUT eth0 0 9 0 1 3 -
    193.140.xxx.210 xx.22.zz.121 INPUT eth0 0 10 0 1 2 -
    202.xx.23x.196 xx.22.zz.121 INPUT eth0 0 13 0 1 10 -
    202.xx.2x8.197 xx.22.zz.121 INPUT eth0 0 20 0 2 17 -
    202.97.xxx.198 xx.22.zz.121 INPUT eth0 0 17 0 2 12 -
    202.97.xxx.199 xx.22.zz.121 INPUT eth0 0 18 0 2 15 -
    202.97.xxx.200 xx.22.zz.121 INPUT eth0 0 17 0 2 14 -
    202.97.xxx.201 xx.22.zz.121 INPUT eth0 0 15 0 2 12 -
    202.97.xxx.202 xx.22.zz.121 INPUT eth0 0 21 0 2 16 -
    203.xxx.128.65 xx.22.zz.121 INPUT eth0 12 0 0 2 6 Windows XP/2000
    211.90.xx.14 xx.22.zz.121 INPUT eth0 1 0 0 2 2 -
    213.163.xxx.9 xx.22.zz.121 INPUT eth0 0 0 1 2 2 -
    221.130.xxx.124 xx.22.zz.121 INPUT eth0 0 35 0 2 31 -
    221.206.xxx.10 xx.22.zz.121 INPUT eth0 0 33 0 2 21 -
    221.206.xxx.53 xx.22.zz.121 INPUT eth0 0 33 0 2 27 -
    221.206.xxx.54 xx.22.zz.121 INPUT eth0 0 39 0 2 26 -
    221.206.xxx.57 xx.22.zz.121 INPUT eth0 0 33 0 2 19 -
    60.222.xxx.146 xx.22.zz.121 INPUT eth0 0 40 0 2 33 -
    60.222.xxx.153 xx.22.zz.121 INPUT eth0 0 14 0 1 11 -
    60.222.xxx.154 xx.22.zz.121 INPUT eth0 0 18 0 2 15 -

    Netfilter prefix counters:
    "SPAM DROP Block": 161519
    "Drop Syn Attacks": 136

    Total scan sources: 95
    Total scan destinations: 1

    Total packet counters:
    tcp: 5868
    udp: 164012
    icmp: 2

    Como faço para remover automaticamente os ips bloqueados?

    Simplesmente digite o seguinte comando para remover qualquer ip bloqueado no firewall:

    # psad -F

    Como faço para visualizar log detalhado para cada endereço IP?

    Vá até o arquivo em /var/log/psad/ip.endereco/ pasta. Por exemplo, para exibir o log do endereço IP 11.22.22.33.

    Por exemplo, para ver os registros para o endereço IP 11.22.22.33, digite:

    # cd /var/log/psad/11.22.22.33
    # ls -l


    Exemplo de saída (que fiz em 2008): -rw------- 1 root root 2623 2008-07-30 13:02 xx.22.zz.121_email_alert
    -rw------- 1 root root 32 2008-07-30 13:02 xx.22.zz.121_packet_ctr
    -rw------- 1 root root 0 2008-07-29 00:27 xx.22.zz.121_signatures
    -rw------- 1 root root 11 2008-07-30 13:02 xx.22.zz.121_start_time
    -rw------- 1 root root 2 2008-07-30 13:02 danger_level
    -rw------- 1 root root 2 2008-07-30 13:02 email_count
    -rw------- 1 root root 1798 2008-07-29 00:27 whois

    Use o comando:

    # cat /var/log/psad/11.22.22.33/xx.22.zz.121_email_alert | more
    ou
    # cat /var/log/psad/11.22.22.33/xx.22.zz.121_email_alert|less


    firebits


  • Font Size
    #2
    parabéns, agora só faltou colocar os créditos.
    Apenas usuários registrados e ativados podem ver os links., Clique aqui para se cadastrar...

    se é pra copiar, deixe os créditos do autor.

    Comment


    • Font Size
      #3
      Postado Originalmente por carlos_eduardo Ver Post
      parabéns, agora só faltou colocar os créditos.
      Apenas usuários registrados e ativados podem ver os links., Clique aqui para se cadastrar...

      se é pra copiar, deixe os créditos do autor.
      Se estar tão preocupado com os créditos, porque não lê o artigo ate o final.

      Sem mais.

      Comment

      X
      Working...
      X