SlideShare a Scribd company logo
2
Most read
8
Most read
16
Most read
Thank You
Topic - Log Analysis
* Not a log analysis of a hacked
server
References
Security Metrics –
Replacing FUD *Diversion ahead
Good Metrics -
- Consistently Measured
- Cheap to Gather
- Expressed as a number / percentage
- Expressed using one unit of measure
- Contextually specific – avoid So What ?
Bad Metrics -
- Inconsistently Measured / Varies from
person to person
- Cannot be Gathered cheaply
- Does not express results with numbers
e.g. - ratings and grades
Log – Record of all the
activities in an Application /
Server or a Process
Log Analysis – Extracting
information from the logs
Pre-Requisites of Log
Analysis
- Logging should be enabled
- Correct Time to be recorded in the logs
- Data should not be corrupted
- Known / Intuitive Log format
- Patience
- Caution
Common Log Format
Host Ident Authuser [Date] Request Status Bytes
127.0.0.1 - - [14/Oct/2010:15:41:45 +0530] "GET /announce?
info_hash=%9E%F7E%21m0%C3%BB%C8%17%AC%CF%C7K
%CCO%85L%B7S&peer_id=-AZ4510-
jsyzmsekckgz&supportcrypto=1&port=14523&azudp=14523&uploaded
=0&downloaded=0&left=144067607&corrupt=0&event=started&numwa
nt=34&no_peer_id=1&compact=1&key=R34XtNXz&azver=3 HTTP/1.1"
404 300 "-" "Azureus 4.5.1.0;Linux;Java 1.6.0_18"
(Last two fields makes the format – Combined Log Format)
Extended W3C Log Format
#Software: Microsoft Internet Security and Acceleration Server 2004
#Version: 2.0
#Date: 2009-10-28 00:00:01
#Fields: computer date time IP protocol source destination original
client IP source network destination network action status rule
application protocol bytes sent bytes sent intermediate bytes received
bytes received intermediate connection time connection time intermediate
username agent session ID connection ID
FW1 2009-10-28 00:00:01 TCP 192.9.133.33:2179
124.153.12.25:443 192.9.133.33 Internal External Establish 0x0
LAN to Internet HTTPS 0 0 0 0 - - - - 248445
7348626
Squid Log Format
Native access.log
Time Duration ClientIp ResultCodes RequestMethod URL Ident Hierarchy Type
1286536314.464 475 192.168.0.188 TCP_MISS/200 627 GET
http://api.bing.com/qsml.aspx? - DIRECT/122.160.242.136 text/xml
1286536314.489 780 192.168.0.68 TCP_MISS/200 507 POST http://rcv-
srv37.inplay.tubemogul.com/streamreceiver/services - DIRECT/174.129.41.128
application/xml
Custom access.log
Dec 15 06:44:23 box squid[2011]: 192.9.101.130 TCP_MISS/200 389 POST
http://65.54.49.123/gateway/gateway.dll? - DIRECT/65.54.49.123 application/x-
msn-messenger
Dec 15 06:45:24 box squid[2011]: 192.9.101.130 TCP_MISS/200 389 POST
http://65.54.49.123/gateway/gateway.dll? - DIRECT/65.54.49.123 application/x-
msn-messenger
Dec 15 06:47:25 box last message repeated 2 times
Dec 15 06:47:32 box squid[2011]: 127.0.0.1 TCP_MISS/200 68777105 GET
http://update.nai.com/products/commonupdater/dat-5832.zip -
DIRECT/122.166.109.18 application/zip
Multi-line Log Format
Generated by Applications which runs multiple processes internally.
Such logs are created when a single activity as seen by the End User internally
translates to several different tasks in the Application.
LogEntry1 of Task1
LogEntry2 of Task2
LogEntry3 of Task3
Almost all Mail Server Logs are Multi line logs.
Example – Postfix and IronPort (Cisco) Email Server
Iptables Log Format
Dec 5 00:17:38 box Shorewall:nic012FW:ACCEPT: IN=eth1 OUT=
MAC=00:1f:e2:6c:cb:6d:00:1e:58:22:6b:30:08:00 SRC=124.153.10.16
DST=192.168.1.4 LEN=44 TOS=00
PREC=0x00 TTL=55 ID=39105 CE PROTO=TCP SPT=36597 DPT=5666
SEQ=3522285426 ACK=0 WINDOW=5840 SYN URGP=0
Dec 5 00:17:40 box Shorewall:nic012FW:DROP: IN=eth1 OUT=
MAC=ff:ff:ff:ff:ff:ff:00:e0:e4:a5:46:f1:08:00 SRC=192.168.1.87
DST=192.168.1.255 LEN=229 TOS=00
PREC=0x00 TTL=128 ID=3758 PROTO=UDP SPT=138 DPT=138 LEN=209
Dec 5 00:17:47 box Shorewall:nic012nic01:DROP: IN=eth1 OUT=eth1
MAC=00:1f:e2:6c:cb:6d:00:1b:b9:63:a3:19:08:00 SRC=192.168.1.120
DST=202.54.157.139 LEN=48 T
OS=00 PREC=0x00 TTL=127 ID=3754 DF PROTO=TCP SPT=1414 DPT=80
SEQ=2498894647 ACK=0 WINDOW=65535 SYN URGP=0
Splunk – Monitor, Report
and Analyze live
streaming / historical IT
data
Basic Configuration after installation
cd /opt/splunk/bin
export SPLUNK_IGNORE_SELINUX=1
./splunk start
Use your browser to login to
http://localhost:8000
New Apps goes to /opt/splunk/etc/apps
For custom log format -
update the following configuration file
/opt/splunk/etc/system/local/props.conf
and
/opt/splunk/etc/system/local/transforms.conf
with entries of new log format
OSSEC – This is an Open Source Host Based
Intrusion Detection System which can work in
a client – server mode.

