Nmap pgsql-brute NSE Script


This page contains detailed information about how to use the pgsql-brute NSE script. For list of all NSE scripts, visit the Nmap NSE Library.

Script Overview


Script source code: https://github.com/nmap/nmap/tree/master/scripts/pgsql-brute.nse
Script categories: intrusive, brute
Target service / protocol: postgresql
Target network port(s): 5432
List of CVEs: -

Script Description


The pgsql-brute.nse script performs password guessing against PostgreSQL.

Pgsql-brute NSE Script Arguments


This is a full list of arguments supported by the pgsql-brute.nse script:

pgsql.nossl

If set to 1 or true, disables SSL.

pgsql.version

Force protocol version 2 or 3.

passdb

The filename of an alternate password database. Default: nselib/data/passwords.lst

unpwdb.passlimit

The maximum number of passwords passwords will return (default unlimited).

unpwdb.timelimit

The maximum amount of time that any iterator will run before stopping. The value is in seconds by default and you can follow it with ms, s, m, or h for milliseconds, seconds, minutes, or hours. For example, unpwdb.timelimit=30m or unpwdb.timelimit=.5h for 30 minutes. The default depends on the timing template level (see the module description). Use the value 0 to disable the time limit.

unpwdb.userlimit

The maximum number of usernames usernames will return (default unlimited).

userdb

The filename of an alternate username database. Default: nselib/data/usernames.lst

- - -
To use these script arguments, add them to the Nmap command line using the --script-args arg1=value,[arg2=value,..] syntax. For example:

nmap --script=pgsql-brute --script-args pgsql.nossl=value,pgsql.version=value <target>

Pgsql-brute NSE Script Example Usage


Here's an example of how to use the pgsql-brute.nse script:

nmap -p 5432 --script pgsql-brute <host>

Pgsql-brute NSE Script Example Output


Here's a sample output from the pgsql-brute.nse script:

5432/tcp open  pgsql
| pgsql-brute:
|   root:<empty> => Valid credentials
|_  test:test => Valid credentials

Pgsql-brute NSE Script Example XML Output


There is no sample XML output for this module. However, by providing the -oX <file> option, Nmap will produce a XML output and save it in the file.xml file.

Author


  • Patrik Karlsson

References


See Also


Visit Nmap NSE Library for more scripts.

Version


This page has been created based on Nmap version 7.92.