Thank you very much @zimmaro !!!
Seems that the "purge" option when uninstalling modules + the manual remove of "/usr/share/metasploit-framework" folder did the job !
Code:
root@kali:~# apt-get purge postgresql-9.4 metasploit-framework -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
armitage* metasploit-framework* postgresql* postgresql-9.4*
0 upgraded, 0 newly installed, 4 to remove and 2 not upgraded.
After this operation, 191 MB disk space will be freed.
(Reading database ... 349720 files and directories currently installed.)
Removing armitage (20150812-1kali1) ...
Removing metasploit-framework (4.11.5-2015121501-0kali1~r1u1) ...
Removing postgresql (9.4+165) ...
Removing postgresql-9.4 (9.4.5-0+deb8u1) ...
Purging configuration files for postgresql-9.4 (9.4.5-0+deb8u1) ...
Dropping cluster main...
Processing triggers for man-db (2.7.0.2-5) ...
Processing triggers for postgresql-common (165) ...
supported-versions: WARNING! Unknown distribution: kali
debian found in ID_LIKE, treating as Debian
supported-versions: WARNING: Unknown Debian release: 2.0
Building PostgreSQL dictionaries from installed myspell/hunspell packages...
en_us
Removing obsolete dictionary files:
root@kali:~# rm -rf /usr/share/metasploit-framework
root@kali:~#
Code:
root@kali:~# apt-get install armitage -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
metasploit-framework postgresql postgresql-9.4
Suggested packages:
postgresql-doc oidentd ident-server
The following NEW packages will be installed:
armitage metasploit-framework postgresql postgresql-9.4
0 upgraded, 4 newly installed, 0 to remove and 2 not upgraded.
Need to get 0 B/66.1 MB of archives.
After this operation, 191 MB of additional disk space will be used.
Selecting previously unselected package postgresql-9.4.
(Reading database ... 335652 files and directories currently installed.)
Preparing to unpack .../postgresql-9.4_9.4.5-0+deb8u1_i386.deb ...
Unpacking postgresql-9.4 (9.4.5-0+deb8u1) ...
Selecting previously unselected package postgresql.
Preparing to unpack .../postgresql_9.4+165_all.deb ...
Unpacking postgresql (9.4+165) ...
Selecting previously unselected package metasploit-framework.
Preparing to unpack .../metasploit-framework_4.11.5-2015121501-0kali1~r1u1_i386.deb ...
Unpacking metasploit-framework (4.11.5-2015121501-0kali1~r1u1) ...
Selecting previously unselected package armitage.
Preparing to unpack .../armitage_20150812-1kali1_all.deb ...
Unpacking armitage (20150812-1kali1) ...
Processing triggers for postgresql-common (165) ...
supported-versions: WARNING! Unknown distribution: kali
debian found in ID_LIKE, treating as Debian
supported-versions: WARNING: Unknown Debian release: 2.0
Building PostgreSQL dictionaries from installed myspell/hunspell packages...
en_us
Removing obsolete dictionary files:
Processing triggers for man-db (2.7.0.2-5) ...
Setting up postgresql-9.4 (9.4.5-0+deb8u1) ...
Creating new cluster 9.4/main ...
config /etc/postgresql/9.4/main
data /var/lib/postgresql/9.4/main
locale en_US.UTF-8
port 5432
update-alternatives: using /usr/share/postgresql/9.4/man/man1/postmaster.1.gz to provide /usr/share/man/man1/postmaster.1.gz (postmaster.1.gz) in auto mode
Setting up postgresql (9.4+165) ...
Setting up metasploit-framework (4.11.5-2015121501-0kali1~r1u1) ...
update-alternatives: using /usr/share/metasploit-framework/msfbinscan to provide /usr/bin/msfbinscan (msfbinscan) in auto mode
update-alternatives: using /usr/share/metasploit-framework/msfconsole to provide /usr/bin/msfconsole (msfconsole) in auto mode
update-alternatives: using /usr/share/metasploit-framework/msfd to provide /usr/bin/msfd (msfd) in auto mode
update-alternatives: using /usr/share/metasploit-framework/msfdb to provide /usr/bin/msfdb (msfdb) in auto mode
update-alternatives: using /usr/share/metasploit-framework/msfelfscan to provide /usr/bin/msfelfscan (msfelfscan) in auto mode
update-alternatives: using /usr/share/metasploit-framework/msfmachscan to provide /usr/bin/msfmachscan (msfmachscan) in auto mode
update-alternatives: using /usr/share/metasploit-framework/msfpescan to provide /usr/bin/msfpescan (msfpescan) in auto mode
update-alternatives: using /usr/share/metasploit-framework/msfrop to provide /usr/bin/msfrop (msfrop) in auto mode
update-alternatives: using /usr/share/metasploit-framework/msfrpc to provide /usr/bin/msfrpc (msfrpc) in auto mode
update-alternatives: using /usr/share/metasploit-framework/msfrpcd to provide /usr/bin/msfrpcd (msfrpcd) in auto mode
update-alternatives: using /usr/share/metasploit-framework/msfupdate to provide /usr/bin/msfupdate (msfupdate) in auto mode
update-alternatives: using /usr/share/metasploit-framework/msfvenom to provide /usr/bin/msfvenom (msfvenom) in auto mode
Setting up armitage (20150812-1kali1) ...
root@kali:~#
Code:
root@kali:~# service postgresql start
root@kali:~# /etc/init.d/postgresql start
[ ok ] Starting postgresql (via systemctl): postgresql.service.
root@kali:~#
Now finally i got the unix service running in /var/run/postgresql/.s.PGSQL.5432
Code:
root@kali:~# netstat -nlp | grep 5432
tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN 8122/postgres
tcp6 0 0 ::1:5432 :::* LISTEN 8122/postgres
unix 2 [ ACC ] STREAM LISTENING 33689 8122/postgres /var/run/postgresql/.s.PGSQL.5432
And finally
Code:
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:~# msfconsole
______________________________________________________________________________
| |
| METASPLOIT CYBER MISSILE COMMAND V4 |
|______________________________________________________________________________|
\ / /
\ . / / x
\ / /
\ / + /
\ + / /
* / /
/ . /
X / / X
/ ###
/ # % #
/ ###
. /
. / . * .
/
*
+ *
^
#### __ __ __ ####### __ __ __ ####
#### / \ / \ / \ ########### / \ / \ / \ ####
################################################################################
################################################################################
# WAVE 4 ######## SCORE 31337 ################################## HIGH FFFFFFFF #
################################################################################
http://metasploit.pro
Taking notes in notepad? Have Metasploit Pro track & report
your progress and findings -- learn more on http://rapid7.com/metasploit
=[ metasploit v4.11.5-2015121501 ]
+ -- --=[ 1517 exploits - 871 auxiliary - 256 post ]
+ -- --=[ 436 payloads - 37 encoders - 8 nops ]
+ -- --=[ Free Metasploit Pro trial: http://r-7.co/trymsp ]
msf > db_status
[*] postgresql connected to msf
msf >
Thanks again !!!