summaryrefslogtreecommitdiff
path: root/pwnlib/shellcraft/templates/i386/stackhunter_helper.asm
diff options
context:
space:
mode:
Diffstat (limited to 'pwnlib/shellcraft/templates/i386/stackhunter_helper.asm')
-rw-r--r--pwnlib/shellcraft/templates/i386/stackhunter_helper.asm17
1 files changed, 17 insertions, 0 deletions
diff --git a/pwnlib/shellcraft/templates/i386/stackhunter_helper.asm b/pwnlib/shellcraft/templates/i386/stackhunter_helper.asm
new file mode 100644
index 0000000..b78eaf8
--- /dev/null
+++ b/pwnlib/shellcraft/templates/i386/stackhunter_helper.asm
@@ -0,0 +1,17 @@
+<%page args="cookie = 0xe4fffc75"/>
+<%docstring>
+ stackhunter_helper(cookie = 0xe4fffc75)
+
+ The helper for the stackhunter, which prepends the cookie
+ at different alignments.
+
+Example:
+
+ >>> with context.local(arch='i386'):
+ ... print(enhex(asm(shellcraft.stackhunter_helper())))
+ 75fcffe43d75fcffe43d75fcffe43d75fcffe4
+</%docstring>
+ .int ${'%#x' % cookie}
+ cmp eax, ${'%#x' % cookie}
+ cmp eax, ${'%#x' % cookie}
+ cmp eax, ${'%#x' % cookie}