ก ก An Automate Log Analyzer for Digital Forensic Investigation. ก Mongkol Pirarak ก ก 2553



Similar documents
Load Balance Mechanism

Firewall VPN Router. Quick Installation Guide M73-APO09-380

Multi-Homing Dual WAN Firewall Router


Open Source Security Tool Overview

Chapter 6 Configuring the SSL VPN Tunnel Client and Port Forwarding

PowerLink Bandwidth Aggregation Redundant WAN Link and VPN Fail-Over Solutions

ZyWALL 5. Internet Security Appliance. Quick Start Guide Version 3.62 (XD.0) May 2004

Astaro Security Gateway V8. Remote Access via SSL Configuring ASG and Client

For extra services running behind your router. What to do after IP change

SSL SSL VPN

Network Configuration Settings

Network/Internet Forensic and Intrusion Log Analysis

Gigabit SSL VPN Security Router

NEFSIS DEDICATED SERVER

information security and its Describe what drives the need for information security.

Network Security. Network Packet Analysis

SANGFOR SSL VPN. Quick Start Guide

Funkwerk UTM Release Notes (english)

Topics in Network Security

Load Balance Router R258V

Getting Started with PRTG Network Monitor 2012 Paessler AG

Wireless G Broadband quick install

Chapter 5. Data Communication And Internet Technology

UIP1868P User Interface Guide

Connecting to and Setting Up a Network

How To Configure A Vyatta As A Ds Internet Connection Router/Gateway With A Web Server On A Dspv.Net (Dspv) On A Network With A D

F-Secure Internet Gatekeeper

Multi-Homing Security Gateway

Appendix C Network Planning for Dual WAN Ports

Cisco RV082 Dual WAN VPN Router Cisco Small Business Routers

