Jump to content

PHP Exploit BUT HOW?


110%Nutter

Recommended Posts

Hi, I went to look at my website last night and found that my homepage had been replaced by something created by some muslim albanian / kosovo hackers.

 

I would be interested in hearing from any of you who could pin point the weak spot in my code, I'm pretty new to php so its likely there are some newbie errors in it that let them in!!

 

Hope to hear from someone soon!!

 

[attachment deleted by admin]

Link to comment
https://forums.phpfreaks.com/topic/169587-php-exploit-but-how/
Share on other sites

Its like bundyxc said, its most likely the unsanitized $_GET['']; input.

 

As you could probably do something like:

index.php?page=<script>alert('I can see this popup')</script>

 

You could use something like

 

<?php
function make_safe($unsafe)
{
mysql_connect($server, $user, $pwd);
$safe = mysql_real_escape_string(strip_tags(trim($unsafe)));
return $safe;
}
?>

 

Then do

 

<?php

make_safe($_GET['something']);

?>

Link to comment
https://forums.phpfreaks.com/topic/169587-php-exploit-but-how/#findComment-895843
Share on other sites

is your site genera

Hi, I went to look at my website last night and found that my homepage had been replaced by something created by some muslim albanian / kosovo hackers.

 

I would be interested in hearing from any of you who could pin point the weak spot in my code, I'm pretty new to php so its likely there are some newbie errors in it that let them in!!

 

Hope to hear from someone soon!!

is your homepage generated by a cms, I have an issue with a clients website they used sql injection. the guys have been round hacking many a site recently word of warning they seem to upload malicious code to some sites so if you goolge for these guys and find other sites they have hacked don't click on them.

 

mysql_escape_strings and real_mysql_escape_strings is a way to stop sql injection. if they have hacked database content.

Link to comment
https://forums.phpfreaks.com/topic/169587-php-exploit-but-how/#findComment-895883
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.