Home » , , » fimap - A little tool for local and remote file inclusion auditing and exploitation

fimap - A little tool for local and remote file inclusion auditing and exploitation

Written By Unknown on Tuesday, 2 October 2012 | 02:43


fimap is a little python tool which can find, prepare, audit, exploit and even google automaticly for local and remote file inclusion bugs in webapps. fimap should be something like sqlmap just for LFI/RFI bugs instead of sql injection. It's currently under heavy development but it's usable.

The goal of fimap is to improve the quality and security of your website.

What works currently?
  • Check a Single URL, List of URLs, or Google results fully automaticly.
  • Can identify and exploit file inclusion bugs.
    • Relative\Absolute Path Handling.
    • Tries automaticly to eleminate suffixes with Nullbyte and other methods like Dot-Truncation.
    • Remotefile Injection.
    • Logfile Injection. (FimapLogInjection)
  • Test and exploit multiple bugs:
    • include()
    • include_once()
    • require()
    • require_once()
  • You always define absolute pathnames in the configs. No monkey like redundant pathes like:
    • ../etc/passwd
    • ../../etc/passwd
    • ../../../etc/passwd
  • Has a Blind Mode (--enable-blind) for cases when the server has disabled error messages. BlindMode
  • Has an interactive exploit mode which...
    • ...can spawn a shell on vulnerable systems.
    • ...can spawn a reverse shell on vulnerable systems.
    • ...can do everything you have added in your payload-dict inside the config.py
  • Add your own payloads and pathes to the config.py file.
  • Has a Harvest mode which can collect URLs from a given domain for later pentesting.
  • Goto FimapHelpPage for all features.
  • Works also on windows.
  • Can handle directories in RFI mode like:
    • <? include ($_GET["inc"] . "/content/index.html"); ?>
    • <? include ($_GET["inc"] . "_lang/index.html"); ?>
    • where Null-Byte is not possible.
  • Can use proxys.
  • Scans and exploits GET, POST and Cookies.
  • Has a very small footprint. (No senseless bruteforcing of pathes - unless you need it.)
  • Can attack also windows servers! (WindowsAttack)
  • Has a tiny plugin interface for writing exploitmode plugins (PluginDevelopment)
  • Non Interactive Exploiting (FimapNonInteractiveExec)
Download -
fimap_alpha_v09.tar.gz

Source -

http://code.google.com/p/fimap/


fimap v.09_svn:: Automatic LFI/RFI scanner and exploiter:: by Iman Karim (fimap.dev@gmail.com)
Usage: ./fimap.py [options]
## Operating Modes:
   -s , --single                 Mode to scan a single URL for FI errors.
                                 Needs URL (-u). This mode is the default.
   -m , --mass                   Mode for mass scanning. Will check every URL
                                 from a given list (-l) for FI errors.
   -g , --google                 Mode to use Google to aquire URLs.
                                 Needs a query (-q) as google search query.
   -H , --harvest                Mode to harvest a URL recursivly for new URLs.
                                 Needs a root url (-u) to start crawling there.
                                 Also needs (-w) to write a URL list for mass mode.
## Techniques:
   -b , --enable-blind           Enables blind FI-Bug testing when no error messages are printed.
                                 Note that this mode will cause lots of requests compared to the
                                 default method. Can be used with -s, -m or -g.
   -D , --dot-truncation         Enables dot truncation technique to get rid of the suffix if
                                 the default mode (nullbyte poison) failed. This mode can cause
                                 tons of requests depending how you configure it.
                                 By default this mode only tests windows servers.
                                 Can be used with -s, -m or -g. Experimental.
   -M , --multiply-term=X        Multiply terminal symbols like '.' and '/' in the path by X.
