PDA

View Full Version : Hacked Yesterday


pspuser007
02-27-2009, 09:38 AM
Hello all.


I was hacked yesterday.
When I am trying to access any thread at my forum i see this:
Warning: Division by zero in [path]/global.php(400) : eval()'d code on line 158

Warning: Division by zero in [path]/global.php(400) : eval()'d code on line 164

Warning: Division by zero in [path]/global.php(400) : eval()'d code on line 168
Database Error Database error
The NuclearWarez::The Radioactive Warez database has encountered a problem.
Please try the following:

* Load the page again by clicking the Refresh button in your web browser.
* Open the www.nuclearwarez.com home page, then try to open another page.
* Click the Back button to try another link.

The www.nuclearwarez.com forum technical staff have been notified of the error, though you may contact them if the problem persists.

We apologise for any inconvenience.
Database error in vBulletin 3.8.1:

Invalid SQL:
SELECT COUNT(*) AS num FROM post AS post LEFT JOIN thread AS thread on post.threadid=thread.threadid LEFT JOIN forum AS forum on thread.forumid=forum.forumid WHERE ((forum.options&4096))AND(post.userid=2)AND(post.dateline>=);

MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1
Error Number : 1064
Request Date : Friday, February 27th 2009 @ 06:30:11 AM
Error Date : Friday, February 27th 2009 @ 06:30:12 AM
Script : http://www.mydomain.com/forumdir/showthread.php?p=6371
Referrer : http://www.mydomain.com/forumdir/
IP Address : *****
Username : myusername
Classname : mydatabase
MySQL Version : 5.0.67-community
The mods are not working!

What can I do?

I am trying to restore the database.
I tried through Cpanel and when i clicked the button upload it said after a while "Restoring Database" and then nothing.
I tried through phpmyadmin to import the backup(it had this extension .sql ) and I got an error.
I have now extracted the SQL file and I am trying to import it through phpmyadmin.But the file is 28MB in size.
Now i got this : "Script timeout passed, if you want to finish import, please resubmit same file and import will resume."


Please help me!


Thank you for your time!

rap^
02-27-2009, 01:36 PM
Add this to your config.php

<?php
define('DISABLE_HOOKS', true);

bluffmaster12pm
02-27-2009, 02:41 PM
http://i42.tinypic.com/2l4cw1.jpg

sorry to hear that -

Add this to your config.php

<?php
define('DISABLE_HOOKS', true);

Hope this works :)

Golden Falcon
02-27-2009, 02:50 PM
this website was hacked

More like this shitty vB software was exploited. That's more like it :)

Saime
02-27-2009, 03:07 PM
@Golden: I don't think so. More like he used same password everywhere.

zes
02-27-2009, 03:14 PM
@Golden: I don't think so. More like he used same password everywhere. Not really guyz.It was a Mysql Injection and I'm not using the same pass everywhere.


<?php
define('DISABLE_HOOKS', true);
This seemed to work but My mods are not working :(

lifetalk
02-27-2009, 04:02 PM
@Golden: I don't think so. More like he used same password everywhere. Not really guyz.It was a Mysql Injection and I'm not using the same pass everywhere.



This seemed to work but My mods are not working :(

That, is because the command disables mods!
After this command, fix your database, and then re-enable your mods

pspuser007
02-27-2009, 06:22 PM
Thank you all for the replies!
OK we have added this code.
How to fix the database?
I repaired it through the Admin Cp,through the cPanel and lastly through the phpmyadmin.
What I have done,is correct?
What else should I do?

forksmaster
02-27-2009, 06:44 PM
you need to run your database back-up ...if your getting a time-out you need to use bigdump.php which will sort the time out and you will be able to restore database.

pspuser007
02-27-2009, 07:03 PM
If i get a time out how to use the bigdump.php?:S

Thank you for the replies!

EDIT:
Tried to Import the backup from phpmyadmin and got this:
"Premature end of script headers: php: Please check / usr / local / cpanel / logs / error_log for the exact error."

What should i do?

forksmaster
02-27-2009, 07:45 PM
as requested :)

you can get bigdump here http://www.ozerov.de/bigdump.php
make a folder on the ftp public_html/Dump/ make sure the CHMOD is 777
upload your database back up and bigdump.php to that folder
you need to modify the bigdump.php
open with editor you will see this

<?php

// BigDump ver. 0.29b from 2008-01-19
// Staggered import of an large MySQL Dump (like phpMyAdmin 2.x Dump)
// Even through the webservers with hard runtime limit and those in safe mode
// Works fine with Internet Explorer 7.0 and Firefox 2.x

// Author: Alexey Ozerov (alexey at ozerov dot de)
// AJAX & CSV functionalities: Krzysiek Herod (kr81uni at wp dot pl)
// Copyright: GPL (C) 2003-2008
// More Infos: http://www.ozerov.de/bigdump.php

// This program is free software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the Free Software Foundation;
// either version 2 of the License, or (at your option) any later version.

// THIS SCRIPT IS PROVIDED AS IS, WITHOUT ANY WARRANTY OR GUARANTEE OF ANY KIND

// USAGE

// 1. Adjust the database configuration in this file
// 2. Remove the old tables on the target database if your dump doesn't contain "DROP TABLE"
// 3. Create the working directory (e.g. dump) on your web server
// 4. Upload bigdump.php and your dump files (.sql, .gz) via FTP to the working directory
// 5. Run the bigdump.php from your browser via URL like http://www.yourdomain.com/dump/bigdump.php
// 6. BigDump can start the next import session automatically if you enable the JavaScript
// 7. Wait for the script to finish, do not close the browser window
// 8. IMPORTANT: Remove bigdump.php and your dump files from the web server

// If Timeout errors still occure you may need to adjust the $linepersession setting in this file

// LAST CHANGES

// *** Accurate current directory detection
// *** Accurate filename handling and urlencode in URLs
// *** Add Paypal button

// Database configuration

$db_server = 'localhost';
$db_name = 'your databasename';
$db_username = 'yourusername';
$db_password = 'yourdbpassword';

you only need to edit the part in red
then close and save run bigdump.php in the browser e.g.
http://yourdomain_name.net/Dump/bigdump.php
a screen will appear and your database name will be there just click run or simular.
done ;)

pspuser007
02-27-2009, 08:11 PM
Thank you my friend!!
But i got this:Error at the line 3021: SET character_set_client = @saved_cs_client;

Query: SET character_set_client = @saved_cs_client;

MySQL: Variable 'character_set_client' can't be set to the value of 'NULL'

Stopped on error


What should i do about it?

forksmaster
02-27-2009, 10:10 PM
you need to change the value 'null' on line 3021 of script to a recognised variables used in script read all of the section the error is in. without seeing the whole the text its hard to work out

pspuser007
02-27-2009, 10:12 PM
Can you please add me at msn?
Mine is nuclearwarez@hotmail.com .
Of what script should I change its value?

forksmaster
02-27-2009, 10:20 PM
I don't use msn sy

pspuser007
02-27-2009, 10:25 PM
Do you use Yahoo messenger cause if you do you can add me there and we could chat too.
Can you please tell me what exactly should I do (consider that this is the first time I am doing something like this)?

Thank you very much for your replies.