Skip to content

Commit 78cb44e

Browse files
committed
lab5: Add link to the lab 5 archive
Add links to the lab archive and change directory references. Signed-off-by: Stefan Jumarea <[email protected]>
1 parent b2e0d44 commit 78cb44e

File tree

7 files changed

+10
-11
lines changed

7 files changed

+10
-11
lines changed

chapters/data/memory-security/drills/tasks/aslr/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ASLR
22

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.
44
Then navigate to `support/src`.
55

66
Use the `Makefile.aslr` file to compile the `chapters/data/memory-security/drills/tasks/aslr/support/aslr.c` file:

chapters/data/memory-security/drills/tasks/bypassing-stack-protector/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Bypassing the Stack Protector
22

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.
44
Then navigate to `support/src`.
55

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.
77
Compile the program and examine the object code.
88
Try to identify the canary value.
99
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()`.

chapters/data/memory-security/drills/tasks/exec-shellcode/README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
## Shellcode Executor
22

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.
44
Then navigate to `support/src`.
55

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.
97
The program thus acts as a shellcode tester.
108

119
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.

chapters/data/memory-security/drills/tasks/pointer-arithmetic-leak/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
# Wild Pointer Arithmetic Info Leak
22

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.
44
Then navigate to `support/src`.
55

6-
Navigate to the `chapters/data/memory-security/drills/tasks/pointer-arithmetic-leak/support/` directory.
76
Open and analyze the `buff_leak.c` file.
87

98
The pointer `p` points to the stack.

chapters/data/memory-security/drills/tasks/stack-protector/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Stack Protector
22

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.
44
Then navigate to `support/src`.
55

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.
77
Examine the binary with `objdump` and identify the instructions that set and test the canary.
88
Observe what happens when a buffer overflow occurs.
99

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
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).

config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ lab_structure:
7070
- title: Lab 5 - Memory Security
7171
filename: lab5.md
7272
content:
73+
- reading/lab5.md
7374
- tasks/pointer-arithmetic-leak.md
7475
- tasks/aslr.md
7576
- tasks/stack-protector.md

0 commit comments

Comments
 (0)