- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 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
format pe console 5.0
entry start
include 'win32ax.inc'
SLEEP=1000
section '.data' data readable
_hello db 'Hello "https://www.govnokod.ru/"!',13,10,0
_conout db 'CONOUT$',0
align 8
_conoutnt du '\??\CONOUT$',0
section '.data?' data readable writeable
bytes_write dd ?
houtput dd ?
length dd ?
section '.text' code readable executable
start:
call _novice
invoke Sleep,SLEEP
call _advanced
invoke Sleep,SLEEP
call _psycho
invoke Sleep,SLEEP
invoke ExitProcess,0
_novice:
invoke GetStdHandle,STD_OUTPUT_HANDLE
mov [houtput],eax
invoke lstrlen,_hello
mov [length],eax
invoke WriteConsole,[houtput],_hello,[length],bytes_write,0
ret
_advanced:
invoke CreateFileA,_conout,GENERIC_WRITE,0,0,OPEN_EXISTING,0,0
mov [houtput],eax
invoke lstrlen,_hello
mov [length],eax
invoke WriteFile,[houtput],_hello,[length],bytes_write,0
invoke CloseHandle,[houtput]
ret
_psycho:
push ebx
sub esp,40
mov ebx,esp
mov word[ebx+24],22
mov word[ebx+26],24
mov dword[ebx+28],_conoutnt
mov dword[ebx+0],24
mov dword[ebx+4],0
lea eax,[ebx+24]
mov dword[ebx+8],eax
mov dword[ebx+12],$00000040
mov dword[ebx+16],0
mov dword[ebx+20],0
lea eax,[ebx+32]
invoke NtCreateFile,houtput,$40100080,ebx,eax,0,0,0,1,$60,0,0
invoke lstrlen,_hello
mov [length],eax
lea eax,[ebx+32]
invoke NtWriteFile,[houtput],0,0,0,eax,_hello,[length],0,0
invoke NtClose,[houtput]
add esp,40
pop ebx
ret
section '.import' data import readable
library\
ntdll,'ntdll.dll',\
kernel32,'kernel32.dll'
import ntdll,\
NtClose,'NtClose',\
NtCreateFile,'NtCreateFile',\
NtWriteFile,'NtWriteFile'
include 'api\kernel32.inc'
section '.reloc' fixups data readable discardable
Интересно какой из методов (_novice, _advanced, _psycho) вывода в консоль является говнокодом?