Skip to content

Commit 48fa16e

Browse files
authored
Add files via upload
1 parent 3e1de5d commit 48fa16e

File tree

3 files changed

+42
-0
lines changed

3 files changed

+42
-0
lines changed

Stack_based/run.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
3+
sudo sysctl -w kernel.randomize_va_space=0
4+
5+
gcc -m32 -o stack -z execstack -fno-stack-protector stack.c
6+
7+
sudo chown root stack
8+
sudo chmod 4755 stack
9+
10+
rm badfile
11+
gcc -m32 exploit.c -o exploit
12+
./exploit
13+
14+
./stack

Stack_based/run1.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
3+
sudo sysctl -w kernel.randomize_va_space=2
4+
5+
gcc -m32 -o stack -z execstack -fno-stack-protector stack.c
6+
7+
sudo chown root stack
8+
sudo chmod 4755 stack
9+
10+
rm badfile
11+
gcc -m32 exploit.c -o exploit
12+
./exploit
13+
14+
./stack

Stack_based/run2.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
3+
sudo sysctl -w kernel.randomize_va_space=0
4+
5+
gcc -m32 -o stack -z execstack stack.c
6+
7+
sudo chown root stack
8+
sudo chmod 4755 stack
9+
10+
rm badfile
11+
gcc -m32 exploit.c -o exploit
12+
./exploit
13+
14+
./stack

0 commit comments

Comments
 (0)