SlideShare a Scribd company logo
Visual Log Analysis – The Beauty of Graphs
           DefCon 2006, Las Vegas




           Raffael Marty, GCIA, CISSP
          Manager Solutions @ ArcSight

                August 5th, 2006
                        *
Raffael Marty, GCIA, CISSP
     Enterprise          Security Management (ESM) specialist
     Strategic         Application Solutions @ ArcSight, Inc.
    
          Intrusion Detection Research @ IBM Research
          
                See http://thor.cryptojail.net
    
          IT Security Consultant @ PriceWaterhouse Coopers
    
          Open Vulnerability and Assessment Language
          (OVAL) board member
    
          Passion for Visual Security Event Analysis


Raffael Marty                       DefCon 2006 Las Vegas        2
Table Of Contents
    ► Introduction

    ► Graphing    Basics
    ► AfterGlow

    ► Firewall   Log File Analysis




Raffael Marty                DefCon 2006 Las Vegas   3
Introduction




Raffael Marty   DefCon 2006 Las Vegas   4
Disclaimer


                  IP addresses and host names showing
                up in event graphs and descriptions were
                 obfuscated/changed. The addresses are
                completely random and any resemblance
                with well-known addresses or host names
                          are purely coincidental.




Raffael Marty                  DefCon 2006 Las Vegas       5
Text or Visuals?
  ►What would you rather look at?
     Jun   17   09:42:30   rmarty   ifup: Determining IP information for eth0...
     Jun   17   09:42:35   rmarty   ifup: failed; no link present. Check cable?
     Jun   17   09:42:35   rmarty   network: Bringing up interface eth0: failed
     Jun   17   09:42:38   rmarty   sendmail: sendmail shutdown succeeded
     Jun   17   09:42:38   rmarty   sendmail: sm-client shutdown succeeded
     Jun   17   09:42:39   rmarty   sendmail: sendmail startup succeeded
     Jun   17   09:42:39   rmarty   sendmail: sm-client startup succeeded
     Jun   17   09:43:39   rmarty   vmnet-dhcpd: DHCPINFORM from 172.16.48.128
     Jun   17   09:45:42   rmarty   last message repeated 2 times
     Jun   17   09:45:47   rmarty   vmnet-dhcpd: DHCPINFORM from 172.16.48.128
     Jun   17   09:56:02   rmarty   vmnet-dhcpd: DHCPDISCOVER from 00:0c:29:b7:b2:47 via vmnet8
     Jun   17   09:56:03   rmarty   vmnet-dhcpd: DHCPOFFER on 172.16.48.128 to 00:0c:29:b7:b2:47 via vmnet8
     Jun   17   09:56:03   rmarty   vmnet-dhcpd: DHCPREQUEST for 172.16.48.128 from 00:0c:29:b7:b2:47 via vmnet8
     Jun   17   09:56:03   rmarty   vmnet-dhcpd: DHCPACK on 172.16.48.128 to 00:0c:29:b7:b2:47 via vmnet8
     Jun   17   10:00:03   rmarty   crond(pam_unix)[30534]: session opened for user root by (uid=0)




                                                       A Picture is Worth a
     Jun   17   10:00:10   rmarty   crond(pam_unix)[30534]: session closed for user root




                                                       A Picture is Worth a
     Jun   17   10:01:02   rmarty   crond(pam_unix)[30551]: session opened for user root by (uid=0)
     Jun   17   10:01:07   rmarty   crond(pam_unix)[30551]: session closed for user root
     Jun   17   10:05:02   rmarty   crond(pam_unix)[30567]: session opened for user idabench by (uid=0)
     Jun   17   10:05:05   rmarty   crond(pam_unix)[30567]: session closed for user idabench
     Jun   17   10:13:05   rmarty   portsentry[4797]: attackalert: UDP scan from host: 192.168.80.19/192.168.80.19 to UDP port: 192
     Jun   17   10:13:05   rmarty   portsentry[4797]: attackalert: Host: 192.168.80.19/192.168.80.19 is already blocked Ignoring
     Jun   17   10:14:09   rmarty   portsentry[4797]: attackalert: UDP scan from host: 192.168.80.8/192.168.80.8 to UDP port: 68




                                                       Thousand Log Lines
     Jun   17   10:14:09   rmarty   portsentry[4797]: attackalert: Host: 192.168.80.8/192.168.80.8 is already blocked Ignoring




                                                       Thousand Log Lines
     Jun   17   10:14:09   rmarty   portsentry[4797]: attackalert: UDP scan from host: 192.168.80.8/192.168.80.8 to UDP port: 68
     Jun   17   10:14:09   rmarty   portsentry[4797]: attackalert: Host: 192.168.80.8/192.168.80.8 is already blocked Ignoring
     Jun   17   10:21:30   rmarty   portsentry[4797]: attackalert: UDP scan from host: 192.168.80.8/192.168.80.8 to UDP port: 68
     Jun   17   10:21:30   rmarty   portsentry[4797]: attackalert: Host: 192.168.80.8/192.168.80.8 is already blocked Ignoring
     Jun   17   10:28:40   rmarty   vmnet-dhcpd: DHCPDISCOVER from 00:0c:29:b7:b2:47 via vmnet8
     Jun   17   10:28:41   rmarty   vmnet-dhcpd: DHCPOFFER on 172.16.48.128 to 00:0c:29:b7:b2:47 via vmnet8
     Jun   17   10:28:41   rmarty   vmnet-dhcpd: DHCPREQUEST for 172.16.48.128 from 00:0c:29:b7:b2:47 via vmnet8
     Jun   17   10:28:45   rmarty   vmnet-dhcpd: DHCPACK on 172.16.48.128 to 00:0c:29:b7:b2:47 via vmnet8
     Jun   17   10:30:47   rmarty   portsentry[4797]: attackalert: UDP scan from host: 192.168.80.8/192.168.80.8 to UDP port: 68
     Jun   17   10:30:47   rmarty   portsentry[4797]: attackalert: Host: 192.168.80.8/192.168.80.8 is already blocked Ignoring
     Jun   17   10:30:47   rmarty   portsentry[4797]: attackalert: UDP scan from host: 192.168.80.8/192.168.80.8 to UDP port: 68
     Jun   17   10:30:47   rmarty   portsentry[4797]: attackalert: Host: 192.168.80.8/192.168.80.8 is already blocked Ignoring
     Jun   17   10:35:28   rmarty   vmnet-dhcpd: DHCPINFORM from 172.16.48.128
     Jun   17   10:35:31   rmarty   vmnet-dhcpd: DHCPINFORM from 172.16.48.128
     Jun   17   10:38:51   rmarty   vmnet-dhcpd: DHCPREQUEST for 172.16.48.128 from 00:0c:29:b7:b2:47 via vmnet8
     Jun   17   10:38:52   rmarty   vmnet-dhcpd: DHCPACK on 172.16.48.128 to 00:0c:29:b7:b2:47 via vmnet8
     Jun   17   10:42:35   rmarty   vmnet-dhcpd: DHCPINFORM from 172.16.48.128
     Jun   17   10:42:38   rmarty   vmnet-dhcpd: DHCPINFORM from 172.16.48.128




