Application Security and Hardening
Geekwise Academy
Week 11 - Kali Linux and Audit Logging
Instructors:
Corey Shuman
Slack Channel:
Github Repo:
https://github.com/coreyshuman/GeekwiseApplicationSecurity
Lecture Notes:
http://coreyshuman.github.io/GeekwiseApplicationSecurity/LectureNotes
Table of Contents:
`docker run -t -i kalilinux/kali-linux-docker /bin/bash`
https://en.wikipedia.org/wiki/Vulnerability_scanner
https://mylesbraithwaite.com/2017/016/exploiting-wordpress-with-metasploit/
https://md5hashing.net/hash_type_checker
https://www.hackthebox.eu/
https://en.wikipedia.org/wiki/Metasploit_Project
https://www.kali.org/news/official-kali-linux-docker-images/
http://www.hackingarticles.in/
https://en.wikipedia.org/wiki/Fuzzing
An audit log is a security-relevant chronological set of records that provide evidence of the sequence of activities that have occured at any time. Audit records typically result from activities such as financial transactions, scientific research and health care data transactions, or communications by individual people, systems, accounts, or other entities.
[OWASP: Error Handling, Auditing and Logging](https://www.owasp.org/index.php/Error_Handling,_Auditing_and_Logging)
[Reference](https://www.datamation.com/columns/article.php/3578916/The-Importance-of-Audit-Logs.htm)
Audit logs provide us with the following:
[Github Audit Logging](https://help.github.com/enterprise/2.12/admin/articles/audit-logging/)
[MySQL Audit Log Format](https://dev.mysql.com/doc/refman/5.7/en/audit-log-file-formats.html)
The following articles discuss the types of data that should be captured in an audit log. Please read these two articles, then discuss with the group the types of data you would like to see in an audit. Are there any things that you can think of that are missing in these articles? Which items are relevant to our blogging app?
[Best Practices for Audit Log Review](http://www.computerweekly.com/tip/Best-practices-for-audit-log-review-for-IT-security-investigations)
[Application Logs - Security Best Practices](https://www.paladion.net/blogs/application-logs-security-best-practices)
[Reference](https://stackoverflow.com/questions/33671027/logging-security-considerations-and-sensitive-data)
You want to be careful that sensitive data is not captured in your audit logs, since these logs are generally not encrypted or secured at the appropriate level for sensitive data. For example: passwords, social security numbers, and credit card data should not be entered into an audit log. The audit logging functionality should have special sanitation in place to strip any sensitive data from payloads before storing logs.
Use this as a resource: [OWASP: Logging Cheat Sheet](https://www.owasp.org/index.php/Logging_Cheat_Sheet)
Add logging to our blogging application. You will need to create a log database, determine what data to capture, and implement code that will capture all events that occur through the API. The logs should be detailed enough that you can recreate a series of events just by using the logs.
Bonus: add sanitization to redact any payloads that contain social security numbers. It should change the number `123-45-6789` to something like `* * * * - * * - * * * * *` or `[SSN Redacted]`
Once you've implemented audit logging, have a partner perform a series of 6-10 actions on your blog, then use the audit log to see if you can recreate the steps they performed.