|
1 | | -# Linux Forensics Study Guide |
2 | | -``` |
3 | | -Welcome to the Linux Forensics study guide! |
4 | | -This document will help you navigate through the necessary topics, |
5 | | -materials, and exercises to build a solid foundation in Linux forensics. |
6 | | -Follow the outlined steps, explore the materials provided, |
7 | | -and feel free to ask questions as you go. |
8 | | -Currently this guide does not explore Memory Forensics |
9 | | -Remember to document your answers and reflections along the way, Let’s dive in! |
10 | | -
|
11 | | -Resources: |
12 | | -Download these: LinuxForensicsLabVM/, Exercises/, PomeranzLinuxForensics.pdf, README.txt |
13 | | -https://archive.org/download/HalLinuxForensics/media-v3.0.2/ |
| 1 | +## 🌐 GitHub Pages |
| 2 | +Visit the live site: [https://solitudepy.github.io/LinuxForensicsLearn](https://solitudepy.github.io/LinuxForensicsLearn) |
14 | 3 |
|
15 | | -Challenges: |
16 | | -https://cyberdefenders.org/blueteam-ctf-challenges/?content=free&categories=endpoint-forensics&os=Linux |
| 4 | +## How to use offline |
| 5 | +``` |
| 6 | +git clone git@github.com:SolitudePy/LinuxForensicsLearn.git |
| 7 | +cd LinuxForensicsLearn |
| 8 | +docker compose build |
| 9 | +docker compose up -d |
17 | 10 | ``` |
18 | 11 |
|
19 | | -# Chapter 1. Linux Directories |
20 | | - |
21 | | -<a href="Subjects/1. Linux Directories/index.html" target="_blank">Linux Directory Structure By https://dev.to/softwaresennin</a><br> |
22 | | -<a href="Resources/PomeranzLinuxForensics.pdf#page=15" target="_blank">PomeranzLinuxForensics page 15-20 By Hal Pomeranz</a> |
23 | | - |
24 | | - |
25 | | -## Tasks |
26 | | -1. What is the difference between a hard link and a symbolic(soft) link? |
27 | | -2. what is the relationship of /bin and /usr/bin, /sbin and /usr/sbin? |
28 | | -3. what is usually saved in /etc? name 3 forensic artifacts in /etc. |
29 | | -4. what is usually saved in /var/log? |
30 | | -5. what is special about the /tmp directory, why as forensic analysts we would want to check it? |
31 | | - |
32 | | -# Chapter 2. Linux Logs |
33 | | -<a href="Subjects/2. Linux Logs/Logs.html" target="_blank">Linux Logs guide</a><br> |
34 | | -<a href="Subjects/2. Linux Logs/Linux_Auditd_For_ThreatDetection_IzyKnows_Part1.pdf" target="_blank">Linux Audit Subsystem Part 1 By IzyKnows</a><br> |
35 | | -<a href="Subjects/2. Linux Logs/Linux_Auditd_For_ThreatDetection_IzyKnows_Part2.pdf" target="_blank">Linux Audit Subsystem Part 2 By IzyKnows</a><br> |
36 | | -<a href="Subjects/2. Linux Logs/Linux_Auditd_For_ThreatDetection_IzyKnows_Part3.pdf" target="_blank">Linux Audit Subsystem Part 3 By IzyKnows</a><br> |
37 | | -<a href="Subjects/2. Linux Logs/LAUREL_README.html" target="_blank">LAUREL_README By https://github.com/threathunters-io/laurel</a><br> |
38 | | -<a href="Subjects/2. Linux Logs/laurel-about.7.html" target="_blank">laurel-about.7.md By https://github.com/threathunters-io/laurel</a><br> |
39 | | -<a href="Subjects/2. Linux Logs/laurel.8.html" target="_blank">laurel.8.md By https://github.com/threathunters-io/laurel</a><br> |
40 | | - |
41 | | - |
42 | | -## Tasks |
43 | | -1. Explain the difference between utmp, wtmp, btmp and lastlog files. |
44 | | -2. What command can be used to format btmp you acquired from other system? |
45 | | -3. What does the /var/log/cron file track, and why is it important? |
46 | | -4. Explain the purpose of auditd and the types of events it logs. |
47 | | -5. What is Laurel? why is it useful? |
48 | | -6. What is the significance of persistent vs. volatile storage in the context of systemd journal logs? |
49 | | -7. What is the role of rsyslog in managing log files? What is Syslog? |
50 | | -8. If you suspect unauthorized access to your system, which logs would you check first? |
51 | | -9. Describe a method for correlating events across different log files. |
52 | | -10. Discuss how log tampering can affect incident response. |
53 | | - What techniques can an attacker use to modify or delete log entries, |
54 | | - and how would you detect such tampering? Give atleast 3 tamper techniques and 2 security techniques. |
55 | | - |
56 | | -# Chapter 3. Linux FileSystems |
57 | | -<a href="Subjects/3. Linux FileSystems/procfs.html" target="_blank">procfs</a><br> |
58 | | -<a href="Subjects/3. Linux FileSystems/sysfs/sysfs.html" target="_blank">sysfs</a><br> |
59 | | -<a href="Subjects/3. Linux FileSystems/What_Are_inodes_linux.pdf" target="_blank">inodes</a><br> |
60 | | -<a href="Resources/PomeranzLinuxForensics.pdf#page=169" target="_blank">PomeranzLinuxForensics page 169-181 By Hal Pomeranz</a><br> |
61 | | -<a href="Resources/PomeranzLinuxForensics.pdf#page=182" target="_blank">PomeranzLinuxForensics page 182 (Exercise 16) By Hal Pomeranz</a> |
62 | | - |
63 | | - |
64 | | -## Tasks |
65 | | -1. Explain how the /proc filesystem differs from other filesystems in Linux. |
66 | | - Why is it considered a "pseudo-filesystem"? |
67 | | -2. Describe the purpose of the /proc/sys directory. How does this directory enable kernel parameter tuning, |
68 | | - and what are some potential security implications of modifying files within it? |
69 | | -3. Explain the purpose of the /proc/sys/net/ipv4 directory. |
70 | | - How could configurations within this directory impact network performance and security? |
71 | | - Describe two settings that a system administrator might modify and the effects they would have. |
72 | | -4. The /proc filesystem contains process-specific directories named by their PID (process ID). |
73 | | - Describe how you could use the contents of these directories to investigate a process that is suspected to be malicious. |
74 | | - What files would you examine, and what indicators would suggest suspicious behavior? |
75 | | -5. How is data generated when you read files in /proc? Explain the kernel’s role in this process. |
76 | | -6. What is /proc/kcore, and what purpose does it serve? Why should accessing this file be handled with caution? |
77 | | -7. What is an inode, and what role does it play in the Linux filesystem? |
78 | | -8. How can forensic investigators access and analyze XFS structures? |
79 | | -9. What happens to data on XFS when files are deleted? |
80 | | -10. What limitations exist for XFS in forensic investigations? |
81 | | -11. What is the purpose of the /sys directory in Linux? How does it differ from /proc? |
82 | | - |
83 | | -# Chapter 4. Linux Attacks Techniques |
84 | | -<a href="Subjects/4. Linux Attacks Techniques/Art-of-Linux-Persistence.pdf" target="_blank">Linux Persistence By hadess</a><br> |
85 | | -<a href="Subjects/4. Linux Attacks Techniques/linux-persistence-map.pdf" target="_blank">Linux Persistence Map</a> |
86 | | - |
87 | | - |
88 | | -## Tasks |
89 | | -1. What is a persistence mechanism, and why is it valuable to attackers? |
90 | | -2. List and explain three common persistence mechanisms discussed in the article. |
91 | | -3. Choose one persistence mechanism and detail steps defenders can take to detect and mitigate it on Linux systems. |
92 | | -4. Discuss the potential impact of overlooking persistence mechanisms during a Linux incident response. What risks might this pose? |
93 | | -5. Explain how LD_PRELOAD and ld.so.preload can be used as persistence mechanisms in Linux. What are the security implications of these techniques? |
94 | | - |
95 | | - |
96 | | -# Chapter 5. Linux Artifacts & Live Response |
97 | | -<a href="Subjects/5. Linux Artifacts & Live Response/Artifacts.html" target="_blank">Linux Artifacts guide</a><br> |
98 | | -<a href="Resources/PomeranzLinuxForensics.pdf#page=5" target="_blank">PomeranzLinuxForensics page 5-13(including Exercise) By Hal Pomeranz</a><br> |
99 | | -<a href="Resources/PomeranzLinuxForensics.pdf#page=25" target="_blank">PomeranzLinuxForensics Honeypot Lab Part 1 By Hal Pomeranz</a><br> |
100 | | -<a href="Resources/PomeranzLinuxForensics.pdf#page=35" target="_blank">PomeranzLinuxForensics Honeypot Lab Part 2 By Hal Pomeranz</a><br> |
101 | | -<a href="Resources/PomeranzLinuxForensics.pdf#page=49" target="_blank">PomeranzLinuxForensics Honeypot Lab Part 3 By Hal Pomeranz</a> |
102 | | - |
103 | | - |
104 | | -## Tasks |
105 | | -1. Choose 5 artifacts and explain their forensic usage with real-world examples. |
106 | | -2. An investigator notices that both ss and netstat commands are used in Linux network analysis. What could be the advantages of using each command in forensic investigations? Describe the usefulness of comparing the outputs of both commands in identifying suspicious activity. |
107 | | -3. Explain the purpose of `lsof` in forensic investigations and describe a situation where lsof might be crucial in a Linux forensic analysis. |
108 | | -4. User login information is critical for tracking user activity. Choose three artifacts from the list that log user activity and explain how each could help determine whether unauthorized access has occurred. |
109 | | -5. Read about OSQuery, why is it useful for live response & monitoring in linux? |
110 | | -6. Try your way around UAX(Unix-like Artifact Collector) and explore the artifacts. |
111 | | -7. Run Plaso on UAC output. |
112 | | - |
113 | | -# Chapter 6. Linux Bonus |
114 | | -<a href="Resources/ulk3.pdf" target="_blank">Understanding the Linux Kernel</a><br> |
115 | | -<a href="Subjects/6. Linux Bonus/How does ltrace work_ _ Packagecloud Blog.html" target="_blank">How does ltrace work By Joe Damato</a><br> |
116 | | -<a href="Subjects/6. Linux Bonus/Linux Boot Process – What Happens when Booting RHEL.html" target="_blank">Linux Boot Process By Kedar Makode</a><br> |
117 | | -<a href="Subjects/6. Linux Bonus/Linux Attack Techniques_ Dynamic Linker Hijacking with LD Preload.html" target="_blank">Dynamic Linker Hijacking By jbowen@cadosecurity.com</a><br> |
118 | | - |
119 | | - |
120 | | -**Read about the following** |
121 | | -* Linux bootloader |
122 | | -* Ptrace |
123 | | -* Linux Syscalls |
124 | | -* Linux Signals |
125 | | -* setuid,setgid, sticky bit file permissions |
126 | | - |
127 | | - |
128 | | -# Answers |
129 | | -Review your answers in: |
130 | | -<a href="Answers.html" target="_blank">Answers</a> |
0 commit comments