centos如何安装metasploit
admin
2023-02-15 14:40:06
0

实验环境

centos6.5_x64

 

实验软件

pgdg-centos94-9.4-1.noarch.rpm

yaml-0.1.7.tar.gz

ruby-2.2.5.tar.gz

nmap-7.12.tar.bz2

metasploit-framework.git

 

软件安装

rpm -ivh pgdg-centos94-9.4-1.noarch.rpm 

yum install -y postgresql94-server postgresql94-devel postgresql94

yum groupinstall -y 'Development Tools'

yum install -y  sqlite-devel libxslt-devel libxml2-devel java-1.7.0-openjdk libpcap-devel nano openssl-devel zlib-devel libffi-devel gdbm-devel readline-devel nano wget git 

 

tar zxvf yaml-0.1.7.tar.gz

cd yaml-0.1.7

./configure --prefix=/usr/local/

make

make install 

 

tar zxvf ruby-2.2.5.tar.gz 

cd ruby-2.2.5

./configure --prefix=/usr/local --with-opt-dir=/usr/local/lib

make

make install

 

tar jxvf nmap-7.12.tar.bz2 

cd nmap-7.12

./configure

make

make install

 

exclude=postgresql*

service postgresql-9.4 initdb

service postgresql-9.4 start

chkconfig --level 35 postgresql-9.4  on

echo export PATH=/usr/pgsql-9.4/bin:$PATH >> /etc/bashrc 

source ~/.bashrc

su - postgres

-bash-4.1$ createuser msf -P -S -R -D 

Enter password for new role: 

Enter it again: 

 

createdb -O msf msf

exit

 

cp /var/lib/pgsql/9.4/data/pg_hba.conf   /var/lib/pgsql/9.4/data/pg_hba.conf.bak

vim /var/lib/pgsql/9.4/data/pg_hba.conf 

 

 

 77 # TYPE  DATABASE        USER            ADDRESS                 METHOD

 78 

 79 # "local" is for Unix domain socket connections only

 80 local   all             all                                     md5

 81 # IPv4 local connections:

 82 host    all             all             127.0.0.1/32            md5

 83 # IPv6 local connections:

 84 host    all             all             ::1/128                 md5

 85 # Allow replication connections from localhost, by a user with thed

 86 # replication privilege.

 87 #local   replication     postgres                                peer

 88 #host    replication     postgres        127.0.0.1/32            ident

 89 #host    replication     postgres        ::1/128                 ident

 

service postgresql-9.4 restart

cd /opt/

git  clone https://github.com/rapid7/metasploit-framework.git

cd metasploit-framework

bash -c 'for MSF in $(ls msf*); do ln -s /opt/metasploit-framework/$MSF /usr/local/bin/$MSF;done'

ln -s /opt/metasploit-framework/armitage /usr/local/bin/armitage


gem install wirble pg sqlite3 msgpack activerecord redcarpet rspec simplecov yard bundler


bundle install

Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as root will

break this application for all non-root users on this machine.

Fetching gem metadata from https://rubygems.org/...........

Fetching version metadata from https://rubygems.org/..

Fetching dependency metadata from https://rubygems.org/.

Resolving dependencies...

Installing rake 11.2.2

Using i18n 0.7.0

Installing json 1.8.3 with native extensions

Installing minitest 5.9.0

Using thread_safe 0.3.5

Installing builder 3.2.2

Installing erubis 2.7.0

Installing mini_portile2 2.1.0

.............

 

vim /opt/metasploit-framework/database.yml

 

production:

   adapter: postgresql

   database: msf

   username: msf

   password: abc123

   host: 127.0.0.1

   port: 5432

   pool: 75

   timeout: 5

 

netstat -tuplna | grep 5432

tcp        0      0 127.0.0.1:5432              0.0.0.0:*                   LISTEN      30767/postmaster    

tcp        0      0 ::1:5432                    :::*                        LISTEN      30767/postmaster    

 

echo export MSF_DATABASE_CONFIG=/opt/metasploit-framework/database.yml >> /etc/bashrc 

source ~/.bashrc

 

验证

msfconsole

centos如何安装metasploit

相关内容

热门资讯

广州远联取得带全方位保护结构的... 国家知识产权局信息显示,广州远联物流服务有限公司取得一项名为“一种带全方位保护结构的升降平台”的专利...
695分放弃清北选择上海交大,... 作者:林靖 责编:缪琦在高考志愿填报中,比起学校,越来越多考生和家长更加看重专业和就业前景。专业优先...
马杜罗被强掳走了,委内瑞拉的3... 据美国有线电视新闻网(CNN)7月23日报道,委内瑞拉近期遭遇强震,本国GDP蒙受6%的巨额损失,灾...
电风扇通电不转,但是有电 原因可能是因为电风扇缺油了,可以通过给风扇注油试试,具体的注油方式是能将电机拆下来,然后再对主轴和前...
美的波轮洗衣机通电不转怎么回事 可能是洗衣机顶盖的安全开关损坏,安全开关与可以控制洗衣机的程序,所以需要更换安全开关;可能是异物卡住...
冰箱通电不启动是怎么回事? 可能是电路故障。电源线开路,电源线插头与插座接触不良,启动继电器、过载保护器接线端子脱落或接触不良,...
为什么我家里的燃气热水器通电不... 1、可能是水管内没有水流通过,热水器不工作。2、可能是电池电量低,无法推动点火器。3、可能是水压低造...
冰箱通电后压缩机不启动,但压缩... 1、非常有可能是因为冰箱的压缩机内高压输出缓冲管出现了断裂,造成高压管不排气低压管不吸气的这种状况,...
身高缩了,房子小了,胆子也怯了... 据日经中文网7月24日报道,日本经济长期停滞催生了“不断缩小”的社会倾向,近年来日本人的平均身高持续...
广东省内铁路即将全线停运 作者 | 第一财经 南英今年第12号台风“红霞”已于7月24日凌晨生成,预计25日夜间至26日早晨在...