How To Configure A Kiwi Ip Address On A Gbk (Networking) To Be A Static Ip Address (Network) On A Ip Address From A Ipad (Netware) On An Ipad Or Ipad 2 (

Network Security. Network Security. Protective and Dependable. > UTM Content Security Gateway. > VPN Security Gateway. > Multi-Homing Security Gateway

Linux firewall. Need of firewall Single connection between network Allows restricted traffic between networks Denies un authorized users

Linux Network Security

Sophos UTM. Remote Access via SSL. Configuring UTM and Client

Guide to Computer Forensics and Investigations, Second Edition

SMC7901WBRA2-B1 Installation Guide

Security. TestOut Modules

Chapter 2 Preparing Your Network

Comtrend 1 Port Router Installation Guide CT-5072T

DRO-210i LOAD BALANCING ROUTER. Review Package Contents

Corporate VPN Using Mikrotik Cloud Feature. By SOUMIL GUPTA BHAYA Mikortik Certified Trainer

Sophos UTM. Remote Access via PPTP. Configuring UTM and Client

Administrator's Guide

Comodo MyDLP Software Version 2.0. Installation Guide Guide Version Comodo Security Solutions 1255 Broad Street Clifton, NJ 07013

REQUIREMENTS AND INSTALLATION OF THE NEFSIS DEDICATED SERVER

Network Monitoring and Traffic Analysis

Internet Privacy Options

The 7th National Conference on Computing and Information Technology. A Web-based Single Sign-on (SSO) using SAML 2.0

1. Hardware Installation

Quick Note 026. Using the firewall of a Digi TransPort to redirect HTTP Traffic to a proxy server. Digi International Technical Support December 2011

Trouble shooting Guide <<<Field and NOC Engineer Perspective>>>

Some Tools for Computer Security Incident Response Team (CSIRT)

Beginning OpenVPN 2.0.9

Multi-Homing Gateway. User s Manual

Edgewater Routers User Guide

ENHWI-N n Wireless Router

Innominate mguard Version 6

AlienVault Installation Guide

Chapter 1 Configuring Basic Connectivity

NETWORK SETUP GLOSSARY

ZEN LOAD BALANCER EE v3.04 DATASHEET The Load Balancing made easy

ESR b/g/n SOHO Router

If you have questions or find errors in the guide, please, contact us under the following address:

Introduction to Passive Network Traffic Monitoring

ESR (Go Green Series) Wireless-N Broadband Router / AP / Repeater. 2.4 GHz b/g/n 300 Mbps

Installing and Configuring Websense Content Gateway

Fortigate Features & Demo

BOSS (Broadband Office Storage Server) a Network Server Appliance (NSA) User Manual

How to Create, Setup, and Configure an Ubuntu Router with a Transparent Proxy.

Firewall Testing. Cameron Kerr Telecommunications Programme University of Otago. May 16, 2005

Front LEDs... 2 Rear Ports... 3 BASIC INSTALLATION... 4 Connecting Your Router... 5 Network Configuration... 6

DSL-2600U. User Manual V 1.0

Scan Report Executive Summary. Part 2. Component Compliance Summary IP Address :

Edgewater Routers User Guide

Networking Basics and Network Security

IBM. Vulnerability scanning and best practices

ESR b/g/n SOHO Router

Lab VI Capturing and monitoring the network traffic

Sweex Wireless BroadBand Router + 4 port switch + print server

SSL Web Proxy. Generally to access an internal web server which is behind a NAT router, you have the following two methods:

Emerald. Network Collector Version 4.0. Emerald Management Suite IEA Software, Inc.

Barracuda Link Balancer Administrator s Guide

JK0-022 CompTIA Academic/E2C Security+ Certification Exam CompTIA

Broadband Phone Gateway BPG510 Technical Users Guide

Configuring Global Protect SSL VPN with a user-defined port

SOHO 6 Wireless Installation Procedure Windows 95/98/ME with Internet Explorer 5.x & 6.0

802.11b/g/n SOHO Router 2.4GHz 150Mbps 11N AP/Router

BorderWare Firewall Server 7.1. Release Notes

Installing Virtual Coordinator (VC) in Linux Systems that use RPM (Red Hat, Fedora, CentOS) Document # 15807A1-103 Date: Aug 06, 2012

Practical Network Forensics

Introduction to Network Security Lab 1 - Wireshark

Intrusion Detection and Prevention: Network and IDS Configuration and Monitoring using Snort

Astaro Security Gateway V8. Remote Access via L2TP over IPSec Configuring ASG and Client

Mailstation & DM Series Communications Device, LAN Constant Connection, PC Meter Connect, and Wi Fi Connection Networking Guide

Ciphermail Gateway Separate Front-end and Back-end Configuration Guide

Prestige 650R-31/33 Read Me First

Firewall Defaults, Public Server Rule, and Secondary WAN IP Address

Transcription:

ก ก An Automate Log Analyzer for Digital Forensic Investigation ก Mongkol Pirarak ก ก ก ก ก ก 2553

ก ก ก ก ก ก ก 5217660022 ก.. 2553.. ก ก ก ก ก ก (Automated Log Analyzer) ก ก ก ก ก ก ก ก ก ก ก กก ก ก ก ก ก I

ก ก ก ก ก ก ก ก ก.. ก ก ก ก ก ก ก ก ก ก ก II

... I ก ก ก... II... III... V... VI 1... 1.1 กก... 1 1.2... 1 1.3... 1 1.4... 2 1.5... 2 1.6 ก ก... 3 2 ก ก ก... 2.1 ก (Forensics Framework)... 4 2.1.1 ก ก (Preparation)... 5 2.1.2 ก (Detection)... 5 2.1.3 ก ก ก (Incident response)... 5 2.1.4 ก ก (Collection)... 6 2.1.5 ก ก ก (Preservation)... 6 2.1.6 ก (Examination)... 6 2.1.7 ก (Analysis)... 6 2.1.8 ก (Investigation)... 7 2.1.9 ก (Presentation)... 7 2.2 Dynamic Forensics... 7 2.3 ก ก ก... 8 2.4 ก ก... 8 2.5 ก ก... 9 2.6 ก ก ก ก (Preserve Evidence)... 9 2.7 ก ก... 11 2.8... 12 III

( ) 3 ก... 3.1 ก... 13 3.2 ก... 14 3.3 ก... 14 3.3.1 Log Agent... 14 3.3.2 Collection... 15 3.3.3 Preservation... 15 3.3.4 Data Processing... 15 3.3.5 Formalization... 15 3.3.6 Comparison... 16 3.3.7 Presentation... 16 3.4... 17 4 ก ก... 4.1... 18 4.2... 18 4.3 ก... 18 4.4 ก ก... 30 4.5 ก... 42 4.6... 42 5... 5.1... 43 5.2 ก... 43 ก... 44 ก... 46 IV

1.1 ก ก... 3 V

2.1 ก ก ก... 5 2.2 ก ก ก ก... 10 3.1 (Framework)... 13 3.2 ก... 14 3.3 ASCII Spider... 15 3.4 Base64 Encodeing... 16 4.1 ก ก... 18 4.2... 30 4.3 ก... 31 4.4 ก ก ก ก... 31 4.5 ก ก ก... 32 4.6 ก กก ก... 32 4.7 ก ก 1... 33 4.8 ก ก 2... 33 4.9 ก (FTP)... 34 4.10 ก ก ก ก (FTP)... 35 4.11 ก ก ก (FTP)... 35 4.12 ก กก (FTP) ก... 36 4.13 ก กก (FTP)... 36 4.14 ก Advanced Port Scanner v1.3... 37 4.15 ก ก ก... 38 4.16 ก ก... 38 4.17 ก ก ก ก ก ก.. 39 4.18 ก ก ก ก ก 1... 40 4.19 ก ก ก ก ก 2... 40 4.20 ก ก ก ก ก ก 1... 41 4.21 ก ก ก ก ก ก 2... 41 VI

1 1.1 กก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก 1.2 ก ก ก ก ก ก ก ก ก ก ก ก ก ก [1-3] ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก 1.3 - ก กก ก (Forensic Frameworks) - ก ก ก 1

- ก ก ก ก ก - ก ก ก 1.4 1.4.1 1 - ก กก ก - ก ก - ก ก - ก ก - ก ก ก 1.4.2 2 - ก ก ก ก - ก - กก 1.5 - ก - ก - ก ก ก - ก ก 2

1.6 ก 1.1 ก ก ก ก กก Forensics Framework ก Forensics Framework ก Framework ก ก Framework ก ก Framework ก ก ก ก ก Forensics Framework ก ก.. -.. ก... ก........ ก.. 3

2 ก ก ก 2.1 ก (Forensics Framework) ก ก (Network Forensics) ก ก (Digital Forensics) Digital Forensic Research Workshop (DFRW) 1 2001 ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก กก ก ก ก ก ก ก ก ก ก (Dynamic Forensics) ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก (Instrusion Forensics) ก กก กก ก ก ก (System Log) ก ก (Log) ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก [2] 4

2.1 ก ก ก [1] 2.1 ก ก ก ก ก ก ก [1] 2.1.1 ก ก (Preparation) ก ก ก (Sensor) ก ก ก ก (Firewall) ก ก ก ก 2.1.2 ก (Detection) ก ก ก ก ก ก ก ก ก ก ก ก กก ก ก ก ก ก ก ก ก TCPDump [7] Wireshark [8] pads [9] Sebek [10] ntop [11] P0f [12] Bro [13] Snort [14] 2.1.3 ก ก ก (Incident response) ก ก ก ก ก ก ก ก ก ก ก ก ก ก 5

ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก 2.1.4 ก ก (Collection) ก ก ก กก ก ก ก ก ก ก ก ก TCPDump Wireshark TCPFlow [15] NfDump [16] pads Sebek TCPReplay [17] Snort Bro 2.1.5 ก ก ก (Preservation) ก ก ก ก ก ก ก ก ก HASH ก ก ก ก TCPDump Wireshark TCPFlow NfDump pads Sebek TCPReplay Bro Snort 2.1.6 ก (Examination) ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก TCPDump Wireshark TCPFlow Flow-tool [18] NfDump pads Argus [19] Nessus [20] Sebek TCPTrace [21] ntop TCPStat [22] NetFlow [23] TCPDstat [24] Ngrep [25] TCPXtract [26] TCPReplay P0f Nmap [27] Bro Snort 2.1.7 ก (Analysis) ก ก ก ก ก ก ก ก ก ก ก ก ก DNS packet fragmentation ก TCPDump Wireshark TCPFlow Flow-tool NfDump pads Argus Nessus Sebek TCPTrace ntop TCPStat NetFlow TCPDstat Ngrep TCPXtract TCPReplay P0f Nmap Bro Snort 6

2.1.8 ก (Investigation) ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก 2.1.9 ก (Presentation) ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก (Real-time) ก ก ก ก ก ก ก ก ก ก ก ก (Preservation) 2.2 Dynamic Forensics [2] ก ก ก 3 ก (ก ก ก ก) ก ก ( ก ก) ก ( ก ก ก) ก ก ก ก ก ก ก ก ก ก ก ก ก ก (Postmortem Forensics ก Static Forensics) ก ก ก ก (Real-time Forensics ก Dynamic Forensics) ก ก ก ก ก ก ก ก ก ก (Hacker) ก กก ก ก ก ก ก ก ก ก ก ก กก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก (Intrution Detection System) 7

IDS ก ก ก ก ก ก ก Dynamic Forensics ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก กก ก ก ก ก ก ก ก ก ก ก ก กก ก ก ก ก ก ก ก ก ก 2.3 ก ก ก [2] ก ก ก ก (Log on) ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก 4 ก ก ก ก ก 1.) ก (Log) ก ก ก ก ก ก ก 2.) ก ก (False Positive) ก ก (False Negative) ก ก ก ก ก ก ก 3.) ก ก ก (Multi-stage) ก ก ก ก ก (Host) ก 4.) ก ก ก ก ก ก ก ก ก ก ก 2.4 ก ก [2] ก ก ก ก ก กก ก ก ก ก ก ก ก ก ก 8

