-
Notifications
You must be signed in to change notification settings - Fork 15
/
nop.asm
91 lines (70 loc) · 1.55 KB
/
nop.asm
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
; Macro & Constantes defintions
%define NULL 0
%define HASH_NOSB_RENAMED.EXE $HASH_NOP_NOSB_RENAMED.EXE
%macro invoke 2-*
extern %1
%rotate %0-1
%rep %0-1
push %1
%rotate -1
%endrep
%rotate %0
call %1
%endmacro
%macro invokel 2-*
%rotate %0-1
%rep %0-1
push %1
%rotate -1
%endrep
%rotate %0
call %1
%endmacro
; Data section
section .data
txt1 db "I am probably in a real PC",0
str_user32 db "user32.dll",0
PEB dd 0x0
FN_LOADLIBRARY dd 0
FN_MSGBOX dd 0
%include "hashs.inc"
%include "cust_config.inc"
; Code Section
section .code
GLOBAL _start
_start:
mov eax, [fs:0x30]
mov [PEB],eax
; Address de qui se finit si on fait rien
push _fend
nop
nop
nop
nop
nop
; Test For Sandboxes
%include "nosandbox.asm"
nop
nop
nop
nop
nop
; Stealth version of MessageBox
; invoke _MessageBoxA@16, 0, txt1, txt1, 0
; Récupère la base addresse de Kernel32
invokel _getdll,HASH_KERNEL32.DLL
; Récuère l'offset de la fonctions LoadLibraryA
invokel _getfunction, eax, HASH_LOADLIBRARYA
mov [FN_LOADLIBRARY], EAX
; Charge user32.dll
invokel [FN_LOADLIBRARY],str_user32
; Récupère l'addresse de base de user32.dll
invokel _getdll,HASH_USER32.DLL
; Récupère l'offset le la fonctions
invokel _getfunction, eax, HASH_MESSAGEBOXA
mov [FN_MSGBOX], EAX
; Appelle la popup discretos
invokel [FN_MSGBOX], 0, txt1, txt1, 0
_fend:
invoke _ExitProcess@4, NULL
%include "dllmgt.asm"