Metasploit使用PostgreSQL作为数据库
来源:互联网 发布:gamecenter数据不同步 编辑:程序博客网 时间:2024/06/10 01:14
(1)启动postgresql
root@kali:~# service postgresql start
(2). 设置用户与数据库
root@kali:~# su postgrespostgres@kali:/root$ createuser msf4 -PEnter password for new role:Enter it again:postgres@kali:/root$ createdb --owner=msf4 msf4
postgres@kali:/root$ exit
exit
root@kali:~#
(3).测试数据库连接状态
root@kali:~# msfconsole### ###msf > db_connect msf4:password@localhost/msf4[*] Rebuilding the module cache in the background...msf > db_status[*] postgresql connected to msf4msf > search 2015-0531[!] Module database cache not built yet, using slow search #这里要稍等一下才会正常,可以考虑关闭应用重启一下msf >
(4). 设置自动连接
自动连接可以通过配置文件 /usr/share/metasploit-framework/config/database.yml 完成,内容可以通过复制database.yml.example并修改内容来完成设置。
root@kali:/usr/share/metasploit-framework/config# cp database.yml.example database.ymlroot@kali:/usr/share/metasploit-framework/config# vi database.ymlroot@kali:/usr/share/metasploit-framework/config# cat database.yml# Please only use postgresql bound to a TCP port.# Only postgresql is supportable for metasploit-framework# these days. (No SQLite, no MySQL).## To set up a metasploit database, follow the directions hosted at:# http://r-7.co/MSF-DEV#set-up-postgresqldevelopment: &pgsqladapter: postgresqldatabase: msf3 #主要该红色的这三个值username: msf3password: passwordhost: localhostport: 5432pool: 5timeout: 5# You will often want to seperate your databases between dev# mode and prod mode. Absent a production db, though, defaulting# to dev is pretty sensible for many developer-users.production: &production<<: *pgsql# 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:<<: *pgsqldatabase: metasploit_framework_testusername: metasploit_framework_testpassword: ___________________________
重新执行msfconsole即可直接链接数据库
root@kali:~# msfconsole### ###msf > db_status[*] postgresql connected to msf4msf > search CVE-2015-0311Matching Modules================Name Disclosure Date Rank Description---- --------------- ---- -----------exploit/multi/browser/adobe_flash_uncompress_zlib_uaf 2014-04-28 great Adobe Flash Player ByteArray UncompressViaZlibVariant Use After Freemsf >
-----使用-oX选项进行扫描,生成***.xml的文件保存在当前的根目录下
nmap -Pn -sS -A -oX Subnet1 192.168.137.2
-----文件生成后,使用db_import将文件导入数据库中,db_hosts显示主机的信息
连接到数据库 db_connect 用户名:密码@localhost/数据库名
导入扫描文件 db_import /root/Subnet1
0 0
- Metasploit使用PostgreSQL作为数据库
- 使用postgresql来作为rails的数据库
- 在Metasploit中使用PostgreSQL
- kali下metasploit链接postgresql数据库
- kali下metasploit链接postgresql数据库
- Kali Linux 2016 Metasploit连接postgresql数据库
- 关于metasploit下连接postgresql数据库问题
- Metasploit Framework 和 PostgreSQL
- BT5 R2 下 Metasploit使用postgersql数据库
- postgresql 数据库安装使用
- PostgreSql数据库使用
- 使用postgreSQL作为roller的后台数据库
- 使用XML作为数据库
- metasploit使用
- django框架使用postgresql数据库
- Rails4 使用postgreSQL做数据库
- 使用Python连接postgresql数据库
- PostgreSQL数据库pg_test_timing学习使用
- Import Legacy CCSv3.3 Project到CCS5.5.0时出错
- 剑指Offer——网易笔试之解救小易——曼哈顿距离的典型应用
- Android应用生死轮回的那些事儿(1) - installd初探
- Delphi学习笔记(二)
- 死锁面试题
- Metasploit使用PostgreSQL作为数据库
- 动态规划-最大子数组和问题
- poj3009 Curling 2.0
- Fibonacci数列优化以及应用
- STM32之定时器(实例)
- vim配置
- 深度学习UFLDL教程翻译之卷积神经网络(二)
- 那些交叉编译问题总结
- 确定C语言各类型变量取值范围(不通过头文件)