SlideShare a Scribd company logo
Logging
Application Security Fundamentals
by Secure Code Warrior Limited is licensed under CC BY-ND 4.0
The application doesn’t log
security-related information
or simply doesn’t log anything
at all. The opposite can
happen as well: an application
logs confidential information.
What could happen?
Security-related incidents cannot be
properly investigated due to a lack of
evidence. In case confidential data is
logged, an attacker could get a hold of it.
How to implement it?
Use a logging framework to log
all interesting events in
appropriate detail with the
necessary variables. Restrict
access to authorized individuals.
What’s the concept
about?
An application uses a logging
mechanism that stores
information about
authentication events.
Suspicious events are being
actively monitored.
The login attempts are being logged.
Since the logs are being monitored,
the administrator is made aware of
the attack on his account.
Using detailed information
of the log file, the incident
response team is able to
get more information about
the attacker and his attack.
An attacker wants to crack the
password of the admin account.
He performs a series of login
attempts using a password list.
123456
password
qwerty
12345678
abc123
…
passwords.txt
Logging authentication
events
Logging
Understanding the concept
Web application
Event: [Login Failed (1)] User: admin, IP: 123.123.123.123
Event: [Login Failed (2)] User: admin, IP: 123.123.123.123
Event: [Login Failed (3)] User: admin, IP: 123.123.123.123
Event: [Login Failed (4)] User: admin, IP: 123.123.123.123
…
EventLog.logadmin
*********
Password
Login
An application without logging
mechanism that stores
information about
authentication events, such as
successful or failed logins.
Because no lockout mechanism
exists, the attacker can try all
possible passwords from the list. No
login attempt is being logged.
The admin does not realize
his account is being
attacked and compromised.
If he discovers the account
takeover, he has no way of
analyzing the attack.
An attacker wants to crack the
password of the admin account.
He performs a series of login
attempts using a password list.
123456
password
qwerty
12345678
abc123
…
passwords.txt
Missing authentication
logging
Logging
What could happen with the concept?
Web application
Event: [Login Failed (1)] User: admin, IP: 123.123.123.123
Event: [Login Failed (2)] User: admin, IP: 123.123.123.123
Event: [Login Failed (3)] User: admin, IP: 123.123.123.123
Event: [Login Failed (4)] User: admin, IP: 123.123.123.123
…
EventLog.logadmin
*********
Password
Login
…
Event: [Successful login] User: John, Password: *********
…
EventLog.log
A web application logs all
relevant activity of its users.
By exploiting a vulnerability of
the site, an attacker is able to
access the log file of the
application.
Because no sensitive
information is present in
the log, the attacker
doesn’t have information
to mount an attack
against user accounts.
A user logs into the system with
its user and password. This event
is logged to a log file. No
sensitive information like the
password is included.
No sensitive
information in log file
Logging
Understanding the concept
Web application
http://site.com/?page=../../../../EventLog.log
Login: John, Password: Y6ZGFIR84
…
Event: [Successful login] User: John, Password: Y6ZGFIR84
…
EventLog.log
A web application logs all
relevant activity of its users.
By exploiting a vulnerability of
the site, an attacker is able to
access the log file of the
application.
Because user passwords
are kept in the log file, the
attacker is able to steal
the accounts of all the
users listed in the log.
A user logs into the system with
its user and password. This event
is logged to a log file. The
password is included in the log.
Plaint text passwords
in log file
Logging
What could happen with the concept?
Web application
http://site.com/?page=../../../../EventLog.log
Login: John, Password: Y6ZGFIR84
Logging
Typical controls
Centralize logging using a framework.
Log activity through all of the application tiers.
Log key events.
Successful and failed logon attempts, modification and retrieval of data, …
Log relevant information (the 5 W’s of logging)
What happened, when, where (host, network interface, ..),
who was involved, where did it come from?
Avoid logging private information such as passwords or credit
card information.
Restrict access to logs to authorized individuals.

More Related Content

PPTX
Secure Code Warrior - Defense in depth
PPTX
Secure Code Warrior - Trust no input
PPTX
Security Testing for Web Application
PPT
Web Application Security
PPTX
Owasp first5 presentation
PPTX
Security Testing For Web Applications
PPT
Step by step guide for web application security testing
PPTX
Owasp top 10 2017
Secure Code Warrior - Defense in depth
Secure Code Warrior - Trust no input
Security Testing for Web Application
Web Application Security
Owasp first5 presentation
Security Testing For Web Applications
Step by step guide for web application security testing
Owasp top 10 2017

What's hot (20)

