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 ...
随机推荐
- angularJs的$scope.$apply
<!DOCTYPE HTML> <html ng-app> <head> <meta http-equiv="Content-Type" ...
- php-fpm配置参数.md
Global Options pid string PID文件的位置.默认为空.默认路径放在/usr/local/php-fpm/var. error_log string 错误日志的位置.默认:安装 ...
- 从 Swift 中的序列到类型擦除
如果有这样的一个需求,我希望能像数组一样,用 for 循环遍历一个类或结构体中的所有属性.就像下面这样: let persion = Persion() for i in persion { prin ...
- 1085. [SCOI2005]骑士精神【IDA※】
Description 在一个5×5的棋盘上有12个白色的骑士和12个黑色的骑士, 且有一个空位.在任何时候一个骑士都能按照骑 士的走法(它可以走到和它横坐标相差为1,纵坐标相差为2或者横坐标相差为2 ...
- Graph I - Graph
Graph There are two standard ways to represent a graph G=(V,E)G=(V,E), where VV is a set of vertices ...
- 将本地已经存在的非git项目提交到github上的空仓库
一.本地项目执行操作 1.在本地项目目录下初始化git仓库 git init 2.将本地项目下工作区的所有文件添加到git版本库的暂存区中 git add . (可以创建.gitignore文件忽略不 ...
- 【转】Spring+Mybatis+SpringMVC+Maven+MySql搭建实例
林炳文Evankaka原创作品.转载请注明出处http://blog.csdn.net/evankaka 摘要:本文主要讲了如何使用Maven来搭建Spring+Mybatis+SpringMVC+M ...
- App测试需要测什么
App,做为当下最热的手机安装软件,无论是产品本身的设计还是性能,易用性等都是非常受考验.一个app能在用户的手机上使用,并作为一个长期用户是非常不容易的.那么,App的测试中我们到底要测试什么呢? ...
- ios下元素溢出设置 overflow:auto; 不能滑动解决办法
ios下元素溢出设置 overflow:auto; 不能滑动解决办法: overflow:auto; overflow-y:scroll; -webkit-overflow-scrolling:tou ...
- .net core 实践笔记(三)--封装底层
前言: 有了前面的工作,简单的架子基本搭建起来了,因为条件有限,只能先测试SqlServer的了,源码放出来,也希望有兴趣的伙伴可以一起改善,相信可以成为未来进阶架构师的第一步,自己有小项目的时候可以 ...