ก ก ก ก ก ก ก ก ก ก ก ก ก ก (False Alarm) ก ก ก ก ก ก ก ก ก กก ก ก ก ก (src dst signature) ก ก ก ก ก ก ก ก (Fourier transform) (F-test) ก ก 2.5 ก ก [2] ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก 1.) ก ก 2.) ก ก ก 3.) ก 4.) ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก (On-line) ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก 2.6 ก ก ก ก (Preserve Evidence) [2] ก ก ก ก ก ก ก ก ก ก ก ก 9

ก ก ก ก (Digital Signature) ก ก ก (Electronic Transaction) ก ก ก ก ก ก ก (Timestamp) ก ก ก ก ก ก ก 2.2 2.2 ก ก ก ก [2] 1.) (Module) ก ก ก ก Ev (Message Digest) Ev ก (Hash Function) ก ก 2.) HASH(Ev) (Private Key) KRa E KRa [HASH(Ev)] 3.) ก ก (Digital Timestamp Server) DTS Ts ก ( National Time Service Center (NTSC)) ก Ts ก E KRa [HASH(Ev)] 4.) E KRa [HASH(Ev)] Ts (Private Key) KRb E KRb [E KRa [HASH(Ev)] Ts] ก ก ก 10

5.) E KRb [E KRa [HASH(Ev)] Ts] ก ก ก ก ก ก E KRb [E KRa [HASH(Ev)] Ts] ก Ev Ev E KRb [E KRa [HASH(Ev)] Ts] ก ก ก ก ก 2.7 ก ก [3] ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก (Packet Sniffing) ก ก ก กก ก ก ( ก ก ก ) (Web site) (FTP server) (Peer-to-peer) ก ก ก ก ก ก ก ก กก ก ก ก ก ก ก ก ก ก - ก ก ก ก - ก ก - ก - ก ก ก ก ก ก ก ก กก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก 11