Raffael Marty                                                                                         DefCon 2006 Las Vegas           6
Graphing Basics




Raffael Marty   DefCon 2006 Las Vegas   7
How To Generate A Graph



                                                                                      ... | Normalization | ...

                               Device                                                                    Parser              Event Visualizer


         Jun   17   09:42:30   rmarty   ifup: Determining IP information for eth0...
         Jun   17   09:42:35   rmarty   ifup: failed; no link present. Check cable?
         Jun   17   09:42:35   rmarty   network: Bringing up interface eth0: failed
         Jun   17   09:42:38   rmarty   sendmail: sendmail shutdown succeeded
         Jun   17   09:42:38   rmarty   sendmail: sm-client shutdown succeeded
         Jun   17   09:42:39   rmarty   sendmail: sendmail startup succeeded
         Jun   17   09:42:39   rmarty   sendmail: sm-client startup succeeded
         Jun   17   09:43:39   rmarty   vmnet-dhcpd: DHCPINFORM from 172.16.48.128
         Jun   17   09:45:42   rmarty   last message repeated 2 times
         Jun   17   09:45:47   rmarty   vmnet-dhcpd: DHCPINFORM from 172.16.48.128


                                                                                                                            Visual
         Jun   17   09:56:02   rmarty   vmnet-dhcpd: DHCPDISCOVER from 00:0c:29:b7:b2:47 via vmnet8
         Jun   17   09:56:03   rmarty   vmnet-dhcpd: DHCPOFFER on 172.16.48.128 to 00:0c:29:b7:b2:47 via vmnet8
         NH




                                        Log File




Raffael Marty                                                                                       DefCon 2006 Las Vegas                       8
Visual Types
  ►Visuals that AfterGlow supports:

                Link Graphs                                  TreeMaps




                        AfterGlow 1.x - Perl                   AfterGlow 2.0 - JAVA


Raffael Marty                        DefCon 2006 Las Vegas                            9
Link Graph Configurations

     Raw Event:
     [**] [1:1923:2] RPC portmap UDP proxy attempt [**]
     [Classification: Decode of an RPC Query] [Priority: 2]
     06/04-15:56:28.219753 192.168.10.90:32859 ->
     192.168.10.255:111
     UDP TTL:64 TOS:0x0 ID:0 IpLen:20 DgmLen:148 DF
     Len: 120

     Different node configurations:

                SIP   Name      DIP                             SIP      DIP            DPort


 192.168.10.90 RPC portmap    192.168.10.255             192.168.10.90 192.168.10.255     111


                SIP   SPort     DPort                           Name     SIP            DIP


 192.168.10.90        32859     111                   RPC portmap 192.168.10.90 192.168.10.255

Raffael Marty                           DefCon 2006 Las Vegas                                   10
Tree Maps




                 All Network Traffic




Raffael Marty         DefCon 2006 Las Vegas   11
Tree Maps


                 20%                             80%




                 UDP                              TCP




                Configuration (Hierarchy): Protocol


Raffael Marty                    DefCon 2006 Las Vegas   12
Tree Maps


                  UDP                               TCP



                                                  HTTP
                 DNS
                 UDP                               TCP
                                                   SSH

                 SNMP                              FTP

                Configuration (Hierarchy): Protocol -> Service


Raffael Marty                     DefCon 2006 Las Vegas          13
AfterGlow
                 afterglow.sourceforge.net




Raffael Marty   DefCon 2006 Las Vegas        14
AfterGlow

                  http://afterglow.sourceforge.net
  ► Two         Versions:
        • AfterGlow 1.x – Perl for Link Graphs
        • AfterGlow 2.0 – Java for TreeMaps


  ► Collection        of Parsers:
        • pf2csv.pl          BSD PacketFilter (pf)
        • tcpdump2csv.pl tcpdump 3.9
        • sendmail2csv.pl Sendmail transaction logs
Raffael Marty                   DefCon 2006 Las Vegas   15
AfterGlow
   Parsers
  ► tcpdump2csv.pl

        • Takes care of swapping response source and targets
            tcpdump -vttttnnelr /tmp/log.tcpdump |
            ./tcpdump2csv.pl "sip dip sport"
  ► sendmail_parser.pl

        • Reassemble email conversations:
                Jul 24 21:01:16 rmarty sendmail[17072]: j6P41Gqt017072:
                from=<root@localhost.localdomain>, size=650, class=0, nrcpts=1,
                Jul 24 21:01:16 rmarty sendmail[17073]: j6P41Gqt017072: to=ram,
                ctladdr=<root@localhost.localdomain> (0/0), delay=00:00:00,
                xdelay=00:00:00, mailer=local, pri=30881, dsn=2.0.0, stat=Sent

  ► pf2csv.pl

        • Parsing OpenBSD pf output

Raffael Marty                           DefCon 2006 Las Vegas                     16
AfterGlow 1.x - Perl

                Parser               AfterGlow                       Grapher
                                                         Graph
                          CSV File                    LanguageFile


  ► Supported            graphing tools:
        • GraphViz from AT&T (dot, neato, circo, twopi)
          http://www.graphviz.org
        • LGL (Large Graph Layout) by Alex Adai
          http://bioinformatics.icmb.utexas.edu/lgl/




Raffael Marty                          DefCon 2006 Las Vegas                   17
AfterGlow 1.x
   Features
  ► Generate         Link Graphs

  ► Filtering   Nodes
        • Based on name
                                                        Fan Out: 3
        • Based on number of occurrences
  ► Fan         Out Filtering
  ► Coloring

        • Edges
        • Nodes
  ► Clustering


Raffael Marty                   DefCon 2006 Las Vegas                18
AfterGlow 1.x
   Command Line Parameters
  
        Some command line arguments:
        -h            : help
        -t            : two node mode
        -d            : print count on nodes
        -e            : edge length
        -n            : no node labels
        -o threshold : omit threshold (fan-out for nodes to be displayed)
        -f threshold : fan out threshold for source node
        -c configfile : color configuration file




Raffael Marty                      DefCon 2006 Las Vegas                    19
AfterGlow 1.x
   Hello World
    Input Data:                  Command:
       a,b                       cat file | ./afterglow –c simple.properties –t 
                                 neato –Tgif –o test.gif
       a,c
       b,c                       simple.properties:
       d,e                        color.source=“green” if ($fields[0] ne “d”)
                                  color.target=“blue” if ($fields[1] ne “e”)
     Output:
                        d         color.source=“red”
                                  color=“green”


                    b       e

                a
                    c



