{"id":123988,"date":"2021-06-28T12:44:00","date_gmt":"2021-06-28T19:44:00","guid":{"rendered":"\/blogs\/?p=123988"},"modified":"2024-07-05T06:05:38","modified_gmt":"2024-07-05T13:05:38","slug":"analyzing-cve-2021-1665-remote-code-execution-vulnerability-in-windows-gdi","status":"publish","type":"post","link":"https:\/\/www.mcafee.com\/blogs\/other-blogs\/mcafee-labs\/analyzing-cve-2021-1665-remote-code-execution-vulnerability-in-windows-gdi\/","title":{"rendered":"Analyzing CVE-2021-1665 \u2013 Remote Code Execution Vulnerability in Windows GDI+"},"content":{"rendered":"<h2><strong>Introduction<\/strong><\/h2>\n<p>Microsoft Windows Graphics Device Interface+, also known as GDI+, allows various applications to use different graphics functionality on video displays as well as printers. Windows applications don\u2019t directly access graphics hardware such as device drivers, but they interact with GDI, which in turn then interacts with device drivers. In this way, there is an abstraction layer to Windows applications and a common set of APIs for everyone to use.<\/p>\n<p>Because of its complex format, GDI+ has a known history of various vulnerabilities. We at McAfee continuously fuzz various open source and closed source software including windows GDI+. Over the last few years, we have reported various issues to Microsoft in various Windows components including GDI+ and have received CVEs for them.<\/p>\n<p>In this post, we detail our root cause analysis of one such vulnerability which we found using WinAFL: CVE-2021-1665 &#8211; GDI+ Remote Code Execution Vulnerability.\u00a0 This issue was fixed in January 2021 as part of a Microsoft Patch.<\/p>\n<h2><strong>What is WinAFL?<\/strong><\/h2>\n<p>WinAFL is a Windows port of a popular Linux AFL fuzzer and is maintained by Ivan Fratric of Google Project Zero. WinAFL uses dynamic binary instrumentation using DynamoRIO and it requires a program called as a harness. A harness is nothing but a simple program which calls the APIs we want to fuzz.<\/p>\n<p>A simple harness for this was already provided with WinAFL, we can enable \u201c<strong>Image-&gt;GetThumbnailImage<\/strong>\u201d code which was commented by default in the code. Following is the harness code to fuzz GDI+ image and GetThumbnailImage API:<\/p>\n<p>As you can see, this small piece of code simply creates a new image object from the provided input file and then calls another function to generate a thumbnail image. This makes for an excellent attack vector and can affect various Windows applications if they use thumbnail images. In addition, this requires little user interaction, thus software which uses GDI+ and calls GetThumbnailImage API, is vulnerable.<\/p>\n<h2><strong>Collecting Corpus:<\/strong><\/h2>\n<p>A good corpus provides a sound foundation for fuzzing. For that we can use Google or GitHub in addition to further test corpus available from various software and public EMF files which were released for other vulnerabilities. We have generated a few test files by making changes to a sample code provided on Microsoft\u2019s site which generates an EMF file with <strong>EMFPlusDrawString<\/strong> and other records:<\/p>\n<p>Ref: <a href=\"https:\/\/docs.microsoft.com\/en-us\/openspecs\/windows_protocols\/ms-emfplus\/07bda2af-7a5d-4c0b-b996-30326a41fa57\">https:\/\/docs.microsoft.com\/en-us\/openspecs\/windows_protocols\/ms-emfplus\/07bda2af-7a5d-4c0b-b996-30326a41fa57<\/a><\/p>\n<h2><strong>Minimizing Corpus:<\/strong><\/h2>\n<p>After we have collected an initial corpus file, we need to minimize it. For this we can use a utility called winafl-cmin.py as follows:<\/p>\n<table style=\"border-collapse: collapse; width: 100%;\">\n<tbody>\n<tr>\n<td style=\"width: 100%;\">winafl-cmin.py -D D:\\\\work\\\\winafl\\\\DynamoRIO\\\\bin32 -t 10000 -i inCorpus -o minCorpus -covtype edge -coverage_module gdiplus.dll -target_module gdiplus_hardik.exe -target_method fuzzMe -nargs 2 &#8212; gdiplus_hardik.exe @@<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><strong>How does WinAFL work?<\/strong><\/h2>\n<p>WinAFL uses the concept of in-memory fuzzing. We need to provide a function name to WinAFL. It will save the program state at the start of the function and take one input file from the corpus, mutate it, and feed it to the function.<\/p>\n<p>It will monitor this for any new code paths or crashes. If it finds a new code path, it will consider the new file as an interesting test case and will add it to the queue for further mutation. If it finds any crashes, it will save the crashing file in crashes folder.<\/p>\n<p>The following picture shows the fuzzing flow:<\/p>\n<h2><strong>Fuzzing with WinAFL:<\/strong><\/h2>\n<p>Once we have compiled our harness program, collected, and minimized the corpus, we can run this command to fuzz our program with WinAFL:<\/p>\n<table style=\"border-collapse: collapse; width: 100%;\">\n<tbody>\n<tr>\n<td style=\"width: 100%;\">afl-fuzz.exe -i minCorpus -o out -D D:\\work\\winafl\\DynamoRIO\\bin32 -t 20000 &#8212;coverage_module gdiplus.dll -fuzz_iterations 5000 -target_module gdiplus_hardik.exe -target_offset 0x16e0 -nargs 2 &#8212; gdiplus_hardik.exe @@<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><strong>Results:<\/strong><\/h2>\n<p>We found a few crashes and after triaging unique crashes, and we found a crash in \u201c<strong>gdiplus!BuiltLine::GetBaselineOffset<\/strong>\u201d which looks as follows in the call stack below:<\/p>\n<p>As can be seen in the above image, the program is crashing while trying to read data from a memory address pointed by edx+8. We can see it registers ebx, ecx and edx contains c0c0c0c0 which means that page heap is enabled for the binary. We can also see that c0c0c0c0 is being passed as a parameter to \u201c<strong>gdiplus!FullTextImager::RenderLine<\/strong>\u201d function.<\/p>\n<h2><strong>Patch Diffing to See If We Can Find the Root Cause<\/strong><\/h2>\n<p>To figure out a root cause, we can use patch diffing\u2014namely, we can use IDA <strong>BinDiff<\/strong> plugin to identify what changes have been made to patched file. If we are lucky, we can easily find the root cause by just looking at the code that was changed. So, we can generate an IDB file of patched and unpatched versions of gdiplus.dll and then run IDA <strong>BinDiff<\/strong> plugin to see the changes.<\/p>\n<p>We can see that one new function was added in the patched file, and this seems to be a destructor for <strong>BuiltLine<\/strong> Object :<\/p>\n<p>We can also see that there are a few functions where the similarity score is &lt; 1 and one such function is <strong>FullTextImager::BuildAllLines<\/strong> as shown below:<\/p>\n<p>Now, just to confirm if this function is really the one which was patched, we can run our test program and POC in windbg and set a break point on this function. We can see that the breakpoint is hit and the program doesn\u2019t crash anymore:<\/p>\n<p>Now, as a next step, we need to identify what has been changed in this function to fix this vulnerability. For that we can check flow graph of this function and we see something as follows. Unfortunately, there are too many changes to identify the vulnerability by simply looking at the diff:<\/p>\n<p>The left side illustrates an unpatched dll while right side shows a patched dll:<\/p>\n<ul>\n<li>Green indicates that the patched and unpatched blocks are same.<\/li>\n<li>Yellow blocks indicate there has been some changes between unpatched and patched dlls.<\/li>\n<li>Red blocks call out differences in the dlls.<\/li>\n<\/ul>\n<p>If we zoom in on the yellow blocks we can see following:<\/p>\n<p>We can note several changes. Few blocks are removed in the patched DLL, so patch diffing will alone will not be sufficient to identify the root cause of this issue. However, this presents valuable hints about where to look and what to look for when using other methods for debugging such as windbg. A few observations we can spot from the bindiff output above:<\/p>\n<ul>\n<li>In the unpatched DLL, if we check carefully we can see that there is a call to \u201c<strong>GetuntrimmedCharacterCount<\/strong>\u201d function and later on there is another call to a function \u201c<strong>SetSpan::SpanVector<\/strong>\u201d<\/li>\n<li>In the patched DLL, we can see that there is a call to \u201c<strong>GetuntrimmedCharacterCount<\/strong>\u201d where a return value stored inside <strong>EAX<\/strong> register is checked. If it\u2019s zero, then control jumps to another location\u2014a <strong>destructor<\/strong> for <strong>BuiltLine <\/strong>Object, this was newly added code in the patched DLL:<\/li>\n<\/ul>\n<p>So we can assume that this is where the vulnerability is fixed. Now we need to figure out following:<\/p>\n<ol>\n<li>Why our program is crashing with the provided POC file?<\/li>\n<li>What field in the file is causing this crash?<\/li>\n<li>What value of the field?<\/li>\n<li>Which condition in program which is causing this crash?<\/li>\n<li>How this was fixed?<\/li>\n<\/ol>\n<h2><strong>EMF File Format:<\/strong><\/h2>\n<p>EMF is also known as enhanced meta file format which is used to store graphical images device independently. An EMF file is consisting of various records which is of variable length. It can contain definition of various graphic object, commands for drawing and other graphics properties.<\/p>\n<p>Credit: MS EMF documentation.<\/p>\n<p>Generally, an EMF file consist of the following records:<\/p>\n<ol>\n<li><strong>EMF Header<\/strong> \u2013 This contains information about EMF structure.<\/li>\n<li><strong>EMF Records<\/strong> \u2013 This can be various variable length records, containing information about graphics properties, drawing order, and so forth.<\/li>\n<li><strong>EMF EOF Record<\/strong> \u2013 This is the last record in EMF file.<\/li>\n<\/ol>\n<p>Detailed specifications of EMF file format can be seen at Microsoft site at following URL:<\/p>\n<p><a href=\"https:\/\/docs.microsoft.com\/en-us\/openspecs\/windows_protocols\/ms-emf\/91c257d7-c39d-4a36-9b1f-63e3f73d30ca\">https:\/\/docs.microsoft.com\/en-us\/openspecs\/windows_protocols\/ms-emf\/91c257d7-c39d-4a36-9b1f-63e3f73d30ca<\/a><\/p>\n<h2><strong>Locating the Vulnerable Record in the EMF File:<\/strong><\/h2>\n<p>Generally, most of the issues in EMF are because of malformed or corrupt records. We need to figure out which record type is causing this crash. For this if we look at the call stack we can see following:<\/p>\n<p>We can notice a call to function \u201c<strong>gdiplus!GdipPlayMetafileRecordCallback<\/strong>\u201d<\/p>\n<p>By setting a breakpoint on this function and checking parameter, we can see following:<\/p>\n<p>We can see that <strong>EDX<\/strong> contains some memory address and we can see that parameter given to this function are: 00x00401c,0x00000000 and 0x00000044.<\/p>\n<p>Also, on checking the location pointed by <strong>EDX<\/strong> we can see following:<\/p>\n<p>If we check our POC EMF file, we can see that this data belongs to file from offset: 0x15c:<\/p>\n<p>By going through EMF specification and manually parsing the records, we can easily figure out that this is a \u201c<strong>EmfPlusDrawString\u201d<\/strong> record, the format of which is shown below:<\/p>\n<p>In our case:<\/p>\n<p>Record Type = 0x401c EmfPlusDrawString record<\/p>\n<p>Flags = 0x0000<\/p>\n<p>Size = 0x50<\/p>\n<p>Data size = 0x44<\/p>\n<p>Brushid = 0x02<\/p>\n<p>Format id = 0x01<\/p>\n<p><strong>Length = 0x14<\/strong><\/p>\n<p>Layoutrect = 00 00 00 00 00 00 00 00 FC FF C7 42 00 00 80 FF<\/p>\n<p>String data =<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-124042\" src=\"\/wp-content\/uploads\/2021\/06\/18.png\" alt=\"\" width=\"904\" height=\"154\" srcset=\"https:\/\/www.mcafee.com\/blogs\/wp-content\/uploads\/2021\/06\/18.png 904w, https:\/\/www.mcafee.com\/blogs\/wp-content\/uploads\/2021\/06\/18-300x51.png 300w, https:\/\/www.mcafee.com\/blogs\/wp-content\/uploads\/2021\/06\/18-768x131.png 768w, https:\/\/www.mcafee.com\/blogs\/wp-content\/uploads\/2021\/06\/18-205x35.png 205w\" sizes=\"auto, (max-width: 904px) 100vw, 904px\" \/><\/p>\n<p>Now that we have located the record that seems to be causing the crash, the next thing is to figure out why our program is crashing. If we debug and check the code, we can see that control reaches to a function \u201c<strong>gdiplus!FullTextImager::BuildAllLines<\/strong>\u201d. When we decompile this code, we can see something\u00a0 like this:<\/p>\n<p>The following diagram shows the function call hierarchy:<\/p>\n<p>&nbsp;<\/p>\n<h2><strong>The execution flow in summary:<\/strong><\/h2>\n<ol>\n<li>Inside \u201c<strong>Builtline::BuildAllLines\u201d<\/strong> function, there is a while loop inside which the program allocates 0x60 bytes of memory. Then it calls the \u201c<strong>Builtline::BuiltLine\u201d<\/strong><\/li>\n<li>The<strong> \u201cBuiltline::BuiltLine\u201d<\/strong> function moves data to the newly allocated memory and then it calls \u201c<strong>BuiltLine::GetUntrimmedCharacterCount<\/strong>\u201d.<\/li>\n<li>The return value of \u201c<strong>BuiltLine::GetUntrimmedCharacterCount<\/strong>\u201d is added to loop counter, which is <strong>ECX<\/strong>. This process will be repeated until the loop counter (<strong>ECX<\/strong>) is &lt; string length(<strong>EAX<\/strong>), which is 0x14 here.<\/li>\n<li>The loop starts from 0, so it should terminate at <strong>0x13<\/strong> or it should terminate when the return value of \u201c<strong>GetUntrimmedCharacterCount\u201d <\/strong>is 0.<\/li>\n<li>But in the vulnerable <strong>DLL<\/strong>, the program doesn\u2019t terminate because of the way loop counter is increased. Here, \u201c<strong>BuiltLine::GetUntrimmedCharacterCount\u201d <\/strong>returns 0, which is added to Loop counter(<strong>ECX<\/strong>) and doesn\u2019t increase ECX value. It allocates 0x60 bytes of memory and creates another line, corrupting the data that later leads the program to crash. The loop is executed for <strong>21<\/strong> times instead of <strong>20.<\/strong><\/li>\n<\/ol>\n<h2><strong>In detail:<\/strong><\/h2>\n<p>1. Inside \u201c<strong>Builtline::BuildAllLines\u201d<\/strong> memory will be allocated for 0x60 or 96 bytes, and in the debugger it looks as follows:<\/p>\n<p>&nbsp;<\/p>\n<p>2. Then it calls \u201c<strong>BuiltLine::BuiltLine<\/strong>\u201d function and moves the data to newly allocated memory:<\/p>\n<p>&nbsp;<\/p>\n<p>3. This happens in side a while loop and there is a function call to \u201c<strong>BuiltLine::GetUntrimmedCharacterCount<\/strong>\u201d.<\/p>\n<p>4. Return value of \u201c<strong>BuiltLine::GetUntrimmedCharacterCount<\/strong>\u201d is stored in a location 0x12ff2ec. This value will be 1 as can be seen below:<\/p>\n<p>&nbsp;<\/p>\n<p>5. This value gets added to ECX:<\/p>\n<p>&nbsp;<\/p>\n<p>6. Then there is a check that determines if <strong>ecx&lt; eax<\/strong>. If true, it will continue loop, else it will jump to another location:<\/p>\n<p>&nbsp;<\/p>\n<p>7. Now in the vulnerable version, loop doesn\u2019t exist if the return value of \u201c<strong>BuiltLine::GetUntrimmedCharacterCount<\/strong>\u201d is 0, which means that this 0 will be added to <strong>ECX <\/strong>and which means ECX will not increase. So the loop will execute 1 more time with the \u201c<strong>ECX<\/strong>\u201d value of 0x13. Thus, this will lead to loop getting executed 21 times rather than 20 times. This is the root cause of the problem here.<\/p>\n<p>Also after some debugging, we can figure out why <strong>EAX<\/strong> contains 14. It is read from the POC file at offset: 0x174:<\/p>\n<p>If we recall, this is the <strong>EmfPlusDrawString<\/strong> record and <strong>0x14<\/strong> is the length we mentioned before.<\/p>\n<p>Later on, the program reaches to \u201c<strong>FullTextImager::Render<\/strong>\u201d function corrupting the value of EAX because it reads the unused memory:<\/p>\n<p>This will be passed as an argument to \u201c<strong>FullTextImager::RenderLine<\/strong>\u201d function:<\/p>\n<p>&nbsp;<\/p>\n<p>Later, program will crash while trying to access this location.<\/p>\n<p>Our program was crashing while processing <strong>EmfPlusDrawString<\/strong> record inside the EMF file while accessing an invalid memory location and processing string data field. Basically, the program was not verifying the return value of \u201c<strong>gdiplus!BuiltLine::GetUntrimmedCharacterCount<\/strong>\u201d function and this resulted in taking a different program path that\u00a0 corrupted the register and various memory values, ultimately causing the crash.<\/p>\n<h2><strong>How this issue was fixed?<\/strong><\/h2>\n<p>As we have figured out by looking at patch diff above, a check was added which determined the return value of \u201c<strong>gdiplus!BuiltLine::GetUntrimmedCharacterCount<\/strong>\u201d function.<\/p>\n<p>If the retuned value is 0, then program xor\u2019s <strong>EBX<\/strong> which contains counter and jump to a location which calls destructor for Builtline Object:<\/p>\n<p>Here is the destructor that prevents the issue:<\/p>\n<h2><strong>Conclusion:<\/strong><\/h2>\n<p>GDI+ is a very commonly used Windows component, and a vulnerability like this can affect billions of systems across the globe. We recommend our users to apply proper updates and keep their Windows deployment current.<\/p>\n<p>We at McAfee are continuously fuzzing various open source and closed source library and work with vendors to fix such issues by responsibly disclosing such issues to them giving them proper time to fix the issue and release updates as needed.<\/p>\n<p>We are thankful to Microsoft for working with us on fixing this issue and releasing an update.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><strong>\u00a0<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction Microsoft Windows Graphics Device Interface+, also known as GDI+, allows various applications to use different graphics functionality on video&#8230;<\/p>\n","protected":false},"author":612,"featured_media":122725,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[442],"tags":[],"coauthors":[2095],"class_list":["post-123988","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-mcafee-labs"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Analyzing CVE-2021-1665 \u2013 Remote Code Execution Vulnerability in Windows GDI+ | McAfee Blog<\/title>\n<meta name=\"description\" content=\"Introduction Microsoft Windows Graphics Device Interface+, also known as GDI+, allows various applications to use different graphics functionality on\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Analyzing CVE-2021-1665 \u2013 Remote Code Execution Vulnerability in Windows GDI+ | McAfee Blog\" \/>\n<meta property=\"og:description\" content=\"Introduction Microsoft Windows Graphics Device Interface+, also known as GDI+, allows various applications to use different graphics functionality on\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.mcafee.com\/blogs\/other-blogs\/mcafee-labs\/analyzing-cve-2021-1665-remote-code-execution-vulnerability-in-windows-gdi\/\" \/>\n<meta property=\"og:site_name\" content=\"McAfee Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/McAfee\/\" \/>\n<meta property=\"article:published_time\" content=\"2021-06-28T19:44:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-07-05T13:05:38+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.mcafee.com\/blogs\/wp-content\/uploads\/2021\/06\/AdobeStock_349881038_614x300-1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"614\" \/>\n\t<meta property=\"og:image:height\" content=\"300\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Hardik Shah\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@hardik05\" \/>\n<meta name=\"twitter:site\" content=\"@McAfee\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Hardik Shah\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"16 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.mcafee.com\/blogs\/other-blogs\/mcafee-labs\/analyzing-cve-2021-1665-remote-code-execution-vulnerability-in-windows-gdi\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.mcafee.com\/blogs\/other-blogs\/mcafee-labs\/analyzing-cve-2021-1665-remote-code-execution-vulnerability-in-windows-gdi\/\"},\"author\":{\"name\":\"Hardik Shah\",\"@id\":\"https:\/\/www.mcafee.com\/blogs\/#\/schema\/person\/99cb905e9b4051dfea96a7752dea4342\"},\"headline\":\"Analyzing CVE-2021-1665 \u2013 Remote Code Execution Vulnerability in Windows GDI+\",\"datePublished\":\"2021-06-28T19:44:00+00:00\",\"dateModified\":\"2024-07-05T13:05:38+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.mcafee.com\/blogs\/other-blogs\/mcafee-labs\/analyzing-cve-2021-1665-remote-code-execution-vulnerability-in-windows-gdi\/\"},\"wordCount\":2248,\"publisher\":{\"@id\":\"https:\/\/www.mcafee.com\/blogs\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.mcafee.com\/blogs\/other-blogs\/mcafee-labs\/analyzing-cve-2021-1665-remote-code-execution-vulnerability-in-windows-gdi\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.mcafee.com\/blogs\/wp-content\/uploads\/2021\/06\/AdobeStock_349881038_614x300-1.jpg\",\"articleSection\":[\"McAfee Labs\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.mcafee.com\/blogs\/other-blogs\/mcafee-labs\/analyzing-cve-2021-1665-remote-code-execution-vulnerability-in-windows-gdi\/\",\"url\":\"https:\/\/www.mcafee.com\/blogs\/other-blogs\/mcafee-labs\/analyzing-cve-2021-1665-remote-code-execution-vulnerability-in-windows-gdi\/\",\"name\":\"Analyzing CVE-2021-1665 \u2013 Remote Code Execution Vulnerability in Windows GDI+ | McAfee Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.mcafee.com\/blogs\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.mcafee.com\/blogs\/other-blogs\/mcafee-labs\/analyzing-cve-2021-1665-remote-code-execution-vulnerability-in-windows-gdi\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.mcafee.com\/blogs\/other-blogs\/mcafee-labs\/analyzing-cve-2021-1665-remote-code-execution-vulnerability-in-windows-gdi\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.mcafee.com\/blogs\/wp-content\/uploads\/2021\/06\/AdobeStock_349881038_614x300-1.jpg\",\"datePublished\":\"2021-06-28T19:44:00+00:00\",\"dateModified\":\"2024-07-05T13:05:38+00:00\",\"description\":\"Introduction Microsoft Windows Graphics Device Interface+, also known as GDI+, allows various applications to use different graphics functionality on\",\"breadcrumb\":{\"@id\":\"https:\/\/www.mcafee.com\/blogs\/other-blogs\/mcafee-labs\/analyzing-cve-2021-1665-remote-code-execution-vulnerability-in-windows-gdi\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.mcafee.com\/blogs\/other-blogs\/mcafee-labs\/analyzing-cve-2021-1665-remote-code-execution-vulnerability-in-windows-gdi\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.mcafee.com\/blogs\/other-blogs\/mcafee-labs\/analyzing-cve-2021-1665-remote-code-execution-vulnerability-in-windows-gdi\/#primaryimage\",\"url\":\"https:\/\/www.mcafee.com\/blogs\/wp-content\/uploads\/2021\/06\/AdobeStock_349881038_614x300-1.jpg\",\"contentUrl\":\"https:\/\/www.mcafee.com\/blogs\/wp-content\/uploads\/2021\/06\/AdobeStock_349881038_614x300-1.jpg\",\"width\":614,\"height\":300,\"caption\":\"Consejos para protegerte de quienes intentan hackear tus correos electr\u00f3nicos\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.mcafee.com\/blogs\/other-blogs\/mcafee-labs\/analyzing-cve-2021-1665-remote-code-execution-vulnerability-in-windows-gdi\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog\",\"item\":\"https:\/\/www.mcafee.com\/blogs\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Other Blogs\",\"item\":\"https:\/\/www.mcafee.com\/blogs\/other-blogs\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"McAfee Labs\",\"item\":\"https:\/\/www.mcafee.com\/blogs\/other-blogs\/mcafee-labs\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Analyzing CVE-2021-1665 \u2013 Remote Code Execution Vulnerability in Windows GDI+\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.mcafee.com\/blogs\/#website\",\"url\":\"https:\/\/www.mcafee.com\/blogs\/\",\"name\":\"McAfee Blog\",\"description\":\"Internet Security News\",\"publisher\":{\"@id\":\"https:\/\/www.mcafee.com\/blogs\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.mcafee.com\/blogs\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.mcafee.com\/blogs\/#organization\",\"name\":\"McAfee\",\"url\":\"https:\/\/www.mcafee.com\/blogs\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.mcafee.com\/blogs\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.mcafee.com\/blogs\/wp-content\/uploads\/2023\/02\/mcafee-logo.png\",\"contentUrl\":\"https:\/\/www.mcafee.com\/blogs\/wp-content\/uploads\/2023\/02\/mcafee-logo.png\",\"width\":1286,\"height\":336,\"caption\":\"McAfee\"},\"image\":{\"@id\":\"https:\/\/www.mcafee.com\/blogs\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/McAfee\/\",\"https:\/\/x.com\/McAfee\",\"https:\/\/www.linkedin.com\/company\/mcafee\/\",\"https:\/\/www.youtube.com\/McAfee\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.mcafee.com\/blogs\/#\/schema\/person\/99cb905e9b4051dfea96a7752dea4342\",\"name\":\"Hardik Shah\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.mcafee.com\/blogs\/#\/schema\/person\/image\/b151596c8b1a8dc9b25ec3b19ccfd8c0\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/2b87a13b8b83a589e5494d7db597ad6a?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/2b87a13b8b83a589e5494d7db597ad6a?s=96&d=mm&r=g\",\"caption\":\"Hardik Shah\"},\"description\":\"Hardik Shah, a Senior Research Engineer in McAfee Labs, is an experienced security researcher and technology evangelist. He has extensive experience with exploits, malware analysis, and various IPS engines. Shah enjoys figuring out ways to protect customers from the latest threats. Prior to McAfee, he worked with the IPS research team at Symantec. You can follow him on twitter at @hardik05\",\"sameAs\":[\"https:\/\/www.linkedin.com\/in\/hardik05\/\",\"https:\/\/x.com\/hardik05\"],\"url\":\"https:\/\/www.mcafee.com\/blogs\/author\/hardik-shah\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Analyzing CVE-2021-1665 \u2013 Remote Code Execution Vulnerability in Windows GDI+ | McAfee Blog","description":"Introduction Microsoft Windows Graphics Device Interface+, also known as GDI+, allows various applications to use different graphics functionality on","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"og_locale":"en_US","og_type":"article","og_title":"Analyzing CVE-2021-1665 \u2013 Remote Code Execution Vulnerability in Windows GDI+ | McAfee Blog","og_description":"Introduction Microsoft Windows Graphics Device Interface+, also known as GDI+, allows various applications to use different graphics functionality on","og_url":"https:\/\/www.mcafee.com\/blogs\/other-blogs\/mcafee-labs\/analyzing-cve-2021-1665-remote-code-execution-vulnerability-in-windows-gdi\/","og_site_name":"McAfee Blog","article_publisher":"https:\/\/www.facebook.com\/McAfee\/","article_published_time":"2021-06-28T19:44:00+00:00","article_modified_time":"2024-07-05T13:05:38+00:00","og_image":[{"width":614,"height":300,"url":"https:\/\/www.mcafee.com\/blogs\/wp-content\/uploads\/2021\/06\/AdobeStock_349881038_614x300-1.jpg","type":"image\/jpeg"}],"author":"Hardik Shah","twitter_card":"summary_large_image","twitter_creator":"@hardik05","twitter_site":"@McAfee","twitter_misc":{"Written by":"Hardik Shah","Est. reading time":"16 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.mcafee.com\/blogs\/other-blogs\/mcafee-labs\/analyzing-cve-2021-1665-remote-code-execution-vulnerability-in-windows-gdi\/#article","isPartOf":{"@id":"https:\/\/www.mcafee.com\/blogs\/other-blogs\/mcafee-labs\/analyzing-cve-2021-1665-remote-code-execution-vulnerability-in-windows-gdi\/"},"author":{"name":"Hardik Shah","@id":"https:\/\/www.mcafee.com\/blogs\/#\/schema\/person\/99cb905e9b4051dfea96a7752dea4342"},"headline":"Analyzing CVE-2021-1665 \u2013 Remote Code Execution Vulnerability in Windows GDI+","datePublished":"2021-06-28T19:44:00+00:00","dateModified":"2024-07-05T13:05:38+00:00","mainEntityOfPage":{"@id":"https:\/\/www.mcafee.com\/blogs\/other-blogs\/mcafee-labs\/analyzing-cve-2021-1665-remote-code-execution-vulnerability-in-windows-gdi\/"},"wordCount":2248,"publisher":{"@id":"https:\/\/www.mcafee.com\/blogs\/#organization"},"image":{"@id":"https:\/\/www.mcafee.com\/blogs\/other-blogs\/mcafee-labs\/analyzing-cve-2021-1665-remote-code-execution-vulnerability-in-windows-gdi\/#primaryimage"},"thumbnailUrl":"https:\/\/www.mcafee.com\/blogs\/wp-content\/uploads\/2021\/06\/AdobeStock_349881038_614x300-1.jpg","articleSection":["McAfee Labs"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.mcafee.com\/blogs\/other-blogs\/mcafee-labs\/analyzing-cve-2021-1665-remote-code-execution-vulnerability-in-windows-gdi\/","url":"https:\/\/www.mcafee.com\/blogs\/other-blogs\/mcafee-labs\/analyzing-cve-2021-1665-remote-code-execution-vulnerability-in-windows-gdi\/","name":"Analyzing CVE-2021-1665 \u2013 Remote Code Execution Vulnerability in Windows GDI+ | McAfee Blog","isPartOf":{"@id":"https:\/\/www.mcafee.com\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.mcafee.com\/blogs\/other-blogs\/mcafee-labs\/analyzing-cve-2021-1665-remote-code-execution-vulnerability-in-windows-gdi\/#primaryimage"},"image":{"@id":"https:\/\/www.mcafee.com\/blogs\/other-blogs\/mcafee-labs\/analyzing-cve-2021-1665-remote-code-execution-vulnerability-in-windows-gdi\/#primaryimage"},"thumbnailUrl":"https:\/\/www.mcafee.com\/blogs\/wp-content\/uploads\/2021\/06\/AdobeStock_349881038_614x300-1.jpg","datePublished":"2021-06-28T19:44:00+00:00","dateModified":"2024-07-05T13:05:38+00:00","description":"Introduction Microsoft Windows Graphics Device Interface+, also known as GDI+, allows various applications to use different graphics functionality on","breadcrumb":{"@id":"https:\/\/www.mcafee.com\/blogs\/other-blogs\/mcafee-labs\/analyzing-cve-2021-1665-remote-code-execution-vulnerability-in-windows-gdi\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.mcafee.com\/blogs\/other-blogs\/mcafee-labs\/analyzing-cve-2021-1665-remote-code-execution-vulnerability-in-windows-gdi\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mcafee.com\/blogs\/other-blogs\/mcafee-labs\/analyzing-cve-2021-1665-remote-code-execution-vulnerability-in-windows-gdi\/#primaryimage","url":"https:\/\/www.mcafee.com\/blogs\/wp-content\/uploads\/2021\/06\/AdobeStock_349881038_614x300-1.jpg","contentUrl":"https:\/\/www.mcafee.com\/blogs\/wp-content\/uploads\/2021\/06\/AdobeStock_349881038_614x300-1.jpg","width":614,"height":300,"caption":"Consejos para protegerte de quienes intentan hackear tus correos electr\u00f3nicos"},{"@type":"BreadcrumbList","@id":"https:\/\/www.mcafee.com\/blogs\/other-blogs\/mcafee-labs\/analyzing-cve-2021-1665-remote-code-execution-vulnerability-in-windows-gdi\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog","item":"https:\/\/www.mcafee.com\/blogs\/"},{"@type":"ListItem","position":2,"name":"Other Blogs","item":"https:\/\/www.mcafee.com\/blogs\/other-blogs\/"},{"@type":"ListItem","position":3,"name":"McAfee Labs","item":"https:\/\/www.mcafee.com\/blogs\/other-blogs\/mcafee-labs\/"},{"@type":"ListItem","position":4,"name":"Analyzing CVE-2021-1665 \u2013 Remote Code Execution Vulnerability in Windows GDI+"}]},{"@type":"WebSite","@id":"https:\/\/www.mcafee.com\/blogs\/#website","url":"https:\/\/www.mcafee.com\/blogs\/","name":"McAfee Blog","description":"Internet Security News","publisher":{"@id":"https:\/\/www.mcafee.com\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.mcafee.com\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.mcafee.com\/blogs\/#organization","name":"McAfee","url":"https:\/\/www.mcafee.com\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mcafee.com\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/www.mcafee.com\/blogs\/wp-content\/uploads\/2023\/02\/mcafee-logo.png","contentUrl":"https:\/\/www.mcafee.com\/blogs\/wp-content\/uploads\/2023\/02\/mcafee-logo.png","width":1286,"height":336,"caption":"McAfee"},"image":{"@id":"https:\/\/www.mcafee.com\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/McAfee\/","https:\/\/x.com\/McAfee","https:\/\/www.linkedin.com\/company\/mcafee\/","https:\/\/www.youtube.com\/McAfee"]},{"@type":"Person","@id":"https:\/\/www.mcafee.com\/blogs\/#\/schema\/person\/99cb905e9b4051dfea96a7752dea4342","name":"Hardik Shah","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mcafee.com\/blogs\/#\/schema\/person\/image\/b151596c8b1a8dc9b25ec3b19ccfd8c0","url":"https:\/\/secure.gravatar.com\/avatar\/2b87a13b8b83a589e5494d7db597ad6a?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/2b87a13b8b83a589e5494d7db597ad6a?s=96&d=mm&r=g","caption":"Hardik Shah"},"description":"Hardik Shah, a Senior Research Engineer in McAfee Labs, is an experienced security researcher and technology evangelist. He has extensive experience with exploits, malware analysis, and various IPS engines. Shah enjoys figuring out ways to protect customers from the latest threats. Prior to McAfee, he worked with the IPS research team at Symantec. You can follow him on twitter at @hardik05","sameAs":["https:\/\/www.linkedin.com\/in\/hardik05\/","https:\/\/x.com\/hardik05"],"url":"https:\/\/www.mcafee.com\/blogs\/author\/hardik-shah\/"}]}},"_links":{"self":[{"href":"https:\/\/www.mcafee.com\/blogs\/wp-json\/wp\/v2\/posts\/123988","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mcafee.com\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mcafee.com\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mcafee.com\/blogs\/wp-json\/wp\/v2\/users\/612"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mcafee.com\/blogs\/wp-json\/wp\/v2\/comments?post=123988"}],"version-history":[{"count":3,"href":"https:\/\/www.mcafee.com\/blogs\/wp-json\/wp\/v2\/posts\/123988\/revisions"}],"predecessor-version":[{"id":196083,"href":"https:\/\/www.mcafee.com\/blogs\/wp-json\/wp\/v2\/posts\/123988\/revisions\/196083"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.mcafee.com\/blogs\/wp-json\/wp\/v2\/media\/122725"}],"wp:attachment":[{"href":"https:\/\/www.mcafee.com\/blogs\/wp-json\/wp\/v2\/media?parent=123988"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mcafee.com\/blogs\/wp-json\/wp\/v2\/categories?post=123988"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mcafee.com\/blogs\/wp-json\/wp\/v2\/tags?post=123988"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.mcafee.com\/blogs\/wp-json\/wp\/v2\/coauthors?post=123988"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}