PDF
The Complete Web Application Security Testing Checklist
PPS
Security testing
PPTX
Web Application Vulnerabilities
PPTX
Security testing
PDF
Web application sec_3
PPTX
How to Test for The OWASP Top Ten
PDF
Web Application Security 101 - 04 Testing Methodology
PPTX
IT security : Keep calm and monitor PowerShell
PPTX
SSRF exploit the trust relationship
PPTX
8 must dos for a perfect privileged account management strategy
PDF
Security testing presentation
PPTX
Security Testing Training With Examples
PDF
Web Application Security 101
PDF
Web Application Security and Awareness
PPTX
OWASP Top 10 - 2017 Top 10 web application security risks
PPT
Bitrix Software Security
PPTX
Exploiting parameter tempering attack in web application
PPTX
A7 Missing Function Level Access Control
PDF
OWASP Top 10 Vulnerabilities - A5-Broken Access Control; A6-Security Misconfi...
PDF
Owasp top 10
The Complete Web Application Security Testing Checklist
Security testing
Web Application Vulnerabilities
Security testing
Web application sec_3
How to Test for The OWASP Top Ten
Web Application Security 101 - 04 Testing Methodology
IT security : Keep calm and monitor PowerShell
SSRF exploit the trust relationship
8 must dos for a perfect privileged account management strategy
Security testing presentation
Security Testing Training With Examples
Web Application Security 101
Web Application Security and Awareness
OWASP Top 10 - 2017 Top 10 web application security risks
Bitrix Software Security
Exploiting parameter tempering attack in web application
A7 Missing Function Level Access Control
OWASP Top 10 Vulnerabilities - A5-Broken Access Control; A6-Security Misconfi...
Owasp top 10
Ad

Viewers also liked (13)

PPTX
Secure Code Warrior - CRLF injection
PPTX
Secure Code Warrior - Robust error checking
PPTX
Secure Code Warrior - Unrestricted file upload
PPTX
Secure Code Warrior - Insufficient data encoding
PPTX
Secure Code Warrior - Privacy
PPTX
Secure Code Warrior - Client side injection
PPTX
Secure Code Warrior - Secure by default
PPTX
Secure Code Warrior - Local storage
PPTX
Secure Code Warrior - XQuery injection
PPTX
Secure Code Warrior - Cookies and sessions
PPTX
Secure Code Warrior - Fail securely
PPTX
Secure Code Warrior - Issues with origins
PPTX
Secure Code Warrior - Least privilege
Secure Code Warrior - CRLF injection
Secure Code Warrior - Robust error checking
Secure Code Warrior - Unrestricted file upload
Secure Code Warrior - Insufficient data encoding
Secure Code Warrior - Privacy
Secure Code Warrior - Client side injection
Secure Code Warrior - Secure by default
Secure Code Warrior - Local storage
Secure Code Warrior - XQuery injection
Secure Code Warrior - Cookies and sessions
Secure Code Warrior - Fail securely
Secure Code Warrior - Issues with origins
Secure Code Warrior - Least privilege
Ad

Similar to Secure Code Warrior - Logging (20)

PPTX
09 application security fundamentals - part 2 - security mechanisms - logging
PPT
The importance of logs - DefCamp 2012
PPTX
Log maintenance network securiy
PPTX
Power of logs: practices for network security
PPT
Logs for Information Assurance and Forensics @ USMA
PPT
Logs for Incident Response and Forensics: Key Issues for GOVCERT.NL 2008
PPT
Logs for Incident Response and Forensics: Key Issues for GOVCERT.NL 2008
PPT
FIRST 2006 Full-day Tutorial on Logs for Incident Response
PPTX
Cm4 secure code_training_1day_error handling and logging
PDF
Events Classification in Log Audit
PPT
Application Logging Good Bad Ugly ... Beautiful?
PPT
Logs = Accountability
DOCX
Security Incident Log Review Checklist by Dr Anton Chuvakin and Lenny Zeltser
PPT
Auditing.ppt
PPT
Making Logs Sexy Again: Can We Finally Lose The Regexes?
PPTX
Security Practices - Logging.pptx
PPTX
Eventlog
PDF
Understanding the Event Log
PPTX
Critical Log Review Checklist For Security Incidents
PPTX
detection pptx siem analyst security for understanding
09 application security fundamentals - part 2 - security mechanisms - logging
The importance of logs - DefCamp 2012
Log maintenance network securiy
Power of logs: practices for network security
Logs for Information Assurance and Forensics @ USMA
Logs for Incident Response and Forensics: Key Issues for GOVCERT.NL 2008
Logs for Incident Response and Forensics: Key Issues for GOVCERT.NL 2008
FIRST 2006 Full-day Tutorial on Logs for Incident Response
Cm4 secure code_training_1day_error handling and logging
Events Classification in Log Audit
Application Logging Good Bad Ugly ... Beautiful?
Logs = Accountability
Security Incident Log Review Checklist by Dr Anton Chuvakin and Lenny Zeltser
Auditing.ppt
Making Logs Sexy Again: Can We Finally Lose The Regexes?
Security Practices - Logging.pptx
Eventlog
Understanding the Event Log
Critical Log Review Checklist For Security Incidents
detection pptx siem analyst security for understanding

