goro spam injection patchremote injection

  • goro spam injectionSince early 2007 I been monitoring this famous WordPress spam injection that only target high PR wordpress blogs like Al gore, blake ross, bluehost CEO to name a few.

    PHP create_function()

    The new variant from wordpress.net.in & qwetro.com used the “anonymous PHP create_function” to append their spam links on their victim blog. Below is quick patch to disabled the mischievous “create_function” injection on wp_head.

    The below code will look for “�lambda_n” function inside wp_head wp_filters array and remove the action hook silently. I assume that any sane developer will never used this unstable PHP function.

    /**
     * Remove create_function action hook
     * append on wordpress wp_head filters
     *
     * @author Avice De'véreux <ck@kaizeku.com>
     * @copyright Copyright (c) 2006 Avice De'véreux
     * @version 1.0
     * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License
     * @link http://blog.kaizeku.com/wordpress/goro-spam-injection-wp-head-patch/
     */
    function remove_create_function_action()
    { global $wp_filter;
    
    	$action_ref	= 'wp_head';
    	$filter 	= $wp_filter[$action_ref];
    	$_lambda	= array();
    
    	foreach(range(1,10) as $priority){
    
    		if (isset($filter[$priority]))
    		{
    			foreach($filter[$priority] as $registered_filter ){
    
    				$callback = (string) $registered_filter['function'];
    
    				if ( preg_match("/lambda/", $callback) ) {
    		 	 		$_lambda[$priority][] = $callback;
    				}
    			}
    
    		}
    	}
    
    	if ( count($_lambda) >= 0 ){
    
    		foreach($_lambda as $priority => $callback) {
    			if ( has_filter($action_ref,$callback) ){
    				remove_filter($action_ref, $callback, $priority, 1);
    			}
    		}
    	}
    }
    
    add_action('init','remove_create_function_action');
    

    note: This method only disabled the spam link from showing on your blog header. it wont fixed your blog vulnerabilities. your blog still owned thought. Tips → http://wordpress.org/download/

    Download

    Related Articles
    About the Author
     

7 Responsesto “goro spam injection patch”

    • security monitoring's photo
    • RE:goro spam injection patch
      3 weeks, 4 days ago on at 2:50 am3url · microId

      The machine or address that initiated the transfer of the spam mail to the injection point is considered to be the source of the spam by most well-informed spam-analysis tools. The operator of this machine or address is considered to be responsible for having sent the spam, or else for having negligently allowed it to be sent by others.

      [Reply]
    • stalker's photo Kaizeku Ban
    • goro spam injection patch - 'Comment Guidlines' ↓
      6 months, 4 weeks ago on Saturday, June 14th, 2008 at 6:58 pm 5 url

      If you want to comment, please read the following guidelines. These are designed to protect you and other users of the site.

      1. Be relevant: Your comment should be a thoughtful contribution to the subject of the entry. Keep your comments constructive and polite.
      2. No advertising or spamming: Do not use the comment feature to promote commercial entities/products, affiliates services or websites. You are allowed to post a link as long as it's relevant to the entry.
      3. Keep within the law: Do not link to offensive or illegal content websites. Do not make any defamatory or disparaging comments which might damage the reputation of a person or organisation.
      4. Privacy: Do not post any personal information relating to yourself or anyone else (i.e., address, place of employment, telephone or mobile number or email address).

      In order to keep these experiences enjoyable and interesting for all of our users, we ask that you follow the above guidlines. Feel free to engage, ask questions, and tell us what you are thinking! insightful comments are most welcomed.

Subscribe to this discussion via RSS

"write as if you were talking to a good friend (in front of your mother)."

.haveyoursay

Disclaimer: For any content that you post, you hereby grant to Kaizeku Ban the royalty-free, irrevocable, perpetual, exclusive and fully sublicensable license to use, reproduce, modify, adapt, publish, translate, create derivative works from, distribute, perform and display such content in whole or in part, world-wide and to incorporate it in other works, in any form, media or technology now known or later developed. Some rights reserved.