Raffael Marty                   DefCon 2006 Las Vegas                           20
AfterGlow 1.x
   Property File – Color Definition
  
        Coloring:
        color.[source|event|target|edge]=
            <perl expression returning a color name>
  
        Array @fields contains input-line, split into tokens:

        color.event=“red” if ($fields[1] =~ /^192..*)
  
        Filter nodes with “invisible” color:

        color.target=“invisible” if ($fields[0] eq
         “IIS Action”)



Raffael Marty                DefCon 2006 Las Vegas              21
AfterGlow 1.x
   Property File - Clustering
  
        Clustering:
        cluster.[source|event|target]=
            <perl expression returning a cluster name>




Raffael Marty             DefCon 2006 Las Vegas          22
AfterGlow 2.0 - Java


                  Parser                  AfterGlow - Java
                           CSV File



  ► Command        line arguments:
        -h            : help
        -c file       : property file
        -f file       : data file



Raffael Marty                   DefCon 2006 Las Vegas        23
AfterGlow 2.0
   Example
  ► Data:
                        ## AfterGlow -- JAVA 2.0
                            AfterGlow    JAVA 2.0
                        ## Properties File
                            Properties File
           Target System Type,SIP,DIP,User,Outcome
           Development,192.168.10.1,10.10.2.1,ram,failure
                       ## File to load
                           File to load
                       file.name=/home/ram/afterglow/data/sample.csv
           VPN,192.168.10.1,10.10.2.1,ram,success
                        file.name=/home/ram/afterglow/data/sample.csv
           Financial System,192.168.20.1,10.0.3.1,drob,success
                       ## Column Types (default is STRING), start with 0!
           VPN,192.168.10.1,10.10.2.1,ram,success
                           Column Types (default is STRING), start with 0!
                       ## Valid values:
                             Valid values:
           VPN,192.168.10.1,10.10.2.1,jmoe,failure
                       ##     STRING
                               STRING
           Financial System,192.168.10.1,10.10.2.1,jmoe,success
                       ##     INTEGER
                               INTEGER
           Financial System,192.168.10.1,10.10.2.1,jmoe,failure
                       ##     CATEGORICAL
                               CATEGORICAL
                        column.type.count=4
                         column.type.count=4
  ► Launch:             column.type[0].column=0
                         column.type[0].column=0
                        column.type[0].type=INTEGER
                         column.type[0].type=INTEGER
                        column.type[1].column=1
                         column.type[1].column=1
        ./afterglow-java.sh –c afterglow.properties
                        column.type[1].type=CATEGORICAL
                         column.type[1].type=CATEGORICAL
                        column.type[2].column=2
                         column.type[2].column=2
                        column.type[2].type=CATEGORICAL
                         column.type[2].type=CATEGORICAL
                        column.type[3].column=3
                         column.type[3].column=3
                        column.type[3].type=CATEGORICAL
                         column.type[3].type=CATEGORICAL
                        ## Size Column (default is 0)
                            Size Column (default is 0)
                        size.column=0
                         size.column=0
                        ## Color Column (default is 0)
                            Color Column (default is 0)
                        color.column=2
                         color.column=2

Raffael Marty                                DefCon 2006 Las Vegas           24
AfterGlow 2.0
   Output




Raffael Marty      DefCon 2006 Las Vegas   25
AfterGlow 2.0
   Interaction
  ► Left-click:

        • Zoom in
  ► Right-click:

        • Zoom all the way out
  ► Middle-click

        • Change Coloring to current
          depth
            (Hack: Use SHIFT for leafs)




Raffael Marty                    DefCon 2006 Las Vegas   26
Firewall Log File
                   Analysis




Raffael Marty   DefCon 2006 Las Vegas   27
Firewall Log File Analysis
   Overview
  1.        Parse Firewall Log
  2.     Investigate allowed incoming traffic
        ► Do you know what you are dealing with?
  3.     Investigate allowed outgoing traffic
        ► What is leaving the network?
  4.     Investigate blocked outgoing traffic
        ► Mis-configured or compromised internal machines OR
           ACL problem
  5.     Investigate blocked incoming traffic
        ► What is trying to attack me?

Raffael Marty                    DefCon 2006 Las Vegas     28
Firewall Log File Analysis
   Parsing PF Firewall Log
   Input (pflog):
   Feb 18 13:39:15.598491 rule 71/0(match): pass in on xl0: 195.27.249.139.63263 >
   195.141.69.42.80: S 492525755:492525755(0) win 32768 <mss 1460,nop,wscale
   0,nop,nop,timestamp 24053 0> (DF)
   Feb 18 13:39:15.899644 rule 71/0(match): pass in on xl0: 195.27.249.139.63264 >
   195.141.69.42.80: S 875844783:875844783(0) win 32768 <mss 1460,nop,wscale
   0,nop,nop,timestamp 24054 0> (DF)

  Command:
   cat pflog | pf2csv.pl “sip dip dport”

    Output:
    195.27.249.139,195.141.69.42,80
    195.27.249.139,195.141.69.42,80

                                                              AfterGlow Input
   Visualization:
   cat pflog | pf2csv.pl “sip dip dport” | 
   afterglow –c properties | neato –Tgif –o foo.gif
Raffael Marty                         DefCon 2006 Las Vegas                          29
Firewall Log File Analysis
   Passed Incoming Traffic
 Command:
  cat log | grep pass_in | ./afterglow –c properties –d | dot –Tgif –o foo.gif


 Properties:                                                Features/Functions:
   cluster.source="External" if (!match("^195.141.69"))   field()
   color=“red” if (field() eq “External”)                   cluster
   color.event=“blue" if (regex("^195.141.69"))           match()
   color.event=“lightblue”
   color="red"




                                                            Port 100 access
Raffael Marty                       DefCon 2006 Las Vegas                        30
Firewall Log File Analysis
   Passed Outgoing Traffic
 Command:
  cat log | grep pass_out | ./afterglow –c properties –d | neato –Tgif –o foo.gif




Raffael Marty                      DefCon 2006 Las Vegas                            31
Firewall Log File Analysis
   Blocked Outgoing Traffic
 Command:
  cat log | grep block_out | ./afterglow –c properties –d | neato –Tgif –o foo.gif


                                                           What happened?

                                                           Rule-set logs on
                                                           response               block in on xl1



                                                                    Firewall
                                                              request


                                                              response
                                                     Client              xl0 xl1    Server


Raffael Marty                      DefCon 2006 Las Vegas                                         32
Firewall Log File Analysis
   Blocked Outgoing Traffic – 2nd Attempt

  cat log | pf2csv.pl “sip dip dport reversed” | grep –v “R$”
  Uses heuristics to filter responses out


Port 427/svrlog




Raffael Marty                DefCon 2006 Las Vegas              33
Firewall Log File Analysis
   Blocked Incoming Traffic
 Command:
  cat log | grep block_in | ./afterglow –c properties –d | neato –Tgif –o foo.gif



                            You guessed right:
                            WAY TOO MESSY!




