{"id":443206,"date":"2024-12-26T06:11:27","date_gmt":"2024-12-26T06:11:27","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=443206"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=443206","title":{"rendered":"<span>\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0430\u0434\u0430\u043b\u0430 \u043d\u0430 \u043f\u0435\u0440\u0432\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u0435<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/620\/8e9\/ee2\/6208e9ee20a20422d85634fad105367b.png\" width=\"707\" height=\"353\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/620\/8e9\/ee2\/6208e9ee20a20422d85634fad105367b.png\"\/><\/figure>\n<p>\u041d\u0430\u0448\u0435\u0433\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0434\u043e\u043d\u0438\u043c\u0430\u043b\u0438 \u043e\u0442\u0447\u0451\u0442\u044b \u043e \u0432\u044b\u043b\u0435\u0442\u0430\u0445, \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0432\u0448\u0438\u0435, \u0447\u0442\u043e \u0435\u0433\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043b\u043e\u043c\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0441\u0430\u043c\u043e\u0439 \u043f\u0435\u0440\u0432\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u0435.<\/p>\n<p>\u042f \u043e\u0442\u043a\u0440\u044b\u043b \u043e\u0434\u0438\u043d \u0438\u0437 \u0434\u0430\u043c\u043f\u043e\u0432 \u0432\u044b\u043b\u0435\u0442\u0430: \u043e\u043d \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u043d\u0430\u0441\u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0440\u0430\u043d\u043d\u044b\u043c, \u0447\u0442\u043e \u043e\u0442\u043b\u0430\u0434\u0447\u0438\u043a \u0434\u0430\u0436\u0435 \u043d\u0435 \u043c\u043e\u0433 \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u043f\u043e\u0448\u043b\u043e \u043d\u0435 \u0442\u0430\u043a.<\/p>\n<pre><code class=\"yaml\">ERROR: Unable to find system thread FFFFFFFF ERROR: The thread being debugged has either exited or cannot be accessed ERROR: Many commands will not work properly This dump file has an exception of interest stored in it. The stored exception information can be accessed via .ecxr. ERROR: Exception C0000005 occurred on unknown thread FFFFFFFF (61c.ffffffff): Access violation - code c0000005 (first\/second chance not available) 0:???&gt; r WARNING: The debugger does not have a current process or thread WARNING: Many commands will not work        ^ Illegal thread error in 'r' 0:???&gt; .ecxr WARNING: The debugger does not have a current process or thread WARNING: Many commands will not work 0:???&gt;<\/code><\/pre>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u0437\u0430 \u043f\u043e\u0442\u043e\u043a\u0438 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c.<\/p>\n<pre><code class=\"yaml\">0:???&gt; ~ WARNING: The debugger does not have a current process or thread WARNING: Many commands will not work    0  Id: 61c.12b4 Suspend: 1 Teb: 000000c7`9604d000 Unfrozen    1  Id: 61c.22d4 Suspend: 1 Teb: 000000c7`9604f000 Unfrozen    2  Id: 61c.1ab0 Suspend: 1 Teb: 000000c7`96051000 Unfrozen    3  Id: 61c.3308 Suspend: 1 Teb: 000000c7`96053000 Unfrozen    4  Id: 61c.2af0 Suspend: 1 Teb: 000000c7`96055000 Unfrozen    5  Id: 61c.2054 Suspend: 1 Teb: 000000c7`96059000 Unfrozen 0:???&gt;<\/code><\/pre>\n<p>\u041b\u044e\u0431\u043e\u043f\u044b\u0442\u043d\u043e, \u0447\u0442\u043e \u043e\u043d\u0438 \u0434\u0435\u043b\u0430\u044e\u0442.<\/p>\n<p>\u0411\u0443\u0434\u0435\u043c \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u043f\u043e\u0442\u043e\u043a\u043e\u0432, \u043f\u0440\u043e\u0441\u0442\u043e \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u043d\u0430 \u043a\u0430\u043a\u043e\u0439 \u043e\u043d\u0438 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0435:<\/p>\n<pre><code class=\"yaml\">0:???&gt; ~0s WARNING: The debugger does not have a current process or thread WARNING: Many commands will not work ntdll!RtlUserThreadStart: 00007ffa`bb16df50 4883ec78        sub     rsp,78h 0:000&gt; ~*s          ^ Illegal thread error in '~*s' 0:000&gt; ~1s 00000293`42074058 66894340        mov     word ptr [rbx+40h],ax ds:00007ff6`e4600040=1f0e 0:001&gt; ~2s ntdll!ZwWaitForWorkViaWorkerFactory+0x14: 00007ffa`bb1b29c4 c3              ret 0:002&gt; ~3s ntdll!ZwWaitForWorkViaWorkerFactory+0x14: 00007ffa`bb1b29c4 c3              ret 0:003&gt; ~4s ntdll!ZwWaitForWorkViaWorkerFactory+0x14: 00007ffa`bb1b29c4 c3              ret 0:004&gt; ~5s ntdll!ZwDelayExecution+0x14: 00007ffa`bb1af3f4 c3              ret<\/code><\/pre>\n<p>\u041a\u0430\u0436\u0443\u0449\u0435\u0439\u0441\u044f \u043f\u0440\u0438\u0447\u0438\u043d\u043e\u0439 \u0432\u044b\u043b\u0435\u0442\u0430 \u0431\u044b\u043b\u0430 \u043d\u0435\u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0437\u0430\u043f\u0438\u0441\u0438, \u0430 \u0437\u0430\u043f\u0438\u0441\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0442\u043e\u043a 1. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u0438\u0433\u043b\u044f\u0434\u0438\u043c\u0441\u044f, \u043a\u0443\u0434\u0430 \u043e\u043d \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u044c.<\/p>\n<pre><code class=\"yaml\">0:001&gt; !address @rbx  Usage:                  Image Base Address:           00007ff6`e4600000 End Address:            00007ff6`e4601000 Region Size:            00000000`00001000 (   4.000 kB) State:                  00001000          MEM_COMMIT Protect:                00000002          PAGE_READONLY Type:                   01000000          MEM_IMAGE Allocation Base:        00007ff6`e4600000 Allocation Protect:     00000080          PAGE_EXECUTE_WRITECOPY Image Path:             C:\\Program Files\\Contoso\\ContosoDeluxe.exe Module Name:            ContosoDeluxe Loaded Image Name:      ContosoDeluxe.exe Mapped Image Name:      C:\\Program Files\\Contoso\\ContosoDeluxe.exe More info:              lmv m ContosoDeluxe More info:              !lmi ContosoDeluxe More info:              ln 0x7ff6e4600000 More info:              !dh 0x7ff6e4600000  Content source: 2 (mapped), length: 400 0:001&gt; ln @rbx (00000000`00000000)   ContosoDeluxe!__ImageBase<\/code><\/pre>\n<p>\u0422\u0430\u043a, \u0437\u043d\u0430\u0447\u0438\u0442, \u043c\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0437\u0430\u043f\u0438\u0441\u044c \u0432 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0451\u043d\u043d\u044b\u0439 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u043e\u0431\u0440\u0430\u0437\u0430 \u0441\u0430\u043c\u043e\u0433\u043e ContosoDeluxe. \u042d\u0442\u043e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f (<code>PAGE_READ\u00adONLY<\/code>), \u0438 \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u0430\u0432 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043d\u0430 \u0437\u0430\u043f\u0438\u0441\u044c.<\/p>\n<p>\u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u043c\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0437\u0430\u043f\u0438\u0441\u044c \u0432 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u043e\u0431\u0440\u0430\u0437\u0430, \u0430 \u044d\u0442\u043e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043d\u0435\u043e\u0431\u044b\u0447\u043d\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435. \u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u043e\u0437\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0437\u0430\u0433\u043b\u044f\u043d\u0443\u0442\u044c \u0432 \u0441\u0442\u0435\u043a\u0438, \u0442\u043e \u043c\u044b \u0443\u0432\u0438\u0434\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<pre><code class=\"yaml\">0:001&gt; ~*k     0  Id: 61c.12b4 Suspend: 1 Teb: 000000c7`9604d000 Unfrozen Child-SP          RetAddr               Call Site 000000c7`962ffd48 00000000`00000000     ntdll!RtlUserThreadStart     1  Id: 61c.22d4 Suspend: 1 Teb: 000000c7`9604f000 Unfrozen Child-SP          RetAddr               Call Site 000000c7`963ff900 00007ff6`e4600000     0x00000293`42074058     2  Id: 61c.1ab0 Suspend: 1 Teb: 000000c7`96051000 Unfrozen Child-SP          RetAddr               Call Site 000000c7`964ff718 00007ffa`bb145a0e     ntdll!ZwWaitForWorkViaWorkerFactory+0x14 000000c7`964ff720 00007ffa`ba25244d     ntdll!TppWorkerThread+0x2ee 000000c7`964ffa00 00007ffa`bb16df78     kernel32!BaseThreadInitThunk+0x1d 000000c7`964ffa30 00000000`00000000     ntdll!RtlUserThreadStart+0x28     3  Id: 61c.3308 Suspend: 1 Teb: 000000c7`96053000 Unfrozen Child-SP          RetAddr               Call Site 000000c7`965ff6a8 00007ffa`bb145a0e     ntdll!ZwWaitForWorkViaWorkerFactory+0x14 000000c7`965ff6b0 00007ffa`ba25244d     ntdll!TppWorkerThread+0x2ee 000000c7`965ff990 00007ffa`bb16df78     kernel32!BaseThreadInitThunk+0x1d 000000c7`965ff9c0 00000000`00000000     ntdll!RtlUserThreadStart+0x28     4  Id: 61c.2af0 Suspend: 1 Teb: 000000c7`96055000 Unfrozen Child-SP          RetAddr               Call Site 000000c7`966ffad8 00007ffa`bb145a0e     ntdll!ZwWaitForWorkViaWorkerFactory+0x14 000000c7`966ffae0 00007ffa`ba25244d     ntdll!TppWorkerThread+0x2ee 000000c7`966ffdc0 00007ffa`bb16df78     kernel32!BaseThreadInitThunk+0x1d 000000c7`966ffdf0 00000000`00000000     ntdll!RtlUserThreadStart+0x28     5  Id: 61c.2054 Suspend: 1 Teb: 000000c7`96059000 Unfrozen Child-SP          RetAddr               Call Site 000000c7`968ffcb8 00007ffa`bb165833     ntdll!ZwDelayExecution+0x14 000000c7`968ffcc0 00007ffa`b88f9fcd     ntdll!RtlDelayExecution+0x43 000000c7`968ffcf0 00000293`420a1efd     KERNELBASE!SleepEx+0x7d 000000c7`968ffd70 00000000`00000000     0x00000293`420a1efd<\/code><\/pre>\n<p>\u041f\u043e\u0442\u043e\u043a 1 \u2014 \u044d\u0442\u043e \u0442\u043e\u0442 \u0441\u0430\u043c\u044b\u0439 \u043f\u043e\u0434\u043e\u0437\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u0442\u043e\u043a, \u0441\u043e\u0432\u0435\u0440\u0448\u0438\u0432\u0448\u0438\u0439 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u0430.<\/p>\n<p>\u0415\u0441\u0442\u044c \u0438 \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u043f\u043e\u0434\u043e\u0437\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u0442\u043e\u043a \u043f\u043e\u0434 \u043d\u043e\u043c\u0435\u0440\u043e\u043c 5, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0432\u044b\u0437\u043e\u0432\u0435 <code>SleepEx<\/code>, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u043c \u0438\u0437 \u0442\u043e\u0433\u043e \u0436\u0435 \u043f\u043e\u0434\u043e\u0437\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 <code>0x00000293`420xxxxx<\/code>. \u0412\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u044d\u0442\u043e\u0442 \u043f\u043e\u0442\u043e\u043a \u0436\u0434\u0451\u0442, \u043f\u043e\u043a\u0430 \u0447\u0442\u043e-\u0442\u043e \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0451\u0442, \u0442\u0430\u043a \u0447\u0442\u043e \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u0437\u0433\u043b\u044f\u043d\u0435\u043c \u043d\u0430 \u044d\u0442\u043e.<\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0438\u0437 \u043a\u0430\u043a\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u043f\u0430\u043c\u044f\u0442\u0438 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435.<\/p>\n<pre><code class=\"yaml\">0:001&gt; !address 00000293`420a1ee0  Usage:                  &lt;unknown&gt; Base Address:           00000293`420a0000 End Address:            00000293`420ca000 Region Size:            00000000`0002a000 ( 168.000 kB) State:                  00001000          MEM_COMMIT Protect:                00000040          PAGE_EXECUTE_READWRITE Type:                   00020000          MEM_PRIVATE Allocation Base:        00000293`420a0000 Allocation Protect:     00000040          PAGE_EXECUTE_READWRITE<\/code><\/pre>\n<p>\u041e\u0439-\u0451\u0439,\u00a0<code>PAGE_EXECUTE_READ\u00adWRITE<\/code>. \u041f\u043b\u043e\u0445\u043e\u0439 \u043f\u0440\u0438\u0437\u043d\u0430\u043a. \u042d\u0442\u043e \u043f\u043e\u0445\u043e\u0434\u0438\u0442 \u043d\u0430 \u0438\u043d\u044a\u0435\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0437\u043b\u043e\u0432\u0440\u0435\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0434\u043b\u044f \u043e\u0431\u044b\u0447\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u043a\u0440\u0430\u0439\u043d\u0435 \u043d\u0435\u043e\u0431\u044b\u0447\u043d\u043e \u0431\u044b\u0442\u044c read-write. \u041d\u043e \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u043c \u043d\u0430\u0434\u0435\u044f\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0432\u0441\u0435\u043c\u0443 \u044d\u0442\u043e\u043c\u0443 \u0435\u0441\u0442\u044c \u043d\u0435\u0432\u0438\u043d\u043d\u043e\u0435 \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u0435, \u0438 \u043d\u0430\u043c \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0435\u0433\u043e \u043d\u0430\u0439\u0442\u0438.<\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0439 \u043a\u043e\u0434.<\/p>\n<pre><code class=\"cpp\">00000293`420a1ed9 add     rsp,30h 00000293`420a1edd pop     rdi 00000293`420a1ede ret 00000293`420a1edf int     3 00000293`420a1ee0 push    rbx 00000293`420a1ee2 sub     rsp,20h 00000293`420a1ee6 call    00000293`420a13e0 00000293`420a1eeb mov     qword ptr [00000293`420c0c78],rax 00000293`420a1ef2 mov     ecx,3E8h 00000293`420a1ef7 call    qword ptr [00000293`420b4028]                   ^^^^^^^^ \u041c\u042b \u0417\u0414\u0415\u0421\u042c 00000293`420a1efd call    00000293`420a13e0 \/\/ do it again 00000293`420a1f02 mov     rdx,rax 00000293`420a1f05 mov     rbx,rax 00000293`420a1f08 call    00000293`420a19d0 00000293`420a1f0d test    eax,eax 00000293`420a1f0f jne     00000293`420a1f22 00000293`420a1f11 mov     rax,qword ptr [00000293`420c0c78] 00000293`420a1f18 mov     qword ptr [00000293`420c0c78],rbx 00000293`420a1f1f mov     rbx,rax 00000293`420a1f22 mov     rcx,rbx 00000293`420a1f25 call    00000293`420a17f0 00000293`420a1f2a jmp     00000293`420a1ef2<\/code><\/pre>\n<p>\u041f\u0435\u0440\u0432\u044b\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043c\u0430\u043d\u0434 \u0434\u043e <code>int 3<\/code>\u00a0\u043e\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u043a\u043e\u043d\u0446\u043e\u043c \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0447\u0430\u0442\u044c \u043d\u0430\u0448 \u0430\u043d\u0430\u043b\u0438\u0437 \u0441 <code>push rbx<\/code>.<\/p>\n<pre><code class=\"lisp\">    push rbx                        ; \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0440\u0435\u0433\u0438\u0441\u0442\u0440     sub rsp, 20h                    ; \u043a\u0430\u0434\u0440 \u0441\u0442\u0435\u043a\u0430     call 00000293`420a13e0          ; \u0437\u0430\u0433\u0430\u0434\u043e\u0447\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f 1     mov  [00000293`420c0c78],rax    ; \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u043e\u0442\u0432\u0435\u0442 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e  00000293`420a1ef2:     mov  ecx, 3E8h                  ; \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u043e\u0435 1000     call [00000293`420b4028]        ; \u0437\u0430\u0433\u0430\u0434\u043e\u0447\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f 2     ^^^^^^^^ YOU ARE HERE      call 00000293`420a13e0          ; \u0437\u0430\u0433\u0430\u0434\u043e\u0447\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f 1     mov  rdx, rax                   ; \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f param1     mov  rbx, rax                   ; \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 rbx     call 00000293`420a19d0          ; \u0437\u0430\u0433\u0430\u0434\u043e\u0447\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f 3     test eax,eax                    ; \u0432\u043e\u043f\u0440\u043e\u0441: \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043b\u043e\u0441\u044c \u043b\u0438 \u0443\u0441\u043f\u0435\u0448\u043d\u043e?     jne  00000293`420a1f22          ; \u043d\u0435\u0442: \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u043c     mov  rax, [00000293`420c0c78]   ; \u0431\u0435\u0440\u0451\u043c \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435     mov  [00000293`420c0c78], rbx   ; \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u043c \u043d\u043e\u0432\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c     mov  rbx, rax                   ; \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 rbx  00000293`420a1f22:     mov   rcx, rbx                  ; rcx = \u043e\u0431\u043d\u043e\u0432\u043b\u0451\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 rbx     call    00000293`420a17f0       ; \u0437\u0430\u0433\u0430\u0434\u043e\u0447\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f 3     jmp     00000293`420a1ef2       ; \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u0432\u043e\u0437\u0432\u0440\u0430\u0442 \u043a \u043d\u0430\u0447\u0430\u043b\u0443 \u0446\u0438\u043a\u043b\u0430<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e \u043e\u0434\u043d\u043e: \u043f\u043e\u0442\u043e\u043a \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0432\u044b\u0445\u043e\u0434. \u042d\u0442\u043e \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u0446\u0438\u043a\u043b.<\/p>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c\u0441\u044f, \u0441\u043c\u043e\u0436\u0435\u043c \u043b\u0438 \u043c\u044b \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u0433\u0430\u0434\u043e\u0447\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/p>\n<p>\u0421\u0430\u043c\u043e\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439, \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0433\u0430\u0434\u043e\u0447\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f 2, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d\u0430 \u043f\u043e\u0445\u043e\u0436\u0430 \u043d\u0430 \u0432\u044b\u0437\u043e\u0432 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/p>\n<pre><code class=\"cpp\">0:001&gt; dps 00000293`420b4028 L1 00000293`420b4028  00007ffa`ba258370 kernel32!SleepStub<\/code><\/pre>\n<p>\u0410\u0433\u0430, \u0437\u0430\u0433\u0430\u0434\u043e\u0447\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f 2 \u2014 \u044d\u0442\u043e <code>Sleep<\/code>, \u0430 \u0432\u044b\u0437\u043e\u0432 \u2014 \u044d\u0442\u043e <code>Sleep(1000)<\/code>. \u0412 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435, \u043c\u044b \u044d\u0442\u043e \u0437\u043d\u0430\u043b\u0438 \u0438\u0437 \u0442\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u043a\u0438 \u0441\u0442\u0435\u043a\u0430, \u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u043e\u043b\u0435\u0437\u043d\u043e.<\/p>\n<p>\u041d\u043e \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u043e\u0431\u043b\u0438\u0437\u043e\u0441\u0442\u0438 \u043e\u0442 \u044d\u0442\u043e\u0433\u043e \u0430\u0434\u0440\u0435\u0441\u0430, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c <a href=\"https:\/\/devblogs.microsoft.com\/oldnewthing\/20230911-00\/?p=108749\" rel=\"noopener noreferrer nofollow\"><u>\u0447\u0430\u0441\u0442\u044c\u044e \u0431\u043e\u043b\u0435\u0435 \u043a\u0440\u0443\u043f\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0439<\/u><\/a>.<\/p>\n<pre><code class=\"cpp\">00000293`420b4000  00007ffa`baa59810 advapi32!RegCloseKeyStub 00000293`420b4008  00007ffa`baa596e0 advapi32!RegQueryInfoKeyWStub 00000293`420b4010  00007ffa`baa595a0 advapi32!RegOpenKeyExWStub  00000293`420b4018  00007ffa`baa5ab30 advapi32!RegEnumValueWStub 00000293`420b4020  00000000`00000000 00000293`420b4028  00007ffa`ba258370 kernel32!SleepStub 00000293`420b4030  00007ffa`ba250cc0 kernel32!GetLastErrorStub 00000293`420b4038  00007ffa`ba266b60 kernel32!lstrcatW 00000293`420b4040  00007ffa`ba25ff00 kernel32!CloseHandle 00000293`420b4048  00007ffa`ba254380 kernel32!CreateThreadStub<\/code><\/pre>\n<p>\u0411\u0438\u043d\u0433\u043e! \u041f\u043e\u0445\u043e\u0436\u0435, \u044d\u0442\u043e \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439.<\/p>\n<p>\u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a, \u0447\u0442\u043e, \u0437\u0430\u0433\u0430\u0434\u043e\u0447\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f 1 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0432\u0441\u0435\u0433\u043e, \u0430 \u0437\u0430\u0442\u0435\u043c \u0441\u043d\u043e\u0432\u0430 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0446\u0438\u043a\u043b\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443, \u043d\u0430\u0432\u0435\u0440\u043d\u043e, \u043e\u043d\u0430 \u0432\u0430\u0436\u043d\u0430. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c\u0441\u044f, \u0447\u0442\u043e \u044d\u0442\u043e \u0442\u0430\u043a\u043e\u0435.<\/p>\n<pre><code class=\"cpp\">00000293`420a13e0 mov     qword ptr [rsp+8],rbx 00000293`420a13e5 mov     qword ptr [rsp+10h],rsi 00000293`420a13ea mov     qword ptr [rsp+18h],rdi 00000293`420a13ef push    rbp 00000293`420a13f0 mov     rbp,rsp 00000293`420a13f3 sub     rsp,80h 00000293`420a13fa mov     rax,qword ptr [00000293`420bf010] 00000293`420a1401 xor     rax,rsp 00000293`420a1404 mov     qword ptr [rbp-8],rax 00000293`420a1408 mov     ecx,40h 00000293`420a140d call    00000293`420a8478 \/\/ \u0437\u0430\u0433\u0430\u0434\u043e\u0447\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f 3<\/code><\/pre>\n<p>\u042d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043a\u0430\u043a \u0442\u0438\u043f\u0438\u0447\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043d\u0430 C, \u0430 \u043d\u0435 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u043d\u044b\u0439 \u043a\u043e\u0434. \u041f\u043e\u0441\u043b\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043d\u0435\u0438\u0437\u043c\u0435\u043d\u044f\u044e\u0449\u0438\u0445\u0441\u044f \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432 \u043e\u043d \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u043a\u0430\u0434\u0440 \u0441\u0442\u0435\u043a\u0430, \u0430 <code>mov rax, [global]<\/code>\u00a0\u0441 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c <code>xor rax, rsp<\/code>\u00a0\u043f\u043e\u0445\u043e\u0434\u0438\u0442 \u043d\u0430 canary\u00a0\/GS\u00a0\u0441\u0442\u0435\u043a\u0430.<\/p>\n<p>\u041f\u043e \u043a\u0440\u0430\u0439\u043d\u0435\u0439 \u043c\u0435\u0440\u0435, \u0437\u0434\u043e\u0440\u043e\u0432\u043e, \u0447\u0442\u043e \u044d\u0442\u043e\u0442 \u0437\u0430\u0433\u0430\u0434\u043e\u0447\u043d\u044b\u0439 \u043a\u043e\u0434 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043b\u0441\u044f \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0431\u0443\u0444\u0435\u0440\u0430 \u0441\u0442\u0435\u043a\u0430. \u041e\u0441\u0442\u043e\u0440\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0431\u044b\u0432\u0430\u0435\u0442 \u043b\u0438\u0448\u043d\u0435\u0439.<\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u0437\u0433\u043b\u044f\u043d\u0435\u043c \u043d\u0430 \u0437\u0430\u0433\u0430\u0434\u043e\u0447\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e 3.<\/p>\n<pre><code class=\"cpp\">00000293`420a8478     push rbx     sub  rsp, 20h     mov  rbx, rcx     jmp  00000293`420a8492  00000293`420a8483     mov  rcx, rbx     call 00000293`420aad50     test eax, eax     je   00000293`420a84a2     mov  rcx, rbx  00000293`420a8492     call 00000293`420aadb4     test rax, rax     je   00000293`420a8483     add  rsp, 20h     pop  rbx     ret  00000293`420a84a2     cmp  rbx, 0FFFFFFFFFFFFFFFFh     je   00000293`420a84ae      call 00000293`420a8c80     int  3  00000293`420a84ae     call 00000293`420a8ca0     int  3  00000293`420a84b4     jmp  00000293`420a8478<\/code><\/pre>\n<p>\u041f\u0440\u0438 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c<\/p>\n<pre><code class=\"cpp\">uint64_t something(uint64_t value) {     uint64_t p;     while (uint64_t p = func00000293420aadb4(value); !p) {         if (!func00000293420aad50(value)) {             if (value == ~0ULL) {                 func00000293420a8c80();             } else {                 func00000293420a8c80();             }             \/\/ NOTREACHED         }     }     return p; }<\/code><\/pre>\n<p>\u041f\u043e\u0445\u043e\u0436\u0435, \u043a\u043e\u0434 \u043c\u043d\u043e\u0433\u043e\u043a\u0440\u0430\u0442\u043d\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>func00000293420aadb4<\/code>.<\/p>\n<pre><code class=\"cpp\">00000293`420aadb4 jmp     00000293`420acf8c<\/code><\/pre>\n<p>\u042d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043a\u0430\u043a thunk \u043a\u043e\u043c\u043f\u043e\u043d\u043e\u0432\u043a\u0438 \u0441 \u043f\u0440\u0438\u0440\u0430\u0449\u0435\u043d\u0438\u0435\u043c. \u0427\u0442\u043e \u0431\u044b \u044d\u0442\u043e \u043d\u0438 \u0431\u044b\u043b\u043e, \u043d\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442, \u043a\u0430\u043a \u0431\u0443\u0434\u0442\u043e \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u044d\u0442\u043e \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u043e\u0442\u043b\u0430\u0434\u043a\u0438.<\/p>\n<pre><code class=\"cpp\">00000293`420acf8c     push rbx     sub  rsp, 20h     mov  rbx,rcx     cmp  rcx, 0FFFFFFFFFFFFFFE0h     ja   00000293`420acfd7     test rcx, rcx     mov  eax, 1     cmove rbx, rax     jmp  00000293`420acfbe  00000293`420acfa9     call 00000293`420b02c0     test eax, eax     je   00000293`420acfd7     mov  rcx, rbx     call 00000293`420aad50     test eax, eax     je   00000293`420acfd7  00000293`420acfbe      mov  rcx, [00000293`420c07f8]     mov  r8, rbx     xor  edx, edx     call [00000293`420b4298]     test rax, rax     je   00000293`420acfa9     jmp  00000293`420acfe4  00000293`420acfd7     call  00000293`420ac71c     mov   [rax], 0Ch     xor   eax, eax     add   rsp, 20h     pop   rbx     ret<\/code><\/pre>\n<p>\u041f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0441 <code>0xFFFFFFFF`FFFFFFFE<\/code>\u00a0\u0437\u0430\u0441\u0442\u0430\u0432\u0438\u043b\u043e \u043c\u0435\u043d\u044f \u0437\u0430\u043f\u043e\u0434\u043e\u0437\u0440\u0438\u0442\u044c, \u0447\u0442\u043e \u044d\u0442\u043e <code>malloc()<\/code>\u00a0\u0438\u043b\u0438\u00a0<code>operator new<\/code>, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u044d\u0442\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442\u0441\u044f \u0441 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0418 \u0432 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u043f\u043e \u0441\u0443\u0442\u0438, \u043a\u0430\u043a \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0438\u0437 \u043a\u043e\u0441\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0438\u043c\u0435\u043d\u043d\u043e \u0432 \u044d\u0442\u043e\u043c \u0438 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0435\u0451 \u0437\u0430\u0434\u0430\u0447\u0430: <\/p>\n<pre><code class=\"cpp\">0:005&gt; dps 00000293`420b4298 L1 00000293`420b4298  00007ffa`bb14cca0 ntdll!RtlAllocateHeap<\/code><\/pre>\n<p>\u0418\u0442\u0430\u043a, \u0437\u043d\u0430\u0447\u0438\u0442, \u043c\u044b \u043d\u0430\u0448\u043b\u0438 <code>malloc()<\/code>\u00a0\u0438\u043b\u0438 <code>operator new<\/code>.<\/p>\n<p>\u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043d\u0430\u043c \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043b\u0443\u0447\u0448\u0435 \u043f\u043e\u043d\u044f\u0442\u044c \u0437\u0430\u0433\u0430\u0434\u043e\u0447\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e 1.<\/p>\n<pre><code class=\"cpp\">00000293`420a13e0     mov     [rsp+8], rbx     mov     [rsp+10h], rsi     mov     [rsp+18h], rdi     push    rbp     mov     rbp, rsp     sub     rsp, 80h     mov     rax, [00000293`420bf010]     xor     rax, rsp     mov     [rbp-8], rax      ; canary \/GS     mov     ecx, 40h     call    00000293`420a8478 ; \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c 64 \u0431\u0430\u0439\u0442\u0430     xorps   xmm0, xmm0     mov     ecx, 18h     mov     rdi,rax           ; \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u043f\u0435\u0440\u0432\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435     movups  [rax],xmm0        ; \u043e\u0431\u043d\u0443\u043b\u044f\u0435\u043c \u043f\u0435\u0440\u0432\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435     movups  [rax+10h],xmm0     movups  [rax+20h],xmm0     movups  [rax+30h],xmm0     call    00000293`420a8478 ; \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c 24 \u0431\u0430\u0439\u0442\u0430     xor     esi,esi     mov     ecx, 80h     mov     rbx,rax           ; \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0432\u0442\u043e\u0440\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435     mov     [rax+0Ch], rsi    ; \u043e\u0431\u043d\u0443\u043b\u044f\u0435\u043c \u0432\u0442\u043e\u0440\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435     mov     [rax+14h], esi     mov     [rax], esi     mov     [rax+4], 10h     mov     [rax+8], 1     call    00000293`420a84b4 ; \u0437\u0430\u0433\u0430\u0434\u043e\u0447\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f 4     mov     [rbx+10h], rax    ; \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442     lea     ecx, [rsi+10h]    ; ecx = 0x10     mov     [rdi], rbx     call    00000293`420a8478 ; \u0442\u0440\u0435\u0442\u044c\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435     lea     ecx, [rsi+40h]    ; ecx = 0x40     mov     rbx, rax     mov     [rax+8], rsi      ; \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0442\u0440\u0435\u0442\u044c\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435     mov     [rax], esi     mov     [rax+4], 10h     call    00000293`420a84b4 ; \u0437\u0430\u0433\u0430\u0434\u043e\u0447\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f 4     mov     [rbx+8], rax     lea     ecx, [rsi+18h]    ; ecx = 0x18<\/code><\/pre>\n<p>\u0418\u0442\u0430\u043a, \u044d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0431\u043b\u043e\u043a\u043e\u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0438\u0445.<\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u0440\u0430\u0437\u0443 \u043f\u0435\u0440\u0435\u0439\u0434\u0451\u043c \u043a \u043c\u0435\u0441\u0442\u0443, \u0433\u0434\u0435 \u043e\u043d\u0430 \u043d\u0430\u043a\u043e\u043d\u0435\u0446 \u0434\u0435\u043b\u0430\u0435\u0442 \u0447\u0442\u043e-\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435.<\/p>\n<pre><code class=\"cpp\">    lea     rdx, [00000293`420bba90] ; LR\"(SOFTWARE\\systemconfig)\"     lea     rax, [rbp-50h]     mov     [rdi+38h], rbx     mov     r9d, 20119h       ; KEY_READ     mov     [rsp+20h], rax     xor     r8d, r8d     mov     rcx,0FFFFFFFF80000002h ; HKEY_LOCAL_MACHINE     call    qword ptr [00000293`420b4010] ; RegOpenKeyExW     test    eax, eax<\/code><\/pre>\n<p><code>dps 00000293`420b4010<\/code>\u00a0\u0434\u0430\u0451\u0442 \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u2014 \u044d\u0442\u043e <code>Reg\u00adOpen\u00adKey\u00adExW<\/code>, \u0442\u0430\u043a \u0447\u0442\u043e \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0432\u044b\u0437\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043e\u043b\u0436\u0435\u043d \u0438\u043c\u0435\u0442\u044c \u0432\u0438\u0434<\/p>\n<pre><code class=\"cpp\">RegOpenKeyExW(HKEY_LOCAL_MACHINE,     L\"SOFTWARE\\\\systemconfig\", 0, KEY_READ, &amp;key);<\/code><\/pre>\n<p>\u0414\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0435 \u0434\u0438\u0437\u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u043e, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u043a\u043e\u0434 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u043a\u043b\u044e\u0447, \u0442\u043e \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0438\u0437 \u043d\u0435\u0433\u043e \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u042f \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u044e, \u0447\u0442\u043e \u043a\u043e\u0434 \u0445\u0440\u0430\u043d\u0438\u0442 \u0441\u0432\u043e\u0451 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0432 <code>system\u00adconfig<\/code>\u00a0.<\/p>\n<p>\u0427\u0442\u043e \u0436, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u044f \u0441\u043c\u043e\u0433\u0443 \u0443\u0441\u043a\u043e\u0440\u0438\u0442\u044c \u0430\u043d\u0430\u043b\u0438\u0437, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0432 \u0434\u0430\u043c\u043f \u0441\u0442\u0440\u043e\u043a \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0432, \u043d\u0430\u0439\u0434\u0443\u0442\u0441\u044f \u043b\u0438 \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0435 \u043d\u0430\u043c \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u043a\u043e\u0434. \u0412\u0441\u043f\u043e\u043c\u043d\u0438\u043c, \u0447\u0442\u043e \u043a\u043e\u043c\u0430\u043d\u0434\u0430 <code>!address<\/code>\u00a0\u0441\u043e\u043e\u0431\u0449\u0438\u043b\u0430 \u043d\u0430\u043c, \u0447\u0442\u043e \u0431\u043b\u043e\u043a \u043f\u0430\u043c\u044f\u0442\u0438 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"cpp\">0:001&gt; !address 00000293`420a1ee0 Base Address:           00000293`420a0000 End Address:            00000293`420ca000<\/code><\/pre>\n<p>\u041f\u043e\u043f\u0440\u043e\u0441\u0438\u043c \u0443 <a href=\"https:\/\/www.microsoft.com\/en-us\/download\/details.aspx?id=53304\" rel=\"noopener noreferrer nofollow\"><u>\u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u043e\u0442\u043b\u0430\u0434\u0447\u0438\u043a\u0430 !mex<\/u><\/a>\u00a0\u043d\u0430\u0439\u0442\u0438 \u0432 \u044d\u0442\u043e\u043c \u0431\u043b\u043e\u043a\u0435 \u043f\u0430\u043c\u044f\u0442\u0438 \u0441\u0442\u0440\u043e\u043a\u0438.<\/p>\n<pre><code class=\"cpp\">0:005&gt; !mex.strings 00000293`420a0000 00000293`420ca000 ... 00000293420bbd10 system 00000293420bc1d4 H:\\rootkit\\r77-rootkit-master\\vs\\x64\\Release\\r77-x64.pdb<\/code><\/pre>\n<p>\u041e\u0442\u043b\u0438\u0447\u043d\u043e, \u043f\u043e\u0445\u043e\u0436\u0435, \u044d\u0442\u043e \u0437\u043b\u043e\u0432\u0440\u0435\u0434, \u0438\u043b\u0438, \u043f\u043e \u043a\u0440\u0430\u0439\u043d\u0435\u0439 \u043c\u0435\u0440\u0435, \u043e\u043d \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u0435\u0442 \u0441\u0435\u0431\u044f, \u043a\u0430\u043a \u0440\u0443\u0442\u043a\u0438\u0442. \u041f\u043e\u0438\u0441\u043a\u0430\u0432 \u0432 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u044d\u0442\u043e\u0433\u043e \u0440\u0443\u0442\u043a\u0438\u0442\u0430, \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u044f\u0441\u043d\u0438\u0442\u044c, \u0447\u0442\u043e \u0435\u0433\u043e \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u043f\u0443\u0431\u043b\u0438\u0447\u0435\u043d.<\/p>\n<p>\u0425\u043e\u0440\u043e\u0448\u0430\u044f \u043d\u043e\u0432\u043e\u0441\u0442\u044c \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043e\u043d \u043d\u0435 \u0432\u0438\u043d\u043e\u0432\u0430\u0442 \u0432 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0435. \u041f\u043b\u043e\u0445\u0430\u044f \u043d\u043e\u0432\u043e\u0441\u0442\u044c: \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0434\u0430\u043c\u043f\u044b \u0432\u044b\u043b\u0435\u0442\u043e\u0432 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0430\u043d\u043e\u043d\u0438\u043c\u043d\u043e, \u043c\u044b \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u0441\u0432\u044f\u0437\u0430\u0442\u044c\u0441\u044f \u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\u0438, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u043e\u0431\u0449\u0438\u0442\u044c \u043e \u0437\u0430\u0440\u0430\u0436\u0435\u043d\u0438\u0438 \u0437\u043b\u043e\u0432\u0440\u0435\u0434\u043e\u043c.<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/862116\/\"> https:\/\/habr.com\/ru\/articles\/862116\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><\/figure>\n<p>\u041d\u0430\u0448\u0435\u0433\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0434\u043e\u043d\u0438\u043c\u0430\u043b\u0438 \u043e\u0442\u0447\u0451\u0442\u044b \u043e \u0432\u044b\u043b\u0435\u0442\u0430\u0445, \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0432\u0448\u0438\u0435, \u0447\u0442\u043e \u0435\u0433\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043b\u043e\u043c\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0441\u0430\u043c\u043e\u0439 \u043f\u0435\u0440\u0432\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u0435.<\/p>\n<p>\u042f \u043e\u0442\u043a\u0440\u044b\u043b \u043e\u0434\u0438\u043d \u0438\u0437 \u0434\u0430\u043c\u043f\u043e\u0432 \u0432\u044b\u043b\u0435\u0442\u0430: \u043e\u043d \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u043d\u0430\u0441\u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0440\u0430\u043d\u043d\u044b\u043c, \u0447\u0442\u043e \u043e\u0442\u043b\u0430\u0434\u0447\u0438\u043a \u0434\u0430\u0436\u0435 \u043d\u0435 \u043c\u043e\u0433 \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u043f\u043e\u0448\u043b\u043e \u043d\u0435 \u0442\u0430\u043a.<\/p>\n<pre><code class=\"yaml\">ERROR: Unable to find system thread FFFFFFFF ERROR: The thread being debugged has either exited or cannot be accessed ERROR: Many commands will not work properly This dump file has an exception of interest stored in it. The stored exception information can be accessed via .ecxr. ERROR: Exception C0000005 occurred on unknown thread FFFFFFFF (61c.ffffffff): Access violation - code c0000005 (first\/second chance not available) 0:???&gt; r WARNING: The debugger does not have a current process or thread WARNING: Many commands will not work        ^ Illegal thread error in 'r' 0:???&gt; .ecxr WARNING: The debugger does not have a current process or thread WARNING: Many commands will not work 0:???&gt;<\/code><\/pre>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u0437\u0430 \u043f\u043e\u0442\u043e\u043a\u0438 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c.<\/p>\n<pre><code class=\"yaml\">0:???&gt; ~ WARNING: The debugger does not have a current process or thread WARNING: Many commands will not work    0  Id: 61c.12b4 Suspend: 1 Teb: 000000c7`9604d000 Unfrozen    1  Id: 61c.22d4 Suspend: 1 Teb: 000000c7`9604f000 Unfrozen    2  Id: 61c.1ab0 Suspend: 1 Teb: 000000c7`96051000 Unfrozen    3  Id: 61c.3308 Suspend: 1 Teb: 000000c7`96053000 Unfrozen    4  Id: 61c.2af0 Suspend: 1 Teb: 000000c7`96055000 Unfrozen    5  Id: 61c.2054 Suspend: 1 Teb: 000000c7`96059000 Unfrozen 0:???&gt;<\/code><\/pre>\n<p>\u041b\u044e\u0431\u043e\u043f\u044b\u0442\u043d\u043e, \u0447\u0442\u043e \u043e\u043d\u0438 \u0434\u0435\u043b\u0430\u044e\u0442.<\/p>\n<p>\u0411\u0443\u0434\u0435\u043c \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u043f\u043e\u0442\u043e\u043a\u043e\u0432, \u043f\u0440\u043e\u0441\u0442\u043e \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u043d\u0430 \u043a\u0430\u043a\u043e\u0439 \u043e\u043d\u0438 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0435:<\/p>\n<pre><code class=\"yaml\">0:???&gt; ~0s WARNING: The debugger does not have a current process or thread WARNING: Many commands will not work ntdll!RtlUserThreadStart: 00007ffa`bb16df50 4883ec78        sub     rsp,78h 0:000&gt; ~*s          ^ Illegal thread error in '~*s' 0:000&gt; ~1s 00000293`42074058 66894340        mov     word ptr [rbx+40h],ax ds:00007ff6`e4600040=1f0e 0:001&gt; ~2s ntdll!ZwWaitForWorkViaWorkerFactory+0x14: 00007ffa`bb1b29c4 c3              ret 0:002&gt; ~3s ntdll!ZwWaitForWorkViaWorkerFactory+0x14: 00007ffa`bb1b29c4 c3              ret 0:003&gt; ~4s ntdll!ZwWaitForWorkViaWorkerFactory+0x14: 00007ffa`bb1b29c4 c3              ret 0:004&gt; ~5s ntdll!ZwDelayExecution+0x14: 00007ffa`bb1af3f4 c3              ret<\/code><\/pre>\n<p>\u041a\u0430\u0436\u0443\u0449\u0435\u0439\u0441\u044f \u043f\u0440\u0438\u0447\u0438\u043d\u043e\u0439 \u0432\u044b\u043b\u0435\u0442\u0430 \u0431\u044b\u043b\u0430 \u043d\u0435\u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0437\u0430\u043f\u0438\u0441\u0438, \u0430 \u0437\u0430\u043f\u0438\u0441\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0442\u043e\u043a 1. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u0438\u0433\u043b\u044f\u0434\u0438\u043c\u0441\u044f, \u043a\u0443\u0434\u0430 \u043e\u043d \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u044c.<\/p>\n<pre><code class=\"yaml\">0:001&gt; !address @rbx  Usage:                  Image Base Address:           00007ff6`e4600000 End Address:            00007ff6`e4601000 Region Size:            00000000`00001000 (   4.000 kB) State:                  00001000          MEM_COMMIT Protect:                00000002          PAGE_READONLY Type:                   01000000          MEM_IMAGE Allocation Base:        00007ff6`e4600000 Allocation Protect:     00000080          PAGE_EXECUTE_WRITECOPY Image Path:             C:\\Program Files\\Contoso\\ContosoDeluxe.exe Module Name:            ContosoDeluxe Loaded Image Name:      ContosoDeluxe.exe Mapped Image Name:      C:\\Program Files\\Contoso\\ContosoDeluxe.exe More info:              lmv m ContosoDeluxe More info:              !lmi ContosoDeluxe More info:              ln 0x7ff6e4600000 More info:              !dh 0x7ff6e4600000  Content source: 2 (mapped), length: 400 0:001&gt; ln @rbx (00000000`00000000)   ContosoDeluxe!__ImageBase<\/code><\/pre>\n<p>\u0422\u0430\u043a, \u0437\u043d\u0430\u0447\u0438\u0442, \u043c\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0437\u0430\u043f\u0438\u0441\u044c \u0432 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0451\u043d\u043d\u044b\u0439 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u043e\u0431\u0440\u0430\u0437\u0430 \u0441\u0430\u043c\u043e\u0433\u043e ContosoDeluxe. \u042d\u0442\u043e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f (<code>PAGE_READ\u00adONLY<\/code>), \u0438 \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u0430\u0432 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043d\u0430 \u0437\u0430\u043f\u0438\u0441\u044c.<\/p>\n<p>\u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u043c\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0437\u0430\u043f\u0438\u0441\u044c \u0432 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u043e\u0431\u0440\u0430\u0437\u0430, \u0430 \u044d\u0442\u043e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043d\u0435\u043e\u0431\u044b\u0447\u043d\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435. \u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u043e\u0437\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0437\u0430\u0433\u043b\u044f\u043d\u0443\u0442\u044c \u0432 \u0441\u0442\u0435\u043a\u0438, \u0442\u043e \u043c\u044b \u0443\u0432\u0438\u0434\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<pre><code class=\"yaml\">0:001&gt; ~*k     0  Id: 61c.12b4 Suspend: 1 Teb: 000000c7`9604d000 Unfrozen Child-SP          RetAddr               Call Site 000000c7`962ffd48 00000000`00000000     ntdll!RtlUserThreadStart     1  Id: 61c.22d4 Suspend: 1 Teb: 000000c7`9604f000 Unfrozen Child-SP          RetAddr               Call Site 000000c7`963ff900 00007ff6`e4600000     0x00000293`42074058     2  Id: 61c.1ab0 Suspend: 1 Teb: 000000c7`96051000 Unfrozen Child-SP          RetAddr               Call Site 000000c7`964ff718 00007ffa`bb145a0e     ntdll!ZwWaitForWorkViaWorkerFactory+0x14 000000c7`964ff720 00007ffa`ba25244d     ntdll!TppWorkerThread+0x2ee 000000c7`964ffa00 00007ffa`bb16df78     kernel32!BaseThreadInitThunk+0x1d 000000c7`964ffa30 00000000`00000000     ntdll!RtlUserThreadStart+0x28     3  Id: 61c.3308 Suspend: 1 Teb: 000000c7`96053000 Unfrozen Child-SP          RetAddr               Call Site 000000c7`965ff6a8 00007ffa`bb145a0e     ntdll!ZwWaitForWorkViaWorkerFactory+0x14 000000c7`965ff6b0 00007ffa`ba25244d     ntdll!TppWorkerThread+0x2ee 000000c7`965ff990 00007ffa`bb16df78     kernel32!BaseThreadInitThunk+0x1d 000000c7`965ff9c0 00000000`00000000     ntdll!RtlUserThreadStart+0x28     4  Id: 61c.2af0 Suspend: 1 Teb: 000000c7`96055000 Unfrozen Child-SP          RetAddr               Call Site 000000c7`966ffad8 00007ffa`bb145a0e     ntdll!ZwWaitForWorkViaWorkerFactory+0x14 000000c7`966ffae0 00007ffa`ba25244d     ntdll!TppWorkerThread+0x2ee 000000c7`966ffdc0 00007ffa`bb16df78     kernel32!BaseThreadInitThunk+0x1d 000000c7`966ffdf0 00000000`00000000     ntdll!RtlUserThreadStart+0x28     5  Id: 61c.2054 Suspend: 1 Teb: 000000c7`96059000 Unfrozen Child-SP          RetAddr               Call Site 000000c7`968ffcb8 00007ffa`bb165833     ntdll!ZwDelayExecution+0x14 000000c7`968ffcc0 00007ffa`b88f9fcd     ntdll!RtlDelayExecution+0x43 000000c7`968ffcf0 00000293`420a1efd     KERNELBASE!SleepEx+0x7d 000000c7`968ffd70 00000000`00000000     0x00000293`420a1efd<\/code><\/pre>\n<p>\u041f\u043e\u0442\u043e\u043a 1 \u2014 \u044d\u0442\u043e \u0442\u043e\u0442 \u0441\u0430\u043c\u044b\u0439 \u043f\u043e\u0434\u043e\u0437\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u0442\u043e\u043a, \u0441\u043e\u0432\u0435\u0440\u0448\u0438\u0432\u0448\u0438\u0439 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u0430.<\/p>\n<p>\u0415\u0441\u0442\u044c \u0438 \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u043f\u043e\u0434\u043e\u0437\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u0442\u043e\u043a \u043f\u043e\u0434 \u043d\u043e\u043c\u0435\u0440\u043e\u043c 5, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0432\u044b\u0437\u043e\u0432\u0435 <code>SleepEx<\/code>, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u043c \u0438\u0437 \u0442\u043e\u0433\u043e \u0436\u0435 \u043f\u043e\u0434\u043e\u0437\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 <code>0x00000293`420xxxxx<\/code>. \u0412\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u044d\u0442\u043e\u0442 \u043f\u043e\u0442\u043e\u043a \u0436\u0434\u0451\u0442, \u043f\u043e\u043a\u0430 \u0447\u0442\u043e-\u0442\u043e \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0451\u0442, \u0442\u0430\u043a \u0447\u0442\u043e \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u0437\u0433\u043b\u044f\u043d\u0435\u043c \u043d\u0430 \u044d\u0442\u043e.<\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0438\u0437 \u043a\u0430\u043a\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u043f\u0430\u043c\u044f\u0442\u0438 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435.<\/p>\n<pre><code class=\"yaml\">0:001&gt; !address 00000293`420a1ee0  Usage:                  &lt;unknown&gt; Base Address:           00000293`420a0000 End Address:            00000293`420ca000 Region Size:            00000000`0002a000 ( 168.000 kB) State:                  00001000          MEM_COMMIT Protect:                00000040          PAGE_EXECUTE_READWRITE Type:                   00020000          MEM_PRIVATE Allocation Base:        00000293`420a0000 Allocation Protect:     00000040          PAGE_EXECUTE_READWRITE<\/code><\/pre>\n<p>\u041e\u0439-\u0451\u0439,\u00a0<code>PAGE_EXECUTE_READ\u00adWRITE<\/code>. \u041f\u043b\u043e\u0445\u043e\u0439 \u043f\u0440\u0438\u0437\u043d\u0430\u043a. \u042d\u0442\u043e \u043f\u043e\u0445\u043e\u0434\u0438\u0442 \u043d\u0430 \u0438\u043d\u044a\u0435\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0437\u043b\u043e\u0432\u0440\u0435\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0434\u043b\u044f \u043e\u0431\u044b\u0447\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u043a\u0440\u0430\u0439\u043d\u0435 \u043d\u0435\u043e\u0431\u044b\u0447\u043d\u043e \u0431\u044b\u0442\u044c read-write. \u041d\u043e \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u043c \u043d\u0430\u0434\u0435\u044f\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0432\u0441\u0435\u043c\u0443 \u044d\u0442\u043e\u043c\u0443 \u0435\u0441\u0442\u044c \u043d\u0435\u0432\u0438\u043d\u043d\u043e\u0435 \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u0435, \u0438 \u043d\u0430\u043c \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0435\u0433\u043e \u043d\u0430\u0439\u0442\u0438.<\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0439 \u043a\u043e\u0434.<\/p>\n<pre><code class=\"cpp\">00000293`420a1ed9 add     rsp,30h 00000293`420a1edd pop     rdi 00000293`420a1ede ret 00000293`420a1edf int     3 00000293`420a1ee0 push    rbx 00000293`420a1ee2 sub     rsp,20h 00000293`420a1ee6 call    00000293`420a13e0 00000293`420a1eeb mov     qword ptr [00000293`420c0c78],rax 00000293`420a1ef2 mov     ecx,3E8h 00000293`420a1ef7 call    qword ptr [00000293`420b4028]                   ^^^^^^^^ \u041c\u042b \u0417\u0414\u0415\u0421\u042c 00000293`420a1efd call    00000293`420a13e0 \/\/ do it again 00000293`420a1f02 mov     rdx,rax 00000293`420a1f05 mov     rbx,rax 00000293`420a1f08 call    00000293`420a19d0 00000293`420a1f0d test    eax,eax 00000293`420a1f0f jne     00000293`420a1f22 00000293`420a1f11 mov     rax,qword ptr [00000293`420c0c78] 00000293`420a1f18 mov     qword ptr [00000293`420c0c78],rbx 00000293`420a1f1f mov     rbx,rax 00000293`420a1f22 mov     rcx,rbx 00000293`420a1f25 call    00000293`420a17f0 00000293`420a1f2a jmp     00000293`420a1ef2<\/code><\/pre>\n<p>\u041f\u0435\u0440\u0432\u044b\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043c\u0430\u043d\u0434 \u0434\u043e <code>int 3<\/code>\u00a0\u043e\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u043a\u043e\u043d\u0446\u043e\u043c \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0447\u0430\u0442\u044c \u043d\u0430\u0448 \u0430\u043d\u0430\u043b\u0438\u0437 \u0441 <code>push rbx<\/code>.<\/p>\n<pre><code class=\"lisp\">    push rbx                        ; \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0440\u0435\u0433\u0438\u0441\u0442\u0440     sub rsp, 20h                    ; \u043a\u0430\u0434\u0440 \u0441\u0442\u0435\u043a\u0430     call 00000293`420a13e0          ; \u0437\u0430\u0433\u0430\u0434\u043e\u0447\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f 1     mov  [00000293`420c0c78],rax    ; \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u043e\u0442\u0432\u0435\u0442 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e  00000293`420a1ef2:     mov  ecx, 3E8h                  ; \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u043e\u0435 1000     call [00000293`420b4028]        ; \u0437\u0430\u0433\u0430\u0434\u043e\u0447\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f 2     ^^^^^^^^ YOU ARE HERE      call 00000293`420a13e0          ; \u0437\u0430\u0433\u0430\u0434\u043e\u0447\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f 1     mov  rdx, rax                   ; \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f param1     mov  rbx, rax                   ; \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 rbx     call 00000293`420a19d0          ; \u0437\u0430\u0433\u0430\u0434\u043e\u0447\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f 3     test eax,eax                    ; \u0432\u043e\u043f\u0440\u043e\u0441: \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043b\u043e\u0441\u044c \u043b\u0438 \u0443\u0441\u043f\u0435\u0448\u043d\u043e?     jne  00000293`420a1f22          ; \u043d\u0435\u0442: \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u043c     mov  rax, [00000293`420c0c78]   ; \u0431\u0435\u0440\u0451\u043c \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435     mov  [00000293`420c0c78], rbx   ; \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u043c \u043d\u043e\u0432\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c     mov  rbx, rax                   ; \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 rbx  00000293`420a1f22:     mov   rcx, rbx                  ; rcx = \u043e\u0431\u043d\u043e\u0432\u043b\u0451\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 rbx     call    00000293`420a17f0       ; \u0437\u0430\u0433\u0430\u0434\u043e\u0447\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f 3     jmp     00000293`420a1ef2       ; \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u0432\u043e\u0437\u0432\u0440\u0430\u0442 \u043a \u043d\u0430\u0447\u0430\u043b\u0443 \u0446\u0438\u043a\u043b\u0430<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e \u043e\u0434\u043d\u043e: \u043f\u043e\u0442\u043e\u043a \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0432\u044b\u0445\u043e\u0434. \u042d\u0442\u043e \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u0446\u0438\u043a\u043b.<\/p>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c\u0441\u044f, \u0441\u043c\u043e\u0436\u0435\u043c \u043b\u0438 \u043c\u044b \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u0433\u0430\u0434\u043e\u0447\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/p>\n<p>\u0421\u0430\u043c\u043e\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439, \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0433\u0430\u0434\u043e\u0447\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f 2, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d\u0430 \u043f\u043e\u0445\u043e\u0436\u0430 \u043d\u0430 \u0432\u044b\u0437\u043e\u0432 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/p>\n<pre><code class=\"cpp\">0:001&gt; dps 00000293`420b4028 L1 00000293`420b4028  00007ffa`ba258370 kernel32!SleepStub<\/code><\/pre>\n<p>\u0410\u0433\u0430, \u0437\u0430\u0433\u0430\u0434\u043e\u0447\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f 2 \u2014 \u044d\u0442\u043e <code>Sleep<\/code>, \u0430 \u0432\u044b\u0437\u043e\u0432 \u2014 \u044d\u0442\u043e <code>Sleep(1000)<\/code>. \u0412 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435, \u043c\u044b \u044d\u0442\u043e \u0437\u043d\u0430\u043b\u0438 \u0438\u0437 \u0442\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u043a\u0438 \u0441\u0442\u0435\u043a\u0430, \u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u043e\u043b\u0435\u0437\u043d\u043e.<\/p>\n<p>\u041d\u043e \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u043e\u0431\u043b\u0438\u0437\u043e\u0441\u0442\u0438 \u043e\u0442 \u044d\u0442\u043e\u0433\u043e \u0430\u0434\u0440\u0435\u0441\u0430, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c <a href=\"https:\/\/devblogs.microsoft.com\/oldnewthing\/20230911-00\/?p=108749\" rel=\"noopener noreferrer nofollow\"><u>\u0447\u0430\u0441\u0442\u044c\u044e \u0431\u043e\u043b\u0435\u0435 \u043a\u0440\u0443\u043f\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0439<\/u><\/a>.<\/p>\n<pre><code class=\"cpp\">00000293`420b4000  00007ffa`baa59810 advapi32!RegCloseKeyStub 00000293`420b4008  00007ffa`baa596e0 advapi32!RegQueryInfoKeyWStub 00000293`420b4010  00007ffa`baa595a0 advapi32!RegOpenKeyExWStub  00000293`420b4018  00007ffa`baa5ab30 advapi32!RegEnumValueWStub<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-443206","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/443206","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=443206"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/443206\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=443206"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=443206"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=443206"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}