[phpBB Debug] PHP Warning: in file [ROOT]/feed.php on line 173: Cannot modify header information - headers already sent by (output started at [ROOT]/feed.php:1)
[phpBB Debug] PHP Warning: in file [ROOT]/feed.php on line 174: Cannot modify header information - headers already sent by (output started at [ROOT]/feed.php:1)
[phpBB Debug] PHP Warning: in file [ROOT]/feed.php on line 180: Cannot modify header information - headers already sent by (output started at [ROOT]/feed.php:1)
IntegraMOD Home of phpBB Integrated Modifications 2006-09-26T16:44:14-07:00 http://integramod.com/forum/feed.php?f=17&t=1604 2006-09-26T16:44:14-07:00 2006-09-26T16:44:14-07:00 http://integramod.com/forum/viewtopic.php?t=1604&p=15887#p15887 <![CDATA[[Solved] Verified SQL injection in IM1.4.0]]>
"Unregistered";p="15702" wrote:
Solved!

http://integramod.com/forum/viewtopic.php?t=1944


This really doesn't solve the injection. It solves another problem which in turn takes care of the issue you reported. To stop sql injection you merely escape your syntax properly.

So instead of $SQL = "SELECT * FROM table WHERE column=$variable";

you use $SQL = "SELECT * FROM table WHERE column='".$variable."';

This way no matter what is inputted it is properly sent to the database as a variable and not as an injection.

Statistics: Posted Author: computerz — Tue Sep 26, 2006 4:44 pm


]]>
2006-09-20T12:27:43-07:00 2006-09-20T12:27:43-07:00 http://integramod.com/forum/viewtopic.php?t=1604&p=15702#p15702 <![CDATA[[Solved] Verified SQL injection in IM1.4.0]]>
http://integramod.com/forum/viewtopic.php?t=1944

Statistics: Posted Author: Unregistered — Wed Sep 20, 2006 12:27 pm


]]>
2006-08-27T06:11:01-07:00 2006-08-27T06:11:01-07:00 http://integramod.com/forum/viewtopic.php?t=1604&p=14209#p14209 <![CDATA[[Solved] Verified SQL injection in IM1.4.0]]>
http://integramod.com/forum/viewtopic.php?t=1583

Statistics: Posted Author: Unregistered — Sun Aug 27, 2006 6:11 am


]]>
2006-08-26T18:45:41-07:00 2006-08-26T18:45:41-07:00 http://integramod.com/forum/viewtopic.php?t=1604&p=14178#p14178 <![CDATA[Re: Verified SQL injection in IM1.4.0 (source inspection)]]>

I think he was saying that a hacker could use a URL command line that would allow them to insert something into your SQL database, by taking advantage of a security hole in the includes/function.php.

Its the line of code that allows people to choose their own template.


Somebody please correct me if Im wrong... <img>

Statistics: Posted Author: Drop-Forged — Sat Aug 26, 2006 6:45 pm


]]>
2006-08-26T17:35:02-07:00 2006-08-26T17:35:02-07:00 http://integramod.com/forum/viewtopic.php?t=1604&p=14166#p14166 <![CDATA[[Solved] Verified SQL injection in IM1.4.0]]>
"Unregistered";p="12044" wrote:
Original link : http://www.attrition.org/pipermail/vim/ ... 00847.html

Ref:

BUGTRAQ:20060606 Multiple Sql injection and XSS in integramod portal
URL:http://www.securityfocus.com/archive/1/archive/1/436457/100/0/threaded

Some VDB's didn't list the SQL injection, but they listed the XSS.

notice in the Bugtraq post that the demo URL is:

http://target/index.php?STYLE_URL=%2527

which decodes to &quot;%27&quot; which, itself, decodes to &quot;'&quot;


So, we have SQL injection by double-decoding.


from includes/functions.php of a 1.4.0 download:

