{"id":16715,"date":"2021-07-07T12:11:59","date_gmt":"2021-07-07T10:11:59","guid":{"rendered":"https:\/\/herolab-usd.formwandler.rocks\/security-advisories\/usd-2021-0005\/"},"modified":"2021-12-30T16:40:45","modified_gmt":"2021-12-30T15:40:45","slug":"usd-2021-0005","status":"publish","type":"page","link":"https:\/\/herolab.usd.de\/en\/security-advisories\/usd-2021-0005\/","title":{"rendered":"usd-2021-0005"},"content":{"rendered":"<p>[et_pb_section fb_built=\"1\" _builder_version=\"4.9.4\" _module_preset=\"default\" background_color=\"#2E353D\" custom_padding=\"||0px|||\" global_colors_info=\"{}\"][et_pb_row _builder_version=\"4.9.4\" _module_preset=\"default\" global_colors_info=\"{}\"][et_pb_column type=\"4_4\" _builder_version=\"4.9.4\" _module_preset=\"default\" global_colors_info=\"{}\"][et_pb_text _builder_version=\"4.9.4\" _module_preset=\"cc5ac6f4-ebbd-4b3f-bc92-4dfc1f15fe2c\" global_colors_info=\"{}\"]<\/p>\n<h1>usd-2021-0005 | CheckPoint Identity Agent &lt; R81.018.0000<\/h1>\n<p><span><\/span><br \/><strong>Advisory ID<\/strong><span>: usd-2021-0005<\/span><br \/><strong>CVE Number<\/strong><span>: <a href=\"https:\/\/cve.mitre.org\/cgi-bin\/cvename.cgi?name=CVE-2021-30356\" target=\"_blank\" rel=\"noopener\">CVE-2021-30356<\/a><\/span><br \/><strong>Affected Product<\/strong><span>: CheckPoint Identity Agent<\/span><br \/><strong>Affected Version<\/strong><span>: &lt; R81.018.0000<\/span><br \/><strong>Vulnerability Type<\/strong><span>: Symlink Vulnerability<\/span><br \/><strong>Security Risk<\/strong><span>: High<\/span><br \/><strong>Vendor URL<\/strong><span>: <a href=\"https:\/\/www.checkpoint.com\/\" target=\"_blank\" rel=\"noopener\">https:\/\/www.checkpoint.com<\/a><\/span><br \/><strong>Vendor Status<\/strong><span>: Fixed<\/span><\/p>\n<h3><\/h3>\n<h3>Description<\/h3>\n<p>The CheckPoint Identity Agent allows low privileged users to write files to protected locations of the file system.<\/p>\n<p>Privileged file write vulnerabilities allow low privileged users to create or overwrite files in arbitrary locations of the file system. The impact of these attacks largely depends on the content that is written to the files. If the content is user controlled, privilege escalations are usually possible. Otherwise, the vulnerability can be used to perform Denial of Service attacks.<\/p>\n<p><span><\/span><\/p>\n<h3>Proof of Concept (PoC)<\/h3>\n<p>The CheckPoint Identity Agent allows users to collect information for the technical support. This information is collected to a Windows Cabinet file and stored within a user defined location. During the write operation that creates the Cabinet file, the service uses the permissions of the SYSTEM account, which allows low privileged users to create the Cabinet file in arbitrary locations of the file system. By using a symbolic link, the file name is also fully user controlled and the write operation can also be redirected to already existing files.<\/p>\n<p>In the following screenshot, a low privileged user account sets the log folder of the CheckPoint Identity Agent to a user controlled path on the file system. This is possible within the tray menu of the agent.<\/p>\n<p>[\/et_pb_text][et_pb_image src=\"https:\/\/herolab.usd.de\/wp-content\/uploads\/sites\/9\/2021\/07\/01-set-log-folder.png\" title_text=\"01-set-log-folder\" _builder_version=\"4.9.4\" _module_preset=\"default\" global_colors_info=\"{}\"][\/et_pb_image][et_pb_text _builder_version=\"4.9.4\" _module_preset=\"cc5ac6f4-ebbd-4b3f-bc92-4dfc1f15fe2c\" global_colors_info=\"{}\"]<\/p>\n<p><span>The <\/span><em>Cabinet file<\/em><span> that we will create soon has a naming scheme of <\/span><strong>CP_Identity_Agent_Logs_25-01-2021_17.07.11.cab<\/strong><span>. As the name contains the current time and the export takes a while, an reliable attack requires multiple symbolic links. For our demonstration, we use the following simple script to create these:<\/span><\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=\"4.9.4\" _module_preset=\"9e260d37-0be2-4a12-a10e-3ed7e27b6ac6\" global_colors_info=\"{}\"]C:\\Users\\tony\\Desktop\u203a type link.bat<br \/>\nC:\\ProgramData\\CreateSymlink.exe -p C:\\Linker\\CP_Identity_Agent_Logs_31-01-2021_12.13.00.cab C:\\Windows\\win.ini<br \/>\nC:\\ProgramData\\CreateSymlink.exe -p C:\\Linker\\CP_Identity_Agent_Logs_31-01-2021_12.13.01.cab C:\\Windows\\win.ini<br \/>\nC:\\ProgramData\\CreateSymlink.exe -p C:\\Linker\\CP_Identity_Agent_Logs_31-01-2021_12.13.02.cab C:\\Windows\\win.ini<br \/>\nC:\\ProgramData\\CreateSymlink.exe -p C:\\Linker\\CP_Identity_Agent_Logs_31-01-2021_12.13.03.cab C:\\Windows\\win.ini<br \/>\nC:\\ProgramData\\CreateSymlink.exe -p C:\\Linker\\CP_Identity_Agent_Logs_31-01-2021_12.13.04.cab C:\\Windows\\win.ini<br \/>\n[...]<\/code><\/pre>\n<p>[\/et_pb_text][et_pb_text _builder_version=\"4.9.4\" _module_preset=\"cc5ac6f4-ebbd-4b3f-bc92-4dfc1f15fe2c\" global_colors_info=\"{}\"]<\/p>\n<p>Within the script, we make obviously use of the <a href=\"https:\/\/github.com\/googleprojectzero\/symboliclink-testing-tools\" target=\"_blank\" rel=\"noopener\">symboliclink-testing-tools<\/a> by <a href=\"https:\/\/twitter.com\/tiraniddo\" target=\"_blank\" rel=\"noopener\">James Forshaw<\/a>.<br \/>After invoking the script, all possible file system locations for the to be generated <em>Cabinet file<\/em> point now to <strong>C:\\Windows\\win.ini<\/strong>, which is not writable for low privileged user accounts. Now we can request technical support information within the agents tray menu:<\/p>\n<p>[\/et_pb_text][et_pb_image src=\"https:\/\/herolab.usd.de\/wp-content\/uploads\/sites\/9\/2021\/07\/02-request-technical-support-info.png\" title_text=\"02-request-technical-support-info\" _builder_version=\"4.9.4\" _module_preset=\"default\" global_colors_info=\"{}\"][\/et_pb_image][et_pb_text _builder_version=\"4.9.4\" _module_preset=\"default\" global_colors_info=\"{}\"]<\/p>\n<p><span>When the export finished, the <\/span><strong>C:\\Windows\\win.ini<\/strong><span> file should be overwritten with the contents of the <\/span><em>Cabinet file<\/em><span>. The following listing shows the original and the new content of the file:<\/span><\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=\"4.9.4\" _module_preset=\"9e260d37-0be2-4a12-a10e-3ed7e27b6ac6\" global_colors_info=\"{}\"]C:\\\u203a type Windows\\win.ini<br \/>\n; for 16-bit app support<br \/>\n[fonts]<br \/>\n[extensions]<br \/>\n[mci extensions]<br \/>\n[files]<br \/>\n[Mail]<br \/>\nMAPI=1<\/p>\n<p>C:\\\u203a type C:\\Windows\\win.ini<br \/>\nMSCF [...]<\/code><\/pre>\n<p>[\/et_pb_text][et_pb_text _builder_version=\"4.9.4\" _module_preset=\"cc5ac6f4-ebbd-4b3f-bc92-4dfc1f15fe2c\" global_colors_info=\"{}\"]<\/p>\n<div class=\"e16902-22 x-container max width\">\n<div class=\"e16902-23 x-column x-sm x-1-1\">\n<h3>Fix<\/h3>\n<p><span>Whenever high privileged services write data into user controlled parts of the file system, they should make sure to impersonate the corresponding user during the operation.<\/span><br \/><span>Additionally, protection mechanisms can be implemented to avoid following symlinks during write operations.<\/span><\/p>\n<h3><\/h3>\n<h3>Timeline<\/h3>\n<ul>\n<li>2021-02-12 Vulnerability discovered by Tobias Neitzel<\/li>\n<li>2021-02-13 Initial contact with vendor<\/li>\n<li>2021-03-02 Vendor provides patch for retest<\/li>\n<li>2021-03-18 <a href=\"https:\/\/supportcenter.checkpoint.com\/supportcenter\/portal?eventSubmit_doGoviewsolutiondetails=&amp;solutionid=sk142952\" target=\"_blank\" rel=\"noopener\">Patch published by vendor in release R81.018.0000<\/a><\/li>\n<li>2021-03-31 Security Advisory released<\/li>\n<\/ul>\n<h3><\/h3>\n<h3>Credits<\/h3>\n<p><span>This security vulnerability was discovered by <\/span><a href=\"https:\/\/twitter.com\/qtc_de\" target=\"_blank\" rel=\"noopener\">Tobias Neitzel<\/a><span> of usd AG.<\/span><\/p>\n<\/div>\n<\/div>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][\/et_pb_section]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>usd-2021-0005 | CheckPoint Identity Agent &lt; R81.018.0000 Advisory ID: usd-2021-0005CVE Number: CVE-2021-30356Affected Product: CheckPoint Identity AgentAffected Version: &lt; R81.018.0000Vulnerability Type: Symlink VulnerabilitySecurity Risk: HighVendor URL: https:\/\/www.checkpoint.comVendor Status: Fixed Description The CheckPoint Identity Agent allows low privileged users to write files to protected locations of the file system. Privileged file write vulnerabilities allow low privileged users [&hellip;]<\/p>\n","protected":false},"author":96,"featured_media":0,"parent":16124,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_et_pb_use_builder":"on","_et_pb_old_content":"","_et_gb_content_width":"","inline_featured_image":false,"footnotes":""},"class_list":["post-16715","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/pages\/16715","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/users\/96"}],"replies":[{"embeddable":true,"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/comments?post=16715"}],"version-history":[{"count":0,"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/pages\/16715\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/pages\/16124"}],"wp:attachment":[{"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/media?parent=16715"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}