Recently uploaded (20)

PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPT
Teaching material agriculture food technology
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
cuic standard and advanced reporting.pdf
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
Teaching material agriculture food technology
Review of recent advances in non-invasive hemoglobin estimation
Unlocking AI with Model Context Protocol (MCP)
Agricultural_Statistics_at_a_Glance_2022_0.pdf
MIND Revenue Release Quarter 2 2025 Press Release
Network Security Unit 5.pdf for BCA BBA.
Spectral efficient network and resource selection model in 5G networks
Building Integrated photovoltaic BIPV_UPV.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
The AUB Centre for AI in Media Proposal.docx
NewMind AI Weekly Chronicles - August'25 Week I
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Programs and apps: productivity, graphics, security and other tools
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
The Rise and Fall of 3GPP – Time for a Sabbatical?
20250228 LYD VKU AI Blended-Learning.pptx
cuic standard and advanced reporting.pdf
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf

Secure Code Warrior - Logging

  • 1. Logging Application Security Fundamentals by Secure Code Warrior Limited is licensed under CC BY-ND 4.0
  • 2. The application doesn’t log security-related information or simply doesn’t log anything at all. The opposite can happen as well: an application logs confidential information. What could happen? Security-related incidents cannot be properly investigated due to a lack of evidence. In case confidential data is logged, an attacker could get a hold of it. How to implement it? Use a logging framework to log all interesting events in appropriate detail with the necessary variables. Restrict access to authorized individuals. What’s the concept about?
  • 3. An application uses a logging mechanism that stores information about authentication events. Suspicious events are being actively monitored. The login attempts are being logged. Since the logs are being monitored, the administrator is made aware of the attack on his account. Using detailed information of the log file, the incident response team is able to get more information about the attacker and his attack. An attacker wants to crack the password of the admin account. He performs a series of login attempts using a password list. 123456 password qwerty 12345678 abc123 … passwords.txt Logging authentication events Logging Understanding the concept Web application Event: [Login Failed (1)] User: admin, IP: 123.123.123.123 Event: [Login Failed (2)] User: admin, IP: 123.123.123.123 Event: [Login Failed (3)] User: admin, IP: 123.123.123.123 Event: [Login Failed (4)] User: admin, IP: 123.123.123.123 … EventLog.logadmin ********* Password Login
  • 4. An application without logging mechanism that stores information about authentication events, such as successful or failed logins. Because no lockout mechanism exists, the attacker can try all possible passwords from the list. No login attempt is being logged. The admin does not realize his account is being attacked and compromised. If he discovers the account takeover, he has no way of analyzing the attack. An attacker wants to crack the password of the admin account. He performs a series of login attempts using a password list. 123456 password qwerty 12345678 abc123 … passwords.txt Missing authentication logging Logging What could happen with the concept? Web application Event: [Login Failed (1)] User: admin, IP: 123.123.123.123 Event: [Login Failed (2)] User: admin, IP: 123.123.123.123 Event: [Login Failed (3)] User: admin, IP: 123.123.123.123 Event: [Login Failed (4)] User: admin, IP: 123.123.123.123 … EventLog.logadmin ********* Password Login
  • 5. … Event: [Successful login] User: John, Password: ********* … EventLog.log A web application logs all relevant activity of its users. By exploiting a vulnerability of the site, an attacker is able to access the log file of the application. Because no sensitive information is present in the log, the attacker doesn’t have information to mount an attack against user accounts. A user logs into the system with its user and password. This event is logged to a log file. No sensitive information like the password is included. No sensitive information in log file Logging Understanding the concept Web application http://site.com/?page=../../../../EventLog.log Login: John, Password: Y6ZGFIR84
  • 6. … Event: [Successful login] User: John, Password: Y6ZGFIR84 … EventLog.log A web application logs all relevant activity of its users. By exploiting a vulnerability of the site, an attacker is able to access the log file of the application. Because user passwords are kept in the log file, the attacker is able to steal the accounts of all the users listed in the log. A user logs into the system with its user and password. This event is logged to a log file. The password is included in the log. Plaint text passwords in log file Logging What could happen with the concept? Web application http://site.com/?page=../../../../EventLog.log Login: John, Password: Y6ZGFIR84
  • 7. Logging Typical controls Centralize logging using a framework. Log activity through all of the application tiers. Log key events. Successful and failed logon attempts, modification and retrieval of data, … Log relevant information (the 5 W’s of logging) What happened, when, where (host, network interface, ..), who was involved, where did it come from? Avoid logging private information such as passwords or credit card information. Restrict access to logs to authorized individuals.