- TCP relaying/proxying - Onion routing - Anonymous remailing - Web anonymizers - IP spoofing - email spoofing - compromised third party machines - session hijacking - DNS cach poisoning - Other main-in-the-middle attacks 2.8 ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก 12

3 ก ก ก (Framework) ก ก ก ก กก ก ก ก ก ก ก ก 3.1 ก Mail Server Log Agent Web Server Presentation Log Agent Collection FTP Server Log Agent Preservation Comparison Formalization Firewall Log Agent RAW LOG DB Data Processing 3.1 (Framework) 3.1 ก (Forensics Framework) ก ก ก ก ก ก ก 13

3.2 ก ก ก ก ก ก ก ก ก ก 3.2 ก 3.2 ก ก ก ก ก ก ก 3.3 ก 3.3.1 Log Agent ก ก ก ก Log Agent ก ก ก ก ก (Central Log) ก Syslog-ng [28] ก ก ก ก 14

3.3.2 Collection ก ก ก ก ก ก ก ก ก ก Syslog-ng ก ก ก ก ก ก ก ก (Central Log) 3.3.3 Preservation ก ก ก ก ก ก ก ก ก ก ก ก ก AES (Advanced Encryption Standard) [29] ก ก SHA-1 sum [30] ก ก กก ก ก ก 3.3.4 Data Processing ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก SHA-1 sum ก ก ก ก ก ก 3.3.5 Formalization ก ก ก ก ก ก Data Processing ก กก ก Data Processing ก ก ก ก ก ก ก ก ก Base64 [31] ก ก ก ก ก ก ก ก ก ก ก Base64 ก ก ก Base64 ก Spider ก base64 ก ASCII ก 3.3 3.3 ASCII Spider 15

ก 3.3 ASCII Spider 83 112 105 100 101 114 10 ก 2 ก 010100110111000001101001011001000110010101110010 ก ก 6 010100 110111 000001 101001 011001 000110 010101 110010 10 20 55 1 41 25 6 21 50 ก 10 ก base64 Base64 Encoding 3.4 3.4 Base64 Encodeing Spider base64 ก U3BpZGVy 3.3.6 Comparison ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก SHA-1 sum ก SHA-1 sum ก ก Data Processing 3.3.7 Presentation ก ก ก ก ก ก ก ก ก ก ก ก ก ก 16

3.4 กก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก 17

4 ก ก 4.1 ก ก ก ก ก ก ก 3 ก ก ก ก ก ก ก ก ก ก ก ก ก Chen Lin, Li Zhitang, Gao Cuixia [2] 4.2 ADSL Static Link R1 Link 1 Link 2 R2 Astaro Firewall Central Log FTP server Web server 4.1 ก ก 18

4.1 ก ก ก ก ก (Web Server) FTP Server ก 4.3 ก 4.3.1 ก ก ก - Router 2 - Firewall 1 - FTP and Web Server 1 - Central Log 1 - Access Point 1 - Switch 3 com 1 Router 2 R1. ADSL router dynamic IP - Link bandwidth 10Mbps - PPPOE mode - IP address : 110.10.10.1/24 R2. ADSL router static IP - Link bandwidth 2Mbps - Bridge mode Astaro Firewall 1 1. Interface eth1 (Link 1) Mode : NAT Type : Ethernet Standard IP address IP Interface Wan : 10.10.10.2 Net mark : 255.255.255.0 Gateway : 10.10.10.1 DNS : 203.144.207.49 : 203.144.207.29 2. Interface eth2 (Link 2) Mode : NAT Type : DSL (PPPOE) 19

IP address IP Interface Wan : 110.77.147.201 Net mark : 255.255.255.255 Gateway : 110.77.147.1 DNS : 61.192.245.245 : 61.19.245.246 3. Interface eth0 (Internal Network) Type : Ethernet Standard IP Interface Wan : 192.168.168.1 Net mark : 255.255.255.0 4. Policy of Firewall Packet Filter Source Internal Network Services 23, 25, 53, 443, 110 Destination Any Network Address Translation (NAT) Traffic Source any Traffic Service 80,443 Traffic Destination 110.77.147.201 NAT mode DNAT Destination Web Server Proxy web cache Mode Transparent Source Internal Network Services http, ftp FTP and Web Server 1 OS Ubuntu 10.04 Service FTP (VSFTP) httpd, https Domain name www.bnsc.ac.th Central Log 1 OS CentOS 5.5 Service Syslog-ng 20

Access Point 1 Product Mode Linksys wrt54gl AP Mode Switch 3 com 1 Product HP V1405-16G Switch Role Layer 2 Access switch ก ก ก ก ก ก (Central Log) ก ก ก Syslog-ng [28] 4.3.2 ก ก ก ก ก ก ก ก Linux Ubuntu 10.04.1 LTS apt-get install syslog-ng ก ก ก ก ก syslog-ng ก /etc/syslogng/syslog-ng.conf ก ก #Create source source s_vsftp { file("/var/log/vsftpd.log"follow_freq(1) ); }; source s_httpd { file("/var/log/apache2/access.log"follow_freq(1) ); }; #Create destination destination d_logserver1{ tcp("192.168.168.3" port(10513)); }; destination d_logserver2{ tcp("192.168.168.3" port(10514)); }; #Sent log log { source(s_vsftp); destination(d_logserver1); }; log { source(s_httpd); destination(d_logserver2); }; ก ก ก Restart Service /etc/init.d/syslog-ng restart 21

