{"id":2600,"date":"2023-01-17T13:37:59","date_gmt":"2023-01-17T12:37:59","guid":{"rendered":"https:\/\/www.dsecbypass.com\/?p=2600"},"modified":"2024-02-07T09:15:25","modified_gmt":"2024-02-07T08:15:25","slug":"centreon-map-vulnerability","status":"publish","type":"post","link":"https:\/\/www.dsecbypass.com\/en\/centreon-map-vulnerability\/","title":{"rendered":"Centreon map vulnerability"},"content":{"rendered":"<p>[et_pb_section fb_built=&#8221;1&#8243; _builder_version=&#8221;4.17.3&#8243; _module_preset=&#8221;default&#8221; custom_padding=&#8221;0px||||false|false&#8221; global_colors_info=&#8221;{}&#8221;][et_pb_row _builder_version=&#8221;4.17.3&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.17.3&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221;][et_pb_image src=&#8221;https:\/\/www.dsecbypass.com\/wp-content\/uploads\/2023\/01\/Centreon_Logo_RVB_HD_Cut_compress-300&#215;67.png&#8221; alt=&#8221;Centreon&#039;s logo&#8221; title_text=&#8221;Centreon&#039;s Logo&#8221; align=&#8221;center&#8221; _builder_version=&#8221;4.19.4&#8243; _module_preset=&#8221;default&#8221; background_color=&#8221;RGBA(255,255,255,0)&#8221; width=&#8221;50%&#8221; module_alignment=&#8221;center&#8221; global_colors_info=&#8221;{}&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.23.2&#8243; _module_preset=&#8221;default&#8221; hover_enabled=&#8221;0&#8243; global_colors_info=&#8221;{}&#8221; sticky_enabled=&#8221;0&#8243;]<\/p>\n<p style=\"text-align: justify;\">Vladimir had the opportunity to test the security of the <a href=\"https:\/\/docs.centreon.com\/fr\/docs\/graph-views\/introduction-map\/\" target=\"_blank\" rel=\"noopener\" title=\"Centreon map plugin documentation\">Centreon MAP<\/a> plugin (centreon-map-server) during an <a href=\"https:\/\/www.dsecbypass.com\/en\/internal-pentest\/\" title=\"Internal security audits\">internal pentest<\/a> on a monitoring infrastructure.<\/p>\n<p style=\"text-align: justify;\">According to the documentation, this plugin &#8220;is capable of displaying efficient graphical overviews and mapping correlated data into user-relevant custom views.&#8221; It is an extension that requires a valid Centreon License.<\/p>\n<p style=\"text-align: justify;\">Our pentester discovered an authentication bypass at the plugin API level followed by remote access to process memory. This could allow an unauthenticated attacker with access to the Web interface to recover all the secrets found in the process&#8217;s memory, which notably includes all the secrets used by the Centreon checks.<\/p>\n<p style=\"text-align: justify;\">Centreon being more often than not a central component in an Information System, this information leak can lead to the compromise of other applications and servers, or even of the IS as a whole.<\/p>\n<p style=\"text-align: justify;\">The vulnerability, with a <a href=\"https:\/\/nvd.nist.gov\/vuln-metrics\/cvss\/v3-calculator?vector=AV:N\/AC:L\/PR:N\/UI:N\/S:C\/C:H\/I:N\/A:N\" title=\"Centreon MAP CVSS vulnerability score\" target=\"_blank\" rel=\"noopener\">CVSSv3 8.3 score<\/a>, has been fixed in the following versions:<\/p>\n<blockquote>\n<p>centreon-map-21.10.8<\/p>\n<p>centreon-map-22.04.2<\/p>\n<p>centreon-map-22.10.1<\/p>\n<\/blockquote>\n<p>A mention of the vulnerability can be found in the <a href=\"https:\/\/docs.centreon.com\/fr\/docs\/releases\/centreon-commercial-extensions\/#22101-1\" title=\"Centreon MAP plugin security fix\" target=\"_blank\" rel=\"noopener\">plugin&#8217;s release notes<\/a> as well as in the <a href=\"https:\/\/github.com\/centreon\/centreon\/security\/policy#security-acknowledgement\" title=\"Acknowledgments of security researchers\" target=\"_blank\" rel=\"noopener\">acknowledgments<\/a> on Centreon&#8217;s GitHub.<\/p>\n<p>[\/et_pb_text][et_pb_text module_id=&#8221;sauvegarder&#8221; _builder_version=&#8221;4.23.2&#8243; _module_preset=&#8221;default&#8221; hover_enabled=&#8221;0&#8243; global_colors_info=&#8221;{}&#8221; sticky_enabled=&#8221;0&#8243;]<\/p>\n<h2 class=\"part\" data-startline=\"14\" data-endline=\"14\">Vulnerability analysis<\/h2>\n<p style=\"text-align: justify;\">The plugin exposes a &#8220;beta&#8221; API whose <a href=\"https:\/\/docs.centreon.com\/fr\/docs\/api\/graph-views-api\/\" title=\"Beta API documentation\" target=\"_blank\" rel=\"noopener\">documentation<\/a> is public.<\/p>\n<p style=\"text-align: justify;\">In order to call the API in an authenticated way, a &#8220;Studio-Session&#8221; HTTP header must be sent. Its content is given by the API in the &#8220;studioSession&#8221; JSON variable upon successful authentication.<\/p>\n<p style=\"text-align: justify;\">Having no accounts to authenticate to the API, the pentester quickly tries a few weak login\/password combinations on the following API endpoint:<\/p>\n<blockquote>\n<p style=\"text-align: justify;\">POST \/centreon-studio\/api\/beta\/authentication<\/p>\n<\/blockquote>\n<p style=\"text-align: justify;\">&#8220;admin:admin&#8221;, &#8220;admin:centreon&#8221;, &#8220;admin:password&#8221;&#8230;<\/p>\n<p style=\"text-align: justify;\">Each time, the same message is returned by the application suggesting that the accounts are not valid:<\/p>\n<p style=\"text-align: justify;\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dsecbypass.com\/wp-content\/uploads\/2023\/01\/centreonmap_login-300x134.png\" alt=\"Centreon map api login\" class=\"wp-image-2571 aligncenter size-medium\" width=\"300\" height=\"134\" srcset=\"https:\/\/www.dsecbypass.com\/wp-content\/uploads\/2023\/01\/centreonmap_login-300x134.png 300w, https:\/\/www.dsecbypass.com\/wp-content\/uploads\/2023\/01\/centreonmap_login.png 422w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p style=\"text-align: justify;\">\n<p style=\"text-align: justify;\">Then comes the test with an account name that is unlikely to exist:<\/p>\n<p style=\"text-align: justify;\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dsecbypass.com\/wp-content\/uploads\/2023\/01\/centreonmap_login_fail-300x152.png\" alt=\"Login API centreon map fail\" class=\"wp-image-2575 aligncenter size-medium\" width=\"300\" height=\"152\" srcset=\"https:\/\/www.dsecbypass.com\/wp-content\/uploads\/2023\/01\/centreonmap_login_fail-300x152.png 300w, https:\/\/www.dsecbypass.com\/wp-content\/uploads\/2023\/01\/centreonmap_login_fail.png 364w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p style=\"text-align: justify;\">Interesting ! Could it be that all the first tests are actually valid?<\/p>\n<p style=\"text-align: justify;\">Using one of the <em>studioSession<\/em> cookies on an authenticated endpoint validates the first vulnerability: the beta Centreon Map API <em>only needs<\/em> a valid username to authenticate the user. In this case, the admin account allows authentication with any password.<\/p>\n<p style=\"text-align: justify;\">The <a href=\"https:\/\/docs.centreon.com\/docs\/graph-views\/troubleshooter\/\" target=\"_blank\" rel=\"noopener\" title=\"Troubleshooting documentation of Centreon MAP\">troubleshooting<\/a> documentation mentions an eye-catching call:<\/p>\n<blockquote>\n<p style=\"text-align: justify;\">GET \/centreon-studio\/api\/beta\/actuator\/health<\/p>\n<\/blockquote>\n<p style=\"text-align: justify;\">The Spring Boot Actuator was previously covered in the <a href=\"https:\/\/www.dsecbypass.com\/en\/love-actuator\/\" title=\"Actutator Apereo CAS exploitation\">Apereo CAS configuration flaw article<\/a>. It is always interesting to enumerate which functionalities are exposed by the Actuator service.<\/p>\n<p style=\"text-align: justify;\">Using the newly acquired admin session, Vladimir proceeds to list the available Actuator calls by simply accessing:<\/p>\n<blockquote>\n<p style=\"text-align: justify;\">GET \/centreon-studio\/api\/beta\/actuator\/<\/p>\n<\/blockquote>\n<p style=\"text-align: justify;\">&#8220;health&#8221;, &#8220;beans&#8221;, &#8220;env&#8221;, &#8220;configprops&#8221;, &#8220;loggers&#8221;, &#8220;jolokia&#8221;, &#8220;heapdump&#8221;&#8230; many possibilities of exploitation are present. But for some obscure reason, only GET requests seem to be accepted and although listed, Jolokia does not seem accessible (no Jolokia RCE then&#8230;).<\/p>\n<p style=\"text-align: justify;\"><em>Heapdump<\/em>, on the other hand, works fine and allows the pentester to recover memory from the process. To his surprise, the <em>dump<\/em> contains the Centreon check command lines with, in particular, the accounts used to access the services.<\/p>\n<p style=\"text-align: justify;\">The second Centreon Map vulnerability is therefore to have left sensitive Actuator calls by default that can allow, depending on the configuration of the targeted Centreon application, to gain access to other components of the Information System.<\/p>\n<p style=\"text-align: justify;\">[\/et_pb_text][et_pb_text module_id=&#8221;virus&#8221; _builder_version=&#8221;4.19.4&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221;]<\/p>\n<h2>POC<\/h2>\n<p>Linux commands to reproduce the vulnerability :<\/p>\n<p>\n<script src=\"https:\/\/gist.github.com\/vtoutain\/2138759c75b99b83840a30c094414660.js\"><\/script>\n<\/p>\n<p>[\/et_pb_text][et_pb_text module_id=&#8221;mobiles&#8221; _builder_version=&#8221;4.23.2&#8243; _module_preset=&#8221;default&#8221; hover_enabled=&#8221;0&#8243; global_colors_info=&#8221;{}&#8221; sticky_enabled=&#8221;0&#8243;]<\/p>\n<h2>Recommendations<\/h2>\n<p>The recommendations are to be addressed on two levels: the software publisher, and the configuration of Centreon.<\/p>\n<p>The correction part of the Centreon MAP plugin revolves around the change of the source code related to authentication, in order to verify the password, as well as the default deactivation of sensitive Actuator endpoints.<\/p>\n<p>Regarding the installation of Centreon, it is necessary to reduce the attack surface as much as possible and to respect the principle of least privilege:<\/p>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li>Use accounts with the minimum privileges necessary for the checks carried out<\/li>\n<li>Use complex and unique secrets and passwords, which cannot be reused in a <a href=\"https:\/\/owasp.org\/www-community\/attacks\/Password_Spraying_Attack\" target=\"_blank\" rel=\"noopener\" title=\"OWASP password spraying\">password spraying<\/a> attack for example<\/li>\n<li>Only expose Centreon web interfaces and administration services to relevant personnel (e.g. to an administration VLAN only)<\/li>\n<li>Apply Centreon security recommendations: <a href=\"https:\/\/docs.centreon.com\/docs\/administration\/secure-platform\/\" target=\"_blank\" rel=\"noopener\">https:\/\/docs.centreon.com\/docs\/administration\/secure-platform\/<\/a> and <a href=\"https:\/\/docs.centreon.com\/docs\/graph-views\/secure-your-map-platform\/\" target=\"_blank\" rel=\"noopener\">https:\/\/docs.centreon.com\/docs\/graph-views\/secure-your-map-platform\/<\/a><\/li>\n<li>Keep components up to date (core and extensions)<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>These advices are to be adapted according to the context of each one.<\/p>\n<p>[\/et_pb_text][et_pb_text module_id=&#8221;motsdepasse&#8221; _builder_version=&#8221;4.23.2&#8243; _module_preset=&#8221;default&#8221; hover_enabled=&#8221;0&#8243; global_colors_info=&#8221;{}&#8221; sticky_enabled=&#8221;0&#8243;]<\/p>\n<h2>Communication with the software publisher<\/h2>\n<p style=\"text-align: justify;\">Centreon&#8217;s Coordinated Disclosure process is well documented at the following URL: <a href=\"https:\/\/github.com\/centreon\/centreon\/security\/policy#security-policy\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/centreon\/centreon\/security\/policy#security-policy<\/a>.<\/p>\n<p style=\"text-align: justify;\">The response was quick, and the vulnerability management and communication process very well handled by Centreon.<\/p>\n<p><span style=\"text-decoration: underline;\">16\/11\/2022:<\/span> First email sent by Vladimir following the Centreon process<\/p>\n<p><span style=\"text-decoration: underline;\">16\/11\/2022:<\/span> Response from Centreon indicating that they are starting the analysis<\/p>\n<p><span style=\"text-decoration: underline;\">17\/11\/2022:<\/span> The vulnerability is reproduced and Centreon validates the proposed severity (CVSSv3 8.3)<\/p>\n<p><span style=\"text-decoration: underline;\">22\/11\/2022:<\/span> Synchronization meeting with Centreon<\/p>\n<p><span style=\"text-decoration: underline;\">29\/11\/2022:<\/span> Publication of corrected versions<\/p>\n<p><span style=\"text-decoration: underline;\">17\/01\/2023:<\/span> Mention on the Centreon GitHub security page<\/p>\n<p><span style=\"text-decoration: underline;\">19\/01\/2023:<\/span> Publication of this article<\/p>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][et_pb_row _builder_version=&#8221;4.17.3&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.17.3&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221;][et_pb_text _builder_version=&#8221;4.23.2&#8243; _module_preset=&#8221;default&#8221; hover_enabled=&#8221;0&#8243; global_colors_info=&#8221;{}&#8221; sticky_enabled=&#8221;0&#8243;]<\/p>\n<p style=\"text-align: justify;\"><span>\ud83d\udee1\ufe0f DSecBypass accompanies you on your <a href=\"https:\/\/www.dsecbypass.com\/en\/internal-pentest\/\" title=\"internal pentests\">internal security audits<\/a>. Do not hesitate to <a href=\"https:\/\/www.dsecbypass.com\/en\/contact\/\">contact <\/a>us for additional information and\/or a personalized quote \ud83d\udcdd.<\/span><\/p>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][et_pb_row _builder_version=&#8221;4.17.3&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.17.3&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221;][et_pb_button button_url=&#8221;https:\/\/www.dsecbypass.com\/en\/contact\/&#8221; button_text=&#8221;CONTACT US&#8221; button_alignment=&#8221;center&#8221; _builder_version=&#8221;4.17.4&#8243; _module_preset=&#8221;default&#8221; custom_button=&#8221;on&#8221; button_text_size=&#8221;13px&#8221; button_bg_color=&#8221;#4328b7&#8243; button_border_width=&#8221;10px&#8221; button_border_color=&#8221;#4328b7&#8243; button_border_radius=&#8221;0px&#8221; button_letter_spacing=&#8221;2px&#8221; button_font=&#8221;Titillium Web|700||on|||||&#8221; background_layout=&#8221;dark&#8221; global_colors_info=&#8221;{}&#8221;][\/et_pb_button][\/et_pb_column][\/et_pb_row][\/et_pb_section]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Technical details on the vulnerability discovered by Vladimir and affecting the Centreon Map extension.<\/p>\n","protected":false},"author":4,"featured_media":2572,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"on","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[34],"tags":[],"class_list":["post-2600","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog-en"],"_links":{"self":[{"href":"https:\/\/www.dsecbypass.com\/en\/wp-json\/wp\/v2\/posts\/2600","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dsecbypass.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dsecbypass.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dsecbypass.com\/en\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dsecbypass.com\/en\/wp-json\/wp\/v2\/comments?post=2600"}],"version-history":[{"count":39,"href":"https:\/\/www.dsecbypass.com\/en\/wp-json\/wp\/v2\/posts\/2600\/revisions"}],"predecessor-version":[{"id":3208,"href":"https:\/\/www.dsecbypass.com\/en\/wp-json\/wp\/v2\/posts\/2600\/revisions\/3208"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.dsecbypass.com\/en\/wp-json\/wp\/v2\/media\/2572"}],"wp:attachment":[{"href":"https:\/\/www.dsecbypass.com\/en\/wp-json\/wp\/v2\/media?parent=2600"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dsecbypass.com\/en\/wp-json\/wp\/v2\/categories?post=2600"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dsecbypass.com\/en\/wp-json\/wp\/v2\/tags?post=2600"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}