본문 바로가기
모의해킹 (WAPT)

Sqlmap, SQL 인젝션 공격 + 운영체제 침투 점검용 프로그램

by 날으는물고기 2009. 10. 26.

Sqlmap, SQL 인젝션 공격 + 운영체제 침투 점검용 프로그램


$ python sqlmap.py -h

    sqlmap/0.7
    by Bernardo Damele A. G. <bernardo.damele@gmail.com>
   
Usage: sqlmap.py [options]

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -v VERBOSE            Verbosity level: 0-5 (default 1)

  Target:
    At least one of these options has to be specified to set the source to
    get target urls from.

    -u URL, --url=URL   Target url
    -l LIST             Parse targets from Burp or WebScarab logs
    -g GOOGLEDORK       Process Google dork results as target urls
    -c CONFIGFILE       Load options from a configuration INI file

  Request:
    These options can be used to specify how to connect to the target url.

    --method=METHOD     HTTP method, GET or POST (default GET)
    --data=DATA         Data string to be sent through POST
    --cookie=COOKIE     HTTP Cookie header
    --referer=REFERER   HTTP Referer header
    --user-agent=AGENT  HTTP User-Agent header
    -a USERAGENTSFILE   Load a random HTTP User-Agent header from file
    --headers=HEADERS   Extra HTTP headers newline separated
    --auth-type=ATYPE   HTTP Authentication type (value Basic or Digest)
    --auth-cred=ACRED   HTTP Authentication credentials (value name:password)
    --proxy=PROXY       Use a HTTP proxy to connect to the target url
    --threads=THREADS   Maximum number of concurrent HTTP requests (default 1)
    --delay=DELAY       Delay in seconds between each HTTP request
    --timeout=TIMEOUT   Seconds to wait before timeout connection (default 30)
    --retries=RETRIES   Retries when the connection timeouts (default 3)

  Injection:
    These options can be used to specify which parameters to test for,
    provide custom injection payloads and how to parse and compare HTTP
    responses page content when using the blind SQL injection technique.

    -p TESTPARAMETER    Testable parameter(s)
    --dbms=DBMS         Force back-end DBMS to this value
    --os=OS             Force back-end DBMS operating system to this value
    --prefix=PREFIX     Injection payload prefix string
    --postfix=POSTFIX   Injection payload postfix string
    --string=STRING     String to match in page when the query is valid
    --regexp=REGEXP     Regexp to match in page when the query is valid
    --excl-str=ESTRING  String to be excluded before comparing page contents
    --excl-reg=EREGEXP  Matches to be excluded before comparing page contents

  Techniques:
    These options can be used to test for specific SQL injection technique
    or to use one of them to exploit the affected parameter(s) rather than
    using the default blind SQL injection technique.

    --stacked-test      Test for stacked queries (multiple statements) support
    --time-test         Test for time based blind SQL injection
    --time-sec=TIMESEC  Seconds to delay the DBMS response (default 5)
    --union-test        Test for UNION query (inband) SQL injection
    --union-tech=UTECH  Technique to test for UNION query SQL injection
    --union-use         Use the UNION query (inband) SQL injection to retrieve
                        the queries output. No need to go blind

  Fingerprint:
    -f, --fingerprint   Perform an extensive DBMS version fingerprint

  Enumeration:
    These options can be used to enumerate the back-end database
    management system information, structure and data contained in the
    tables. Moreover you can run your own SQL statements.

    -b, --banner        Retrieve DBMS banner
    --current-user      Retrieve DBMS current user
    --current-db        Retrieve DBMS current database
    --is-dba            Detect if the DBMS current user is DBA
    --users             Enumerate DBMS users
    --passwords         Enumerate DBMS users password hashes (opt -U)
    --privileges        Enumerate DBMS users privileges (opt -U)
    --dbs               Enumerate DBMS databases
    --tables            Enumerate DBMS database tables (opt -D)
    --columns           Enumerate DBMS database table columns (req -T opt -D)
    --dump              Dump DBMS database table entries (req -T, opt -D, -C)
    --dump-all          Dump all DBMS databases tables entries
    -D DB               DBMS database to enumerate
    -T TBL              DBMS database table to enumerate
    -C COL              DBMS database table column to enumerate
    -U USER             DBMS user to enumerate
    --exclude-sysdbs    Exclude DBMS system databases when enumerating tables
    --start=LIMITSTART  First query output entry to retrieve
    --stop=LIMITSTOP    Last query output entry to retrieve
    --sql-query=QUERY   SQL statement to be executed
    --sql-shell         Prompt for an interactive SQL shell

  File system access:
    These options can be used to access the back-end database management
    system underlying file system.

    --read-file=RFILE   Read a file from the back-end DBMS file system
    --write-file=WFILE  Write a local file on the back-end DBMS file system
    --dest-file=DFILE   Back-end DBMS absolute filepath to write to

  Operating system access:
    This option can be used to access the back-end database management
    system underlying operating system.

    --os-cmd=OSCMD      Execute an operating system command
    --os-shell          Prompt for an interactive operating system shell
    --os-pwn            Prompt for an out-of-band shell, meterpreter or VNC
    --os-smbrelay       One click prompt for an OOB shell, meterpreter or VNC
    --os-bof            Stored procedure buffer overflow exploitation
    --priv-esc          User priv escalation by abusing Windows access tokens
    --msf-path=MSFPATH  Local path where Metasploit Framework 3 is installed
    --tmp-path=TMPPATH  Remote absolute path of temporary files directory

  Miscellaneous:
    --eta               Display for each output the estimated time of arrival
    --update            Update sqlmap to the latest stable version
    -s SESSIONFILE      Save and resume all data retrieved on a session file
    --save              Save options on a configuration INI file
    --batch             Never ask for user input, use the default behaviour
    --cleanup           Clean up the DBMS by sqlmap specific UDF and tables


원문 : http://sqlmap.sourceforge.net/doc/README.html

728x90

댓글