More Related Content

What's hot (20)

PDF
Cyber security and demonstration of security tools
Vicky Fernandes
 
PPT
Log Mining: Beyond Log Analysis
Anton Chuvakin
 
PDF
An overview of access control
Elimity
 
PPTX
Dos n d dos
sadhana21297
 
PPTX
Social Engineering new.pptx
Santhosh Prabhu
 
PPT
IT Security management and risk assessment
CAS
 
PDF
Offensive OSINT
Christian Martorella
 
PPTX
Security operation center (SOC)
Ahmed Ayman
 
PPT
Network security
Ali Kamil
 
PPTX
Rothke rsa 2012 building a security operations center (soc)
Ben Rothke
 
PPTX
OWASP Top 10 2021 Presentation (Jul 2022)
TzahiArabov
 
PPT
Proxy Servers
Sourav Roy
 
PPT
Intrusion detection system ppt
Sheetal Verma
 
PDF
Building Security Operation Center
S.E. CTS CERT-GOV-MD
 
PPTX
Networking infrastructure
Kerry Cole
 
PDF
Cybersecurity Tools | Popular Tools for Cybersecurity Threats | Cybersecurity...
Edureka!
 
PPT
Introduction To OWASP
Marco Morana
 
PPTX
Threat Hunting with Splunk
Splunk
 
PPTX
Practical Malware Analysis: Ch 0: Malware Analysis Primer & 1: Basic Static T...
Sam Bowne
 
Cyber security and demonstration of security tools
Vicky Fernandes
 
Log Mining: Beyond Log Analysis
Anton Chuvakin
 
An overview of access control
Elimity
 
Dos n d dos
sadhana21297
 
Social Engineering new.pptx
Santhosh Prabhu
 
IT Security management and risk assessment
CAS
 
Offensive OSINT
Christian Martorella
 
Security operation center (SOC)
Ahmed Ayman
 
Network security
Ali Kamil
 
Rothke rsa 2012 building a security operations center (soc)
Ben Rothke
 
OWASP Top 10 2021 Presentation (Jul 2022)
TzahiArabov
 
Proxy Servers
Sourav Roy
 
Intrusion detection system ppt
Sheetal Verma
 
Building Security Operation Center
S.E. CTS CERT-GOV-MD
 
Networking infrastructure
Kerry Cole
 
Cybersecurity Tools | Popular Tools for Cybersecurity Threats | Cybersecurity...
Edureka!
 
Introduction To OWASP
Marco Morana
 
Threat Hunting with Splunk
Splunk
 
