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

ZH200502.txt

ZH200502.txt
Posted Nov 12, 2005
Authored by Kevin Fernandez aka Siegfried | Site zone-h.fr

Zone-H Research Center Security Advisory 200502 - phpAdsNew versions 2.0.6 and below suffer from SQL injection flaws. Exploitation details provided.

tags | exploit, sql injection
SHA-256 | 2bb01d8a857a347319337c91c213000292e3c3de4261bf1f0a85cb37550308b2

ZH200502.txt

Change Mirror Download
Zone-H Research Center Security Advisory 200502
http://www.zone-h.fr

Date of release: 11/11/2005
Software: phpAdsNew (www.phpadsnew.com)
Affected versions:
<= 2.0.6
2.0.7rc1 (latest CVS snapshot)
Risk: Medium
Discovered by: Kevin Fernandez "Siegfried" from the Zone-H Research Team

Background (from their web site)
----------
phpAdsNew is an open-source ad server, with an integrated banner
management interface and tracking system for gathering statistics.
With phpAdsNew you can easily rotate paid banners and your own
in-house advertisements. You can even integrate banners from third
party advertising companies.

Details
--------
Toni Koivunen has published an advisory yesterday regarding a
vulnerability exploitable via /admin/logout.php, that can be used to
delete arbitrary data (maybe more). However more sql injections are
present in this part of the code, all the functions in
/admin/lib-sessions.inc.php do not check the "sessionID" variable
coming from the cookie, the most interesting is
phpAds_SessionDataFetch() because it is called in config.php and makes
a simple SELECT query.

Snip:
[no previous check]
if (isset($HTTP_COOKIE_VARS['sessionID']) &&
$HTTP_COOKIE_VARS['sessionID'] != '')
{
$result = phpAds_dbQuery("SELECT sessiondata FROM
".$phpAds_config['tbl_session']." WHERE
sessionid='".$HTTP_COOKIE_VARS['sessionID']."'" .
" AND UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(lastused) < 3600"); <-- ouch

Since /admin/config.php is included in /admin/index.php, we don't need
to be authenticated to exploit the vulnerability.

PoC (cookie):
sessionID=adsds'/**/UNION/**/SELECT admin_pw from phpads_config into
outfile "/var/www/blah.txt"/*;

Just "exploit" one of the many errors in the pages to get the path and
here you go, open /admin/index.php with that as cookie.

Solution
---------
No patch.

Filter the variable in the affected functions.

Original advisories:
English version: http://www.zone-h.org/en/advisories/read/id=8413/
French: http://www.zone-h.fr/fr/advisories/read/id=674/
Login or Register to add favorites

File Archive:

May 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    May 1st
    44 Files
  • 2
    May 2nd
    5 Files
  • 3
    May 3rd
    11 Files
  • 4
    May 4th
    0 Files
  • 5
    May 5th
    0 Files
  • 6
    May 6th
    28 Files
  • 7
    May 7th
    3 Files
  • 8
    May 8th
    4 Files
  • 9
    May 9th
    54 Files
  • 10
    May 10th
    12 Files
  • 11
    May 11th
    0 Files
  • 12
    May 12th
    0 Files
  • 13
    May 13th
    17 Files
  • 14
    May 14th
    11 Files
  • 15
    May 15th
    17 Files
  • 16
    May 16th
    13 Files
  • 17
    May 17th
    22 Files
  • 18
    May 18th
    0 Files
  • 19
    May 19th
    0 Files
  • 20
    May 20th
    0 Files
  • 21
    May 21st
    0 Files
  • 22
    May 22nd
    0 Files
  • 23
    May 23rd
    0 Files
  • 24
    May 24th
    0 Files
  • 25
    May 25th
    0 Files
  • 26
    May 26th
    0 Files
  • 27
    May 27th
    0 Files
  • 28
    May 28th
    0 Files
  • 29
    May 29th
    0 Files
  • 30
    May 30th
    0 Files
  • 31
    May 31st
    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