Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Metasploit connects to postgresql database

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

Metasploit connects to the postgresql database:

Open the postgresql service: service postgresql start

Enter the postgresql database, set the default user password, create a new user, set new user permissions, and create a database:

Shell # sudo-u postgres psql # enter the default user of postgresql

Postgres=# alter user postgres with password 'password'; # set the default user's login password (optional, must be a single quotation mark)

Postgres=# create user username with password 'password' nocreatedb; # create a new user with a password

Postgres=# create database database name with owner = 'user name'; # create the database and specify the user to which the database belongs

Postgres=#\ Q # exit psql

Enter metasploit and connect to the database:

Shell # msfconsole

Msf > db_status # View the status of msf's database

Msf > db_connect username: password @ host address\ database name # connect to psql via username and password

Msf > db_status # check the status of msf's database

4. Configured through the database.yml configuration file, at\ usr\ share\ metasploit-frameword\ config\ database.yml

* * how msf connects to psql database * * personal thoughts * *

Personal thinking:

Why does 1.msf connect to postgresql?

A: first of all, the speed of searching modules in msf after connecting to the database can be greatly improved.

Second, after connecting to the database, the traces of using msf will be saved to facilitate the export and writing of the test report.

Therefore, connecting to the psql database is not a necessary operation, but in order to improve the efficiency of the test and facilitate the writing of reports in the future, you should connect to the database and create a cache.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report