Saturday, December 31, 2016

Metasploit Tutorial P2

How to connect to the database ?
InnoCurrent Services - Get Paid to Visits Sites and Complete Surveys
We should use the db_connect command to connect to the database.To connect to the database we should know the password,username,port,hostname and database name all these details you can find in the database.yml file.you can access this file through cd /opt/metasploit/config/ :~ cat database.yml
1)db_connect: This command is used to connect to the database.The format to use this command is " db_connect username:password@hostname:portname/database " name.In my system my username password are
db_connect msf3:4bfedfc2@localhost:7337/msf3dev
2)db_disconnect: To disconnect from the database.Here you can see the status as no connection.
3)db_status:To see the current status of the database.
4)creds: This command is used to view the credential stored in the system.This command shows the hashed passwords.
5)db_import: To import the files from various softwares like nessus and nexpose.
6)db_export:To export our results to other softwares.
7)hosts:This command will display the connected hosts .

you can use hosts -c to filter the columns.
8)db_nmap: Nmap is a very useful tool for pentester and network engineers.We can do many tasks using nmap tool .
eg:db_nmap -O 192.168.217.131.It displays the services and operating system info.
9)services:This command wil disply the list of all services running.
10)Vulns:It will display the vulnerabilities existing in the victim system.

No comments:

Post a Comment