Prompt
Analyze an nginx access log and answer questions about what happened.
access.log13.1KB
Tutorial Video
Walk-Through
This challenge involves analyzing an NGINX access log. The questions can be solved through manual inspection of the file and by using basic Linux commands to parse the log.
Questions
Q1. How many different IP addresses reached the server?
cat access.log | cut -d " " -f 1 | sort | uniq | wc -l
Q2. How many requests yielded a 200 code?
cat access.log | cut -d '"' -f 3 | cut -d ' ' -f 2 | sort | uniq -c | sort -rn
Q3. How many requests yielded a 400 code?
Same as the question above
Q4. What IP address rang at the doorbell?
cat access.log | grep "bell"
Q5. What version of the Googlebot visited the website?
cat access.log | grep "Googlebot"
Q6. Which IP address attempted to exploit the Shellshock vulnerability?
Search online for details about the Shellshock vulnerability. You should be able to find that the presence of this sequence of characters () { :; };
is an indication of an attempted exploitation of this vulnerability.
cat access.log | grep '() { :; };'
() { :; };
Q7. What was the most popular version of Firefox used for browsing the website?
cat access.log | egrep -o "Firefox/.*" | sort | uniq -c
Q8. What is the most common HTTP method used?
cat access.log | awk -F " " '{print $6}' | sort | uniq -c | sort -rn
Q9. What is the second most common HTTP method used?
Same as the question above
Q10. How many requests were for \x04\x01\x00P\xC6\xCE\x0Eu0\x00?
cat access.log | grep '\\x04\\x01\\x00P\\xC6\\xCE\\x0Eu0\\x00' | wc -l
©️ 2024 Cyber Skyline. All Rights Reserved. Unauthorized reproduction or distribution of this copyrighted work is illegal.