hacker-metasploit
hacker-metasploit

is a computer project that explores to exploit the system security vulnerabilities/weaknesses of computer and its networks.

INTRO

Intro to running metasploit framework on OS

Installing metasploit-framework on windows

Downloading and installing

Firstly download the PostgreSQL from here https://www.enterprisedb.com/products-services-training/pgdownload

During the installation of PostgreSQL when it request for Password Please type “1” only

postgresql-install-password
postgresql-install-password

Downloading and installing the Metasploit-framework

Secondly download the metasploit-framework from here https://windows.metasploit.com/metasploitframework-latest.msi and Install it properly as you follow the instructions showed on you installation window.

Now that you have installed both the PostgreSQL and Metasploit-framework now let’s run the both program

RUNNING THE INSTALLED APPLICATION: METASPLOIT-FRAMEWORK

Running Metasploit-framework on windows using cmd

We are going to open metaspoit-framework console from cmd

metasploit-framework-running
metasploit-framework-running

RUNNING THE INSTALLED APPLICATION: POSTGRESQL

Running PostgreSQL on windows Using SQL shell

Go to your start menu and locate the SQL shell type the below but type only “1” for the password which you gave to the PostgreSQL as I instructed you during its installation.

running metasploit framework on WINDOWS OS
SQL-shell-running

TO NOT SUPPORTED : YAML FILE MISSING

Problem while running the Metasploit-framework

Normal you are bound to witness this issue “No database : No database YAML file”

running metasploit framework on WINDOWS OS
msfconsole-no-database-support-_-no-database-yaml-file

 [SOLVED] No database support: No database YAML file WHILE running the metasploit-framework

Solutions

1. Find the config directory for the metasploit-framework

2. Notice you have database.yml.example

file directory of the metasploit framework
file directory of the metasploit framework

3. Open the database.yml.example in a text editor / source code editor

metasploit-framework-database-yml-example
metasploit-framework-database-yml-example

4. Resave it as database.yml and REPLACE in the parameters contained in the content with the below ones

running metasploit framework on WINDOWS OS
development: &pgsql   adapter: postgresql   database: msfdb   username: postgres   password: 1   host: localhost   port: 5432   pool: 200   timeout: 5
test:   <<: *pgsql   database: msfdb   username: postgres   password: 1 

Notice:

During your PostgreSQL installation your password was “1” and default username was “postgres” , default host was localhost “127.0.0.1” with default port listening to “5432

But the database “msfdb” as I defined it have not been created, therefore I have to create msfdb database in SQL shell as shown below:

5. Type the below codes in the SQL shell which is already open

create-and-connect-database-postgreSQL
create-and-connect-database-postgreSQL

Type the below code:

To create database with the name msfdb -:

CREATE DATABASE msfdb

To check if the database have been created -:

\l

To connect to the database -:

\c msfdb

Once you are done you are now connected to database msfdb as user postgres  with password 1 as defined in the parameters in the resaved database.yml file whose content you have changed.

Let’s move on:

6. Now close metasploit-framework console in cmd

running metasploit framework on WINDOWS OS

Type “quit” press enter key then type “exit” and press enter the msfconsole will automatically close. Basically that’s how to exit msfconsole of metasploit-framework using cmd.

Now reopen the metasploit-framework as described in RUNNING THE INSTALLED APPLICATION: METASPLOIT-FRAMEWORK [Running Metasploit-framework on windows using cmd]

Now notice that the metasploit-framework console (msfconsole.bat) no longer displays this error No database support: No database YAML file

The metasploit-framework now works well since it have stopped displaying the error [No database support: No database YAML file].

See the below

metasploit-framework-running-properly
metasploit-framework-running-properly

Type the codes below to check if the database is connected

db_status

metasploit-framework-database-connected-status
metasploit-framework-database-connected-status

The metasploit-framework now have msfdb connected with connection type being postgresql

Don’t forget to share this post – if you like it

Next <i class=”fa fa-chevron”></i> we will be discussing how to connect the Kage GUI of metasploit to our metasploit-framework

LEAVE A REPLY

Please enter your comment!
Please enter your name here