## Variables:
   -u , --url=URL                The URL you want to test.
                                 Needed in single mode (-s).
   -l , --list=LIST              The URL-LIST you want to test.
                                 Needed in mass mode (-m).
   -q , --query=QUERY            The Google Search QUERY.
                                 Example: 'inurl:include.php'
                                 Needed in Google Mode (-g)
        --skip-pages=X           Skip the first X pages from the Googlescanner.
   -p , --pages=COUNT            Define the COUNT of pages to search (-g).
                                 Default is 10.
        --results=COUNT          The count of results the Googlescanner should get per page.
                                 Possible values: 10, 25, 50 or 100(default).
        --googlesleep=TIME       The time in seconds the Googlescanner should wait befor each
                                 request to google. fimap will count the time between two requests
                                 and will sleep if its needed to reach your cooldown. Default is 5.
   -w , --write=LIST             The LIST which will be written if you have choosen
                                 harvest mode (-H). This file will be opened in APPEND mode.
   -d , --depth=CRAWLDEPTH       The CRAWLDEPTH (recurse level) you want to crawl your target site
                                 in harvest mode (-H). Default is 1.
   -P , --post=POSTDATA          The POSTDATA you want to send. All variables inside
                                 will also be scanned for file inclusion bugs.
        --cookie=COOKIES         Define the cookie which should be send with each request.
                                 Also the cookies will be scanned for file inclusion bugs.
                                 Concatenate multiple cookies with the ';' character.
        --ttl=SECONDS            Define the TTL (in seconds) for requests. Default is 30 seconds.
        --no-auto-detect         Use this switch if you dont want to let fimap automaticly detect
                                 the target language in blind-mode. In that case you will get some
                                 options you can choose if fimap isnt sure which lang it is.
        --dot-trunc-min=700      The count of dots to begin with in dot-truncation mode.
        --dot-trunc-max=2000     The count of dots to end with in dot-truncation mode.
        --dot-trunc-step=50      The step size for each round in dot-truncation mode.
        --dot-trunc-ratio=0.095  The maximum ratio to detect if dot truncation was successfull.
        --dot-trunc-also-unix    Use this if dot-truncation should also be tested on unix servers.
## Attack Kit:
   -x , --exploit                Starts an interactive session where you can
                                 select a target and do some action.
   -T , --tab-complete           Enables TAB-Completation in exploit mode. Needs readline module.
                                 Use this if you want to be able to tab-complete thru remote
                                 files\dirs. Eats an extra request for every "cd" command.
## Disguise Kit:
   -A , --user-agent=UA          The User-Agent which should be sent.
        --http-proxy=PROXY       Setup your proxy with this option. But read this facts:
                                   * The googlescanner will ignore the proxy to get the URLs,
                                     but the pentest\attack itself will go thru proxy.
                                   * PROXY should be in format like this: 127.0.0.1:8080
                                   * Its experimental
        --show-my-ip             Shows your internet IP, current country and user-agent.
                                 Useful if you want to test your vpn\proxy config.
## Plugins:
        --plugins                List all loaded plugins and quit after that.
   -I , --install-plugins        Shows some official exploit-mode plugins you can install 
                                 and\or upgrade.
## Other:
        --update-def             Checks and updates your definition files found in the
                                 config directory.
        --test-rfi               A quick test to see if you have configured RFI nicely.
        --merge-xml=XMLFILE      Use this if you have another fimap XMLFILE you want to
                                 include to your own fimap_result.xml.
   -C , --enable-color           Enables a colorful output. Works only in linux!
   -v , --verbose=LEVEL          Verbose level you want to receive.
                                 LEVEL=3 -> Debug
                                 LEVEL=2 -> Info(Default)
                                 LEVEL=1 -> Messages
                                 LEVEL=0 -> High-Level
        --credits                Shows some credits.
        --greetings              Some greetings ;)
   -h , --help                   Shows this cruft.
## Examples:
  1. Scan a single URL for FI errors:
        ./fimap.py -u 'http://localhost/test.php?file=bang&id=23'
  2. Scan a list of URLS for FI errors:
        ./fimap.py -m -l '/tmp/urllist.txt'
  3. Scan Google search results for FI errors:
        ./fimap.py -g -q 'inurl:include.php'
  4. Harvest all links of a webpage with recurse level of 3 and
     write the URLs to /tmp/urllist
        ./fimap.py -H -u 'http://localhost' -d 3 -w /tmp/urllist


Share this article :

Post a Comment

 
Support : Creating Website | Johny Template | Mas Template
Copyright © 2011. Turorial Grapich Design and Blog Design - All Rights Reserved
Template Created by Creating Website Published by Mas Template
Proudly powered by Blogger