root@moon:~# /etc/init.d/syslog-ng restart * Stopping system logging syslog-ng [ OK ] * Starting system logging syslog-ng[ OK ] 4.3.3 ก ก ก ก ก ก ก ก Linux CentOS 5.5 ก ก #rpm ivh syslog-ng-3.0.5-1.rhel5.i386.rpm ก ก ก /opt/syslog-ng/etc/syslog-ng.conf sources_remote { tcp(ip(0.0.0.0) port(514) max-connections(100)); udp(ip(0.0.0.0) port(514)); }; source s_remote2 { tcp(ip(0.0.0.0) port(10514) max-connections(100)); udp(ip(0.0.0.0) port(10514)); }; source s_remote3 { tcp(ip(0.0.0.0) port(10513) max-connections(100)); udp(ip(0.0.0.0) port(10513)); }; filterf_asgfirewall { host("192.168.168.1"); }; filterf_webftp { host("192.168.168.2"); }; filterf_web { host("192.168.168.2"); }; destinationd_astaro { file("/export/centrallog/raw/asg.log" owner("root") group("root") perm(0644) dir_perm(0755) create_dirs(yes) ); }; 22

destinationd_ftp { file("/export/centrallog/raw/vsftpd.log" owner("root") group("root") perm(0644) dir_perm(0755) create_dirs(yes) ); }; destinationd_httpd { file("/export/centrallog/raw/httpd.log" owner("root") group("root") perm(0644) dir_perm(0755) create_dirs(yes) ); }; log{ source(s_remote); filter(f_asgfirewall); destination(d_astaro); }; log{ source(s_remote2); destination(d_httpd); }; log{ source(s_remote3); destination(d_ftp); }; ก ก ก restart service #/etc/init.d/syslog-ng restart 4.3.4 ก ก ก ก ก ก ก ก ก ก ก AES ก ก ก Script ก ก ก Openssl AES 128bit ECB openssl aes-128-ecb -in filename -k "password" -out filename.sec 23

/log-program/asg_moon ก ก ก ASG (Astaro Security Gateway) /log-program/httpd_moon ก ก ก (Apache Webserver) /log-program/vsftpd_moon ก ก ก /log-program/encryption-asg.sh ก ก /log-program/encryption-httpd.sh ก ก /log-program/encryption-vsftpd.sh ก ก /log-program/asg_moon #rotate90 /export/centrallog/raw/asg.log { rotate 90 compress dateext maxage 365 missingok create 640 root root prerotate /log-program/encryption-asg.sh endscript postrotate service syslog-ng restart >/dev/null 2>&1 true endscript } 24

/log-program/httpd_moon #rotate90 /export/centrallog/raw/httpd.log { rotate 90 compress dateext maxage 365 missingok create 640 root root prerotate /log-program/encryption-httpd.sh endscript postrotate service syslog-ng restart >/dev/null 2>&1 true endscript } 25

/log-program/vsftpd_moon #rotate90 /export/centrallog/raw/vsftpd.log { rotate 90 compress dateext maxage 365 missingok create 640 root root prerotate /log-program/encryption-vsftpd.sh endscript postrotate service syslog-ng restart >/dev/null 2>&1 true endscript } 26

/log-program/encryption-asg.sh #!/bin/sh #Script to encrypt log file #/export/centrallog/raw/ mkdir -p /export/centrallog/encrypt/$(date +%F) cd /export/centrallog/encrypt/$(date +%F) pass=isylzjko x=log_asg log_path=/export/centrallog/raw/asg.log #compress if [[ -a /export/centrallog/raw/asg.log ]] then #tar zcvf $x.tar.gz $log_path cp $log_path $x #encrypt openssl aes-128-ecb -in $x -k "$pass" -out $x.sec #hashing sha1path=/export/centrallog/encrypt/$(date +%F) sha1sum "$sha1path/$x".sec> sha1sum-$x #remove file rm -f $x fi 27

/log-program/encryption-httpd.sh #!/bin/sh #Script to encrypt log file #/export/centrallog/raw/ mkdir -p /export/centrallog/encrypt/$(date +%F) cd /export/centrallog/encrypt/$(date +%F) pass=isylzjko x=log_httpd log_path=/export/centrallog/raw/httpd.log #compress if [[ -a /export/centrallog/raw/httpd.log ]] then #tar zcvf $x.tar.gz $log_path cp $log_path $x #encrypt openssl aes-128-ecb -in $x -k "$pass" -out "$x".sec #hashing sha1path=/export/centrallog/encrypt/$(date +%F) sha1sum "$sha1path/$x".sec> sha1sum-$x #remove file rm -f $x fi 28