Raffael Marty                      DefCon 2006 Las Vegas                            34
Firewall Log File Analysis
   Blocked Incoming Port-Scans
 Command:
  cat log |grep block_in |./afterglow –c properties –d –g 2 | neato –Tgif –o foo.gif


  Properties:
    cluster.target=“>30000” if ($fields[2]>30000)
    cluster.target=“>1024” if ($fields[2]>1024)
    color= . . .




  Feature:
  -g 2 : Filter based on event-node fan-out!
         i.e., more than two ports accessed!




Raffael Marty                       DefCon 2006 Las Vegas                         35
Firewall Log File Analysis
   Blocked Incoming Port-Scans


                                                   SIP


                                                   DIP



                                                   DPort




Raffael Marty              DefCon 2006 Las Vegas           36
Firewall Log File Analysis
   Blocked Incoming Bogon Addresses
  Command:
  cat log | grep block_in |./afterglow –c properties –d | neato –Tgif –o foo.gif




                                This is going
                                to be crazy!




Raffael Marty                      DefCon 2006 Las Vegas                           37
Firewall Log File Analysis
   Blocked Incoming Bogon Addresses
  Command:
  cat log |grep block_in |./afterglow –c properties –d | neato –Tgif –o foo.gif

  Properties:                                                            Bogon Address Space
   variable=@ranges=qw{0.0.0.0/7                 2.0.0.0/8 5.0.0.0/8 7.0.0.0/8 10.0.0.0/8 23.0.0.0/8 27.0.0.0/8
   31.0.0.0/8 36.0.0.0/7 39.0.0.0/8 42.0.0.0/8 49.0.0.0/8 50.0.0.0/8 77.0.0.0/8 78.0.0.0/7 92.0.0.0/6 96.0.0.0/4
   112.0.0.0/5 120.0.0.0/8 127.0.0.0/8 169.254.0.0/16 172.16.0.0/12 173.0.0.0/8 174.0.0.0/7 176.0.0.0/5 184.0.0.0/6
   192.0.2.0/24 192.168.0.0/16 197.0.0.0/8 198.18.0.0/15 223.0.0.0/8 224.0.0.0/3};

    color=$value=0; map{ ($value+=subnet(field(),$_)) } @ranges
    cluster.source=$value=0; map{ $value+=subnet(field(),$_) }
      "red" if ($value)
      @ranges; regex_replace("(d+)")."/8" if
    color="green" if (!match("^(195.141.69)"))
      (!match("^(195.141.69)") && !$value);
    color="blue"
    cluster.target=$value=0; map{ $value+=subnet(field(),$_) }
      @ranges; regex_replace("(d+)")."/8" if
      (!match("^(195.141.69)") && !$value);
    Features:
   variable=
   regex_replace()
   subnet(IP,range) e.g., subnet(“10.0.0.2”,”10.0.0.0/8”)  1 (true)



Raffael Marty                                    DefCon 2006 Las Vegas                                                38
Firewall Log File Analysis
   Blocked Incoming Bogon Addresses

                                                   Bogon Addresses
                                                   External Addresses
                                                   Internal Addresses




Raffael Marty              DefCon 2006 Las Vegas                     39
Summary
    ► Introduced         AfterGlow
          • Filtering
          • Coloring
          • Clustering
    ► Quickly     Visualize Log Files Log Files
                    Don’t Read Log Files
                     Don’t Read
          • Understand Relationships
                        Visualize Them!!
                         Visualize Them!!
          • Find Outliers
          • Spot suspicious activity




Raffael Marty                    DefCon 2006 Las Vegas   40
THANKS!
                     raffy@arcsight.com

Raffael Marty   DefCon 2006 Las Vegas     41

More Related Content

PPT
Log Visualization - Bellua BCS 2006
PPT
Event Graphs - EUSecWest 2006
PDF
Visual Security Event Analysis - DefCon 13 - 2005
TXT
Services
ODP
7.protocols 2
ODP
7. protocols
PDF
Programming TCP for responsiveness
PDF
Why my network does not work? Networking Quiz 2017
Log Visualization - Bellua BCS 2006
Event Graphs - EUSecWest 2006
Visual Security Event Analysis - DefCon 13 - 2005
Services
7.protocols 2
7. protocols
Programming TCP for responsiveness
Why my network does not work? Networking Quiz 2017

What's hot (20)

PDF
The Spectre of Meltdowns
PDF
HPCユーザが知っておきたいTCP/IPの話 ~クラスタ・グリッド環境の落とし穴~
PDF
Networking Fundamentals: Local Networks
PDF
How You Will Get Hacked Ten Years from Now
PPTX
VPP for Stateless SRv6/GTP-U Translation
PDF
Leonardo Nve Egea - Playing in a Satellite Environment 1.2
PDF
Reorganizing Website Architecture for HTTP/2 and Beyond
PDF
L2/L3 für Fortgeschrittene - Helle und dunkle Magie im Linux-Netzwerkstack
PDF
Networking Fundamentals: Transport Protocols (TCP and UDP)
ODP
Networking
PDF
PLNOG 8: Nicolai van der Smagt - IPv6: Transition mechanisms
PPTX
NGS techniques and data
PPT
6.Routing
PDF
Faster packet processing in Linux: XDP
PDF
Dynamische Routingprotokolle Aufzucht und Pflege - OSPF
PDF
Fun with PRB, VRFs and NetNS on Linux - What is it, how does it work, what ca...
PDF
SACSIS2009_TCP.pdf
PPTX
ULA network experience @ JANOG34, by Shishio Tsuchiya [APNIC 38 / APIPv6TF]
PDF
Matrix sapex vs grandstream gxe502 x series
PPTX
Mpls Presentation Ine
The Spectre of Meltdowns
HPCユーザが知っておきたいTCP/IPの話 ~クラスタ・グリッド環境の落とし穴~
Networking Fundamentals: Local Networks
How You Will Get Hacked Ten Years from Now
VPP for Stateless SRv6/GTP-U Translation
Leonardo Nve Egea - Playing in a Satellite Environment 1.2
Reorganizing Website Architecture for HTTP/2 and Beyond
L2/L3 für Fortgeschrittene - Helle und dunkle Magie im Linux-Netzwerkstack
Networking Fundamentals: Transport Protocols (TCP and UDP)
Networking
PLNOG 8: Nicolai van der Smagt - IPv6: Transition mechanisms
NGS techniques and data
6.Routing
Faster packet processing in Linux: XDP
Dynamische Routingprotokolle Aufzucht und Pflege - OSPF
Fun with PRB, VRFs and NetNS on Linux - What is it, how does it work, what ca...
SACSIS2009_TCP.pdf
ULA network experience @ JANOG34, by Shishio Tsuchiya [APNIC 38 / APIPv6TF]
Matrix sapex vs grandstream gxe502 x series
Mpls Presentation Ine
Ad

