SecurityReason.com - Our Reason is

Security

Register | Forget Password | Login
SecurityReason
WLB
Services
RSS
Corporate
Note

If you have found a vulnerability, please send to our SecurityAlert Database :
secalert()securityreason()com

Also if you have new ( 0-day ) exploit, please send to our ExploitAlert Archive :
exploit()securityreason()com

Home arrow SecurityAlert Database

Arrow  Topic :

Affiliate Network Pro v7.2 SQL Injections, Arbitrary code execution, XSS


Arrow  SecurityAlert : 184
Arrow  CVE : CVE-2005-3796
Arrow  SecurityRisk : High  Security Risk High  (About)
Arrow  Remote Exploit : Yes
Arrow  Local Exploit : No
Arrow  Exploit Available : Yes
Arrow  Credit : Robin Verton
Arrow  Published : 15.11.2005

Arrow  Affected Software : Affiliate Network Pro v7.2



Arrow  Advisory Content :  

Affiliate Network Pro v7.2 SQL Injections, Arbitrary code execution, XSS
========================================================================

Software: Affiliate Network Pro v7.2
Severity: SQL Injection(s), Arbitrary code execution, XSS
Risk: High
Author: Robin Verton <r.verton (at) gmail (dot) com [email concealed]>
Date: Nov. 15 2005
Vendor: www.alstrasoft.com

Description:

AlstraSoft Affiliate Network Pro is the next generation affiliate network
software solution that allows
you to start your own successful affiliate network just like LinkShare and
Commission Junction.
[http://www.alstrasoft.com/]

Details:

1) /admin/admin_validate_login.php (with magic_quotes_gpc = Off)

$login =(trim($_POST['login'])); // login name
$passwd =(trim($_POST['passwd'])); // login passord

[...]

$sql ="SELECT * FROM partners_admin where admin_login='$login'
AND admin_password='$passwd'";
$result =mysql_query($sql);

Because of no input validation it is possible to injectio malicious
code. By submitting (at the index.php login-form)
with the username admin and the password ' OR '1'='1 you can log in as
an administrator.

2) /admin/admin_options_manage.php

$number=trim($_POST['number']);
$number =$number; //Notice by auditor: Great code here ;p
if($number){
$filename ="../includes/constants.php";
$fd = fopen ($filename, "r");
$contents = fread ($fd, filesize ($filename));
fclose($fd);

$conts =explode("n",$contents);
$n =count($conts);
for ($i=0; $i<$n; $i++) {
$tmp =explode("=",$conts[$i]);
$tmp1 =trim($tmp[0]);

if($tmp1=="$"."lines"){
$conts[$i]
=str_replace($lines,$number,$conts[$i]);
continue;
}
}

$fd = fopen ($filename, "w");
$cont1 =implode("n",$conts);
fwrite($fd,$cont1);
fclose($fd);

Because the input of $_POST['numbers'] is not validated you can write each
code you want into the /includes/constants.php file.
Example input to view a phpinfo() each time the /includes/constant.php
is included or accessed:

0; phpinfo()

3) /admin/index.php XSS Vulnerability

Via the $Err - which is not validated against XSS - you can insert
HTML-Code

/admin/index.php?Err=<script>alert('foobar');</script>

4) /index.php?Act=register XSS Vulnerabilities

Same as in the /admin/index.php file - all fields in the register-form
like $firstname, $lastname or $fax are vulnernable to XSS-attacks.

/index.php?Act=register&firstname=<script>alert('weeow :D');</script>
/index.php?Act=register&lastname=<script>alert('weeow :D');</script>

5) /login_validate.php (with magic_quotes_gpc = Off)

$login =trim($_POST['login']); //login email id
$passwd =trim($_POST['password']); //password
$flag =trim($_POST['flag']);
//differentiate merchant and affiliate

$sql ="SELECT * FROM partners_login where login_email='$login' AND
login_password='$passwd' and login_flag='$type'";
$result =mysql_query($sql);

Like in the admin-login-form the user-input isn't validated here, too. Same
dimension - you can log in as an random user or
insert malicious code.

6) /togateway.php Path disclosure

Because of the insufficient check if a file is direct access or
not you can disclose here the path of the affiliate application.
This file is only an exmaple, nearly EVERY file who shouldn't be access
trough direct browsing can be access directly !

There are a few more SQL-Injections in this software, too much too count
them all here.


Patch:
Best way to secure Affiliate Network Pro is to set
magic_quotes_gpc in the php.ini ON or to insert a global addslashes for the
User-submitted variables.

Credits:

Credit goes to Robin Verton

References:

[1] http://www.alstrasoft.com/affiliate.htm
[2] http://myblog.it-security23.net





Arrow  Feedback :

If you have additional information or notice any errors regarding this security advisory, please use contact form or email us at info()securityreason()com.
Alert

libc:fts_*() Multiple Denial of Service

Security Risk Medium- 2009-10-02

The fts functions are provided for traversing UNIX file hierarchies...

Apache RSS Apache Alert

» Apache 1.3.41 mod_proxy
   Integer overflow (code
   execution)

» Apache Tomcat 6.0.20 and
   5.5.28 unexpected file
   deletion in work
   directory

» Apache Tomcat 6.0.20 and
   5.5.28 insecure partial
   deploy after failed
   undeploy

» Apache Tomcat 6.0.20 and
   5.5.28 unexpected file
   deletion and/or
   alteration

PHP RSS PHP Alert

» PHP 5.2.12/5.3.1
   session.save_path
   safe_mode and
   open_basedir bypass

» PHP 5.2.12/5.3.1 Multiple
   Vulnerabilities

» PHP 5.2.11 libgd multiple
   vulnerabilities

» PHP 5.2.11 tempnam()
   safe_mode bypass

Copyright © SecurityReason.com. All Rights Reserved.