You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: chapters/data/memory-security/drills/tasks/aslr/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# ASLR
2
2
3
-
Navigate to `chapters/data/memory-security/drills/tasks/aslr` and run `make skels` to generate the `support/` folder.
3
+
Navigate to the `aslr` directory in the lab archive (or `chapters/data/memory-security/drills/tasks/aslr` if you are working directly in the repository) and run `make skels` to generate the `support/` folder.
4
4
Then navigate to `support/src`.
5
5
6
6
Use the `Makefile.aslr` file to compile the `chapters/data/memory-security/drills/tasks/aslr/support/aslr.c` file:
Copy file name to clipboardExpand all lines: chapters/data/memory-security/drills/tasks/bypassing-stack-protector/README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,9 @@
1
1
# Bypassing the Stack Protector
2
2
3
-
Navigate to `chapters/data/memory-security/drills/tasks/bypassing-stack-protector` and run `make skels` to generate the `support/` folder.
3
+
Navigate to the `bypassing-stack-protector` directory in the lab archive (or `chapters/data/memory-security/drills/tasks/bypassing-stack-protector` if you are working directly in the repository) and run `make skels` to generate the `support/` folder.
4
4
Then navigate to `support/src`.
5
5
6
-
Inspect the `chapters/data/memory-security/drills/tasks/bypassing-stack-protector/support/stack_protector.c` source file.
6
+
Inspect the `bypassing-stack-protector/support/stack_protector.c` source file.
7
7
Compile the program and examine the object code.
8
8
Try to identify the canary value.
9
9
Using the `addr` variable, write 2 instructions: one that indexes `addr` to overwrite the canary with the correct value and one that indexes `addr` to overwrite the return address with the address of function `pawned()`.
Copy file name to clipboardExpand all lines: chapters/data/memory-security/drills/tasks/exec-shellcode/README.md
+2-4Lines changed: 2 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,9 @@
1
1
## Shellcode Executor
2
2
3
-
Navigate to `chapters/data/memory-security/drills/tasks/exec-shellcode` and run `make skels` to generate the `support/` folder.
3
+
Navigate to the `exec-shellcode` directory in the lab archive (or `chapters/data/memory-security/drills/tasks/exec-shellcode` if you are working directly in the repository) and run `make skels` to generate the `support/` folder.
4
4
Then navigate to `support/src`.
5
5
6
-
Navigate to the `chapters/data/memory-security/drills/tasks/exec-shellcode/support/` directory.
7
-
8
-
Your goal is to update the `src/exec-shellcode.s` source code file to be able to read and execute shellcodes from a given binary files.
6
+
Your goal is to update the `exec-shellcode.s` source code file to be able to read and execute shellcodes from a given binary files.
9
7
The program thus acts as a shellcode tester.
10
8
11
9
A [shellcode](https://cocomelonc.github.io/tutorial/2021/10/09/linux-shellcoding-1.html) is a small program that is commonly used in memory-related security exploits as a form of arbitrary code execution.
Copy file name to clipboardExpand all lines: chapters/data/memory-security/drills/tasks/pointer-arithmetic-leak/README.md
+1-2Lines changed: 1 addition & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,8 @@
1
1
# Wild Pointer Arithmetic Info Leak
2
2
3
-
Navigate to `chapters/data/memory-security/drills/tasks/pointer-arithmetic-leak` and run `make skels` to generate the `support/` folder.
3
+
Navigate to the `pointer-arithmetic-leak/` in the lab archive (or `chapters/data/memory-security/drills/tasks/pointer-arithmetic-leak` if you are working directly in the repository) and run `make skels` to generate the `support/` folder.
4
4
Then navigate to `support/src`.
5
5
6
-
Navigate to the `chapters/data/memory-security/drills/tasks/pointer-arithmetic-leak/support/` directory.
Copy file name to clipboardExpand all lines: chapters/data/memory-security/drills/tasks/stack-protector/README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,9 @@
1
1
# Stack Protector
2
2
3
-
Navigate to `chapters/data/memory-security/drills/tasks/stack-protector` and run `make skels` to generate the `support/` folder.
3
+
Navigate to `stack-protector/` directory in the lab archive (or `chapters/data/memory-security/drills/tasks/stack-protector` if you are working directly in the repository) and run `make skels` to generate the `support/` folder.
4
4
Then navigate to `support/src`.
5
5
6
-
Comment the `-fno-stack-protector` switch from the `chapters/data/memory-security/drills/tasks/stack-protector/support/Makefile`, recompile and run the `bo_practice_write` executable.
6
+
Comment the `-fno-stack-protector` switch from `stack-protector/support/Makefile`, recompile and run the `bo_practice_write` executable.
7
7
Examine the binary with `objdump` and identify the instructions that set and test the canary.
8
8
Observe what happens when a buffer overflow occurs.
The contents of the lab are located in the [lab archive](https://github.com/cs-pub-ro/operating-systems/raw/refs/heads/lab-archives/Lab_5_Memory_Security.zip) and in the [GitHub repository](https://github.com/cs-pub-ro/operating-systems).
0 commit comments