exploit the possibilities
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:

April 2024

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