PostgreSQL On Kali Linux
- In this tutorial we will learn how to connect postgresql with metasploit framework .
- We cover all the backend database commands of metasploit framework.
- We also use nmap to scan the targets and then we will analyse how useful is PostgreSQL on Kali Linux .
HOW TO START POSTGRESQL SERVICE & METASPLOIT SERVICES.
- Command Used : services postgresql start && services metasploit start .
- See the below image for the response -
Description : In this command we start both the services together .
- First service we start is postgresql .
- And second service we start is metsploit .
Note : You can also start these services one-by-one also .
OPEN METASPLOIT FRAMEWORK
METASPLOIT FRAMEWORK OPENED
NOW CHECK ALL THE DATABASE BACKEND COMMANDS
COMMAND USED
- Description : After using help command it will display all the commands that are used in metasploit framework but we are only cover Database Backend Commands .The above image shows all the commands .
CHECKING DATABASE STATUS
- Now once we start the postgresql and metasploit services , lets see is our database is connected to msf or not .
- Command Used : db_status
Description : It shows that our database( postgresql ) is connected to msf3( metasploit framework3 ).
PERFORM NMAP SCAN WITHIN METASPLOIT FRAMEWORK
TARGET 1 : METASPLOITABLE
TARGET 2: WINDOWS XP
HOSTS COMMAND
Description :We scan two targets ( Metasploitable , windows xp )And when you use the hosts command , it will display the list of hosts you scan.
HOST HELP COMMAND
- If you want something more about hosts command then use the following command .
- Command Used : hosts -h.
- See the below image for more details-
EXAMPLES
EXAMPLE 1 : SHOW ONLY THOSE HOST WHICH ARE UP
- This command only shows those host which are running on the network .
- See the below image for more details -
EXAMPLE 2 : SEARCH HOSTS
- COMMAND : hosts -S < host-ip>
- This command helps you when there is a long list and you have to filter single ip .
- See the below example for more details -
EXAMPLE 3 : ONLY SHOW THE GIVEN COLUMNS
OUTPUT
DELETE HOSTS
- Examples1 : It will display all the running services .
- See the below image for more details -
Example 2 :
EXAMPLE 4 : SEARCH FOR A LIST OF SERVICE NAMES
EXAMPLE 5 : ONLY SHOW TCP UDP SERVICES
EXAMPLE 6 : SEARCH FOR A LIST OF PORTS
NOTES COMMAND : List all the notes in the database
NOTES HELP COMMAND
WORKSPACE : DATABASE WORKSPACES
DATABASE EXPORT COMMAND
DATABASE DISCONNECT COMMAND
EXAMPLE 5 : ONLY SHOW TCP UDP SERVICES
EXAMPLE 6 : SEARCH FOR A LIST OF PORTS
NOTES COMMAND : List all the notes in the database
NOTES HELP COMMAND
WORKSPACE : DATABASE WORKSPACES
DATABASE EXPORT COMMAND
DATABASE DISCONNECT COMMAND
- To disconnect database , use the db_disconnect command .
- See the below image for more details -
- And to check the database status , use the db_status command .
0 comments:
Post a Comment