Skip to content
This repository was archived by the owner on Apr 6, 2025. It is now read-only.

Commit e496dfe

Browse files
committed
Adaugă materialele laboratorului III
Commit-ul adaugă materialele ce vor fi folosite pentru laboratorul III și modifică anumite fișiere ale laboratoarelor anterioare. Signed-off-by: iosifache <[email protected]>
1 parent e25274c commit e496dfe

File tree

19 files changed

+413
-12
lines changed

19 files changed

+413
-12
lines changed

1 - Introducere/Exerciții/flag-checker/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ libcheckflag.so:
77
gcc -m32 -shared library.o -o libcheckflag.so
88

99
flag-checker.elf:
10-
gcc -m32 -Wl,--no-as-needed source.c -zlazy -o flag-checker.elf -L. -lcheckflag -ldl
10+
gcc -m32 -no-pie -Wl,--no-as-needed flag-checker.c -zlazy -o flag-checker.elf -L. -lcheckflag -ldl
1111

1212
clean:
1313
rm -f flag-checker.elf library.o libcheckflag.so
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
all: clean build
22

33
build:
4-
gcc -m32 source.c -o lyrics.elf
4+
gcc -m32 -no-pie lyrics.c -o lyrics.elf
55

66
clean:
77
rm -f lyrics.elf

2 - Suprascrierea Stivei. Shellcodes I/Chestionar.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
![Stack Frame](../1%20-%20Introducere/Resurse/stack_frame.png)
1414

15-
1. Ce beneficii pot aduce unui atacator atacurile de tip *buffer overflow* și cu *shellcodes*?
15+
2. Ce beneficii pot aduce unui atacator atacurile de tip *buffer overflow* și cu *shellcodes*?
1616

1717
## Altele
1818

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
NO_STACK_SECURITY=-no-pie -fno-stack-protector -z execstack
1+
NO_STACK_SECURITY=-fno-stack-protector -z execstack
22

33
all: clean cookie_lover.elf
44

55
cookie_lover.elf:
6-
gcc -m32 -mpreferred-stack-boundary=2 $(NO_STACK_SECURITY) -Wall cookie_lover.c -o cookie_lover.elf
6+
gcc -m32 -no-pie $(NO_STACK_SECURITY) -mpreferred-stack-boundary=2 -Wall cookie_lover.c -o cookie_lover.elf
77

88
clean:
99
rm -rf cookie_lover.elf

2 - Suprascrierea Stivei. Shellcodes I/Exerciții/shellcode/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ get_shellcode:
99
hexdump -v -e '"\\" 1/1 "x%02x"' shellcode.bin
1010

1111
execution_from_stack.elf:
12-
gcc -m32 $(NO_STACK_SECURITY) execution_from_stack.c -o execution_from_stack.elf
12+
gcc -m32 -no-pie $(NO_STACK_SECURITY) execution_from_stack.c -o execution_from_stack.elf
1313

1414
execution_with_mprotect.elf:
15-
gcc -m32 execution_with_mprotect.c -o execution_with_mprotect.elf
15+
gcc -m32 -no-pie execution_with_mprotect.c -o execution_with_mprotect.elf
1616

1717
clean:
1818
rm -f shellcode.bin execution_from_stack.elf execution_with_mprotect.elf
489 Bytes
Binary file not shown.
417 Bytes
Loading
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Ignoră codul sursă al exercițiilor
2+
Exerciții/essay-checker/essay-checker.c
3+
Exerciții/essay-checker/Makefile
4+
Exerciții/santa-letters/santa-letters.c
5+
Exerciții/santa-letters/Makefile
6+
7+
# Ignoră rezolvările exercițiilor
8+
Rezolvări
9+
10+
# Ignoră chestionarul
11+
Chestionar.md

0 commit comments

Comments
 (0)