Рыцарь
Регистрация: 26.06.2009
Сообщений: 2,433
Сказал Спасибо: 154
Имеет 692 спасибок в 426 сообщенях
|
было так:
Код:
.text:00401000 ; int __cdecl main(int argc, const char **argv, const char **envp)
.text:00401000 _main
.text:00401000 push 0 ; uType
.text:00401002 push offset Caption ; lpCaption
.text:00401007 push offset Text ; "hello"
.text:0040100C push 0 ; hWnd
.text:0040100E call ds:MessageBoxW
.text:00401014 xor eax, eax
.text:00401016 retn
.text:00401016 _main endp
потом погромист добавляем специальный макрос который обьясняет упаковщику откуда докуда шифровать код.
становится так:
Код:
.text:00401000 ; int __cdecl main(int argc, const char **argv, const char **envp)
.text:00401000 _main proc near
.text:00401000 argc = dword ptr 4
.text:00401000 argv = dword ptr 8
.text:00401000 envp = dword ptr 0Ch
.text:00401000
.text:00401000 jmp short loc_401012
.text:00401002 db 43h, 56h, 20h, 20h, 0Ch, 0, 0, 0, 0, 0, 0, 0, 43h, 56h, 20h, 20h
.text:00401012 loc_401012:
.text:00401012 push 0 ; uType
.text:00401014 push offset Caption ; lpCaption
.text:00401019 push offset Text ; "hello"
.text:0040101E push 0 ; hWnd
.text:00401020 call ds:MessageBoxW
.text:00401026 jmp short loc_401038
.text:00401028 db 43h, 56h, 20h, 20h, 0Dh, 0, 0, 0, 0, 0, 0, 0, 43h, 56h, 20h, 20h
.text:00401038 loc_401038:
.text:00401038 xor eax, eax
.text:0040103A retn
.text:0040103A _main endp
потом код можно прогнать упаковщиком, и станет он выглядеть так:
Код:
.text:00401000 ; int __cdecl main(int argc, const char **argv, const char **envp)
.text:00401000 _main proc near
.text:00401000 argc = dword ptr 4
.text:00401000 argv = dword ptr 8
.text:00401000 envp = dword ptr 0Ch
.text:00401000
.text:00401000 jmp sub_408520 ; полетели в дебри виртуальной машины
.text:00401000 ; ------------------------------тут рандомный мусор------------------------
.text:00401005 db 33h, 5Ah, 0B0h, 90h, 0DBh, 7Eh, 0F3h, 0AAh, 0F2h, 0F7h, 0C7h, 0C4h, 0B7h, 0F0h, 1Eh, 97h
.text:00401005 db 26h, 11h, 0DEh, 33h, 0DFh, 0A9h, 0B8h, 0EAh, 20h, 0F8h, 82h, 78h, 2, 2Ah, 1Ch, 29h
.text:00401005 db 0BEh, 0EBh, 10h, 0A8h, 23h, 1Fh, 13h, 0C2h, 0B8h, 0DDh, 3Fh, 51h, 7Eh, 0A9h, 29h, 0C1h
.text:00401005 db 7Bh, 0A4h, 54h
.text:00401038 ; ---------------------------------------------------------------------------
.text:00401038 xor eax, eax
.text:0040103A retn
.text:0040103A _main endp
__________________
Шожиделать.. ботить хочется..
Последний раз редактировалось destructor, 21.03.2011 в 18:06.
|