PDA

View Full Version : Kali issue database



pentest09
2013-05-03, 14:58
Hi ,

Im having problems with armitage on Kali,

I have bleeding edge updates etc, now my metasploit and postgresql services are running with msf 4.6

I can connect to the database from within metasploit:

db_connect msf3:zFhgymTtR*****[email protected]/msf3

Now does armitage on kali use postgresql? or mysql?

In the settings box I tried the msf and test to 127.0.0.1 on port 55553
and also the msf postgresql database using msf3 and password above which
is the random created by metasploit in the database.yml file.

Once run it says it cannot connect to the database.


I have also run ap-get remove armitage apt-get update apt-get install after reboot
and still cant connect.

Where is the file that tells armitage where to connect to as there may be an issue with port
or can I create a new database or as with backtrack 5 install new instance of postgres with user
and db independant of metasploit...



Kind Regards Dee

charonsecurity
2013-05-03, 16:36
You have to start the service first I believe. Try this command, "service posgresql start" to see if that does the trick. Or optionally, just to check to see if its running, service posgresql status.

pentest09
2013-05-03, 19:10
"I have bleeding edge updates etc, now my metasploit and postgresql services are running with msf 4.6"

I have tried all guides online and none of them work, it goes to connect and gives the error, does it use msf database.yaml file or can i create a new instance. Its a common error but the usual advice of " service postgresql start and service metasploit start " are running csetup automatically to run upon start up....I have no issues with connecting within metasploit.. In backtrack 5 i was able to install postgres independently of msf's bundle and setup a seperate database and user , password etc.

I get the feeling its a config problem so need to find the file that handles database port user etc. maybe #ssl needs commenting/uncommenting as before.[/QUOTE]

Ok I have a feeling its an issue with the preferences.sl pointing to wrong location does anyone agree?????

pentest09
2013-05-04, 13:02
After having no end of problems trying to find why armitage couldnt connect msf database.yml

Trying all online guides and the simple "service blah blah start" heres the solution.

After updating metasploit my database was changed and causing problems for armitage.

After checking the clean kali install on my snapshot, I run the services start and armitage
and BOOM!!!!!! it works no problem. I checked the database.yml file and its totally different to
the one available after metasploits update. Both files are below:

Obviously the password will need changing to the updated one.

So I replaced the updated .yml file to the original one and replaced my password
and now it works fine.

database.yml working: before updates clean install
################################################## ############
development:
adapter: "postgresql"
database: "msf3"
username: "msf3"
password: "9hMj2yrZ62r3cynWh***************"
port: 5432
host: "localhost"
pool: 256
timeout: 5

production:
adapter: "postgresql"
database: "msf3"
username: "msf3"
password: "9hMj2yrZ62r3cynWh***************"
port: 5432
host: "localhost"
pool: 256
timeout: 5

################################################## ###############


Updated database.yml doesnt work!!!!!
################################################## ###############
# Please only use postgresql bound to a TCP port.
development:
adapter: postgresql
database: "msf3"
username: "msf3"
password: "zFhgymTtRt4P7ZFQsJ8K************"
host: localhost
port: 5432
pool: 5
timeout: 5


# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
#
# Note also, sqlite3 is totally unsupported by Metasploit now.
test:
adapter: sqlite3
database: "msf3"
pool: 5
timeout: 5
################################################## ###############

Now the problem lies with the updated metasploit which changes the database.yml

Raphael has had no reports of this , so if anyone has the same issues hopefully this will help.....

Kind Regards Dee