# 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: "" 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 "", means that we exploited CSRF sucessfully! XSS will execute here: http://localhost/[SubrionPATH]/tag/title-script-alert-document-domain-script/ [!] PoC Code:
---------------------------------------------------------------------------------------------------------------------- [+] 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:
Credits & Authors: ================== Ahsan Tahir - [https://twitter.com/AhsanTahirAT]