what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

CatBot 0.4.2 SQL Injection

CatBot 0.4.2 SQL Injection
Posted Jan 16, 2015
Authored by Paulos Yibelo, Vulnerability Laboratory | Site vulnerability-lab.com

CatBot version 0.4.2 suffers from a remote SQL injection vulnerability.

tags | exploit, remote, sql injection
SHA-256 | 8ca8d8041febb4bd7e87451a3b49b4a0db8053b94320613163e2349fd83ba080

CatBot 0.4.2 SQL Injection

Change Mirror Download
Document Title:
===============
CatBot v0.4.2 (PHP) - SQL Injection Vulnerability


References (Source):
====================
http://www.vulnerability-lab.com/get_content.php?id=1408


Release Date:
=============
2015-01-15


Vulnerability Laboratory ID (VL-ID):
====================================
1408


Common Vulnerability Scoring System:
====================================
7.3


Product & Service Introduction:
===============================
CatBot is a simple, HTML/PHP/MySQL based chatterbot that`s easy to set up and use. He comes equipped with a few commands, as well as a
basic `learning` ability. With some moderate tweaking, he could make a very nice browser-based helpdesk assistant.

( Copy of the vendor Homepage: http://sourceforge.net/projects/catbot/ )


Abstract Advisory Information:
==============================
An independent vulnerability laboratory researcher discovered a remote sql injection web vulnerability in the CateBot v0.4.2 web-application.


Vulnerability Disclosure Timeline:
==================================
2015-01-15: Public Disclosure (Vulnerability Laboratory)


Discovery Status:
=================
Published


Affected Product(s):
====================
GNU General Public License v2.0 (GPLv2)
Product: CatBot - Web Application 0.4.2


Exploitation Technique:
=======================
Remote


Severity Level:
===============
High


Technical Details & Description:
================================
A sql injection web vulnerability has been discovered in the official Lazarus Guestbook v1.22 content management system.
The vulnerability allows an attacker to inject sql commands by usage of a vulnerable value to compromise the application dbms.

The sql injection web vulnerability is located in the `lastcatbot` value of the `index.php` file. Remote attackers are
able to inject own sql commands by usage of vulnerable `lastcatbot` value in the update and pending POST method request.
A successful attack requires to manipulate a POST method request with vulnerable `lastcatbot` value. The injection is a
classic order-by sql injection web vulnerability.

The security risk of the sql injection vulnerability is estimated as high with a cvss (common vulnerability scoring system) count of 7.3.
Exploitation of the application-side web vulnerability requires no privileged web-application user account and no user interaction.
Successful exploitation of the security vulnerability results in content management system compromise and database management system compromise.

Request Method(s):
[+] POST

Vulnerable Module(s):
[+] Index & Update

Vulnerable Files(s):
[+] index.php

Vulnerable Parameter(s):
[+] lastcatbot


Proof of Concept (PoC):
=======================
The sql injection vulnerability can be exploited by remote attackers without privileged application user account and user interaction.
For security demonstration or to reproduce the vulnerability follow the provided information and steps below to continue.

Vulnerable File(s): /index.php

Vulnerable Source:
$result = mysql_query($query);
$query = "SELECT * FROM `pending` WHERE `trigger` =
'$lastcatbot' AND `reply` = '$usermessage';";
$lastcatbot = "Connect!"; // if(isset($_POST)) else ,
$lastcatbot = $_POST['lastcatbot']; //
if(isset($_POST)), - User input

Note: The request sends a POST method request with the vulnerable `lastcastbot` value were the attacker can inject the own sql commands!

... the regular update action is also vulnerable to the same issue.

Vulnerable Source:
$result = mysql_query($query);
$query = "UPDATE `pending` SET rnumber=rnumber+1 WHERE
`trigger` = '$lastcatbot';";
$lastcatbot = "Connect!"; // if(isset($_POST)) else ,
$lastcatbot = $_POST['lastcatbot']; // if(isset($_POST)),

Note: A similar UPDATE call can be easily exploited by intercepting the request!


Solution - Fix & Patch:
=======================
The vulnerability can be patched by a secure aprse and encode of the vulnerable `lastcastbot` value.
Use a prepared statement or escape to filter malicious inputs.


Security Risk:
==============
The security risk of the remote sql injection web vulnerability in the catbot application is estimated as high. (CVSS)


Credits & Authors:
==================
Paulos Yibelo (paulosyibelo.com)


Disclaimer & Information:
=========================
The information provided in this advisory is provided as it is without any warranty. Vulnerability Lab disclaims all warranties, either
expressed or implied, including the warranties of merchantability and capability for a particular purpose. Vulnerability-Lab or its suppliers
are not liable in any case of damage, including direct, indirect, incidental, consequential loss of business profits or special damages, even
if Vulnerability-Lab or its suppliers have been advised of the possibility of such damages. Some states do not allow the exclusion or limitation
of liability for consequential or incidental damages so the foregoing limitation may not apply. We do not approve or encourage anybody to break
any vendor licenses, policies, deface websites, hack into databases or trade with fraud/stolen material.

Domains: www.vulnerability-lab.com - www.vuln-lab.com - www.evolution-sec.com
Contact: admin@vulnerability-lab.com - research@vulnerability-lab.com - admin@evolution-sec.com
Section: dev.vulnerability-db.com - forum.vulnerability-db.com - magazine.vulnerability-db.com
Social: twitter.com/#!/vuln_lab - facebook.com/VulnerabilityLab - youtube.com/user/vulnerability0lab
Feeds: vulnerability-lab.com/rss/rss.php - vulnerability-lab.com/rss/rss_upcoming.php - vulnerability-lab.com/rss/rss_news.php
Programs: vulnerability-lab.com/submit.php - vulnerability-lab.com/list-of-bug-bounty-programs.php - vulnerability-lab.com/register/

Any modified copy or reproduction, including partially usages, of this file requires authorization from Vulnerability Laboratory. Permission to
electronically redistribute this alert in its unmodified form is granted. All other rights, including the use of other media, are reserved by
Vulnerability-Lab Research Team or its suppliers. All pictures, texts, advisories, source code, videos and other information on this website
is trademark of vulnerability-lab team & the specific authors or managers. To record, list (feed), modify, use or edit our material contact
(admin@vulnerability-lab.com or research@vulnerability-lab.com) to get a permission.

Copyright © 2015 | Vulnerability Laboratory [Evolution Security]



--
VULNERABILITY LABORATORY - RESEARCH TEAM
SERVICE: www.vulnerability-lab.com
CONTACT: research@vulnerability-lab.com
PGP KEY: http://www.vulnerability-lab.com/keys/admin@vulnerability-lab.com%280x198E9928%29.txt

Login or Register to add favorites

File Archive:

February 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Feb 1st
    16 Files
  • 2
    Feb 2nd
    19 Files
  • 3
    Feb 3rd
    0 Files
  • 4
    Feb 4th
    0 Files
  • 5
    Feb 5th
    24 Files
  • 6
    Feb 6th
    2 Files
  • 7
    Feb 7th
    10 Files
  • 8
    Feb 8th
    25 Files
  • 9
    Feb 9th
    37 Files
  • 10
    Feb 10th
    0 Files
  • 11
    Feb 11th
    0 Files
  • 12
    Feb 12th
    17 Files
  • 13
    Feb 13th
    20 Files
  • 14
    Feb 14th
    25 Files
  • 15
    Feb 15th
    15 Files
  • 16
    Feb 16th
    6 Files
  • 17
    Feb 17th
    0 Files
  • 18
    Feb 18th
    0 Files
  • 19
    Feb 19th
    35 Files
  • 20
    Feb 20th
    25 Files
  • 21
    Feb 21st
    18 Files
  • 22
    Feb 22nd
    15 Files
  • 23
    Feb 23rd
    0 Files
  • 24
    Feb 24th
    0 Files
  • 25
    Feb 25th
    0 Files
  • 26
    Feb 26th
    0 Files
  • 27
    Feb 27th
    0 Files
  • 28
    Feb 28th
    0 Files
  • 29
    Feb 29th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close