if ( isset($HTTP_POST_VARS[STYLE_URL]) || isset($HTTP_GET_VARS[STYLE_URL]) )
{
$style = urldecode( (isset($HTTP_POST_VARS[STYLE_URL])) ? $HTTP_POST_VARS[STYLE_URL] : $HTTP_GET_VARS[STYLE_URL] );
if ( $theme = setup_style($style) )
{

....

if ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_style']) )
{
$style = $HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_style'];
if ( $theme = setup_style($style) )
{


...

function setup_style($style)
{
global $db, $board_config, $template, $images, $phpbb_root_path, $var_cache, $portal_config, $current_template_path;

// BEGIN Style Select MOD
if ( intval($style) == 0 )
{
$sql = &quot;SELECT themes_id
FROM &quot; . THEMES_TABLE . &quot;
WHERE style_name = '$style'&quot;;



So... setup_style() checks if its $style argument equates to an
integer value of 0, which is the case with most arbitrary non-numeric
strings as I understand it.

But it then just feeds '$style' into a SQL query.

I would venture a guess that the &quot;%2527&quot; string is first decoded to
&quot;%27&quot; by PHP itself (this is mentioned in a comment in the online PHP
manual entry for urlencode), and then the &quot;urldecode&quot; call will then
translate the &quot;%27&quot; to a &quot;'&quot;.


- Steve



um.. what?

Statistics: Posted Author: Dioncecht — Sat Aug 26, 2006 5:35 pm


]]>
2006-08-26T04:48:41-07:00 2006-08-26T04:48:41-07:00 http://integramod.com/forum/viewtopic.php?t=1604&p=14101#p14101 <![CDATA[Re: Verified SQL injection in IM1.4.0 (source inspection)]]> Statistics: Posted Author: ihammo — Sat Aug 26, 2006 4:48 am


]]>
2006-07-20T14:43:40-07:00 2006-07-20T14:43:40-07:00 http://integramod.com/forum/viewtopic.php?t=1604&p=12209#p12209 <![CDATA[Re: Verified SQL injection in IM1.4.0 (source inspection)]]> http://127.0.0.1 ?

The followin codes are to prevent Santy worms (%2527 vulnerability)

RewriteEngine on
RewriteCond %{HTTP_REFERER} ^.*$
RewriteRule ^.*%27.*$ http://127.0.0.1/ [redirect,last]
RewriteRule ^.*%25.*$ http://127.0.0.1/ [redirect,last]
RewriteRule ^.*rush=.*$ http://127.0.0.1/ [redirect,last]
RewriteRule ^.*echr.*$ http://127.0.0.1/ [redirect,last]
RewriteRule ^.*esystem.*$ http://127.0.0.1/ [redirect,last]
RewriteRule ^.*wget.*$ http://127.0.0.1/ [redirect,last]

cant we apply the same method to index.php?STYLE_URL=%2527 to redirect http://127.0.0.1/ ?

anyone familiar with htaccess please give an adivce..

Statistics: Posted Author: Unregistered — Thu Jul 20, 2006 2:43 pm


]]>
2006-07-20T12:29:13-07:00 2006-07-20T12:29:13-07:00 http://integramod.com/forum/viewtopic.php?t=1604&p=12198#p12198 <![CDATA[Re: Verified SQL injection in IM1.4.0 (source inspection)]]> Statistics: Posted Author: Teelk — Thu Jul 20, 2006 12:29 pm


]]>
2006-07-18T09:13:22-07:00 2006-07-18T09:13:22-07:00 http://integramod.com/forum/viewtopic.php?t=1604&p=12056#p12056 <![CDATA[Re: Verified SQL injection in IM1.4.0 (source inspection)]]>
anyways.. heres more link regarding this..

http://seclists.org/lists/bugtraq/2006/Jun/0195.html

http://www.security.nnov.ru/Ndocument55.html

http://packetstorm.linuxsecurity.com/06 ... bb2021.txt

http://www.derkeiler.com/Mailing-Lists/ ... 00203.html

http://www.spinics.net/lists/bugtraq/msg23745.html

Statistics: Posted Author: Unregistered — Tue Jul 18, 2006 9:13 am


]]>
2006-09-20T12:26:08-07:00 2006-07-18T05:58:29-07:00 http://integramod.com/forum/viewtopic.php?t=1604&p=12044#p12044 <![CDATA[[Solved] Verified SQL injection in IM1.4.0]]> http://www.attrition.org/pipermail/vim/ ... 00847.html

Ref:

BUGTRAQ:20060606 Multiple Sql injection and XSS in integramod portal
URL:http://www.securityfocus.com/archive/1/archive/1/436457/100/0/threaded

Some VDB's didn't list the SQL injection, but they listed the XSS.

notice in the Bugtraq post that the demo URL is:

http://target/index.php?STYLE_URL=%2527

which decodes to "%27" which, itself, decodes to "'"


So, we have SQL injection by double-decoding.


from includes/functions.php of a 1.4.0 download:

if ( isset($HTTP_POST_VARS[STYLE_URL]) || isset($HTTP_GET_VARS[STYLE_URL]) )
{
$style = urldecode( (isset($HTTP_POST_VARS[STYLE_URL])) ? $HTTP_POST_VARS[STYLE_URL] : $HTTP_GET_VARS[STYLE_URL] );
if ( $theme = setup_style($style) )
{

....

if ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_style']) )
{
$style = $HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_style'];
if ( $theme = setup_style($style) )
{


...

function setup_style($style)
{
global $db, $board_config, $template, $images, $phpbb_root_path, $var_cache, $portal_config, $current_template_path;

// BEGIN Style Select MOD
if ( intval($style) == 0 )
{
$sql = "SELECT themes_id
FROM " . THEMES_TABLE . "
WHERE style_name = '$style'";



So... setup_style() checks if its $style argument equates to an
integer value of 0, which is the case with most arbitrary non-numeric
strings as I understand it.

But it then just feeds '$style' into a SQL query.

I would venture a guess that the "%2527" string is first decoded to
"%27" by PHP itself (this is mentioned in a comment in the online PHP
manual entry for urlencode), and then the "urldecode" call will then
translate the "%27" to a "'".


- Steve

Statistics: Posted Author: Unregistered — Tue Jul 18, 2006 5:58 am


]]>