2014-04-13

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 .
  1. First service we start is postgresql .
  2. 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 
  • Now after scanning 2 targets lets use the command hosts 
  • Command Used : hosts
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
SERVICES 
Services help 

  • Examples1 : It will display all the running services .
  • See the below image for more details -
Example 2 : 

EXAMPLE 3 : Only show the given columns

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 
  • 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 .



Source : http://www.hackingdna.com/Description.aspx?ItemHeaderId=7C91C7B8-10C3-49F6-8BBA-AEA39748959F#.U0pq-fmSxin

沒有留言:

張貼留言