/log-program/encryption-httpd.sh #!/bin/sh #Script to encrypt log file #/export/centrallog/raw/ mkdir -p /export/centrallog/encrypt/$(date +%F) cd /export/centrallog/encrypt/$(date +%F) pass=isylzjko x=log_vsftpd log_path=/export/centrallog/raw/vsftpd.log #compress if [[ -a /export/centrallog/raw/vsftpd.log ]] then #tar zcvf $x.tar.gz $log_path cp $log_path $x #encrypt openssl aes-128-ecb -in $x -k "$pass" -out "$x".sec #hashing sha1path=/export/centrallog/encrypt/$(date +%F) sha1sum "$sha1path/$x".sec> sha1sum-$x #remove file rm -f $x fi 29

4.4 ก ก ก ก ก ก กก ก ก ก 3 ก ก, ก ก (FTP) ก 4.4.1 ก ก ก ก ก ก ก ก ก ก ก ก กก www.bnsc.ac.th 4.2 4.2 ก ก ก ก www.bnsc.ac.th:8800 ก ก ก ก ก 4.3 30

4.3 ก 4.4 ก ก ก ก 4.4 ก ก ก ก log_httpd.sec ก ก SHA-1 sum ก ก ก 31

4.5 ก ก ก 4.5 ก ก ก ก ก ก 4.5 ก กก ก ก ก ก ก ก ก ก ก ก SHA-1 sum 4.6 ก กก ก 32

4.6 ก ก ก ก ก ก ก ก ก Check log ก ก ก ก ก SHA-1 sum ก SHA-1 sum ก 4.6 ก ก ก ก ก ก ก ก ก ก ก View log report ก ก 4.7 ก ก 1 4.8 ก ก 2 4.7 4.8 ก ก ก, ก 33

4.4.2 ก ก ก ก ก ก ก ก (FTP) url ftp://www.bnsc.ac.th ก ก 4.9 4.9 ก (FTP) ก ก ก (FTP) ก ก www.bnsc.ac.th:8800 ก ก ก ก ก ก ก ก (FTP) log_vsftpd.sec ก ก SHA-1 sum ก ก ก 4.10 34

4.10 ก ก ก ก (FTP) 4.11 ก ก ก (FTP) 4.11 ก ก ก (FTP) ก ก ก ก 4.11 ก กก ก ก ก ก ก ก ก ก ก ก SHA-1 sum 35

4.12 ก กก (FTP) ก 4.12 ก กก (FTP) ก ก ก ก ก ก ก Check log ก ก ก ก ก SHA-1 sum ก SHA-1 sum ก 4.12 ก ก ก ก ก ก ก ก ก ก ก View log report ก ก 4.13 ก กก (FTP) 36

4.13 ก กก (FTP) ก, 4.4.3 ก ก ก ก ก ก ก ก ก (PortScan) ก ก Advanced Port Scanner v1.3 ก ก ก ก ก ก ก ก ก ก 4.14 4.14 ก Advanced Port Scanner v1.3 ก ก ก ก ก Advanced Port Scanner v1.3 ก ก www.bnsc.ac.th:8800 ก ก ก ก ก ก ก ก log_asg.sec ก ก SHA-1 sum ก ก ก 4.15 37

4.15 ก ก ก 4.16 ก ก 4.16 ก ก ก ก ก ก 4.16 ก กก ก ก ก ก ก ก ก ก ก ก SHA-1 sum 38

4.17 ก ก ก ก ก ก 4.17 ก ก ก ก ก ก ก ก ก Check log ก ก ก ก ก SHA-1 sum ก SHA-1 sum ก 4.17 ก ก ก ก ก ก ก ก ก ก ก View log report ก ก ก 2 ก ก ก ก ก (View ASG Packagefilter Log Report) ก ก ก 2 ก ก ก ก ก (View ASG IPS Log Report) ก ก ก ก 39

4.18 ก ก ก ก ก 1 4.19 ก ก ก ก ก 2 4.18 4.19 ก ก ก ก ก ก, ก ก ก ก drop accept 40

4.20 ก ก ก ก ก ก 1 4.21 ก ก ก ก ก ก 2 4.20 4.21 ก ก ก ก ก ก (Intrusion Prevention System) ก, ก ก 41

4.5 ก ก ก ก Chen Lin, Li Zhitang, Gao Cuixia [2] ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก 4.6 ก ก ก ก ก ก ก ก ก ก ก ก ก 42

5.1 5 ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก 2 ก ก ก ก ก ก ก ก ก ก ก ก กก ก 5.2 ก ก ก ก ก IPSec VPN, SSL VPN ก ก ก ก ก ก 43

