Results 1 to 5 of 5

Thread: How to Install Metasploit on Kali Linux App on WSL?

  1. #1
    Join Date
    2014-Dec
    Location
    Indianapolis, Indiana
    Posts
    105

    How to Install Metasploit on Kali Linux App on WSL?

    Hi, I have Kali Linux App from the App Store on Windows Subsystem for Linux and Windows 10 Host. I also have Kali Linux 2 on VMware but that's not the problem. I'm trying to install Metasploit on the Kali App. I've entered:

    sudo su

    apt-get -y install build-essential zlib1g zlib1g-dev libxml2 libxml2-dev libxslt-dev locate libreadline6-dev libcurl4-openssl-dev git-core libssl-dev libyaml-dev openssl autoconf libtool ncurses-dev bison curl wget postgresql postgresql-contrib libpq-dev libapr1 libaprutil1 libsvn1 libpcap-dev

    apt-get install git-core postgresql curl ruby1.9.3 nmap gem
    gem install wirble sqlite3 bundler

    cd /opt
    git clone https://github.com/rapid7/metasploit-framework.git

    cd metasploit-framework
    bundle install

    ./msfconsole

    Everything worked fine and Metasploit starts up with no problems. Now I'm trying to setup the database. I enter:

    su postgres
    createuser msf -P -S -R -D
    createdb -O msf msf
    exit

    I get the error:

    createuser: could not connect to database postgres: could not connect to server: No such file or directory
    Is the server running locally and accepting
    connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?

    I entered pg_lsclusters and got:

    Ver Cluster Port Status Owner Data directory Log file
    10 main 5432 down postgres /var/lib/postgresql/10/main /var/log/postgresql/postgresql-10-main.log

    Does anyone kno what these errors mean so I can creat a user and setup the database? I read a lot online but nothing worked. I'm attaching some screenshots. Please reply. Thanks

    MSF Console Database Error.jpg

    Metasploit Postgres (Create User) Errors (2).jpg

  2. #2
    Join Date
    2016-Dec
    Location
    Canada
    Posts
    326
    Quote Originally Posted by Mike9876 View Post
    Hi, I have Kali Linux App from the App Store on Windows Subsystem for Linux and Windows 10 Host. I also have Kali Linux 2 on VMware but that's not the problem. I'm trying to install Metasploit on the Kali App. I've entered:

    sudo su

    apt-get -y install build-essential zlib1g zlib1g-dev libxml2 libxml2-dev libxslt-dev locate libreadline6-dev libcurl4-openssl-dev git-core libssl-dev libyaml-dev openssl autoconf libtool ncurses-dev bison curl wget postgresql postgresql-contrib libpq-dev libapr1 libaprutil1 libsvn1 libpcap-dev

    apt-get install git-core postgresql curl ruby1.9.3 nmap gem
    gem install wirble sqlite3 bundler

    cd /opt
    git clone https://github.com/rapid7/metasploit-framework.git

    cd metasploit-framework
    bundle install

    ./msfconsole

    Everything worked fine and Metasploit starts up with no problems. Now I'm trying to setup the database. I enter:

    su postgres
    createuser msf -P -S -R -D
    createdb -O msf msf
    exit

    I get the error:

    createuser: could not connect to database postgres: could not connect to server: No such file or directory
    Is the server running locally and accepting
    connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?

    I entered pg_lsclusters and got:

    Ver Cluster Port Status Owner Data directory Log file
    10 main 5432 down postgres /var/lib/postgresql/10/main /var/log/postgresql/postgresql-10-main.log

    Does anyone kno what these errors mean so I can creat a user and setup the database? I read a lot online but nothing worked. I'm attaching some screenshots. Please reply. Thanks

    MSF Console Database Error.jpg

    Metasploit Postgres (Create User) Errors (2).jpg
    Metesploit for windows would be a more logical install.
    easy to start; hard to finish

  3. #3
    Join Date
    2014-Dec
    Location
    Indianapolis, Indiana
    Posts
    105
    Hi, thanks for your reply. Yeah I have Metasploit Community on Windows. I just wanted to add it to the Kali App. I guess I could give up. If anyone knows what the above errors are you can reply. Thanks again

  4. #4
    Join Date
    2014-Dec
    Location
    Indianapolis, Indiana
    Posts
    105
    I installed MSF framework on windows from their website. Looks good. Thanks for the help.

  5. #5
    Join Date
    2016-Dec
    Location
    Canada
    Posts
    326
    Quote Originally Posted by Mike9876 View Post
    I installed MSF framework on windows from their website. Looks good. Thanks for the help.
    No problem
    easy to start; hard to finish

Similar Threads

  1. Replies: 0
    Last Post: 2016-12-23, 17:30
  2. How to update Metasploit in Kali Linux?
    By mahmoudissam in forum General Archive
    Replies: 4
    Last Post: 2016-10-11, 11:42
  3. Replies: 3
    Last Post: 2015-03-31, 14:50
  4. BeEF and Metasploit on up-to-date Kali fresh install
    By riramar in forum General Archive
    Replies: 0
    Last Post: 2014-09-03, 13:06

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •