Deepin Linux下的Metasploit安装及优化
前言
本文不限于Deepin Linux系统,类似的在ubuntu
debian
xubuntu
等血统类似的Linux发行版中都可以使用这里方法来安装原生的metasploit
配置Kali Linux官方源
Kali 官方源
这个源是我在Kali 2016.2中提取的原生源,速度很快,会根据具体的网络情况自动去选择最近的更新源服务器进行更新的。
deb http://http.kali.org/kali kali-rolling main contrib non-free
deb-src http://http.kali.org/kali kali-rolling main contrib non-free
把kali的源添加到 Deepin 自带的源后面
# vim /etc/apt/sources.list
## GGenerated by deepin-installer-reborn
deb [by-hash=force] http://ackages.deepin.com/deepin unstable main contrib non-free
#deb-src http://packages.deepin.com/deepin unstable main contrib non-free
#Kali Linux2016.2
deb http://http.kali.org/kali kali-rolling main contrib non-free
deb-src http://http.kali.org/kali kali-rolling main contrib non-free
如下图
更新源
apt-get update
大概3分钟左右可以更新完,然后就可以像Kali Linux一样,任意安装所需要的工具了。 举个例子
安装sqlmap
apt-get install sqlmap
就是这种格式apt-get install 软件名
强迫症患者可以把Kali Linux下的工具全部搬到 Deepin上面,使用如下命令,安装Kali的全部工具
apt-get install kali-linux-all
然而我看到了要下载这么大的文件~! 当时就放弃这个想法了,真不清楚Demon他下载了多长时间~~ 细思恐极
安装 Metasploit
metasploit神器级别的工具,怎么错过。
Deepin Linux安装metasploit很简单,一条命令即可
apt-get install metasploit-framework
配置postgresql 数据库
先切换到root用户,然后再切换到postgresql
,然后就进入了数据库管理了
gg@gg-PC:~$ su
密码:
root@gg-PC:/home/gg# su postgres
postgres@gg-PC:/home/gg$
然后创建metasploit的数据库和用户
createuser msf -P -S -R -D #创建用户 会提示输入密码
createdb -O msf msf #创建数据库
配置metasploit数据库的连接
在metasploit的安装目录下新建database.yml
文件,内容如下
production:
adapter: postgresql
database: msf
username: msf
password: gg #我在上一步创建用户的时候 设置的密码
host: 127.0.0.1
port: 5432
pool: 75
timeout: 5
然后在msfconsole下手动连接数据库
msf > db_connect -y /usr/share/metasploit-framework/databa查看数据库连接状态
```r
msf > db_status
[*] postgresql connected to msf
解决metasploi搜索缓慢, 调用数据库缓存 实现秒搜索
Deepin Linux安装完metasploit后,例行公事 搜索下经典的08-067漏洞攻击模块
msf > search 08-067
[!] Module database cache not built yet, using slow search
Matching Modules
================
Name Disclosure Date Rank Description
---- --------------- ---- -----------
exploit/windows/smb/ms08_067_netapi 2008-10-28 great MS08-067 Microsoft Server Service Relative Path Stack Corruption
msf > exit
可以发现第1行就出现了警告:[!] Module database cache not built yet, using slow search
大意是没有调用缓存模块,只能使用慢速搜索了~~ ,这怎么能忍?Google查了下资料,解决方法是重启postgresql
和重建metasploit缓存
重启postgresql
# etc/init.d/postgresql restart
重新进msf 并重建缓存
gg@gg-PC:/usr/share/metasploit-framework$ msfconsole
_ _
/ \ /\ __ _ __ /_/ __
| |\ / | _____ \ \ ___ _____ | | / \ _ \ \
| | \/| | | ___\ |- -| /\ / __\ | -__/ | || | || | |- -|
|_| | | | _|__ | |_ / -\ __\ \ | | | | \__/| | | |_
|/ |____/ \___\/ /\ \\___/ \/ \__| |_\ \___\
Validate lots of vulnerabilities to demonstrate exposure
with Metasploit Pro -- Learn more on http://rapid7.com/metasploit
=[ metasploit v4.14.2-dev ]
+ -- --=[ 1631 exploits - 932 auxiliary - 282 post ]
+ -- --=[ 472 payloads - 40 encoders - 9 nops ]
+ -- --=[ Free Metasploit Pro trial: http://r-7.co/trymsp ]
重建缓存
msf > db_rebuild_cache
[*] Purging and rebuilding the module cache in the background...
查看metasploit数据库状态
msf > db_status
[*] postgresql selected, no connection
手动连接数据库
msf > db_connect -y /usr/share/metasploit-framework/database.yml
[*] Rebuilding the module cache in the background...
再次检验数据库
msf > db_status
[*] postgresql connected to msf
然后再次搜索就会发现 搜索速度瞬间上来了
没有再报错 数据库缓存没有建立 的错误了
metasploit秒搜效果
Deepin Linux下的Metasploit安装及优化的更多相关文章
- deepin linux下eclipse c/c++ 调试开源代码
1.deepin linux 下使用eclipse c/c++ 调试2. 编译选项,-g3 -O0,-g3表示输出调试信息,-O0不优化代码(第一个字母o的大写,第二个是数字0) 3.必备环境: gd ...
- 细说Linux下软件包的安装与管理
一 源码安装方式 由于linux操作系统开放源代码,因而在其上安装的软件大部分也都是开源软件,例如apache.tomcat.php等软件.开源软件基本都提供源码下载,源码安装的方式:源码安 ...
- Linux下nginx编译安装教程和编译参数详解
这篇文章主要介绍了Linux下nginx编译安装教程和编译参数详解,需要的朋友可以参考下 一.必要软件准备1.安装pcre 为了支持rewrite功能,我们需要安装pcre 复制代码代码如下: # y ...
- deepin linux 下C开发环境配置
# deepin linux 下C开发环境配置 ## 前言-----------------------------deepin操作系统商店默认提供了 eclipse for c\c++但是系统没有提 ...
- deepin linux下markdown实时预览
# deepin linux下markdown实时预览 ## 参考文章------------------------------ [vim安装markdown插件](http://www.jians ...
- Deepin Linux下为Wine创建文件关联
在Deepin Linux下,默认地,使用apt安装的Wine并没有创建文件关联,这使得在文件管理器中双击exe等Windows可执行文件时,不能直接运行.为此,必须手动在桌面环境中创建文件关联. 文 ...
- Linux下命令行安装weblogic10.3.6
Linux下命令行安装weblogic10.3.6 一.安装前准备工作: 1.创建用户useradd weblogic;创建用户成功linux系统会自动创建一个和用户名相同的分组,并将该用户分到改组中 ...
- Linux下MongoDB服务安装
Linux下MongoDB服务安装 MongoDB是一个基于分布式文件存储的数据库.由C++语言编写.旨在为WEB应用提供可扩展的高性能数据存储解决方案.MongoDB是一个介于关系数据库和非关系数据 ...
- Windows下的Memcache安装 linux下的Memcache安装
linux下的Memcache安装: 1. 下载 memcache的linux版本,注意 memcached 用 libevent 来作事件驱动,所以要先安装有 libevent. 官方网址:http ...
随机推荐
- java内部类之成员内部类之局部内部类
局部内部类特点: 1.定义在代码块.方法体内的类叫局部内部类 2.局部内部类访问外部类的属性和方法使用“外部类名.this.属性名”和“外部类名.this.方法名(参数)”的形式 3.对外部世界完全隐 ...
- 【[SCOI2016]背单词】
这是一道贪心题 刚开始yy出来一个比较\(sb\)的贪心 之后发现它错了 首先这道题得先把题面翻译成人话 如果存在一个单词是它的后缀,且当前没被填入,代价为\(n*n\): 如果不存在一个单词是它的后 ...
- Mysql 用户权限管理--从 xxx command denied to user xxx
今天遇到一个mysql 权限的问题,即标题所述 xxx command denied to user xxx,一般mysql 这种报错,基本都属于当前用户没有进行该操作的权限,需要 root 用户授 ...
- [19/04/22-星期一] GOF23_创建型模式(单例模式)
一.概念 <Design Patterns: Elements of Reusable Object-Oriented Software>(即后述<设计模式>一书),由 Eri ...
- Kali-linux渗透攻击应用
前面依次介绍了Armitage.MSFCONSOLE和MSFCLI接口的概念及使用.本节将介绍使用MSFCONSOLE工具渗透攻击MySQL数据库服务.PostgreSQL数据库服务.Tomcat服务 ...
- [转载] MySQL 注入攻击与防御
MySQL 注入攻击与防御 2017-04-21 16:19:3454921次阅读0 作者:rootclay 预估稿费:500RMB 投稿方式:发送邮件至linwei#360.cn,或登陆网页 ...
- selenium + python自动化测试unittest框架学习(二)
1.unittest单元测试框架文件结构 unittest是python单元测试框架之一,unittest测试框架的主要文件结构: File >report >all_case.py &g ...
- ThinkPHP5入门(二)----控制器篇
一.控制器访问 1.命名空间 命名空间与目录路径对应. 如:路径位置为:application/index/controller/Index.php 其文件的命名空间应为:app\index\cont ...
- centos6.4安装使用wine 持续更新中
首先,从wine的官网下载页面http://www.winehq.org/download/可以了解到centos安装wine需要EPEL软件仓库.那么首先安装EPEL软件仓库,从http://mir ...
- Python中级 —— 03进程与线程
多任务的实现有3种方式: 多进程模式: 多线程模式: 多进程+多线程模式. ** 进程: ** 不同任务,例如打开一个写字本,就是开启一个新进程. 多进程 Unix/Linux操作系统提供了一个for ...