ก [1] E. S. Pilli, R.C.Joshi,R. Niyogi. Network forensic framework:survey and research challenges. Digital Investigation(2010), doi:10.1016/j.diin.2010.02.003 [2] C. Lin, L. Zhitang, G. Cuixia. Automated Analysis of Multi-source Logs for Network Forensics. 2009 First International Workshop on Education Technology and Computer Science. DOI 10.1109/ETCS.2009.153 [3] B. J. Nikkel. Generalizing sources of live network evidence. Digital Investigation (2005) 2, 193-200. doi:10.1016/j.diin.2005.08.001 [4] B. J. Nikkel. A portable network forensic evidence collector. Digital investigation (2006) 3, 127 135. doi:10.1016/j.diin.2006.08.012 [5] H. Ming, S. LiZhong. A New System Design of Network Invastion Forensics. 2009 Second International Conference on Computer and Electrical Engineering. DOI 10.1109/ICCEE.2009.257 [6] N. Kittirungruang, P. Limmaneewichid, and S. Kungpisdan, Design and Development of An Event Log Server for Microsoft Windows, to appear at the 2 nd ECTI- Conference on Application Research and Development 2010 (ECTI-CARD2010), Pattaya, Thailand, 10-12 May 2010 [7] Tcpdump, http://www.tcpdump.org/ [8] Wireshark, http://www.wireshark.org/ [9] pads, http://www.mentor.com/products/pcb-system-design/design-flows/pads/ [10] Sebek, http://www.honeynet.org/project/sebek [11] ntop, http://www.ntop.org/news.php [12] P0f, http://freshmeat.net/projects/p0f/ [13] Bro, http://www.bro-ids.org/ [14] Snort, http://www.snort.org/ [15] TCPFlow, http://www.circlemud.org/jelson/software/tcpflow [16] NfDump, http://sourceforge.net/projects/nfdump/ 44

ก ( ) [17] TCPReplay, http://tcpreplay.synfin.net/trac/ [18] Flow-tools, http://www.splintered.net/sw/flow-tools [19] Argus, http://www.qosient.com/argus/ [20] Nessus, http://www.nessus.org [21] TCPTrace, http://www.tcptrace.org [22] TCPStat, http://www.frenchfries.net/paul/tcpstat [23] NetFlow, http://www.cisco.com/web/go/netflow.network [24] TCPDstat, http://staff.washington.edu/dittrich/talks/core02/tools [25] Ngrep, http://ngrep.sourceforge.net [26] TCPXtract, http://tcpxtract.sourceforge.net [27] Nmap, http://www.nmap.org [28] Syslog-ng, http://www.balabit.com/network-security/syslog-ng [29] AES (Advanced Encryption Standard), http://en.wikipedia.org/wiki/advanced_encryption_standard [30] SHA-1, http://en.wikipedia.org/wiki/sha-1 [31] Base64, http://en.wikipedia.org/wiki/base64 45

ก ก M.Pirarak and S.Kungpisdan, An Automate Log Analyzer for Digital Forensic Investigation, to appear at The Journal of Information Science and Technology, Vol. 2, No. 1, Jan June, 2011. 46

ก ก ก An Automated Log Analyzer for Digital Forensics Investigation ก 1 ก ก 2 ก E-mail: mpirarak@yahoo.com 1 supakorn@mut.ac.th 2 ABSTRACT In this paper, we propose a study and development of an automated log analyzer in order to acquire critical evidence of crime and find potential suspects. We analyze several existing network forensics models and propose a new model for automated log analyzer that can provide and summarize necessary evidence. We create a prototype of the proposed model. The results of our implementation show that the proposed model can assist users analyze and report evidence for forensics investigation. KEY WORDS: Network forensics, log analysis, digital forensics, intrusion detection ก ก ก ก (Automated Log Analyzer) ก ก ก ก ก ก ก ก ก ก ก กก ก ก ก ก ก ก ก, ก ก, ก ก, ก ก ก ก 1. ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก [1, 2, 3, 4] ก ก ก ก ก ก ก ก ก ก ก ก Lin et al. [2] ก ก ก ก (Raw Log) ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก

ก ก ก ก ก ก ก ก ก ก ก ก ก 2 ก 3 ก ก 4 ก ก ก ก 5 ก 6 2. ก ก (Network Forensics) ก ก (Digital Forensics) Digital Forensic Research Workshop (DFRW) 1.. 2001 ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก กก ก ก ก ก ก ก ก ก ก (Dynamic Forensics) ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก (Intrusion Forensics) ก กก กก ก ก ก (System Log) ก ก (Log) ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก [2] 1 ก ก ก [1] 1 ก ก ก ก ก ก ก [1] ก ก ก 2.1 ก ก (Preparation) ก ก ก (Sensor) ก

ก ก ก (Firewall) ก ก ก ก 2.2 ก (Detection) ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก TCPDump [7] Wireshark [8] pads [9] Sebek [10] ntop [11] P0f [12] Bro [13] Snort [14] 2.3 ก ก ก (Incident Response) ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก 2.4 ก ก (Collection) ก ก ก กก ก ก ก ก ก ก ก ก TCPDump Wireshark TCPFlow [15] NfDump [16] pads Sebek TCPReplay [17] 2.5 ก ก ก (Preservation) ก ก ก ก ก ก ก ก ก (Hash) ก ก ก ก TCPDump Wireshark TCPFlow NfDump pads Sebek TCPReplay Bro Snort 2.6 ก (Examination) ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก TCPDump Wireshark TCPFlow Flow-tool [18] NfDump pads 2.7 ก (Analysis) ก ก ก ก ก ก ก ก ก ก ก ก ก DNS packet fragmentation ก ก TCPDump Wireshark TCPFlow Flow-tool NfDump pads 2.7 ก (Investigation) ก ก ก ก ก ก ก

ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก 2.8 ก (Presentation) ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก (Real-time) ก ก ก ก ก ก ก ก ก ก ก ก (Preservation) 3. ก ก ก (Log on) ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก 3.1 ก ก ก ก 2 ก ก ก ก ก (Agent) ก ก ก (Log) ก ก ก ก กก ก Mail Server Web Server FTP Server Firewall Log Agent Log Agent Log Agent Log Agent 1 1 1 1 Collection Preservation 4 2 3 RAW LOG DB 8 Presentation 7 Comparison 6 Formalization 5 Data Processing 2 (Framework) 1 ก ก ก ก ก ก 2 ก ก ก ก ก 3 ก ก ก ก ก ก ก ก ก ก ก AES (Advanced Encryption Standard ) [19] ก RAW LOG 4 ก ก ก ก ก ก ก 5 ก ก 3 ก ก ก ก ก SHA-1 [20] sum ก 6 ก ก ก 5 ก ก ก Base64 [21] ก ก ก ก

