<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>Posts on My Blog - Mahmood AlKhoori</title>
        <link>https://khoori.org/posts/</link>
        <description>Recent content in Posts on My Blog - Mahmood AlKhoori</description>
        <generator>Hugo -- gohugo.io</generator>
        <language>en-us</language>
        <lastBuildDate>Sat, 02 Apr 2022 22:38:24 +0400</lastBuildDate>
        <atom:link href="https://khoori.org/posts/index.xml" rel="self" type="application/rss+xml" />
        
        <item>
            <title>CVE-2022-0507</title>
            <link>https://khoori.org/posts/cve-2022-0507/</link>
            <pubDate>Sat, 02 Apr 2022 22:38:24 +0400</pubDate>
            
            <guid>https://khoori.org/posts/cve-2022-0507/</guid>
            <description>Introduction Found a potential security vulnerability inside the Pandora API. Affected Pandora FMS version range: all versions of NG version, up to OUM 759. This vulnerability could allow an attacker with authenticated IP to inject SQL.
CVE-2022-0507: SQL Injection Pandora FMS is a monitoring software that collects data from any system, generates alerts based on that data and shows graphs, reports and maps of our environment. There are two versions of Pandora FMS; a free or OpenSource version and a paid or Enterprise version, available starting from 100 devices.</description>
            <content type="html"><![CDATA[

<hr />

<h1 id="introduction">Introduction</h1>

<p>Found a potential security vulnerability inside the Pandora API. Affected Pandora FMS version range: all versions of NG version, up to OUM 759. This vulnerability could allow an attacker with authenticated IP to inject SQL.</p>

<h1 id="cve-2022-0507-sql-injection">CVE-2022-0507: SQL Injection</h1>

<p>Pandora FMS is a monitoring software that collects data from any system, generates alerts based on that data and shows graphs, reports and maps of our environment. There are two versions of Pandora FMS; a free or OpenSource version and a paid or Enterprise version, available starting from 100 devices.</p>

<h1 id="affected-product-s">Affected Product(s):</h1>

<p>Panadorafms
Product: Panadorafms Build 760.</p>

<h1 id="proof-of-concept-poc">Proof of Concept (PoC):</h1>

<p>The remote sql-injection web vulnerability can be exploited by remote attackers with privileged account and without user interaction.
For security demonstration or to reproduce the sql injection vulnerability follow the provided information and steps below to continue.</p>

<p>PoC: Example
/pandora_console/index.php?sec=view&amp;sec2=operation/devicelist</p>

<p>PoC: Exploitation
Name=test&amp;DeviceId=[ADD EXISITING DEFAULT VALUE]-[SQL-INJECTION!]</p>

<p>&mdash; PoC Session (POST) &mdash;
<a href="https://host/pandora_console/index.php?sec=view&amp;sec2=operation/devicelist" target="_blank">https://host/pandora_console/index.php?sec=view&amp;sec2=operation/devicelist</a>
Host: host
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,<em>/</em>;q=0.8
Content-Type: application/x-www-form-urlencoded
Origin: <a href="https://host" target="_blank">https://host</a>
Connection: keep-alive</p>

<p>Name=test&amp;DeviceId=[ADD EXISITING DEFAULT VALUE]-[SQL-INJECTION!]</p>

<h1 id="solution-fix-patch">Solution - Fix &amp; Patch:</h1>

<ol>
<li>Disallow sql-errors to be displayed in the frontend and backend. Disable to redisplay the broken or malicious query on client-side.</li>
<li>Use prepared statement to protect the sql query of the post method request</li>
<li>Restrict the post parameters by disallow the usage of special chars with single or double quotes</li>
<li>Setup a filter or validation class to deny broken or manipulated sql queries</li>
</ol>
]]></content>
        </item>
        
    </channel>
</rss>