Similar to Visual Log Analysis - DefCon 2006 (20)

PDF
Insider Threat – The Visual Conviction - FIRST 2007 - Sevilla
PDF
Pentesting111111 Cheat Sheet_OSCP_2023.pdf
PDF
3 scanning-ger paoctes-pub
PDF
Insider Threat Visualization - HackInTheBox 2007
PDF
Insider Threat Visualization - HITB 2007, Kuala Lumpur
PDF
Neighbor Discovery Deep Dive – IPv6-Networking-Referat
PDF
Network Security Best Practice (BCP38 & 140)
PDF
20141102 VyOS 1.1.0 and NIFTY Cloud New Features
PDF
VYOS & RPKI at the BGP as edge
PDF
Charla ipv6
PDF
Building your own sdn with debian linux salt stack and python
PDF
WebRTC: A front-end perspective
PDF
Cloud RPI4 tomcat ARM64
PDF
Lightweight 4-over-6: One step further Dual-Stack Lite Networks (RIPE 76)
PDF
Ltsp talk
PDF
Nessus scan report using the defualt scan policy - Tareq Hanaysha
PPTX
[오픈소스컨설팅] Linux Network Troubleshooting
PDF
Using routing domains / routing tables in a production network by Peter Hessler
Insider Threat – The Visual Conviction - FIRST 2007 - Sevilla
Pentesting111111 Cheat Sheet_OSCP_2023.pdf
3 scanning-ger paoctes-pub
Insider Threat Visualization - HackInTheBox 2007
Insider Threat Visualization - HITB 2007, Kuala Lumpur
Neighbor Discovery Deep Dive – IPv6-Networking-Referat
Network Security Best Practice (BCP38 & 140)
20141102 VyOS 1.1.0 and NIFTY Cloud New Features
VYOS & RPKI at the BGP as edge
Charla ipv6
Building your own sdn with debian linux salt stack and python
WebRTC: A front-end perspective
Cloud RPI4 tomcat ARM64
Lightweight 4-over-6: One step further Dual-Stack Lite Networks (RIPE 76)
Ltsp talk
Nessus scan report using the defualt scan policy - Tareq Hanaysha
[오픈소스컨설팅] Linux Network Troubleshooting
Using routing domains / routing tables in a production network by Peter Hessler
Ad

More from Raffael Marty (20)

PDF
Exploring the Defender's Advantage
PDF
Extended Detection and Response (XDR) An Overhyped Product Category With Ulti...
PPTX
How To Drive Value with Security Data
PDF
Cyber Security Beyond 2020 – Will We Learn From Our Mistakes?
PDF
Artificial Intelligence – Time Bomb or The Promised Land?
PDF
Understanding the "Intelligence" in AI
PDF
Security Chat 5.0
PDF
AI & ML in Cyber Security - Why Algorithms are Dangerous
PDF
AI & ML in Cyber Security - Why Algorithms Are Dangerous
PPTX
Delivering Security Insights with Data Analytics and Visualization
PPTX
AI & ML in Cyber Security - Welcome Back to 1999 - Security Hasn't Changed
PDF
Security Insights at Scale
PDF
Creating Your Own Threat Intel Through Hunting & Visualization
PDF
Creating Your Own Threat Intel Through Hunting & Visualization
PDF
Visualization in the Age of Big Data
PDF
Big Data Visualization
PDF
The Heatmap
 - Why is Security Visualization so Hard?
PDF
Workshop: Big Data Visualization for Security
PDF
Visualization for Security
PDF
The Heatmap
 - Why is Security Visualization so Hard?
Exploring the Defender's Advantage
Extended Detection and Response (XDR) An Overhyped Product Category With Ulti...
How To Drive Value with Security Data
Cyber Security Beyond 2020 – Will We Learn From Our Mistakes?
Artificial Intelligence – Time Bomb or The Promised Land?
Understanding the "Intelligence" in AI
Security Chat 5.0
AI & ML in Cyber Security - Why Algorithms are Dangerous
AI & ML in Cyber Security - Why Algorithms Are Dangerous
Delivering Security Insights with Data Analytics and Visualization
AI & ML in Cyber Security - Welcome Back to 1999 - Security Hasn't Changed
Security Insights at Scale
Creating Your Own Threat Intel Through Hunting & Visualization
Creating Your Own Threat Intel Through Hunting & Visualization
Visualization in the Age of Big Data
Big Data Visualization
The Heatmap
 - Why is Security Visualization so Hard?
Workshop: Big Data Visualization for Security
Visualization for Security
The Heatmap
 - Why is Security Visualization so Hard?

Recently uploaded (20)

PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Encapsulation theory and applications.pdf
PDF
cuic standard and advanced reporting.pdf
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
Big Data Technologies - Introduction.pptx
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Empathic Computing: Creating Shared Understanding
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
Spectroscopy.pptx food analysis technology
PPTX
sap open course for s4hana steps from ECC to s4
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
Diabetes mellitus diagnosis method based random forest with bat algorithm
Unlocking AI with Model Context Protocol (MCP)
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Encapsulation theory and applications.pdf
cuic standard and advanced reporting.pdf
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
NewMind AI Weekly Chronicles - August'25 Week I
Digital-Transformation-Roadmap-for-Companies.pptx
Advanced methodologies resolving dimensionality complications for autism neur...
Big Data Technologies - Introduction.pptx
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Empathic Computing: Creating Shared Understanding
20250228 LYD VKU AI Blended-Learning.pptx
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Dropbox Q2 2025 Financial Results & Investor Presentation
Spectroscopy.pptx food analysis technology
sap open course for s4hana steps from ECC to s4
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Reach Out and Touch Someone: Haptics and Empathic Computing

