-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
923f4c9
commit c87dd0c
Showing
5 changed files
with
139 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
documentation/modules/auxiliary/scanner/postgres/postgres_login.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
## Description | ||
|
||
This auxiliary module is a brute-force login tool for Postgres servers. | ||
|
||
## Verification Steps | ||
|
||
1. Do: ```use auxiliary/scanner/postgres/postgres_login``` | ||
2. Do: ```set PASS_FILE [file containing passwords]``` | ||
3. Do: ```set RHOSTS [IP]``` | ||
4. Do: ```set USER_FILE [file containing usernames]``` | ||
5. Do: ```set DATABASE [template name]``` | ||
6. Do: ```run``` | ||
|
||
The above USER_FILE and PASS_FILE options can be replaced with USERNAME | ||
and PASSWORD if you know the credentials. | ||
|
||
## Getting an Interactive Session | ||
|
||
The CreateSession option allows you to obtain an interactive session | ||
for the Postgres client you're connecting to. The run command with CreateSession | ||
set to true should give you an interactive session, and you can interact with | ||
`sessions -i -1` or `sessions REPLACE_WITH_SESSION_NUMBER`. | ||
|
||
For example: | ||
|
||
``` | ||
msf6 auxiliary(scanner/postgres/postgres_login) > run rhost=127.0.0.1 rport=5432 username=postgres password=password database=template1 createsession=true | ||
``` | ||
|
||
Should yield: | ||
|
||
``` | ||
Postgres session 1 opened | ||
``` | ||
|
||
Once you've done that, you can run any Postgres query against the target using | ||
the `query` command, or run `query_interactive` to interact directly with | ||
your session. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters