Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.