{"id":339763,"date":"2022-10-15T15:00:15","date_gmt":"2022-10-15T15:00:15","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=339763"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=339763","title":{"rendered":"<span>\u041f\u0440\u044f\u0447\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043e\u0442 \u0433\u043b\u0430\u0437 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439<\/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<p>\u041d\u0430 \u0434\u043d\u044f\u0445 \u0443 \u043c\u0435\u043d\u044f \u0441\u043f\u0440\u043e\u0441\u0438\u043b\u0438, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0441\u043f\u0440\u044f\u0442\u0430\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443 \u0432 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u043c \u0444\u0430\u0439\u043b\u0435, \u0447\u0442\u043e\u0431\u044b &#171;\u043e\u0431\u0440\u0430\u0442\u043d\u044b\u0439 \u0438\u043d\u0436\u0435\u043d\u0435\u0440&#187; \u043d\u0435 \u0441\u043c\u043e\u0433 \u0435\u0435 \u043d\u0430\u0439\u0442\u0438? \u0412\u043e\u043f\u0440\u043e\u0441 \u0434\u0438\u043b\u0435\u0442\u0430\u043d\u0442\u0441\u043a\u0438\u0439, \u043d\u043e \u0442\u0430\u043a \u0441\u043e\u0432\u043f\u0430\u043b\u043e, \u0447\u0442\u043e \u0432 \u0442\u043e\u0442 \u0434\u0435\u043d\u044c \u044f \u0440\u0435\u0448\u0430\u043b \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0439 \u0447\u0435\u043b\u043b\u0435\u043d\u0434\u0436 \u043d\u0430 Hack The Box. \u0417\u0430\u0434\u0430\u043d\u0438\u0435 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <code>Bombs Landed<\/code> \u0438 \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0435\u0433\u043e \u0438\u0437\u044e\u043c\u0438\u043d\u043a\u0430 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u043e\u0434\u0433\u0440\u0443\u0436\u0430\u043b\u0430\u0441\u044c \u0432 \u043f\u0430\u043c\u044f\u0442\u044c. \u0418\u0437-\u0437\u0430 \u044d\u0442\u043e\u0433\u043e Ghidra \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u0439\u0442\u0438 \u0438 \u0434\u0435\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0434. <\/p>\n<details class=\"spoiler\">\n<summary>\u0420\u0435\u0448\u0435\u043d\u0438\u0435 Bombs Landed<\/summary>\n<div class=\"spoiler__content\">\n<p>\u041f\u043e\u043b\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0442\u0430\u0441\u043a\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u043c\u043e\u0435\u043c YouTube \u043a\u0430\u043d\u0430\u043b\u0435: <a href=\"https:\/\/youtu.be\/Qdj08RRN4fA\" rel=\"noopener noreferrer nofollow\">https:\/\/youtu.be\/Qdj08RRN4fA<\/a><\/p>\n<\/div>\n<\/details>\n<p>\u0412 \u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u0438 \u0440\u043e\u0434\u0438\u043b\u0430\u0441\u044c \u0438\u0434\u0435\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u0441 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439, \u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043d\u0430 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0442\u043e\u043b\u044c\u043a\u043e <a href=\"https:\/\/ru.wikipedia.org\/wiki\/NASM\" rel=\"noopener noreferrer nofollow\">Netwide Assembler<\/a> (NASM).<\/p>\n<h2>\u041a\u0430\u043a\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u0431\u0443\u0434\u0443\u0442 \u0440\u0435\u0448\u0435\u043d\u044b \u0432 \u0438\u0442\u043e\u0433\u0435?<\/h2>\n<ol>\n<li>\n<p>\u041c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442 \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0441\u0442\u0430\u0442\u044c\u0438;<\/p>\n<\/li>\n<li>\n<p>\u041e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u043c\u0441\u044f \u0441 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043e\u0439 \u043d\u0430 \u043d\u0438\u0437\u043a\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435;<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u043c\u0441\u044f \u0441 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u043e\u043c NASM.<\/p>\n<\/li>\n<\/ol>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u0438\u043c, \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043f\u043e\u043b\u044c\u0437\u044b \u043d\u0435\u0442. \u0412\u0441\u0435, \u0447\u0442\u043e \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0432 \u043a\u043e\u043d\u0446\u0435 &#8212; \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c <code>flag{qwerty123}<\/code> \u0438 \u0437\u043d\u0430\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u0438\u0433\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435.<\/p>\n<h2>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u043e\u0434\u0433\u0440\u0443\u0436\u0430\u0435\u043c\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f?<\/h2>\n<p>\u041a\u0430\u043a \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u044d\u0442\u043e &#8212; \u043f\u043e\u0434\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438\u043c\u0435\u0435\u0442 \u043d\u0430\u0431\u043e\u0440 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043b\u0435\u0436\u0430\u0442 \u043d\u0430 \u0441\u0432\u043e\u0438\u0445 \u0430\u0434\u0440\u0435\u0441\u0430\u0445. \u0424\u0443\u043d\u043a\u0446\u0438\u044e \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0438\u0437 \u043b\u044e\u0431\u043e\u0433\u043e \u043c\u0435\u0441\u0442\u0430 \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u0435\u0441\u043b\u0438 \u043d\u0430\u043c \u0438\u0437\u0432\u0435\u0441\u0442\u0435\u043d \u0435\u0435 \u0430\u0434\u0440\u0435\u0441. \u0412\u043e\u0442 \u0442\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432 hex.<\/p>\n<pre><code>1400122d0 : 40 55 57 48 81 ec 08 01 00 00 48 8d 6c 24 20 ... c3<\/code><\/pre>\n<ul>\n<li>\n<p><code>1400122d0<\/code> &#8212; \u043f\u0435\u0440\u0432\u044b\u0439 \u0430\u0434\u0440\u0435\u0441 \u043d\u0430\u0448\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438;<\/p>\n<\/li>\n<li>\n<p><code>c3<\/code> &#8212; return;<\/p>\n<\/li>\n<\/ul>\n<p>\u042d\u0442\u043e \u043e\u0431\u044b\u0447\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u0431\u0430\u0439\u0442\u044b \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043b\u0435\u0436\u0430\u0442 \u0432 \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 <code>1400122d0<\/code> \u0438 \u043c\u044b \u043b\u0435\u0433\u043a\u043e \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0438\u0445 \u0447\u0435\u0440\u0435\u0437 r2, IDA, Ghidra \u0432 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435. \u041d\u043e \u0447\u0442\u043e, \u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0434\u0435\u043b\u044f\u0442\u044c \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u043f\u0430\u043c\u044f\u0442\u0438, \u043f\u043e\u043c\u0435\u0449\u0430\u0442\u044c \u0442\u0443\u0434\u0430 \u0431\u0430\u0439\u0442\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438\u0437 \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u043c\u0435\u0441\u0442\u0430, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u044d\u0442\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e. \u0412 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u0444\u0430\u0439\u043b\u0430 \u043d\u0435 \u043f\u043e\u043a\u0430\u0436\u0435\u0442 \u043d\u0430\u043c \u044d\u0442\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442 \u043e\u0431\u0440\u0430\u0442\u043d\u0430\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c\u0441\u044f \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0435\u0439. <\/p>\n<h2>\u0412\u0438\u0436\u0443 \u0446\u0435\u043b\u044c, \u043d\u0435 \u0432\u0438\u0436\u0443 \u043f\u0440\u0435\u043f\u044f\u0442\u0441\u0442\u0432\u0438\u0439!<\/h2>\n<p>\u0417\u0430\u0434\u0430\u0447\u0430 \u043f\u043e\u043d\u044f\u0442\u043d\u0430:<\/p>\n<ol>\n<li>\n<p>\u0412\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u043c\u0435\u0441\u0442\u043e \u0432 \u043f\u0430\u043c\u044f\u0442\u0438;<\/p>\n<\/li>\n<li>\n<p>\u0423\u0437\u043d\u0430\u0442\u044c \u043f\u0435\u0440\u0432\u044b\u0439 \u0430\u0434\u0440\u0435\u0441 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430;<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u043b\u043e\u0436\u0438\u0442\u044c \u0442\u0443\u0434\u0430 \u0431\u0430\u0439\u0442\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0438;<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u0437\u0432\u0430\u0442\u044c \u0438\u0445, \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0444\u043b\u0430\u0433;<\/p>\n<\/li>\n<li>\n<p><s>\u041e\u0441\u0432\u043e\u0431\u043e\u0434\u0438\u0442\u044c \u043f\u0430\u043c\u044f\u0442\u044c<\/s>  \u043d\u0435 \u0441\u0435\u0433\u043e\u0434\u043d\u044f.<\/p>\n<\/li>\n<\/ol>\n<p>\u041f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c\u0441\u044f \u0441 \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u044b\u043c \u043c\u0435\u0441\u0442\u043e\u043c, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0431\u0440\u0430\u0442\u044c \u0431\u0430\u0439\u0442\u044b \u043d\u0430\u0448\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u0412 \u0440\u0430\u043c\u043a\u0430\u0445 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u044f \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0443\u0441\u044c \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u0435\u043c \u043d\u0430\u0448\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u043d\u0443\u0442\u0440\u0438 \u043c\u0430\u0441\u0441\u0438\u0432\u0430. \u041d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435, \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u043c\u0435\u0441\u0442\u0430, \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u0430\u0441\u0441\u0438\u0432 + \u0448\u0438\u0444\u0440 \u0446\u0435\u0437\u0430\u0440\u044f, \u0441\u0442\u0435\u0433\u0430\u043d\u043e\u0433\u0440\u0430\u0444\u0438\u044e \u0438\u043b\u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u043f\u043e\u0434\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0431\u0430\u0439\u0442\u044b \u0438\u0437 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430. \u0412\u0441\u0435 \u044d\u0442\u043e \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0434\u0435\u043b\u0430\u0442\u044c \u043f\u043e\u0434 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 Windows.<\/p>\n<h2>\u041f\u0438\u0448\u0435\u043c \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e.<\/h2>\n<p>\u041d\u0430\u0448\u0430 \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b \u0441\u0442\u0440\u043e\u043a\u0443. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u0442\u0430\u043a\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440. <\/p>\n<pre><code class=\"assembly\">;https:\/\/www.nasm.us\/xdoc\/2.11.08\/html\/nasmdoc6.html NULL EQU 0  ;EXTERN \u0418\u043c\u043f\u043e\u0440\u0442 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0438\u0437 \u0434\u0440\u0443\u0433\u0438\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 extern _ExitProcess@4 extern _WriteFile@20 extern _GetStdHandle@4  ;ucrtbased.dll  ;https:\/\/strontic.github.io\/xcyclopedia\/library\/ucrtbase.dll-ED27C615D14DADBE15581E8CB7ABBE1C.html extern _o_malloc  ;\u042d\u043a\u0441\u043f\u043e\u0440\u0442 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0432 \u0434\u0440\u0443\u0433\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 global Start    ;\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 section .data     Message db \"flag{qwerty123}\", 0Dh, 0Ah ; \u041e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u043c \u0441\u0442\u0440\u043e\u043a      ;\u043d\u0435\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 section .bss StandardHandle resd 1 Written resd 1 ;Code section .text ; \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d Print: push  edi push  ecx push -11         call _GetStdHandle@4         mov dword [StandardHandle], eax     push NULL         push Written     ;mov ecx, 15 ;mov edi, Hidden+37         push ecx ;\u0434\u043b\u0438\u043d\u0430 \u0442\u0435\u043a\u0441\u0442\u0430 \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d         push edi ;\u0442\u0435\u043a\u0441\u0442 \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d         push dword [StandardHandle]         call _WriteFile@20 pop   ebx     pop   ecx ret     ; \u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f Start: mov ecx, 15 ; \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u043c  \u0434\u043b\u0438\u043d\u0443 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 e\u0441x mov edi, Message ; \u043a\u043b\u0430\u0434\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0441 \u0442\u0435\u043a\u0441\u0442\u043e\u043c call Print ; \u0417\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b exit:        push    NULL        call    _ExitProcess@4<\/code><\/pre>\n<p>\u0412\u044b\u0448\u0435 \u043c\u044b \u0432\u0438\u0434\u0438\u043c  \u0434\u0432\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438:<\/p>\n<ul>\n<li>\n<p>Start &#8212; \u0433\u043b\u0430\u0432\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f (\u0442\u043e\u0447\u043a\u0430 \u0432\u0445\u043e\u0434\u0430);<\/p>\n<\/li>\n<li>\n<p>Print &#8212; \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u0441\u043a\u0440\u043e\u0435\u043c \u043e\u0442 \u0433\u043b\u0430\u0437 \u043b\u044e\u0431\u043e\u043f\u044b\u0442\u043d\u044b\u0445 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.<\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u043c \u044d\u0442\u043e\u0442 \u043a\u043e\u0434.<\/p>\n<pre><code>.\\nasm.exe -fwin32 .\\malloc.asm .\\GoLink.exe \/entry:Start \/console kernel32.dll user32.dll ucrtbased.dll malloc.obj<\/code><\/pre>\n<p>\u041d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0444\u0430\u0439\u043b malloc.exe. \u0415\u0441\u043b\u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0444\u0430\u0439\u043b \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435, \u043c\u044b \u0443\u0432\u0438\u0434\u0438\u043c \u0432\u044b\u0445\u043b\u043e\u043f \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c: <code>flag{qwerty123}<\/code>. <\/p>\n<p>\u041e\u0442\u043a\u0440\u043e\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0439 exe \u0444\u0430\u0439\u043b \u0432 x32dbg.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/327\/6f1\/d87\/3276f1d87885c9a3a5a11cdafa46d68e.png\" alt=\"\u041d\u0430\u0448\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043f\u043e\u0434 \u043e\u0442\u043b\u0430\u0434\u043a\u043e\u0439.\" title=\"\u041d\u0430\u0448\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043f\u043e\u0434 \u043e\u0442\u043b\u0430\u0434\u043a\u043e\u0439.\" width=\"706\" height=\"371\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/327\/6f1\/d87\/3276f1d87885c9a3a5a11cdafa46d68e.png\"\/><figcaption>\u041d\u0430\u0448\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043f\u043e\u0434 \u043e\u0442\u043b\u0430\u0434\u043a\u043e\u0439.<\/figcaption><\/figure>\n<p>\u041d\u0430 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u0435 \u0432\u044b\u0448\u0435, \u043a\u0440\u0430\u0441\u043d\u044b\u043c \u0446\u0432\u0435\u0442\u043e\u043c, \u044f \u0432\u044b\u0434\u0435\u043b\u0438\u043b \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>Start<\/code>, \u043e\u0440\u0430\u043d\u0436\u0435\u0432\u044b\u043c \u0446\u0432\u0435\u0442\u043e\u043c \u043e\u0431\u0432\u0435\u043b \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>Print<\/code>. \u0412\u0438\u0434\u0438\u043c \u043c\u0435\u0441\u0442\u043e \u0432\u044b\u0437\u043e\u0432\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>Print<\/code> \u0438 \u0435\u0435 \u043f\u0435\u0440\u0432\u044b\u0439 \u0430\u0434\u0440\u0435\u0441. \u0412\u0441\u0435, \u0447\u0442\u043e \u043c\u0435\u0436\u0434\u0443 \u0430\u0434\u0440\u0435\u0441\u0430\u043c\u0438 00401000 &#8212; 00401024 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432 \u043d\u0430\u0448 \u0441\u043a\u0440\u044b\u0442\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432. <\/p>\n<p>\u0414\u0435\u043b\u0430\u0435\u043c \u043c\u0430\u0441\u0441\u0438\u0432 \u0432 \u0441\u0435\u043a\u0446\u0438\u0438 <code>.data<\/code>.<\/p>\n<pre><code class=\"assembly\">;\u043e\u0431\u044a\u0432\u043b\u044f\u0435\u043c \u043c\u0430\u0441\u0441\u0438\u0432                                                                                                                                                                                                                                                                                         string 38 array   dw 0x57, 0x51, 0x6a, 0xf5, 0xe8, 0xf9, 0x1f, 0x00, 0x00, 0xa3, 0x38, 0x20, 0x40, 0x00, 0x6a, 0x00, 0x68, 0x3c, 0x20, 0x40, 0x00, 0xb9, 0x0f, 0x00, 0x00, 0x00, 0xbf, 0xb3, 0x20, 0x40, 0x00, 0x51, 0x57, 0xff, 0x35, 0x38, 0x20, 0x40, 0x00, 0xe8, 0xda, 0x1f, 0x00, 0x00, 0x5b, 0x59, 0xc3, 0x66, 0x6c, 0x61, 0x67, 0x7b, 0x71, 0x77, 0x65, 0x72, 0x74, 0x79, 0x31, 0x32, 0x33, 0x7d<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c <code>dw<\/code> \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442,\u0447\u0442\u043e \u043a\u0430\u0436\u0434\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 2 \u0431\u0430\u0439\u0442\u0430. \u0415\u0441\u043b\u0438 \u0432\u044b \u043f\u0440\u043e\u043b\u0438\u0441\u0442\u0430\u0435\u0442\u0435 \u043c\u0430\u0441\u0441\u0438\u0432 \u0432 \u043a\u043e\u043d\u0435\u0446, \u0442\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u0435, \u0447\u0442\u043e \u043e\u043d \u043d\u0435 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 <code>c3<\/code>. \u041f\u043e\u0441\u043b\u0435 <code>c3<\/code> \u044f \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u043d\u0430\u0448\u0443 \u0441\u0442\u0440\u043e\u043a\u0443 \u0441 \u0444\u043b\u0430\u0433\u043e\u043c.<\/p>\n<details class=\"spoiler\">\n<summary>\u0417\u0430\u043c\u0435\u0442\u043a\u0430<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0421\u0442\u0440\u043e\u043a\u0438 \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u0442\u044c \u043d\u0443\u043b\u0435\u0432\u044b\u043c \u0431\u0430\u0439\u0442\u043e\u043c, \u0447\u0442\u043e \u044f \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043f\u0440\u043e\u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u043b \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043a\u043e\u0434\u0430.<\/p>\n<\/div>\n<\/details>\n<p>\u0412 \u0441\u0435\u043a\u0446\u0438\u0438 <code>.bss<\/code> \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0435\u0449\u0435 \u0434\u0432\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435.<\/p>\n<pre><code class=\"assembly\">    ;\u043f\u043e\u0438\u043d\u0442\u0435\u0440 \u043d\u0430 \u0441\u043a\u0440\u044b\u0442\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e Hidden resq 1 ;\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0445\u0440\u0430\u043d\u0438\u0442 \u043f\u0435\u0440\u0435\u0432\u0435\u0440\u043d\u0443\u0442\u044b\u0435 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u044f Reverse resd 1<\/code><\/pre>\n<p>\u0412 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <code>Hidden<\/code> \u043c\u044b \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u043c \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u0443\u044e \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u043f\u0430\u043c\u044f\u0442\u0438. \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <code>Reverse<\/code> \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u043d\u0430\u043c \u0447\u0443\u0442\u044c \u043f\u043e\u0437\u0436\u0435.<\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u044b\u0434\u0435\u043b\u0438\u043c \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0432 \u043f\u0430\u043c\u044f\u0442\u0438. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u044f \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <code>malloc<\/code>.<\/p>\n<pre><code class=\"assembly\">    ;malloc 1000  push 0x3e8 call _o_malloc ;\u043a\u043b\u0430\u0434\u0435\u043c \u043f\u043e\u0438\u043d\u0442\u0435\u0440 \u043d\u0430 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0430\u0434\u0440\u0435\u0441\u0430 \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e Hidden         mov [Hidden], eax<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <code>Hidden<\/code> \u0443 \u043d\u0430\u0441 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 1000 \u0430\u0434\u0440\u0435\u0441\u043e\u0432. \u041d\u0430\u043f\u0438\u0448\u0435\u043c \u0446\u0438\u043a\u043b \u0438 \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u043c \u0431\u0430\u0439\u0442\u044b \u0432 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e. <\/p>\n<pre><code class=\"assembly\">;\u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u0446\u0438\u043a\u0434 mov edx, 0x0 M1: ;\u0442.\u043a. \u0443 \u043d\u0430\u0441 \u043a\u0430\u0436\u0434\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 2 \u0431\u0430\u0439\u0442\u0430 *2 mov cx, [array+edx*2] ;\u043f\u043e\u0438\u043d\u0442\u0435\u0440 \u043d\u0430 \u043c\u0430\u043b\u043b\u043e\u043a + \u043d\u043e\u043c\u0435\u0440 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438 \u043a\u043b\u0430\u0434\u0435\u043c \u0431\u0430\u0439\u0442 \u0438\u0437 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 mov byte [Hidden+edx], cl ;\u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u043c \u0441\u0447\u0435\u0442\u0447\u0438\u043a add edx, 0x1 ;\u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u043c edx \u0441 62 (\u0434\u043b\u0438\u043d\u0430 \u043c\u0430\u0441\u0441\u0438\u0432\u0430) cmp edx, 0x3e ;\u0435\u0441\u043b\u0438 edx \u043d\u0435 \u0440\u0430\u0432\u043d\u043e 62 (0x3e) \u0442\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u043c M1 jne M1          ;\u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u0441\u043a\u0440\u044b\u0442\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e         call Hidden<\/code><\/pre>\n<p>\u0421\u043e\u0431\u0435\u0440\u0435\u043c \u044d\u0442\u043e \u0447\u0443\u0434\u043e \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0432 \u043e\u0442\u043b\u0430\u0434\u0447\u0438\u043a.<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p align=\"left\">0040105E<\/p>\n<\/td>\n<td>\n<p align=\"left\">E8 21100000<\/p>\n<\/td>\n<td>\n<p align=\"left\">call calloc.402084<\/p>\n<\/td>\n<td>\n<p align=\"left\">\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u0412\u043e\u0442 \u043d\u0430\u0448 \u0430\u0434\u0440\u0435\u0441, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043c\u044b \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e Hidden. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043f\u043e \u044d\u0442\u043e\u043c\u0443 \u0430\u0434\u0440\u0435\u0441\u0443 \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u043c\u044b \u043f\u043e\u043b\u043e\u0436\u0438\u043b\u0438 \u0432 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u0443\u044e \u043f\u0430\u043c\u044f\u0442\u044c.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f62\/746\/f43\/f62746f43b4fb13d9c00c3ccf2578049.png\" width=\"719\" height=\"293\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f62\/746\/f43\/f62746f43b4fb13d9c00c3ccf2578049.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0414\u0430, \u044d\u0442\u043e \u043d\u0430\u0448\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f <code>Print<\/code>! \u041d\u043e \u0447\u0442\u043e \u0432\u043e\u0442 \u044d\u0442\u043e?<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"175\" width=\"175\">\n<p align=\"left\">00402088<\/p>\n<\/td>\n<td>\n<p align=\"left\">E8 F91F0000<\/p>\n<\/td>\n<td>\n<p align=\"left\">call 404086<\/p>\n<\/td>\n<td>\n<p align=\"left\">\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"175\" width=\"175\">\n<p align=\"left\">004020AB<\/p>\n<\/td>\n<td>\n<p align=\"left\">E8 DA1F0000<\/p>\n<\/td>\n<td>\n<p align=\"left\">call 40408A<\/p>\n<\/td>\n<td>\n<p align=\"left\">\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u041f\u043e\u0447\u0435\u043c\u0443 \u0432\u043c\u0435\u0441\u0442\u043e <code>call _GetStdHandle@4<\/code> \u0438 <code>call _WriteFile@20<\/code> \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u0432\u044b\u0437\u043e\u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u0430\u0434\u0440\u0435\u0441\u043e\u0432? \u0414\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0430\u0434\u0440\u0435\u0441\u0430 \u0432\u044b\u0437\u043e\u0432\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u044b\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043f\u043e \u0444\u043e\u0440\u043c\u0443\u043b\u0435:<\/p>\n<p><code>\u0410\u0434\u0440\u0435\u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c - \u0440\u0430\u0437\u043c\u0435\u0440 \u043a\u043e\u043c\u0430\u043d\u0434\u044b (call = 5) - \u0430\u0434\u0440\u0435\u0441 \u043e\u0442\u043a\u0443\u0434\u0430 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c<\/code><\/p>\n<details class=\"spoiler\">\n<summary>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0430\u0434\u0440\u0435\u0441 0000000000459340 \u0438\u0437 0000000000D610C8.<\/summary>\n<div class=\"spoiler__content\">\n<p>0000000000459340 &#8212; 5 &#8212; 0000000000D610C8 = FFFF FFFF FF6F 8273 \u0438 \u043f\u0435\u0440\u0435\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0431\u0430\u0439\u0442\u044b.<\/p>\n<p>call 73826fff<\/p>\n<\/div>\n<\/details>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0430\u0434\u0440\u0435\u0441\u0430 \u0432\u0441\u0435\u0433\u0434\u0430 \u0440\u0430\u0437\u043d\u044b\u0435, \u043c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0443\u0437\u043d\u0430\u0442\u044c \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u0435, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442 \u043d\u0430\u043c \u043d\u0430\u0434\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b <code>call<\/code>, \u043f\u043e\u0441\u043b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b <code>malloc<\/code> .<\/p>\n<p>\u041d\u0430\u043f\u0438\u0448\u0435\u043c \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e:<\/p>\n<pre><code class=\"assembly\">;\u0440\u0430\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0432\u044b\u0437\u043e\u0432\u0430 Calculation:     push ebp ;ecx - \u0447\u0442\u043e \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0432\u044b\u0437\u0432\u0430\u0442\u044c mov ecx, esi ;\u043e\u0442 \u0430\u0434\u0440\u0435\u0441\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043e\u0442\u043d\u0438\u043c\u0430\u0435\u043c \u0440\u0430\u0437\u043c\u0435\u0440 \u043a\u043e\u043c\u0430\u043d\u0434\u044b (5) sub ecx, 5 ;\u043e\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u043e\u0442\u043d\u0438\u043c\u0430\u0435\u043c \u0430\u0434\u0440\u0435\u0441\u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0445\u043e\u0442\u0438\u043c \u0432\u044b\u0437\u0432\u0430\u0442\u044c ;ecx \u0445\u0440\u0430\u043d\u0438\u0442 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0430\u0434\u043e \u043f\u0435\u0440\u0435\u0432\u0435\u0440\u043d\u0443\u0442\u044c sub ecx, eax ;\u043a\u043b\u0430\u0434\u0435\u043c \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043f\u0435\u0440\u0435\u0432\u0435\u0440\u043d\u0443\u0442\u044b\u0435 \u0431\u0430\u0439\u0442\u044b ;+100 - \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0447\u0442\u043e \u0431\u044b \u043e\u043d\u0430 \u043d\u0435 \u043d\u0430\u0435\u0445\u0430\u043b\u0430 \u043d\u0430 \u043c\u0430\u0441\u0441\u0438\u0432 array mov [Reverse+100], ecx  ;\u0440\u0430\u0441\u0447\u0438\u0442\u0430\u043d\u044b\u0439 \u0430\u0434\u0440\u0435\u0441 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u043a\u043b\u0430\u0434\u0435\u043c \u0432 edx mov edx, [Reverse+100+0] ;eax = e8 (\u043a\u043e\u043c\u0430\u043d\u0434\u0430 call). eax+1 \u043f\u0435\u0440\u0432\u044b\u0439 \u0431\u0430\u0439\u0442 \u0430\u0434\u0440\u0435\u0441\u0430, \u043a\u043b\u0430\u0434\u0435\u043c \u0432 \u043d\u0435\u0433\u043e \u043c\u043b\u0430\u0434\u0448\u0438\u0439 \u0431\u0438\u0442 edx mov [eax+1], dl ;\u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c edx \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0440\u0430\u0441\u0447\u0438\u0442\u0430\u043d\u044b\u043c \u0431\u0430\u0439\u0442\u043e\u043c mov edx, [Reverse+100+1] mov [eax+2], dl mov edx, [Reverse+100+2] mov [eax+3], dl mov edx, [Reverse+100+3] mov [eax+4], dl pop ebp ret<\/code><\/pre>\n<p>\u0412\u044b\u0437\u0432\u0430\u0442\u044c \u044d\u0442\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043c\u043e\u0436\u043d\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code>        mov eax, Hidden+4 ;\u043e\u0442\u043a\u0443\u0434\u0430 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c mov esi, 0x0040300c ;\u0447\u0442\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c call Calculation<\/code><\/pre>\n<p> <code>Hidden+4<\/code> &#8212; \u0430\u0434\u0440\u0435\u0441, \u043e\u0442\u043a\u0443\u0434\u0430 \u043c\u044b \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e.<\/p>\n<p> <code>0x0040300c<\/code> &#8212; \u0430\u0434\u0440\u0435\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0432\u044b\u0437\u0432\u0430\u0442\u044c (<code>call _GetStdHandle@4<\/code>). \u0422\u043e\u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u043d\u0430\u0434\u043e \u043f\u0440\u043e\u0434\u0435\u043b\u0430\u0442\u044c \u0438 \u0441 <code>call _WriteFile@20<\/code>.<\/p>\n<h2>\u0424\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u0434.<\/h2>\n<pre><code class=\"assembly\">;https:\/\/www.nasm.us\/xdoc\/2.11.08\/html\/nasmdoc6.html   NULL EQU 0  ;EXTERN \u0418\u043c\u043f\u043e\u0440\u0442 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0438\u0437 \u0434\u0440\u0443\u0433\u0438\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 extern _ExitProcess@4 extern _WriteFile@20 extern _GetStdHandle@4  ;ucrtbased.dll  ;https:\/\/strontic.github.io\/xcyclopedia\/library\/ucrtbase.dll-ED27C615D14DADBE15581E8CB7ABBE1C.html extern _o_malloc  ;\u042d\u043a\u0441\u043f\u043e\u0440\u0442 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0432 \u0434\u0440\u0443\u0433\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 global Start    ;\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 section .data     ;\u043e\u0431\u044a\u0432\u043b\u044f\u0435\u043c \u043c\u0430\u0441\u0441\u0438\u0432                                                                                                                                                                                                                                                                                     string 38 array   dw 0x57, 0x51, 0x6a, 0xf5, 0xe8, 0xf9, 0x1f, 0x00, 0x00, 0xa3, 0x38, 0x20, 0x40, 0x00, 0x6a, 0x00, 0x68, 0x3c, 0x20, 0x40, 0x00, 0xb9, 0x0f, 0x00, 0x00, 0x00, 0xbf, 0xb3, 0x20, 0x40, 0x00, 0x51, 0x57, 0xff, 0x35, 0x38, 0x20, 0x40, 0x00, 0xe8, 0xda, 0x1f, 0x00, 0x00, 0x5b, 0x59, 0xc3, 0x66, 0x6c, 0x61, 0x67, 0x7b, 0x71, 0x77, 0x65, 0x72, 0x74, 0x79, 0x31, 0x32, 0x33, 0x7d   ;\u043d\u0435\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 section .bss StandardHandle resd 1 Written resd 1 ;\u043f\u043e\u0438\u043d\u0442\u0435\u0440 \u043d\u0430 \u0441\u043a\u0440\u044b\u0442\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e Hidden resq 1 ;\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0445\u0440\u0430\u043d\u0438\u0442 \u043f\u0435\u0440\u0435\u0432\u0435\u0440\u043d\u0443\u0442\u044b\u0435 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u044f Reverse resd 1    ;Code section .text      ;\u0440\u0430\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0432\u044b\u0437\u043e\u0432\u0430     Calculation:          push ebp  ;ecx - \u0447\u0442\u043e \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0432\u044b\u0437\u0432\u0430\u0442\u044c mov ecx, esi ;\u043e\u0442 \u0430\u0434\u0440\u0435\u0441\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043e\u0442\u043d\u0438\u043c\u0430\u0435\u043c \u0440\u0430\u0437\u043c\u0435\u0440 \u043a\u043e\u043c\u0430\u043d\u0434\u044b (5) sub ecx, 5 ;\u043e\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u043e\u0442\u043d\u0438\u043c\u0430\u0435\u043c \u0430\u0434\u0440\u0435\u0441\u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0445\u043e\u0442\u0438\u043c \u0432\u044b\u0437\u0432\u0430\u0442\u044c ;ecx \u0445\u0440\u0430\u043d\u0438\u0442 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0430\u0434\u043e \u043f\u0435\u0440\u0435\u0432\u0435\u0440\u043d\u0443\u0442\u044c sub ecx, eax  ;\u043a\u043b\u0430\u0434\u0435\u043c \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043f\u0435\u0440\u0435\u0432\u0435\u0440\u043d\u0443\u0442\u044b\u0435 \u0431\u0430\u0439\u0442\u044b ;+100 - \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0447\u0442\u043e \u0431\u044b \u043e\u043d\u0430 \u043d\u0435 \u043d\u0430\u0435\u0445\u0430\u043b\u0430 \u043d\u0430 \u043c\u0430\u0441\u0441\u0438\u0432 array mov [Reverse+100], ecx  ;\u0440\u0430\u0441\u0447\u0438\u0442\u0430\u043d\u044b\u0439 \u0430\u0434\u0440\u0435\u0441 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u043a\u043b\u0430\u0434\u0435\u043c \u0432 edx mov edx, [Reverse+100+0] ;eax = e8 (\u043a\u043e\u043c\u0430\u043d\u0434\u0430 call). eax+1 \u043f\u0435\u0440\u0432\u044b\u0439 \u0431\u0430\u0439\u0442 \u0430\u0434\u0440\u0435\u0441\u0430, \u043a\u043b\u0430\u0434\u0435\u043c \u0432 \u043d\u0435\u0433\u043e \u043c\u043b\u0430\u0434\u0448\u0438\u0439 \u0431\u0438\u0442 edx mov [eax+1], dl ;\u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c edx \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0440\u0430\u0441\u0447\u0438\u0442\u0430\u043d\u044b\u043c \u0431\u0430\u0439\u0442\u043e\u043c mov edx, [Reverse+100+1] mov [eax+2], dl mov edx, [Reverse+100+2] mov [eax+3], dl mov edx, [Reverse+100+3] mov [eax+4], dl pop ebp ret   ; \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d ;Print: ;push  edi ;push  ecx   ;push -11     ;    call _GetStdHandle@4     ;    mov dword [StandardHandle], eax ;    push NULL     ;    push Written     ; mov ecx, 15 ;mov edi, Hidden+37     ;    push ecx ;\u0434\u043b\u0438\u043d\u0430 \u0442\u0435\u043a\u0441\u0442\u0430 \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d     ;    push edi ;\u0442\u0435\u043a\u0441\u0442 \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d     ;    push dword [StandardHandle]     ;    call _WriteFile@20  ;pop   ebx     ;pop   ecx ;ret      ; \u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f Start:      ;malloc 1000 flhtcjd push 0x3e8 call _o_malloc  ;\u043a\u043b\u0430\u0434\u0435\u043c \u043f\u043e\u0438\u043d\u0442\u0435\u0440 \u043d\u0430 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0430\u0434\u0440\u0435\u0441\u0430 \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e Hidden         mov [Hidden], eax  ;\u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u0446\u0438\u043a\u0434 mov edx, 0x0 M1: ;\u0442.\u043a. \u0443 \u043d\u0430\u0441 \u043a\u0430\u0436\u0434\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 2 \u0431\u0430\u0439\u0442\u0430 *2 mov cx, [array+edx*2] ;\u043f\u043e\u0438\u043d\u0442\u0435\u0440 \u043d\u0430 \u043c\u0430\u043b\u043b\u043e\u043a + \u043d\u043e\u043c\u0435\u0440 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438 \u043a\u043b\u0430\u0434\u0435\u043c \u0431\u0430\u0439\u0442 \u0438\u0437 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 mov byte [Hidden+edx], cl ;\u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u043c \u0441\u0447\u0435\u0442\u0447\u0438\u043a add edx, 0x1 ;\u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u043c edx \u0441 62 cmp edx, 0x3e ;\u0435\u0441\u043b\u0438 edx \u043d\u0435 \u0440\u0430\u0432\u043d\u043e 62 (0x3e) \u0442\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u043c M1 jne M1           mov eax, Hidden+4 ;\u043e\u0442\u043a\u0443\u0434\u0430 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c mov esi, 0x0040300c ;\u0447\u0442\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c call Calculation  ;+39 \u0430\u0434\u0440\u0435\u0441\u0441 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u04358 \u0438\u0437 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 mov eax, Hidden+39  mov esi, 0x00403006 call Calculation  ;\u0412\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e call Hidden  ;\u043d\u0430\u0434\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c free         ; \u0417\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b exit:        push    NULL        call    _ExitProcess@4<\/code><\/pre>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u0430\u043a \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0432 Ghidra. <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c6f\/5bb\/d36\/c6f5bbd36ca7ce898619a1f85adea9ce.png\" width=\"740\" height=\"526\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c6f\/5bb\/d36\/c6f5bbd36ca7ce898619a1f85adea9ce.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0412\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u043d\u0430\u0448\u0435\u0439 \u0441\u043a\u0440\u044b\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0431\u044b\u043b \u043f\u0440\u0438\u0441\u0432\u043e\u0435\u043d \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 <code>FUN_00402084<\/code>. \u041e\u0442\u043a\u0440\u043e\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e.<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/42a\/09d\/16f\/42a09d16f7fba2343a3efa01cc3ccf00.png\" width=\"507\" height=\"953\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/42a\/09d\/16f\/42a09d16f7fba2343a3efa01cc3ccf00.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c! \u0412\u043c\u0435\u0441\u0442\u043e \u043e\u0441\u043c\u044b\u0441\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u043d\u0435\u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b. \u041f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u0436\u043d\u043e <a href=\"https:\/\/github.com\/notrobot1\/NASM_HelloWorld\/tree\/main\/Windows\/malloc\" rel=\"noopener noreferrer nofollow\">\u0437\u0434\u0435\u0441\u044c<\/a>. <\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435.<\/summary>\n<div class=\"spoiler__content\">\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u044f \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u043e\u0431\u0444\u0443\u0441\u0446\u0438\u0440\u043e\u0432\u0430\u043b \u043d\u0430\u0448 \u043c\u0430\u0441\u0441\u0438\u0432, Ghidra \u0432\u0441\u0435 \u0435\u0449\u0435 \u0432\u0438\u0434\u0438\u0442 \u043d\u0430\u0448 \u0441\u043a\u0440\u044b\u0442\u044b\u0439 \u0444\u043b\u0430\u0433 \u0432 \u0441\u0442\u0440\u043e\u043a\u0430\u0445. \u0427\u0442\u043e \u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u044d\u0442\u043e\u0433\u043e, \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u044f\u0432\u0438\u0442\u044c \u0444\u0430\u043d\u0442\u0430\u0437\u0438\u044e \u0438 \u043d\u0435 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0431\u0430\u0439\u0442\u044b \u043f\u043e\u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e. <\/p>\n<\/div>\n<\/details>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/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\/post\/693502\/\"> https:\/\/habr.com\/ru\/post\/693502\/<\/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<p>\u041d\u0430 \u0434\u043d\u044f\u0445 \u0443 \u043c\u0435\u043d\u044f \u0441\u043f\u0440\u043e\u0441\u0438\u043b\u0438, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0441\u043f\u0440\u044f\u0442\u0430\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443 \u0432 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u043c \u0444\u0430\u0439\u043b\u0435, \u0447\u0442\u043e\u0431\u044b &#171;\u043e\u0431\u0440\u0430\u0442\u043d\u044b\u0439 \u0438\u043d\u0436\u0435\u043d\u0435\u0440&#187; \u043d\u0435 \u0441\u043c\u043e\u0433 \u0435\u0435 \u043d\u0430\u0439\u0442\u0438? \u0412\u043e\u043f\u0440\u043e\u0441 \u0434\u0438\u043b\u0435\u0442\u0430\u043d\u0442\u0441\u043a\u0438\u0439, \u043d\u043e \u0442\u0430\u043a \u0441\u043e\u0432\u043f\u0430\u043b\u043e, \u0447\u0442\u043e \u0432 \u0442\u043e\u0442 \u0434\u0435\u043d\u044c \u044f \u0440\u0435\u0448\u0430\u043b \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0439 \u0447\u0435\u043b\u043b\u0435\u043d\u0434\u0436 \u043d\u0430 Hack The Box. \u0417\u0430\u0434\u0430\u043d\u0438\u0435 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <code>Bombs Landed<\/code> \u0438 \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0435\u0433\u043e \u0438\u0437\u044e\u043c\u0438\u043d\u043a\u0430 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u043e\u0434\u0433\u0440\u0443\u0436\u0430\u043b\u0430\u0441\u044c \u0432 \u043f\u0430\u043c\u044f\u0442\u044c. \u0418\u0437-\u0437\u0430 \u044d\u0442\u043e\u0433\u043e Ghidra \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u0439\u0442\u0438 \u0438 \u0434\u0435\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0434. <\/p>\n<details class=\"spoiler\">\n<summary>\u0420\u0435\u0448\u0435\u043d\u0438\u0435 Bombs Landed<\/summary>\n<div class=\"spoiler__content\">\n<p>\u041f\u043e\u043b\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0442\u0430\u0441\u043a\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u043c\u043e\u0435\u043c YouTube \u043a\u0430\u043d\u0430\u043b\u0435: <a href=\"https:\/\/youtu.be\/Qdj08RRN4fA\" rel=\"noopener noreferrer nofollow\">https:\/\/youtu.be\/Qdj08RRN4fA<\/a><\/p>\n<\/div>\n<\/details>\n<p>\u0412 \u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u0438 \u0440\u043e\u0434\u0438\u043b\u0430\u0441\u044c \u0438\u0434\u0435\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u0441 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439, \u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043d\u0430 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0442\u043e\u043b\u044c\u043a\u043e <a href=\"https:\/\/ru.wikipedia.org\/wiki\/NASM\" rel=\"noopener noreferrer nofollow\">Netwide Assembler<\/a> (NASM).<\/p>\n<h2>\u041a\u0430\u043a\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u0431\u0443\u0434\u0443\u0442 \u0440\u0435\u0448\u0435\u043d\u044b \u0432 \u0438\u0442\u043e\u0433\u0435?<\/h2>\n<ol>\n<li>\n<p>\u041c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442 \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0441\u0442\u0430\u0442\u044c\u0438;<\/p>\n<\/li>\n<li>\n<p>\u041e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u043c\u0441\u044f \u0441 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043e\u0439 \u043d\u0430 \u043d\u0438\u0437\u043a\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435;<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u043c\u0441\u044f \u0441 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u043e\u043c NASM.<\/p>\n<\/li>\n<\/ol>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u0438\u043c, \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043f\u043e\u043b\u044c\u0437\u044b \u043d\u0435\u0442. \u0412\u0441\u0435, \u0447\u0442\u043e \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0432 \u043a\u043e\u043d\u0446\u0435 &#8212; \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c <code>flag{qwerty123}<\/code> \u0438 \u0437\u043d\u0430\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u0438\u0433\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435.<\/p>\n<h2>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u043e\u0434\u0433\u0440\u0443\u0436\u0430\u0435\u043c\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f?<\/h2>\n<p>\u041a\u0430\u043a \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u044d\u0442\u043e &#8212; \u043f\u043e\u0434\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438\u043c\u0435\u0435\u0442 \u043d\u0430\u0431\u043e\u0440 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043b\u0435\u0436\u0430\u0442 \u043d\u0430 \u0441\u0432\u043e\u0438\u0445 \u0430\u0434\u0440\u0435\u0441\u0430\u0445. \u0424\u0443\u043d\u043a\u0446\u0438\u044e \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0438\u0437 \u043b\u044e\u0431\u043e\u0433\u043e \u043c\u0435\u0441\u0442\u0430 \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u0435\u0441\u043b\u0438 \u043d\u0430\u043c \u0438\u0437\u0432\u0435\u0441\u0442\u0435\u043d \u0435\u0435 \u0430\u0434\u0440\u0435\u0441. \u0412\u043e\u0442 \u0442\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432 hex.<\/p>\n<pre><code>1400122d0 : 40 55 57 48 81 ec 08 01 00 00 48 8d 6c 24 20 ... c3<\/code><\/pre>\n<ul>\n<li>\n<p><code>1400122d0<\/code> &#8212; \u043f\u0435\u0440\u0432\u044b\u0439 \u0430\u0434\u0440\u0435\u0441 \u043d\u0430\u0448\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438;<\/p>\n<\/li>\n<li>\n<p><code>c3<\/code> &#8212; return;<\/p>\n<\/li>\n<\/ul>\n<p>\u042d\u0442\u043e \u043e\u0431\u044b\u0447\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u0431\u0430\u0439\u0442\u044b \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043b\u0435\u0436\u0430\u0442 \u0432 \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 <code>1400122d0<\/code> \u0438 \u043c\u044b \u043b\u0435\u0433\u043a\u043e \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0438\u0445 \u0447\u0435\u0440\u0435\u0437 r2, IDA, Ghidra \u0432 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435. \u041d\u043e \u0447\u0442\u043e, \u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0434\u0435\u043b\u044f\u0442\u044c \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u043f\u0430\u043c\u044f\u0442\u0438, \u043f\u043e\u043c\u0435\u0449\u0430\u0442\u044c \u0442\u0443\u0434\u0430 \u0431\u0430\u0439\u0442\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438\u0437 \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u043c\u0435\u0441\u0442\u0430, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u044d\u0442\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e. \u0412 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u0444\u0430\u0439\u043b\u0430 \u043d\u0435 \u043f\u043e\u043a\u0430\u0436\u0435\u0442 \u043d\u0430\u043c \u044d\u0442\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442 \u043e\u0431\u0440\u0430\u0442\u043d\u0430\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c\u0441\u044f \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0435\u0439. <\/p>\n<h2>\u0412\u0438\u0436\u0443 \u0446\u0435\u043b\u044c, \u043d\u0435 \u0432\u0438\u0436\u0443 \u043f\u0440\u0435\u043f\u044f\u0442\u0441\u0442\u0432\u0438\u0439!<\/h2>\n<p>\u0417\u0430\u0434\u0430\u0447\u0430 \u043f\u043e\u043d\u044f\u0442\u043d\u0430:<\/p>\n<ol>\n<li>\n<p>\u0412\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u043c\u0435\u0441\u0442\u043e \u0432 \u043f\u0430\u043c\u044f\u0442\u0438;<\/p>\n<\/li>\n<li>\n<p>\u0423\u0437\u043d\u0430\u0442\u044c \u043f\u0435\u0440\u0432\u044b\u0439 \u0430\u0434\u0440\u0435\u0441 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430;<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u043b\u043e\u0436\u0438\u0442\u044c \u0442\u0443\u0434\u0430 \u0431\u0430\u0439\u0442\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0438;<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u0437\u0432\u0430\u0442\u044c \u0438\u0445, \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0444\u043b\u0430\u0433;<\/p>\n<\/li>\n<li>\n<p><s>\u041e\u0441\u0432\u043e\u0431\u043e\u0434\u0438\u0442\u044c \u043f\u0430\u043c\u044f\u0442\u044c<\/s>  \u043d\u0435 \u0441\u0435\u0433\u043e\u0434\u043d\u044f.<\/p>\n<\/li>\n<\/ol>\n<p>\u041f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c\u0441\u044f \u0441 \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u044b\u043c \u043c\u0435\u0441\u0442\u043e\u043c, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0431\u0440\u0430\u0442\u044c \u0431\u0430\u0439\u0442\u044b \u043d\u0430\u0448\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u0412 \u0440\u0430\u043c\u043a\u0430\u0445 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u044f \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0443\u0441\u044c \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u0435\u043c \u043d\u0430\u0448\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u043d\u0443\u0442\u0440\u0438 \u043c\u0430\u0441\u0441\u0438\u0432\u0430. \u041d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435, \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u043c\u0435\u0441\u0442\u0430, \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u0430\u0441\u0441\u0438\u0432 + \u0448\u0438\u0444\u0440 \u0446\u0435\u0437\u0430\u0440\u044f, \u0441\u0442\u0435\u0433\u0430\u043d\u043e\u0433\u0440\u0430\u0444\u0438\u044e \u0438\u043b\u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u043f\u043e\u0434\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0431\u0430\u0439\u0442\u044b \u0438\u0437 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430. \u0412\u0441\u0435 \u044d\u0442\u043e \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0434\u0435\u043b\u0430\u0442\u044c \u043f\u043e\u0434 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 Windows.<\/p>\n<h2>\u041f\u0438\u0448\u0435\u043c \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e.<\/h2>\n<p>\u041d\u0430\u0448\u0430 \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b \u0441\u0442\u0440\u043e\u043a\u0443. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u0442\u0430\u043a\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440. <\/p>\n<pre><code class=\"assembly\">;https:\/\/www.nasm.us\/xdoc\/2.11.08\/html\/nasmdoc6.html NULL EQU 0  ;EXTERN \u0418\u043c\u043f\u043e\u0440\u0442 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0438\u0437 \u0434\u0440\u0443\u0433\u0438\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 extern _ExitProcess@4 extern _WriteFile@20 extern _GetStdHandle@4  ;ucrtbased.dll  ;https:\/\/strontic.github.io\/xcyclopedia\/library\/ucrtbase.dll-ED27C615D14DADBE15581E8CB7ABBE1C.html extern _o_malloc  ;\u042d\u043a\u0441\u043f\u043e\u0440\u0442 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0432 \u0434\u0440\u0443\u0433\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 global Start    ;\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 section .data     Message db \"flag{qwerty123}\", 0Dh, 0Ah ; \u041e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u043c \u0441\u0442\u0440\u043e\u043a      ;\u043d\u0435\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 section .bss StandardHandle resd 1 Written resd 1 ;Code section .text ; \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d Print: push  edi push  ecx push -11         call _GetStdHandle@4         mov dword [StandardHandle], eax     push NULL         push Written     ;mov ecx, 15 ;mov edi, Hidden+37         push ecx ;\u0434\u043b\u0438\u043d\u0430 \u0442\u0435\u043a\u0441\u0442\u0430 \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d         push edi ;\u0442\u0435\u043a\u0441\u0442 \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d         push dword [StandardHandle]         call _WriteFile@20 pop   ebx     pop   ecx ret     ; \u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f Start: mov ecx, 15 ; \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u043c  \u0434\u043b\u0438\u043d\u0443 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 e\u0441x mov edi, Message ; \u043a\u043b\u0430\u0434\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0441 \u0442\u0435\u043a\u0441\u0442\u043e\u043c call Print ; \u0417\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b exit:        push    NULL        call    _ExitProcess@4<\/code><\/pre>\n<p>\u0412\u044b\u0448\u0435 \u043c\u044b \u0432\u0438\u0434\u0438\u043c  \u0434\u0432\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438:<\/p>\n<ul>\n<li>\n<p>Start &#8212; \u0433\u043b\u0430\u0432\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f (\u0442\u043e\u0447\u043a\u0430 \u0432\u0445\u043e\u0434\u0430);<\/p>\n<\/li>\n<li>\n<p>Print &#8212; \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u0441\u043a\u0440\u043e\u0435\u043c \u043e\u0442 \u0433\u043b\u0430\u0437 \u043b\u044e\u0431\u043e\u043f\u044b\u0442\u043d\u044b\u0445 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.<\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u043c \u044d\u0442\u043e\u0442 \u043a\u043e\u0434.<\/p>\n<pre><code>.\\nasm.exe -fwin32 .\\malloc.asm .\\GoLink.exe \/entry:Start \/console kernel32.dll user32.dll ucrtbased.dll malloc.obj<\/code><\/pre>\n<p>\u041d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0444\u0430\u0439\u043b malloc.exe. \u0415\u0441\u043b\u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0444\u0430\u0439\u043b \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435, \u043c\u044b \u0443\u0432\u0438\u0434\u0438\u043c \u0432\u044b\u0445\u043b\u043e\u043f \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c: <code>flag{qwerty123}<\/code>. <\/p>\n<p>\u041e\u0442\u043a\u0440\u043e\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0439 exe \u0444\u0430\u0439\u043b \u0432 x32dbg.<\/p>\n<figure class=\"full-width\"><figcaption>\u041d\u0430\u0448\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043f\u043e\u0434 \u043e\u0442\u043b\u0430\u0434\u043a\u043e\u0439.<\/figcaption><\/figure>\n<p>\u041d\u0430 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u0435 \u0432\u044b\u0448\u0435, \u043a\u0440\u0430\u0441\u043d\u044b\u043c \u0446\u0432\u0435\u0442\u043e\u043c, \u044f \u0432\u044b\u0434\u0435\u043b\u0438\u043b \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>Start<\/code>, \u043e\u0440\u0430\u043d\u0436\u0435\u0432\u044b\u043c \u0446\u0432\u0435\u0442\u043e\u043c \u043e\u0431\u0432\u0435\u043b \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>Print<\/code>. \u0412\u0438\u0434\u0438\u043c \u043c\u0435\u0441\u0442\u043e \u0432\u044b\u0437\u043e\u0432\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>Print<\/code> \u0438 \u0435\u0435 \u043f\u0435\u0440\u0432\u044b\u0439 \u0430\u0434\u0440\u0435\u0441. \u0412\u0441\u0435, \u0447\u0442\u043e \u043c\u0435\u0436\u0434\u0443 \u0430\u0434\u0440\u0435\u0441\u0430\u043c\u0438 00401000 &#8212; 00401024 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432 \u043d\u0430\u0448 \u0441\u043a\u0440\u044b\u0442\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432. <\/p>\n<p>\u0414\u0435\u043b\u0430\u0435\u043c \u043c\u0430\u0441\u0441\u0438\u0432 \u0432 \u0441\u0435\u043a\u0446\u0438\u0438 <code>.data<\/code>.<\/p>\n<pre><code class=\"assembly\">;\u043e\u0431\u044a\u0432\u043b\u044f\u0435\u043c \u043c\u0430\u0441\u0441\u0438\u0432                                                                                                                                                                                                                                                                                         string 38 array   dw 0x57, 0x51, 0x6a, 0xf5, 0xe8, 0xf9, 0x1f, 0x00, 0x00, 0xa3, 0x38, 0x20, 0x40, 0x00, 0x6a, 0x00, 0x68, 0x3c, 0x20, 0x40, 0x00, 0xb9, 0x0f, 0x00, 0x00, 0x00, 0xbf, 0xb3, 0x20, 0x40, 0x00, 0x51, 0x57, 0xff, 0x35, 0x38, 0x20, 0x40, 0x00, 0xe8, 0xda, 0x1f, 0x00, 0x00, 0x5b, 0x59, 0xc3, 0x66, 0x6c, 0x61, 0x67, 0x7b, 0x71, 0x77, 0x65, 0x72, 0x74, 0x79, 0x31, 0x32, 0x33, 0x7d<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c <code>dw<\/code> \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442,\u0447\u0442\u043e \u043a\u0430\u0436\u0434\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 2 \u0431\u0430\u0439\u0442\u0430. \u0415\u0441\u043b\u0438 \u0432\u044b \u043f\u0440\u043e\u043b\u0438\u0441\u0442\u0430\u0435\u0442\u0435 \u043c\u0430\u0441\u0441\u0438\u0432 \u0432 \u043a\u043e\u043d\u0435\u0446, \u0442\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u0435, \u0447\u0442\u043e \u043e\u043d \u043d\u0435 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 <code>c3<\/code>. \u041f\u043e\u0441\u043b\u0435 <code>c3<\/code> \u044f \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u043d\u0430\u0448\u0443 \u0441\u0442\u0440\u043e\u043a\u0443 \u0441 \u0444\u043b\u0430\u0433\u043e\u043c.<\/p>\n<details class=\"spoiler\">\n<summary>\u0417\u0430\u043c\u0435\u0442\u043a\u0430<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0421\u0442\u0440\u043e\u043a\u0438 \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u0442\u044c \u043d\u0443\u043b\u0435\u0432\u044b\u043c \u0431\u0430\u0439\u0442\u043e\u043c, \u0447\u0442\u043e \u044f \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043f\u0440\u043e\u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u043b \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043a\u043e\u0434\u0430.<\/p>\n<\/div>\n<\/details>\n<p>\u0412 \u0441\u0435\u043a\u0446\u0438\u0438 <code>.bss<\/code> \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0435\u0449\u0435 \u0434\u0432\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435.<\/p>\n<pre><code class=\"assembly\">    ;\u043f\u043e\u0438\u043d\u0442\u0435\u0440 \u043d\u0430 \u0441\u043a\u0440\u044b\u0442\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e Hidden resq 1 ;\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0445\u0440\u0430\u043d\u0438\u0442 \u043f\u0435\u0440\u0435\u0432\u0435\u0440\u043d\u0443\u0442\u044b\u0435 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u044f Reverse resd 1<\/code><\/pre>\n<p>\u0412 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <code>Hidden<\/code> \u043c\u044b \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u043c \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u0443\u044e \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u043f\u0430\u043c\u044f\u0442\u0438. \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <code>Reverse<\/code> \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u043d\u0430\u043c \u0447\u0443\u0442\u044c \u043f\u043e\u0437\u0436\u0435.<\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u044b\u0434\u0435\u043b\u0438\u043c \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0432 \u043f\u0430\u043c\u044f\u0442\u0438. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u044f \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <code>malloc<\/code>.<\/p>\n<pre><code class=\"assembly\">    ;malloc 1000  push 0x3e8 call _o_malloc ;\u043a\u043b\u0430\u0434\u0435\u043c \u043f\u043e\u0438\u043d\u0442\u0435\u0440 \u043d\u0430 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0430\u0434\u0440\u0435\u0441\u0430 \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e Hidden         mov [Hidden], eax<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <code>Hidden<\/code> \u0443 \u043d\u0430\u0441 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 1000 \u0430\u0434\u0440\u0435\u0441\u043e\u0432. \u041d\u0430\u043f\u0438\u0448\u0435\u043c \u0446\u0438\u043a\u043b \u0438 \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u043c \u0431\u0430\u0439\u0442\u044b \u0432 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e. <\/p>\n<pre><code class=\"assembly\">;\u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u0446\u0438\u043a\u0434 mov edx, 0x0 M1: ;\u0442.\u043a. \u0443 \u043d\u0430\u0441 \u043a\u0430\u0436\u0434\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 2 \u0431\u0430\u0439\u0442\u0430 *2 mov cx, [array+edx*2] ;\u043f\u043e\u0438\u043d\u0442\u0435\u0440 \u043d\u0430 \u043c\u0430\u043b\u043b\u043e\u043a + \u043d\u043e\u043c\u0435\u0440 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438 \u043a\u043b\u0430\u0434\u0435\u043c \u0431\u0430\u0439\u0442 \u0438\u0437 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 mov byte [Hidden+edx], cl ;\u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u043c \u0441\u0447\u0435\u0442\u0447\u0438\u043a add edx, 0x1 ;\u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u043c edx \u0441 62 (\u0434\u043b\u0438\u043d\u0430 \u043c\u0430\u0441\u0441\u0438\u0432\u0430) cmp edx, 0x3e ;\u0435\u0441\u043b\u0438 edx \u043d\u0435 \u0440\u0430\u0432\u043d\u043e 62 (0x3e) \u0442\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u043c M1 jne M1          ;\u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u0441\u043a\u0440\u044b\u0442\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e         call Hidden<\/code><\/pre>\n<p>\u0421\u043e\u0431\u0435\u0440\u0435\u043c \u044d\u0442\u043e \u0447\u0443\u0434\u043e \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0432 \u043e\u0442\u043b\u0430\u0434\u0447\u0438\u043a.<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p align=\"left\">0040105E<\/p>\n<\/td>\n<td>\n<p align=\"left\">E8 21100000<\/p>\n<\/td>\n<td>\n<p align=\"left\">call calloc.402084<\/p>\n<\/td>\n<td>\n<p align=\"left\">\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u0412\u043e\u0442 \u043d\u0430\u0448 \u0430\u0434\u0440\u0435\u0441, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043c\u044b \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e Hidden. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043f\u043e \u044d\u0442\u043e\u043c\u0443 \u0430\u0434\u0440\u0435\u0441\u0443 \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u043c\u044b \u043f\u043e\u043b\u043e\u0436\u0438\u043b\u0438 \u0432 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u0443\u044e \u043f\u0430\u043c\u044f\u0442\u044c.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0414\u0430, \u044d\u0442\u043e \u043d\u0430\u0448\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f <code>Print<\/code>! \u041d\u043e \u0447\u0442\u043e \u0432\u043e\u0442 \u044d\u0442\u043e?<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"175\" width=\"175\">\n<p align=\"left\">00402088<\/p>\n<\/td>\n<td>\n<p align=\"left\">E8 F91F0000<\/p>\n<\/td>\n<td>\n<p align=\"left\">call 404086<\/p>\n<\/td>\n<td>\n<p align=\"left\">\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"175\" width=\"175\">\n<p align=\"left\">004020AB<\/p>\n<\/td>\n<td>\n<p align=\"left\">E8 DA1F0000<\/p>\n<\/td>\n<td>\n<p align=\"left\">call 40408A<\/p>\n<\/td>\n<td>\n<p align=\"left\">\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u041f\u043e\u0447\u0435\u043c\u0443 \u0432\u043c\u0435\u0441\u0442\u043e <code>call _GetStdHandle@4<\/code> \u0438 <code>call _WriteFile@20<\/code> \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u0432\u044b\u0437\u043e\u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u0430\u0434\u0440\u0435\u0441\u043e\u0432? \u0414\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0430\u0434\u0440\u0435\u0441\u0430 \u0432\u044b\u0437\u043e\u0432\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u044b\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043f\u043e \u0444\u043e\u0440\u043c\u0443\u043b\u0435:<\/p>\n<p><code>\u0410\u0434\u0440\u0435\u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c - \u0440\u0430\u0437\u043c\u0435\u0440 \u043a\u043e\u043c\u0430\u043d\u0434\u044b (call = 5) - \u0430\u0434\u0440\u0435\u0441 \u043e\u0442\u043a\u0443\u0434\u0430 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c<\/code><\/p>\n<details class=\"spoiler\">\n<summary>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0430\u0434\u0440\u0435\u0441 0000000000459340 \u0438\u0437 0000000000D610C8.<\/summary>\n<div class=\"spoiler__content\">\n<p>0000000000459340 &#8212; 5 &#8212; 0000000000D610C8 = FFFF FFFF FF6F 8273 \u0438 \u043f\u0435\u0440\u0435\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0431\u0430\u0439\u0442\u044b.<\/p>\n<p>call 73826fff<\/p>\n<\/div>\n<\/details>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0430\u0434\u0440\u0435\u0441\u0430 \u0432\u0441\u0435\u0433\u0434\u0430 \u0440\u0430\u0437\u043d\u044b\u0435, \u043c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0443\u0437\u043d\u0430\u0442\u044c \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u0435, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442 \u043d\u0430\u043c \u043d\u0430\u0434\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b <code>call<\/code>, \u043f\u043e\u0441\u043b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b <code>malloc<\/code> .<\/p>\n<p>\u041d\u0430\u043f\u0438\u0448\u0435\u043c \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e:<\/p>\n<pre><code class=\"assembly\">;\u0440\u0430\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0432\u044b\u0437\u043e\u0432\u0430 Calculation:     push ebp ;ecx - \u0447\u0442\u043e \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0432\u044b\u0437\u0432\u0430\u0442\u044c mov ecx, esi ;\u043e\u0442 \u0430\u0434\u0440\u0435\u0441\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043e\u0442\u043d\u0438\u043c\u0430\u0435\u043c \u0440\u0430\u0437\u043c\u0435\u0440 \u043a\u043e\u043c\u0430\u043d\u0434\u044b (5) sub ecx, 5 ;\u043e\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u043e\u0442\u043d\u0438\u043c\u0430\u0435\u043c \u0430\u0434\u0440\u0435\u0441\u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0445\u043e\u0442\u0438\u043c \u0432\u044b\u0437\u0432\u0430\u0442\u044c ;ecx \u0445\u0440\u0430\u043d\u0438\u0442 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0430\u0434\u043e \u043f\u0435\u0440\u0435\u0432\u0435\u0440\u043d\u0443\u0442\u044c sub ecx, eax ;\u043a\u043b\u0430\u0434\u0435\u043c \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043f\u0435\u0440\u0435\u0432\u0435\u0440\u043d\u0443\u0442\u044b\u0435 \u0431\u0430\u0439\u0442\u044b ;+100 - \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0447\u0442\u043e \u0431\u044b \u043e\u043d\u0430 \u043d\u0435 \u043d\u0430\u0435\u0445\u0430\u043b\u0430 \u043d\u0430 \u043c\u0430\u0441\u0441\u0438\u0432 array mov [Reverse+100], ecx  ;\u0440\u0430\u0441\u0447\u0438\u0442\u0430\u043d\u044b\u0439 \u0430\u0434\u0440\u0435\u0441 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u043a\u043b\u0430\u0434\u0435\u043c \u0432 edx mov edx, [Reverse+100+0] ;eax = e8 (\u043a\u043e\u043c\u0430\u043d\u0434\u0430 call). eax+1 \u043f\u0435\u0440\u0432\u044b\u0439 \u0431\u0430\u0439\u0442 \u0430\u0434\u0440\u0435\u0441\u0430, \u043a\u043b\u0430\u0434\u0435\u043c \u0432 \u043d\u0435\u0433\u043e \u043c\u043b\u0430\u0434\u0448\u0438\u0439 \u0431\u0438\u0442 edx mov [eax+1], dl ;\u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c edx \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0440\u0430\u0441\u0447\u0438\u0442\u0430\u043d\u044b\u043c \u0431\u0430\u0439\u0442\u043e\u043c mov edx, [Reverse+100+1] mov [eax+2], dl mov edx, [Reverse+100+2] mov [eax+3], dl mov edx, [Reverse+100+3] mov [eax+4], dl pop ebp ret<\/code><\/pre>\n<p>\u0412\u044b\u0437\u0432\u0430\u0442\u044c \u044d\u0442\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043c\u043e\u0436\u043d\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code>        mov eax, Hidden+4 ;\u043e\u0442\u043a\u0443\u0434\u0430 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c mov esi, 0x0040300c ;\u0447\u0442\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c call Calculation<\/code><\/pre>\n<p> <code>Hidden+4<\/code> &#8212; \u0430\u0434\u0440\u0435\u0441, \u043e\u0442\u043a\u0443\u0434\u0430 \u043c\u044b \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e.<\/p>\n<p> <code>0x0040300c<\/code> &#8212; \u0430\u0434\u0440\u0435\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0432\u044b\u0437\u0432\u0430\u0442\u044c (<code>call _GetStdHandle@4<\/code>). \u0422\u043e\u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u043d\u0430\u0434\u043e \u043f\u0440\u043e\u0434\u0435\u043b\u0430\u0442\u044c \u0438 \u0441 <code>call _WriteFile@20<\/code>.<\/p>\n<h2>\u0424\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u0434.<\/h2>\n<pre><code class=\"assembly\">;https:\/\/www.nasm.us\/xdoc\/2.11.08\/html\/nasmdoc6.html   NULL EQU 0  ;EXTERN \u0418\u043c\u043f\u043e\u0440\u0442 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0438\u0437 \u0434\u0440\u0443\u0433\u0438\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 extern _ExitProcess@4 extern _WriteFile@20 extern _GetStdHandle@4  ;ucrtbased.dll  ;https:\/\/strontic.github.io\/xcyclopedia\/library\/ucrtbase.dll-ED27C615D14DADBE15581E8CB7ABBE1C.html extern _o_malloc  ;\u042d\u043a\u0441\u043f\u043e\u0440\u0442 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0432 \u0434\u0440\u0443\u0433\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 global Start    ;\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 section .data     ;\u043e\u0431\u044a\u0432\u043b\u044f\u0435\u043c \u043c\u0430\u0441\u0441\u0438\u0432                                                                                                                                                                                                                                                                                     string 38 array   dw 0x57, 0x51, 0x6a, 0xf5, 0xe8, 0xf9, 0x1f, 0x00, 0x00, 0xa3, 0x38, 0x20, 0x40, 0x00, 0x6a, 0x00, 0x68, 0x3c, 0x20, 0x40, 0x00, 0xb9, 0x0f, 0x00, 0x00, 0x00, 0xbf, 0xb3, 0x20, 0x40, 0x00, 0x51, 0x57, 0xff, 0x35, 0x38, 0x20, 0x40, 0x00, 0xe8, 0xda, 0x1f, 0x00, 0x00, 0x5b, 0x59, 0xc3, 0x66, 0x6c, 0x61, 0x67, 0x7b, 0x71, 0x77, 0x65, 0x72, 0x74, 0x79, 0x31, 0x32, 0x33, 0x7d   ;\u043d\u0435\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 section .bss StandardHandle resd 1 Written resd 1 ;\u043f\u043e\u0438\u043d\u0442\u0435\u0440 \u043d\u0430 \u0441\u043a\u0440\u044b\u0442\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e Hidden resq 1 ;\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0445\u0440\u0430\u043d\u0438\u0442 \u043f\u0435\u0440\u0435\u0432\u0435\u0440\u043d\u0443\u0442\u044b\u0435 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u044f Reverse resd 1    ;Code section .text      ;\u0440\u0430\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0432\u044b\u0437\u043e\u0432\u0430     Calculation:          push ebp  ;ecx - \u0447\u0442\u043e \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0432\u044b\u0437\u0432\u0430\u0442\u044c mov ecx, esi ;\u043e\u0442 \u0430\u0434\u0440\u0435\u0441\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0432\u044b\u0437\u0432\u0430\u0442\u044c<\/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-339763","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/339763","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=339763"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/339763\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=339763"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=339763"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=339763"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}