Practical Malware Analysis: Ch 0: Malware Analysis Primer & 1: Basic Static T...
Sam Bowne
 

Similar to Log Analysis (20)

PPTX
Logs: Can’t Hate Them, Won’t Love Them: Brief Log Management Class by Anton C...
Anton Chuvakin
 
PPTX
Power of logs: practices for network security
Information Technology Society Nepal
 
PPTX
Log Files
Heinrich Hartmann
 
PPTX
Log maintenance network securiy
Mohsin Ali
 
PPT
Web Proxy Log Analysis and Management 2007
Anton Chuvakin
 
PPT
Logs for Information Assurance and Forensics @ USMA
Anton Chuvakin
 
PPTX
Log Standards & Future Trends by Dr. Anton Chuvakin
Anton Chuvakin
 
PPT
FIRST 2006 Full-day Tutorial on Logs for Incident Response
Anton Chuvakin
 
PPTX
LogChaos: Challenges and Opportunities of Security Log Standardization
Anton Chuvakin
 
PPT
The importance of logs - DefCamp 2012
DefCamp
 
PPTX
Structured logging
Mikhail Shcherbakov
 
PPT
Making Logs Sexy Again: Can We Finally Lose The Regexes?
Anton Chuvakin
 
PPT
Logs for Incident Response and Forensics: Key Issues for GOVCERT.NL 2008
guestc0c304
 
PPT
Logs for Incident Response and Forensics: Key Issues for GOVCERT.NL 2008
Anton Chuvakin
 