Visual Log Analysis - DefCon 2006

  • 1. Visual Log Analysis – The Beauty of Graphs DefCon 2006, Las Vegas Raffael Marty, GCIA, CISSP Manager Solutions @ ArcSight August 5th, 2006 *
  • 2. Raffael Marty, GCIA, CISSP  Enterprise Security Management (ESM) specialist  Strategic Application Solutions @ ArcSight, Inc.  Intrusion Detection Research @ IBM Research  See http://thor.cryptojail.net  IT Security Consultant @ PriceWaterhouse Coopers  Open Vulnerability and Assessment Language (OVAL) board member  Passion for Visual Security Event Analysis Raffael Marty DefCon 2006 Las Vegas 2
  • 3. Table Of Contents ► Introduction ► Graphing Basics ► AfterGlow ► Firewall Log File Analysis Raffael Marty DefCon 2006 Las Vegas 3
  • 4. Introduction Raffael Marty DefCon 2006 Las Vegas 4
  • 5. Disclaimer IP addresses and host names showing up in event graphs and descriptions were obfuscated/changed. The addresses are completely random and any resemblance with well-known addresses or host names are purely coincidental. Raffael Marty DefCon 2006 Las Vegas 5
  • 6. Text or Visuals? ►What would you rather look at? Jun 17 09:42:30 rmarty ifup: Determining IP information for eth0... Jun 17 09:42:35 rmarty ifup: failed; no link present. Check cable? Jun 17 09:42:35 rmarty network: Bringing up interface eth0: failed Jun 17 09:42:38 rmarty sendmail: sendmail shutdown succeeded Jun 17 09:42:38 rmarty sendmail: sm-client shutdown succeeded Jun 17 09:42:39 rmarty sendmail: sendmail startup succeeded Jun 17 09:42:39 rmarty sendmail: sm-client startup succeeded Jun 17 09:43:39 rmarty vmnet-dhcpd: DHCPINFORM from 172.16.48.128 Jun 17 09:45:42 rmarty last message repeated 2 times Jun 17 09:45:47 rmarty vmnet-dhcpd: DHCPINFORM from 172.16.48.128 Jun 17 09:56:02 rmarty vmnet-dhcpd: DHCPDISCOVER from 00:0c:29:b7:b2:47 via vmnet8 Jun 17 09:56:03 rmarty vmnet-dhcpd: DHCPOFFER on 172.16.48.128 to 00:0c:29:b7:b2:47 via vmnet8 Jun 17 09:56:03 rmarty vmnet-dhcpd: DHCPREQUEST for 172.16.48.128 from 00:0c:29:b7:b2:47 via vmnet8 Jun 17 09:56:03 rmarty vmnet-dhcpd: DHCPACK on 172.16.48.128 to 00:0c:29:b7:b2:47 via vmnet8 Jun 17 10:00:03 rmarty crond(pam_unix)[30534]: session opened for user root by (uid=0) A Picture is Worth a Jun 17 10:00:10 rmarty crond(pam_unix)[30534]: session closed for user root A Picture is Worth a Jun 17 10:01:02 rmarty crond(pam_unix)[30551]: session opened for user root by (uid=0) Jun 17 10:01:07 rmarty crond(pam_unix)[30551]: session closed for user root Jun 17 10:05:02 rmarty crond(pam_unix)[30567]: session opened for user idabench by (uid=0) Jun 17 10:05:05 rmarty crond(pam_unix)[30567]: session closed for user idabench Jun 17 10:13:05 rmarty portsentry[4797]: attackalert: UDP scan from host: 192.168.80.19/192.168.80.19 to UDP port: 192 Jun 17 10:13:05 rmarty portsentry[4797]: attackalert: Host: 192.168.80.19/192.168.80.19 is already blocked Ignoring Jun 17 10:14:09 rmarty portsentry[4797]: attackalert: UDP scan from host: 192.168.80.8/192.168.80.8 to UDP port: 68 Thousand Log Lines Jun 17 10:14:09 rmarty portsentry[4797]: attackalert: Host: 192.168.80.8/192.168.80.8 is already blocked Ignoring Thousand Log Lines Jun 17 10:14:09 rmarty portsentry[4797]: attackalert: UDP scan from host: 192.168.80.8/192.168.80.8 to UDP port: 68 Jun 17 10:14:09 rmarty portsentry[4797]: attackalert: Host: 192.168.80.8/192.168.80.8 is already blocked Ignoring Jun 17 10:21:30 rmarty portsentry[4797]: attackalert: UDP scan from host: 192.168.80.8/192.168.80.8 to UDP port: 68 Jun 17 10:21:30 rmarty portsentry[4797]: attackalert: Host: 192.168.80.8/192.168.80.8 is already blocked Ignoring Jun 17 10:28:40 rmarty vmnet-dhcpd: DHCPDISCOVER from 00:0c:29:b7:b2:47 via vmnet8 Jun 17 10:28:41 rmarty vmnet-dhcpd: DHCPOFFER on 172.16.48.128 to 00:0c:29:b7:b2:47 via vmnet8 Jun 17 10:28:41 rmarty vmnet-dhcpd: DHCPREQUEST for 172.16.48.128 from 00:0c:29:b7:b2:47 via vmnet8 Jun 17 10:28:45 rmarty vmnet-dhcpd: DHCPACK on 172.16.48.128 to 00:0c:29:b7:b2:47 via vmnet8 Jun 17 10:30:47 rmarty portsentry[4797]: attackalert: UDP scan from host: 192.168.80.8/192.168.80.8 to UDP port: 68 Jun 17 10:30:47 rmarty portsentry[4797]: attackalert: Host: 192.168.80.8/192.168.80.8 is already blocked Ignoring Jun 17 10:30:47 rmarty portsentry[4797]: attackalert: UDP scan from host: 192.168.80.8/192.168.80.8 to UDP port: 68 Jun 17 10:30:47 rmarty portsentry[4797]: attackalert: Host: 192.168.80.8/192.168.80.8 is already blocked Ignoring Jun 17 10:35:28 rmarty vmnet-dhcpd: DHCPINFORM from 172.16.48.128 Jun 17 10:35:31 rmarty vmnet-dhcpd: DHCPINFORM from 172.16.48.128 Jun 17 10:38:51 rmarty vmnet-dhcpd: DHCPREQUEST for 172.16.48.128 from 00:0c:29:b7:b2:47 via vmnet8 Jun 17 10:38:52 rmarty vmnet-dhcpd: DHCPACK on 172.16.48.128 to 00:0c:29:b7:b2:47 via vmnet8 Jun 17 10:42:35 rmarty vmnet-dhcpd: DHCPINFORM from 172.16.48.128 Jun 17 10:42:38 rmarty vmnet-dhcpd: DHCPINFORM from 172.16.48.128 Raffael Marty DefCon 2006 Las Vegas 6
  • 7. Graphing Basics Raffael Marty DefCon 2006 Las Vegas 7
  • 8. How To Generate A Graph ... | Normalization | ... Device Parser Event Visualizer Jun 17 09:42:30 rmarty ifup: Determining IP information for eth0... Jun 17 09:42:35 rmarty ifup: failed; no link present. Check cable? Jun 17 09:42:35 rmarty network: Bringing up interface eth0: failed Jun 17 09:42:38 rmarty sendmail: sendmail shutdown succeeded Jun 17 09:42:38 rmarty sendmail: sm-client shutdown succeeded Jun 17 09:42:39 rmarty sendmail: sendmail startup succeeded Jun 17 09:42:39 rmarty sendmail: sm-client startup succeeded Jun 17 09:43:39 rmarty vmnet-dhcpd: DHCPINFORM from 172.16.48.128 Jun 17 09:45:42 rmarty last message repeated 2 times Jun 17 09:45:47 rmarty vmnet-dhcpd: DHCPINFORM from 172.16.48.128 Visual Jun 17 09:56:02 rmarty vmnet-dhcpd: DHCPDISCOVER from 00:0c:29:b7:b2:47 via vmnet8 Jun 17 09:56:03 rmarty vmnet-dhcpd: DHCPOFFER on 172.16.48.128 to 00:0c:29:b7:b2:47 via vmnet8 NH Log File Raffael Marty DefCon 2006 Las Vegas 8
  • 9. Visual Types ►Visuals that AfterGlow supports: Link Graphs TreeMaps AfterGlow 1.x - Perl AfterGlow 2.0 - JAVA Raffael Marty DefCon 2006 Las Vegas 9
  • 10. Link Graph Configurations Raw Event: [**] [1:1923:2] RPC portmap UDP proxy attempt [**] [Classification: Decode of an RPC Query] [Priority: 2] 06/04-15:56:28.219753 192.168.10.90:32859 -> 192.168.10.255:111 UDP TTL:64 TOS:0x0 ID:0 IpLen:20 DgmLen:148 DF Len: 120 Different node configurations: SIP Name DIP SIP DIP DPort 192.168.10.90 RPC portmap 192.168.10.255 192.168.10.90 192.168.10.255 111 SIP SPort DPort Name SIP DIP 192.168.10.90 32859 111 RPC portmap 192.168.10.90 192.168.10.255 Raffael Marty DefCon 2006 Las Vegas 10
  • 11. Tree Maps All Network Traffic Raffael Marty DefCon 2006 Las Vegas 11
  • 12. Tree Maps 20% 80% UDP TCP Configuration (Hierarchy): Protocol Raffael Marty DefCon 2006 Las Vegas 12
  • 13. Tree Maps UDP TCP HTTP DNS UDP TCP SSH SNMP FTP Configuration (Hierarchy): Protocol -> Service Raffael Marty DefCon 2006 Las Vegas 13
  • 14. AfterGlow afterglow.sourceforge.net Raffael Marty DefCon 2006 Las Vegas 14
  • 15. AfterGlow http://afterglow.sourceforge.net ► Two Versions: • AfterGlow 1.x – Perl for Link Graphs • AfterGlow 2.0 – Java for TreeMaps ► Collection of Parsers: • pf2csv.pl BSD PacketFilter (pf) • tcpdump2csv.pl tcpdump 3.9 • sendmail2csv.pl Sendmail transaction logs Raffael Marty DefCon 2006 Las Vegas 15
  • 16. AfterGlow Parsers ► tcpdump2csv.pl • Takes care of swapping response source and targets tcpdump -vttttnnelr /tmp/log.tcpdump | ./tcpdump2csv.pl "sip dip sport" ► sendmail_parser.pl • Reassemble email conversations: Jul 24 21:01:16 rmarty sendmail[17072]: j6P41Gqt017072: from=<root@localhost.localdomain>, size=650, class=0, nrcpts=1, Jul 24 21:01:16 rmarty sendmail[17073]: j6P41Gqt017072: to=ram, ctladdr=<root@localhost.localdomain> (0/0), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30881, dsn=2.0.0, stat=Sent ► pf2csv.pl • Parsing OpenBSD pf output Raffael Marty DefCon 2006 Las Vegas 16
  • 17. AfterGlow 1.x - Perl Parser AfterGlow Grapher Graph CSV File LanguageFile ► Supported graphing tools: • GraphViz from AT&T (dot, neato, circo, twopi) http://www.graphviz.org • LGL (Large Graph Layout) by Alex Adai http://bioinformatics.icmb.utexas.edu/lgl/ Raffael Marty DefCon 2006 Las Vegas 17
  • 18. AfterGlow 1.x Features ► Generate Link Graphs ► Filtering Nodes • Based on name Fan Out: 3 • Based on number of occurrences ► Fan Out Filtering ► Coloring • Edges • Nodes ► Clustering Raffael Marty DefCon 2006 Las Vegas 18
  • 19. AfterGlow 1.x Command Line Parameters  Some command line arguments: -h : help -t : two node mode -d : print count on nodes -e : edge length -n : no node labels -o threshold : omit threshold (fan-out for nodes to be displayed) -f threshold : fan out threshold for source node -c configfile : color configuration file Raffael Marty DefCon 2006 Las Vegas 19
  • 20. AfterGlow 1.x Hello World Input Data: Command: a,b cat file | ./afterglow –c simple.properties –t neato –Tgif –o test.gif a,c b,c simple.properties: d,e color.source=“green” if ($fields[0] ne “d”) color.target=“blue” if ($fields[1] ne “e”) Output: d color.source=“red” color=“green” b e a c Raffael Marty DefCon 2006 Las Vegas 20
  • 21. AfterGlow 1.x Property File – Color Definition  Coloring: color.[source|event|target|edge]= <perl expression returning a color name>  Array @fields contains input-line, split into tokens: color.event=“red” if ($fields[1] =~ /^192..*)  Filter nodes with “invisible” color: color.target=“invisible” if ($fields[0] eq “IIS Action”) Raffael Marty DefCon 2006 Las Vegas 21
  • 22. AfterGlow 1.x Property File - Clustering  Clustering: cluster.[source|event|target]= <perl expression returning a cluster name> Raffael Marty DefCon 2006 Las Vegas 22
  • 23. AfterGlow 2.0 - Java Parser AfterGlow - Java CSV File ► Command line arguments: -h : help -c file : property file -f file : data file Raffael Marty DefCon 2006 Las Vegas 23
  • 24. AfterGlow 2.0 Example ► Data: ## AfterGlow -- JAVA 2.0 AfterGlow JAVA 2.0 ## Properties File Properties File Target System Type,SIP,DIP,User,Outcome Development,192.168.10.1,10.10.2.1,ram,failure ## File to load File to load file.name=/home/ram/afterglow/data/sample.csv VPN,192.168.10.1,10.10.2.1,ram,success file.name=/home/ram/afterglow/data/sample.csv Financial System,192.168.20.1,10.0.3.1,drob,success ## Column Types (default is STRING), start with 0! VPN,192.168.10.1,10.10.2.1,ram,success Column Types (default is STRING), start with 0! ## Valid values: Valid values: VPN,192.168.10.1,10.10.2.1,jmoe,failure ## STRING STRING Financial System,192.168.10.1,10.10.2.1,jmoe,success ## INTEGER INTEGER Financial System,192.168.10.1,10.10.2.1,jmoe,failure ## CATEGORICAL CATEGORICAL column.type.count=4 column.type.count=4 ► Launch: column.type[0].column=0 column.type[0].column=0 column.type[0].type=INTEGER column.type[0].type=INTEGER column.type[1].column=1 column.type[1].column=1 ./afterglow-java.sh –c afterglow.properties column.type[1].type=CATEGORICAL column.type[1].type=CATEGORICAL column.type[2].column=2 column.type[2].column=2 column.type[2].type=CATEGORICAL column.type[2].type=CATEGORICAL column.type[3].column=3 column.type[3].column=3 column.type[3].type=CATEGORICAL column.type[3].type=CATEGORICAL ## Size Column (default is 0) Size Column (default is 0) size.column=0 size.column=0 ## Color Column (default is 0) Color Column (default is 0) color.column=2 color.column=2 Raffael Marty DefCon 2006 Las Vegas 24
  • 25. AfterGlow 2.0 Output Raffael Marty DefCon 2006 Las Vegas 25
  • 26. AfterGlow 2.0 Interaction ► Left-click: • Zoom in ► Right-click: • Zoom all the way out ► Middle-click • Change Coloring to current depth (Hack: Use SHIFT for leafs) Raffael Marty DefCon 2006 Las Vegas 26
  • 27. Firewall Log File Analysis Raffael Marty DefCon 2006 Las Vegas 27
  • 28. Firewall Log File Analysis Overview 1. Parse Firewall Log 2. Investigate allowed incoming traffic ► Do you know what you are dealing with? 3. Investigate allowed outgoing traffic ► What is leaving the network? 4. Investigate blocked outgoing traffic ► Mis-configured or compromised internal machines OR ACL problem 5. Investigate blocked incoming traffic ► What is trying to attack me? Raffael Marty DefCon 2006 Las Vegas 28
  • 29. Firewall Log File Analysis Parsing PF Firewall Log Input (pflog): Feb 18 13:39:15.598491 rule 71/0(match): pass in on xl0: 195.27.249.139.63263 > 195.141.69.42.80: S 492525755:492525755(0) win 32768 <mss 1460,nop,wscale 0,nop,nop,timestamp 24053 0> (DF) Feb 18 13:39:15.899644 rule 71/0(match): pass in on xl0: 195.27.249.139.63264 > 195.141.69.42.80: S 875844783:875844783(0) win 32768 <mss 1460,nop,wscale 0,nop,nop,timestamp 24054 0> (DF) Command: cat pflog | pf2csv.pl “sip dip dport” Output: 195.27.249.139,195.141.69.42,80 195.27.249.139,195.141.69.42,80 AfterGlow Input Visualization: cat pflog | pf2csv.pl “sip dip dport” | afterglow –c properties | neato –Tgif –o foo.gif Raffael Marty DefCon 2006 Las Vegas 29
  • 30. Firewall Log File Analysis Passed Incoming Traffic Command: cat log | grep pass_in | ./afterglow –c properties –d | dot –Tgif –o foo.gif Properties: Features/Functions: cluster.source="External" if (!match("^195.141.69")) field() color=“red” if (field() eq “External”) cluster color.event=“blue" if (regex("^195.141.69")) match() color.event=“lightblue” color="red" Port 100 access Raffael Marty DefCon 2006 Las Vegas 30
  • 31. Firewall Log File Analysis Passed Outgoing Traffic Command: cat log | grep pass_out | ./afterglow –c properties –d | neato –Tgif –o foo.gif Raffael Marty DefCon 2006 Las Vegas 31
  • 32. Firewall Log File Analysis Blocked Outgoing Traffic Command: cat log | grep block_out | ./afterglow –c properties –d | neato –Tgif –o foo.gif What happened? Rule-set logs on response  block in on xl1 Firewall request response Client xl0 xl1 Server Raffael Marty DefCon 2006 Las Vegas 32
  • 33. Firewall Log File Analysis Blocked Outgoing Traffic – 2nd Attempt cat log | pf2csv.pl “sip dip dport reversed” | grep –v “R$” Uses heuristics to filter responses out Port 427/svrlog Raffael Marty DefCon 2006 Las Vegas 33
  • 34. Firewall Log File Analysis Blocked Incoming Traffic Command: cat log | grep block_in | ./afterglow –c properties –d | neato –Tgif –o foo.gif You guessed right: WAY TOO MESSY! Raffael Marty DefCon 2006 Las Vegas 34
  • 35. Firewall Log File Analysis Blocked Incoming Port-Scans Command: cat log |grep block_in |./afterglow –c properties –d –g 2 | neato –Tgif –o foo.gif Properties: cluster.target=“>30000” if ($fields[2]>30000) cluster.target=“>1024” if ($fields[2]>1024) color= . . . Feature: -g 2 : Filter based on event-node fan-out! i.e., more than two ports accessed! Raffael Marty DefCon 2006 Las Vegas 35
  • 36. Firewall Log File Analysis Blocked Incoming Port-Scans SIP DIP DPort Raffael Marty DefCon 2006 Las Vegas 36
  • 37. Firewall Log File Analysis Blocked Incoming Bogon Addresses Command: cat log | grep block_in |./afterglow –c properties –d | neato –Tgif –o foo.gif This is going to be crazy! Raffael Marty DefCon 2006 Las Vegas 37
  • 38. Firewall Log File Analysis Blocked Incoming Bogon Addresses Command: cat log |grep block_in |./afterglow –c properties –d | neato –Tgif –o foo.gif Properties: Bogon Address Space variable=@ranges=qw{0.0.0.0/7 2.0.0.0/8 5.0.0.0/8 7.0.0.0/8 10.0.0.0/8 23.0.0.0/8 27.0.0.0/8 31.0.0.0/8 36.0.0.0/7 39.0.0.0/8 42.0.0.0/8 49.0.0.0/8 50.0.0.0/8 77.0.0.0/8 78.0.0.0/7 92.0.0.0/6 96.0.0.0/4 112.0.0.0/5 120.0.0.0/8 127.0.0.0/8 169.254.0.0/16 172.16.0.0/12 173.0.0.0/8 174.0.0.0/7 176.0.0.0/5 184.0.0.0/6 192.0.2.0/24 192.168.0.0/16 197.0.0.0/8 198.18.0.0/15 223.0.0.0/8 224.0.0.0/3}; color=$value=0; map{ ($value+=subnet(field(),$_)) } @ranges cluster.source=$value=0; map{ $value+=subnet(field(),$_) } "red" if ($value) @ranges; regex_replace("(d+)")."/8" if color="green" if (!match("^(195.141.69)")) (!match("^(195.141.69)") && !$value); color="blue" cluster.target=$value=0; map{ $value+=subnet(field(),$_) } @ranges; regex_replace("(d+)")."/8" if (!match("^(195.141.69)") && !$value); Features: variable= regex_replace() subnet(IP,range) e.g., subnet(“10.0.0.2”,”10.0.0.0/8”)  1 (true) Raffael Marty DefCon 2006 Las Vegas 38
  • 39. Firewall Log File Analysis Blocked Incoming Bogon Addresses Bogon Addresses External Addresses Internal Addresses Raffael Marty DefCon 2006 Las Vegas 39
  • 40. Summary ► Introduced AfterGlow • Filtering • Coloring • Clustering ► Quickly Visualize Log Files Log Files Don’t Read Log Files Don’t Read • Understand Relationships Visualize Them!! Visualize Them!! • Find Outliers • Spot suspicious activity Raffael Marty DefCon 2006 Las Vegas 40
  • 41. THANKS! raffy@arcsight.com Raffael Marty DefCon 2006 Las Vegas 41