lost and found ( for me ? )

run Kali Linux via vagrant and set up Metasploit

- run Kali Linux via vagrant

# vagrant init Sliim/kali-linux-2.0-amd64

# vagrant up

nnn, warning messages.
# vagrant up
Bringing machine 'default' up with 'virtualbox' provider...

   default: Warning: Authentication failure. Retrying...
   default: Warning: Authentication failure. Retrying...
   default: Warning: Authentication failure. Retrying...
   default: Warning: Authentication failure. Retrying...
#

can not access, because I am not sure credentials..
# vagrant ssh
vagrant@127.0.0.1's password:
vagrant@127.0.0.1's password:
vagrant@127.0.0.1's password:
Permission denied (publickey,password).

stop VM
# vagrant halt

download a private key.
# wget https://raw.githubusercontent.com/Sliim/pentest-env/master/ssh-keys/pentest-env

edit Vagrant file
# egrep 'private_key|username' Vagrantfile
 config.ssh.username = "root"
 config.ssh.private_key_path = "/home/foobar/Vagrant_works/Kali_linux/pentest-env"

start VM
# vagrant up

access to the VM over ssh.
Okay, I was able to access to the VM over ssh.
# vagrant ssh

root@kali:~#

root@kali:~# cat /etc/lsb-release
DISTRIB_ID=Kali
DISTRIB_RELEASE=2.0
DISTRIB_CODENAME=sana
DISTRIB_DESCRIPTION="Kali GNU/Linux 2.0"

- set up Metasploit

Reference
http://docs.kali.org/general-use/starting-metasploit-framework-in-kali

root@kali:~# service postgresql start
root@kali:~#
root@kali:~# service postgresql status
● postgresql.service - PostgreSQL RDBMS
  Loaded: loaded (/lib/systemd/system/postgresql.service; disabled)
  Active: active (exited) since Wed 2016-05-25 08:50:35 EDT; 6s ago
 Process: 1297 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
Main PID: 1297 (code=exited, status=0/SUCCESS)
root@kali:~#
root@kali:~# lsof -ni:5432
COMMAND   PID     USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
postgres 1280 postgres    6u  IPv6  18924      0t0  TCP [::1]:postgresql (LISTEN)
postgres 1280 postgres    7u  IPv4  18925      0t0  TCP 127.0.0.1:postgresql (LISTEN)
root@kali:~#

initialize DB
root@kali:~# msfdb init
Creating database user 'msf'
Enter password for new role:
Enter it again:
Creating databases 'msf' and 'msf_test'
Creating configuration file in /usr/share/metasploit-framework/config/database.yml
Creating initial database schema
root@kali:~#

root@kali:~# msfconsole

msf > db_status
[*] postgresql connected to msf
msf >

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.