PDF
Teach your application eloquence. Logs, metrics, traces - Dmytro Shapovalov (...
Ruby Meditation
 
PPT
Investigating server logs
Animesh Shaw
 
PPT
Best practises for log management
Brian Honan
 
PPT
Log Forensics from CEIC 2007
Anton Chuvakin
 
PPT
Derek Pearcy - Reading Users' Minds For Fun And Profit
bolt peters
 
PDF
Obiee logfiles 11.1.1.5
Amit Sharma
 
Logs: Can’t Hate Them, Won’t Love Them: Brief Log Management Class by Anton C...
Anton Chuvakin
 
Power of logs: practices for network security
Information Technology Society Nepal
 
Log maintenance network securiy
Mohsin Ali
 
Web Proxy Log Analysis and Management 2007
Anton Chuvakin
 
Logs for Information Assurance and Forensics @ USMA
Anton Chuvakin
 
Log Standards & Future Trends by Dr. Anton Chuvakin
Anton Chuvakin
 
FIRST 2006 Full-day Tutorial on Logs for Incident Response
Anton Chuvakin
 
LogChaos: Challenges and Opportunities of Security Log Standardization
Anton Chuvakin
 
The importance of logs - DefCamp 2012
DefCamp
 
Structured logging
Mikhail Shcherbakov
 
Making Logs Sexy Again: Can We Finally Lose The Regexes?
Anton Chuvakin
 
Logs for Incident Response and Forensics: Key Issues for GOVCERT.NL 2008
guestc0c304
 
Logs for Incident Response and Forensics: Key Issues for GOVCERT.NL 2008
Anton Chuvakin
 
Teach your application eloquence. Logs, metrics, traces - Dmytro Shapovalov (...
Ruby Meditation
 
Investigating server logs
Animesh Shaw
 
Best practises for log management
Brian Honan
 
Log Forensics from CEIC 2007
Anton Chuvakin
 
Derek Pearcy - Reading Users' Minds For Fun And Profit
bolt peters
 
Obiee logfiles 11.1.1.5
Amit Sharma
 
Ad

More from n|u - The Open Security Community (20)

PDF
Hardware security testing 101 (Null - Delhi Chapter)
n|u - The Open Security Community
 
PPTX
SSRF exploit the trust relationship
n|u - The Open Security Community
 
PDF
Metasploit primary
n|u - The Open Security Community
 
PDF
Api security-testing
n|u - The Open Security Community
 
PDF
Introduction to TLS 1.3
n|u - The Open Security Community
 
PDF
Gibson 101 -quick_introduction_to_hacking_mainframes_in_2020_null_infosec_gir...
n|u - The Open Security Community
 
PDF
Talking About SSRF,CRLF
n|u - The Open Security Community
 
PPTX
Building active directory lab for red teaming
n|u - The Open Security Community
 
PPTX
Owning a company through their logs
n|u - The Open Security Community
 
PPTX
Introduction to shodan
n|u - The Open Security Community
 
PDF
Detecting persistence in windows
n|u - The Open Security Community
 
PPTX
Frida - Objection Tool Usage
n|u - The Open Security Community
 
PDF
OSQuery - Monitoring System Process
n|u - The Open Security Community
 
PDF
DevSecOps Jenkins Pipeline -Security
n|u - The Open Security Community
 
PDF
Extensible markup language attacks
n|u - The Open Security Community
 
PPTX
Linux for hackers
n|u - The Open Security Community
 
PDF
Android Pentesting
n|u - The Open Security Community
 
Hardware security testing 101 (Null - Delhi Chapter)
n|u - The Open Security Community
 
SSRF exploit the trust relationship
n|u - The Open Security Community
 
Api security-testing
n|u - The Open Security Community
 
Introduction to TLS 1.3
n|u - The Open Security Community
 
Gibson 101 -quick_introduction_to_hacking_mainframes_in_2020_null_infosec_gir...
n|u - The Open Security Community
 
Talking About SSRF,CRLF
n|u - The Open Security Community
 
Building active directory lab for red teaming
n|u - The Open Security Community
 
Owning a company through their logs
n|u - The Open Security Community
 
Introduction to shodan
n|u - The Open Security Community
 
Detecting persistence in windows
n|u - The Open Security Community
 
Frida - Objection Tool Usage
n|u - The Open Security Community
 
OSQuery - Monitoring System Process
n|u - The Open Security Community
 
DevSecOps Jenkins Pipeline -Security
n|u - The Open Security Community
 
Extensible markup language attacks
n|u - The Open Security Community
 
Ad

Recently uploaded (20)

PDF
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PDF
Timothy Rottach - Ramp up on AI Use Cases, from Vector Search to AI Agents wi...
AWS Chicago
 
PDF
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
PDF
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
PDF
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
PPTX
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
PDF
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PDF
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
July Patch Tuesday
Ivanti
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PDF
Predicting the unpredictable: re-engineering recommendation algorithms for fr...
Speck&Tech
 
PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
PDF
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
PPT
Interview paper part 3, It is based on Interview Prep
SoumyadeepGhosh39
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
Timothy Rottach - Ramp up on AI Use Cases, from Vector Search to AI Agents wi...
AWS Chicago
 
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
July Patch Tuesday
Ivanti
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
Predicting the unpredictable: re-engineering recommendation algorithms for fr...
Speck&Tech
 
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
Interview paper part 3, It is based on Interview Prep
SoumyadeepGhosh39
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 

Log Analysis

  • 2. Topic - Log Analysis * Not a log analysis of a hacked server
  • 4. Good Metrics - - Consistently Measured - Cheap to Gather - Expressed as a number / percentage - Expressed using one unit of measure - Contextually specific – avoid So What ?
  • 5. Bad Metrics - - Inconsistently Measured / Varies from person to person - Cannot be Gathered cheaply - Does not express results with numbers e.g. - ratings and grades
  • 6. Log – Record of all the activities in an Application / Server or a Process Log Analysis – Extracting information from the logs
  • 7. Pre-Requisites of Log Analysis - Logging should be enabled - Correct Time to be recorded in the logs - Data should not be corrupted - Known / Intuitive Log format - Patience - Caution
  • 8. Common Log Format Host Ident Authuser [Date] Request Status Bytes 127.0.0.1 - - [14/Oct/2010:15:41:45 +0530] "GET /announce? info_hash=%9E%F7E%21m0%C3%BB%C8%17%AC%CF%C7K %CCO%85L%B7S&peer_id=-AZ4510- jsyzmsekckgz&supportcrypto=1&port=14523&azudp=14523&uploaded =0&downloaded=0&left=144067607&corrupt=0&event=started&numwa nt=34&no_peer_id=1&compact=1&key=R34XtNXz&azver=3 HTTP/1.1" 404 300 "-" "Azureus 4.5.1.0;Linux;Java 1.6.0_18" (Last two fields makes the format – Combined Log Format)
  • 9. Extended W3C Log Format #Software: Microsoft Internet Security and Acceleration Server 2004 #Version: 2.0 #Date: 2009-10-28 00:00:01 #Fields: computer date time IP protocol source destination original client IP source network destination network action status rule application protocol bytes sent bytes sent intermediate bytes received bytes received intermediate connection time connection time intermediate username agent session ID connection ID FW1 2009-10-28 00:00:01 TCP 192.9.133.33:2179 124.153.12.25:443 192.9.133.33 Internal External Establish 0x0 LAN to Internet HTTPS 0 0 0 0 - - - - 248445 7348626
  • 10. Squid Log Format Native access.log Time Duration ClientIp ResultCodes RequestMethod URL Ident Hierarchy Type 1286536314.464 475 192.168.0.188 TCP_MISS/200 627 GET http://api.bing.com/qsml.aspx? - DIRECT/122.160.242.136 text/xml 1286536314.489 780 192.168.0.68 TCP_MISS/200 507 POST http://rcv- srv37.inplay.tubemogul.com/streamreceiver/services - DIRECT/174.129.41.128 application/xml Custom access.log Dec 15 06:44:23 box squid[2011]: 192.9.101.130 TCP_MISS/200 389 POST http://65.54.49.123/gateway/gateway.dll? - DIRECT/65.54.49.123 application/x- msn-messenger Dec 15 06:45:24 box squid[2011]: 192.9.101.130 TCP_MISS/200 389 POST http://65.54.49.123/gateway/gateway.dll? - DIRECT/65.54.49.123 application/x- msn-messenger Dec 15 06:47:25 box last message repeated 2 times Dec 15 06:47:32 box squid[2011]: 127.0.0.1 TCP_MISS/200 68777105 GET http://update.nai.com/products/commonupdater/dat-5832.zip - DIRECT/122.166.109.18 application/zip
  • 11. Multi-line Log Format Generated by Applications which runs multiple processes internally. Such logs are created when a single activity as seen by the End User internally translates to several different tasks in the Application. LogEntry1 of Task1 LogEntry2 of Task2 LogEntry3 of Task3 Almost all Mail Server Logs are Multi line logs. Example – Postfix and IronPort (Cisco) Email Server
  • 12. Iptables Log Format Dec 5 00:17:38 box Shorewall:nic012FW:ACCEPT: IN=eth1 OUT= MAC=00:1f:e2:6c:cb:6d:00:1e:58:22:6b:30:08:00 SRC=124.153.10.16 DST=192.168.1.4 LEN=44 TOS=00 PREC=0x00 TTL=55 ID=39105 CE PROTO=TCP SPT=36597 DPT=5666 SEQ=3522285426 ACK=0 WINDOW=5840 SYN URGP=0 Dec 5 00:17:40 box Shorewall:nic012FW:DROP: IN=eth1 OUT= MAC=ff:ff:ff:ff:ff:ff:00:e0:e4:a5:46:f1:08:00 SRC=192.168.1.87 DST=192.168.1.255 LEN=229 TOS=00 PREC=0x00 TTL=128 ID=3758 PROTO=UDP SPT=138 DPT=138 LEN=209 Dec 5 00:17:47 box Shorewall:nic012nic01:DROP: IN=eth1 OUT=eth1 MAC=00:1f:e2:6c:cb:6d:00:1b:b9:63:a3:19:08:00 SRC=192.168.1.120 DST=202.54.157.139 LEN=48 T OS=00 PREC=0x00 TTL=127 ID=3754 DF PROTO=TCP SPT=1414 DPT=80 SEQ=2498894647 ACK=0 WINDOW=65535 SYN URGP=0
  • 13. Splunk – Monitor, Report and Analyze live streaming / historical IT data
  • 14. Basic Configuration after installation cd /opt/splunk/bin export SPLUNK_IGNORE_SELINUX=1 ./splunk start Use your browser to login to http://localhost:8000
  • 15. New Apps goes to /opt/splunk/etc/apps For custom log format - update the following configuration file /opt/splunk/etc/system/local/props.conf and /opt/splunk/etc/system/local/transforms.conf with entries of new log format
  • 16. OSSEC – This is an Open Source Host Based Intrusion Detection System which can work in a client – server mode.