ก ก 7 ก ก ก ก ก ก SHA-1 sum ก SHA-1 sum ก 5 8 ก ก ก ก ก ก 3.2 ก ก ก ก ก ก (Central log) ก (Server system) ก ก ก ก ก 3 Central Log FTP server R1 ADSL Web server Link 1 Link 2 R2 Astaro Firewall Static Link 3 ก ก 3 ก ก ADSL ก ก ก ก ก ก ก ก ก 4. ก ก 3 ก ก ก ก ก ก ก ก ก ก ก, ก ก ก ก ก ก ก ก ก ก ก 4.1 ก ก ก - Router 2 - Firewall 1 - FTP and Web Server 1 - Central Log 1 - Access Point 1 - Switch 3 com 1 Router 2 R1. ADSL router dynamic IP - Link bandwidth 10Mbps - PPPOE mode R2. ADSL router static IP - Link bandwidth 2Mbps - Bridge mode Astaro Firewall 1 1. Interface eth1 (Link 1) Mode : NAT Type : Ethernet Standard 2. Interface eth2 (Link 2) Mode : NAT Type : DSL (PPPOE) 3. Interface eth0 (Internal Network) Type : Ethernet Standard 4. Policy of Firewall Packet Filter Source Internal Network Services 23, 25, 53, 443, 110 Destination Any

Network Address Translation (NAT) Traffic Source any Traffic Service 80,443 Traffic Destination 110.77.147.201 NAT mode DNAT Destination Web Server Proxy web cache Mode Transparent Source Internal Network Services http, ftp FTP and Web Server 1 OS Ubuntu 10.04 Service FTP (VSFTP) httpd, https Domain name www.bnsc.ac.th Central Log 1 OS CentOS 5.5 Service Syslog-ng Access Point 1 Product Linksys wrt54gl Mode AP Mode Switch 3 com 1 Product HP V1405-16G Switch Role Layer 2 Access switch 4.2 ก ก ก ก ก ก ก ก ก (Port scan) ก ก ก ก ก ก 4 ก ก Advanced Port Scanner v1.3 ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก 5 ก ก ก 5 กก ก ก ก ก ก 4 ก ก ก

6 ก ก ก 6 ก ก ก ก ก ก 8 ก ก ก 8 ก ก ก ก ก ก 7 ก ก ก 7 ก ก ก ก ก ก 9 MAC ก ก ก 9 ก ก ก ก ก ก

5. ก 5.1 ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก 5.2 ก ก ก ก ก กก ก ก ก ก ก ก ก ก ก ก 5.3 ก ก ก Lin et al. [2] ก ก ก ก ก ก ก ก ก ก ก ก 6. ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก ก IPSec VPN, SSL VPN ก ก ก ก ก ก ก [1] E. S. Pilli, R. C. Joshi, and R. Niyogi. Network Forensic Framework: Survey and Research Challenges. Digital Investigation (2010), doi:10.1016/j.diin.2010.02.003.. [2] C. Lin, L. Zhitang, and G. Cuixia. Automated Analysis of Multi-source Logs for Network Forensics. 2009 First International Workshop on Education Technology and Computer Science. [3] B. J. Nikkel. Generalizing Sources of Live Network Evidence. Digital Investigation (2005) 2, 193-200.. [4] Bruce J. Nikkel. A portable network forensic evidence collector. Digital investigation (2006) 3, 127 135. [5] Hou Ming, Shen LiZhong. A New System Design of Network Invastion Forensics. 2009 Second International Conference on Computer and Electrical Engineering. [6] ก,, ก ก.ก ก ก [7] Tcpdump, http://www.tcpdump.org/ [8] Wireshark, http://www.wireshark.org/ [9] pads, http://www.mentor.com/products/pcb-systemdesign/design-flows/pads/ [10] Sebek, http://www.honeynet.org/project/sebek [11] ntop, http://www.ntop.org/news.php [12] P0f, http://freshmeat.net/projects/p0f/ [13] Bro, http://www.bro-ids.org/ [14] Snort, http://www.snort.org/ [15] TCPFlow, http://www.circlemud.org/jelson/software/tcpflow

[16] NfDump, http://sourceforge.net/projects/nfdump/ [17] TCPReplay, http://tcpreplay.synfin.net/trac/ [18] Flow-tools, http://www.splintered.net/sw/flow-tools [19] AES (Advanced Encryption Standard), http://en.wikipedia.org/wiki/advanced_encryption_stand ard [20] SHA-1, http://en.wikipedia.org/wiki/sha-1 [21] Base64, http://en.wikipedia.org/wiki/base64