installex factory是什么意思思?

Metasploit Framework が突然の死を迎えたので作業めも
OS:ubuntu-12.10-desktop-amd64
OSインストール
追加パッケージなし
起動後、必要なパッケージを入れる
手順を追うだけなので、アップデートはしていない
openssh-server
いろいろ便利なので。
% sudo apt-get update
% sudo apt-get install openssh-server
% sudo start ssh
ruby と git
% sudo apt-get install git
% sudo apt-get install ruby
Metasploitインストール
ここから本題。
% git clone /rapid7/metasploit-framework.git
Cloning into 'metasploit-framework'...
remote: Counting objects: 191992, done.
remote: Compressing objects: 100% (), done.
remote: Total 191992 (delta 136039), reused 188983 (delta 133606)
Receiving objects: 100% (992), 204.35 MiB | 1.20 MiB/s, done.
Resolving deltas: 100% (039), done.
動かすとエラーが出るので必要なものを入れていく。
% ./metasploit-framework/msfconsole
[*] Metasploit requires the Bundler gem to be installed
$ gem install bundler
いれるもの(とりあえず手で入れてみる)
こんなことしなくても bundler を使って一括で入れましょうw
% ./metasploit-framework/msfconsole
Could not find rake-10.0.4 in any of the sources
% sudo gem install rake -v 10.0.4
Fetching: rake-10.0.4.gem (100%)
Successfully installed rake-10.0.4
1 gem installed
% ./metasploit-framework/msfconsole
Could not find i18n-0.6.1 in any of the sources
% sudo gem install i18n -v 0.6.1
Fetching: i18n-0.6.1.gem (100%)
Successfully installed i18n-0.6.1
1 gem installed
multi_json
% ./metasploit-framework/msfconsole
Could not find multi_json-1.0.4 in any of the sources
% sudo gem install multi_json -v 1.0.4
Fetching: multi_json-1.0.4.gem (100%)
Successfully installed multi_json-1.0.4
1 gem installed
activesupport
% ./metasploit-framework/msfconsole
Could not find activesupport-3.2.13 in any of the sources
% sudo gem install activesupport -v 3.2.13
Fetching: activesupport-3.2.13.gem (100%)
Successfully installed activesupport-3.2.13
1 gem installed
% ./metasploit-framework/msfconsole
Could not find builder-3.0.4 in any of the sources
% sudo gem install builder -v 3.0.4
Fetching: builder-3.0.4.gem (100%)
Successfully installed builder-3.0.4
1 gem installed
activemodel
% ./metasploit-framework/msfconsole
Could not find activemodel-3.2.13 in any of the sources
% sudo gem install activemodel -v 3.2.13
Fetching: activemodel-3.2.13.gem (100%)
Successfully installed activemodel-3.2.13
1 gem installed
% ./metasploit-framework/msfconsole
Could not find arel-3.0.2 in any of the sources
% sudo gem install arel -v 3.0.2
Fetching: arel-3.0.2.gem (100%)
Successfully installed arel-3.0.2
1 gem installed
% ./metasploit-framework/msfconsole
Could not find tzinfo-0.3.37 in any of the sources
% sudo gem install tzinfo -v 0.3.37
Fetching: tzinfo-0.3.37.gem (100%)
Successfully installed tzinfo-0.3.37
1 gem installed
activerecord
% ./metasploit-framework/msfconsole
Could not find activerecord-3.2.13 in any of the sources
% sudo gem install activerecord -v 3.2.13
Fetching: activerecord-3.2.13.gem (100%)
Successfully installed activerecord-3.2.13
1 gem installed
database_cleaner
% ./metasploit-framework/msfconsole
Could not find database_cleaner-0.9.1 in any of the sources
% sudo gem install database_cleaner -v 0.9.1
Fetching: database_cleaner-0.9.1.gem (100%)
Successfully installed database_cleaner-0.9.1
1 gem installed
% ./metasploit-framework/msfconsole
Could not find diff-lcs-1.2.2 in any of the sources
% sudo gem install diff-lcs -v 1.2.2
Fetching: diff-lcs-1.2.2.gem (100%)
Successfully installed diff-lcs-1.2.2
1 gem installed
factory_girl
% ./metasploit-framework/msfconsole
Could not find factory_girl-4.2.0 in any of the sources
% sudo gem install factory_girl -v 4.2.0
Fetching: factory_girl-4.2.0.gem (100%)
Successfully installed factory_girl-4.2.0
1 gem installed
% ./metasploit-framework/msfconsole
Could not find json-1.7.7 in any of the sources
% sudo gem install json -v 1.7.7
Fetching: json-1.7.7.gem (100%)
Building native extensions.
This could take a while...
Error installing json:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mkmf (LoadError)
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from extconf.rb:1:in `&main&'
% sudo apt-get install ruby-dev
% sudo gem install json -v 1.7.7
Building native extensions.
This could take a while...
Successfully installed json-1.7.7
1 gem installed
% ./metasploit-framework/msfconsole
Could not find pg-0.15.0 in any of the sources
% sudo gem install pg -v 0.15.0
Fetching: pg-0.15.0.gem (100%)
Building native extensions.
This could take a while...
Error installing pg:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb
checking for pg_config... no
No pg_config... trying anyway. If building fails, please try again with
--with-pg-config=/path/to/pg_config
checking for libpq-fe.h... no
Can't find the 'libpq-fe.h header
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.
Check the mkmf.log file for more
You may need configuration options.
% sudo apt-get install postgresql
% sudo gem install pg -v 0.15.0
Building native extensions.
This could take a while...
Error installing pg:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb
checking for pg_config... yes
Using config values from /usr/bin/pg_config
You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for building a client-side application.
You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for building a client-side application.
checking for libpq-fe.h... no
Can't find the 'libpq-fe.h header
*** extconf.rb failed ***
% sudo apt-get install postgresql-server-dev-9.1
% sudo gem install pg -v 0.15.0
Building native extensions.
This could take a while...
Successfully installed pg-0.15.0
1 gem installed
metasploit_data_models
% ./metasploit-framework/msfconsole
Could not find metasploit_data_models-0.6.14 in any of the sources
% sudo gem install metasploit_data_models -v 0.6.14
Fetching: metasploit_data_models-0.6.14.gem (100%)
Successfully installed metasploit_data_models-0.6.14
1 gem installed
% ./metasploit-framework/msfconsole
Could not find msgpack-0.5.4 in any of the sources
% sudo gem install msgpack -v 0.5.4
Fetching: msgpack-0.5.4.gem (100%)
Building native extensions.
This could take a while...
Successfully installed msgpack-0.5.4
1 gem installed
% ./metasploit-framework/msfconsole
Could not find nokogiri-1.5.9 in any of the sources
% sudo gem install nokogiri -v 1.5.9
Building native extensions.
This could take a while...
Error installing nokogiri:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb
checking for libxml/parser.h... no
libxml2 is missing.
please visit http://nokogiri.org/tutorials/installing_nokogiri.html for help with installing dependencies.
*** extconf.rb failed ***
% sudo apt-get install libxml2-dev
% ./metasploit-framework/msfconsole
Could not find nokogiri-1.5.9 in any of the sources
% sudo gem install nokogiri -v 1.5.9
Building native extensions.
This could take a while...
Error installing nokogiri:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb
checking for libxml/parser.h... yes
checking for libxslt/xslt.h... no
libxslt is missing.
please visit http://nokogiri.org/tutorials/installing_nokogiri.html for help with installing dependencies.
*** extconf.rb failed ***
% sudo apt-get install libxslt1-dev
% sudo gem install nokogiri -v 1.5.9
Building native extensions.
This could take a while...
Successfully installed nokogiri-1.5.9
1 gem installed
% ./metasploit-framework/msfconsole
Could not find pcaprub-0.11.3 in any of the sources
% sudo gem install pcaprub -v 0.11.3
Fetching: pcaprub-0.11.3.gem (100%)
Building native extensions.
This could take a while...
Error installing pcaprub:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb
[*] Running checks for pcaprub code...
platform is x86_64-linux
checking for pcap_open_live() in -lpcap... no
checking for pcap_setnonblock() in -lpcap... no
creating Makefile
compiling pcaprub.c
pcaprub.c:8:18: fatal error: pcap.h: No such file or directory
compilation terminated.
make: *** [pcaprub.o] Error 1
% sudo apt-get install libpcap-dev
% sudo gem install pcaprub -v 0.11.3
Building native extensions.
This could take a while...
Successfully installed pcaprub-0.11.3
1 gem installed
% ./metasploit-framework/msfconsole
Could not find redcarpet-2.2.2 in any of the sources
% sudo gem install redcarpet -v 2.2.2
Fetching: redcarpet-2.2.2.gem (100%)
Building native extensions.
This could take a while...
Successfully installed redcarpet-2.2.2
1 gem installed
% ./metasploit-framework/msfconsole
Could not find robots-0.10.1 in any of the sources
% sudo gem install robots -v 0.10.1
Fetching: robots-0.10.1.gem (100%)
Successfully installed robots-0.10.1
1 gem installed
rspec-core
% ./metasploit-framework/msfconsole
Could not find rspec-core-2.13.1 in any of the sources
% sudo gem install rspec-core -v 2.13.1
Fetching: rspec-core-2.13.1.gem (100%)
Successfully installed rspec-core-2.13.1
1 gem installed
rspec-expectations
% ./metasploit-framework/msfconsole
Could not find rspec-expectations-2.13.0 in any of the sources
% sudo gem install rspec-expectations -v 2.13.0
Fetching: rspec-expectations-2.13.0.gem (100%)
Successfully installed rspec-expectations-2.13.0
1 gem installed
rspec-mocks
% ./metasploit-framework/msfconsole
Could not find rspec-mocks-2.13.0 in any of the sources
% sudo gem install rspec-mocks -v 2.13.0
Fetching: rspec-mocks-2.13.0.gem (100%)
Successfully installed rspec-mocks-2.13.0
1 gem installed
% ./metasploit-framework/msfconsole
Could not find rspec-2.13.0 in any of the sources
% sudo gem install rspec -v 2.13.0
Fetching: rspec-2.13.0.gem (100%)
Successfully installed rspec-2.13.0
1 gem installed
simplecov-html
% ./metasploit-framework/msfconsole
Could not find simplecov-html-0.5.3 in any of the sources
% sudo gem install simplecov-html -v 0.5.3
Fetching: simplecov-html-0.5.3.gem (100%)
Successfully installed simplecov-html-0.5.3
1 gem installed
% ./metasploit-framework/msfconsole
Could not find simplecov-0.5.4 in any of the sources
% sudo gem install simplecov -v 0.5.4
Fetching: simplecov-0.5.4.gem (100%)
Successfully installed simplecov-0.5.4
1 gem installed
% ./metasploit-framework/msfconsole
Could not find yard-0.8.5.2 in any of the sources
% sudo gem install yard -v 0.8.5.2
Fetching: yard-0.8.5.2.gem (100%)m
Successfully installed yard-0.8.5.2
1 gem installed
% ./metasploit-framework/msfconsole
#################
######################
#########################
############################
##############################
###############################
###############################
##############################
##########
#######################
####################
##################
############
############
############
#######################
########################
http://metasploit.pro
=[ metasploit v4.7.0-dev [core:4.7 api:1.0]
+ -- --=[ 1082 exploits - 608 auxiliary - 177 post
+ -- --=[ 298 payloads - 29 encoders - 8 nops
あっぷでーとしてみる
% cd metasploit-framework/
% ./msfupdate
[*] Attempting to update the Metasploit Framework...
fatal: 'upstream' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
[*] Attempting to add remote 'upstream' to your local git repository.
[*] Added remote 'upstream' to your local git repository.
HEAD is now at 15e2ceb Land #1660, dlink backdoor wordlist
Already on 'master'
From git:///rapid7/metasploit-framework
* [new branch]
ChrisJohnRiley-sip_invite_spoof -& upstream/ChrisJohnRiley-sip_invite_spoof
* [new branch]
Datacut-master -& upstream/Datacut-master
* [new branch]
Meatballs1-smb_login -& upstream/Meatballs1-smb_login
* [new branch]
SherifEldeeb-master -& upstream/SherifEldeeb-master
* [new branch]
-& upstream/WinRM
* [new branch]
add-kaminari-to-gemcache -& upstream/add-kaminari-to-gemcache
* [new branch]
-& upstream/arthastp
* [new branch]
bmerinofe-telnet_ruggedcom -& upstream/bmerinofe-telnet_ruggedcom
* [new branch]
bug/7292-testcase -& upstream/bug/7292-testcase
* [new branch]
bug/bypassuac-enable-windows-8 -& upstream/bug/bypassuac-enable-windows-8
* [new branch]
bug/fix-ruby-payloads -& upstream/bug/fix-ruby-payloads
* [new branch]
bug/obsolete-activerecord-patch -& upstream/bug/obsolete-activerecord-patch
* [new branch]
bug/update-active-record -& upstream/bug/update-active-record
* [new branch]
bug/yard-guard -& upstream/bug/yard-guard
* [new branch]
bugs/fix-payload-set-iterator -& upstream/bugs/fix-payload-set-iterator
* [new branch]
bugs/fix-rdp-check -& upstream/bugs/fix-rdp-check
* [new branch]
cmaruti-Dell_iDrac -& upstream/cmaruti-Dell_iDrac
* [new branch]
darkoperator-skype_enum -& upstream/darkoperator-skype_enum
* [new branch]
feature/active-record-migrator-migrations-paths -& upstream/feature/active-record-migrator-migrations-paths
* [new branch]
feature/all-modules-load-spec -& upstream/feature/all-modules-load-spec
* [new branch]
feature/bump-rails-and-gemcache -& upstream/feature/bump-rails-and-gemcache
* [new branch]
feature/metasploit_data_models-0.6.2 -& upstream/feature/metasploit_data_models-0.6.2
* [new branch]
feature/migrations-in-metasploit_data_models -& upstream/feature/migrations-in-metasploit_data_models
* [new branch]
feature/niagara-modules -& upstream/feature/niagara-modules
* [new branch]
feature/patchable-web-vuln-import -& upstream/feature/patchable-web-vuln-import
* [new branch]
feature/railgun/error_msg -& upstream/feature/railgun/error_msg
* [new branch]
feature/rake-db -& upstream/feature/rake-db
* [new branch]
fixes-ie-0day -& upstream/fixes-ie-0day
* [new branch]
jvazquez-r7-coolpdf_image_stream_bof -& upstream/jvazquez-r7-coolpdf_image_stream_bof
* [new branch]
jvazquez-r7-gimp_script_fu -& upstream/jvazquez-r7-gimp_script_fu
* [new branch]
jvazquez-r7-lmgrd_overflow -& upstream/jvazquez-r7-lmgrd_overflow
* [new branch]
jvazquez-r7-setuid_tunnelblick -& upstream/jvazquez-r7-setuid_tunnelblick
* [new branch]
-& upstream/master
* [new branch]
meterpreter-submodule -& upstream/meterpreter-submodule
* [new branch]
module/postgres-scanner -& upstream/module/postgres-scanner
* [new branch]
module/rails-exploit -& upstream/module/rails-exploit
* [new branch]
-& upstream/ms09-022
* [new branch]
nahualito-codesys_gateway_server_remote_execution.rb -& upstream/nahualito-codesys_gateway_server_remote_execution.rb
* [new branch]
olliwolli-sharepointadfs -& upstream/olliwolli-sharepointadfs
* [new branch]
pcanywhere_login -& upstream/pcanywhere_login
* [new branch]
-& upstream/rails3
* [new branch]
-& upstream/release
* [new branch]
release-4.5-tech-preview -& upstream/release-4.5-tech-preview
* [new branch]
revert-msfupdate -& upstream/revert-msfupdate
* [new branch]
revertastic-reverse-http -& upstream/revertastic-reverse-http
* [new branch]
scriptjunkie-migrator -& upstream/scriptjunkie-migrator
* [new branch]
telnet-banner-unicode -& upstream/telnet-banner-unicode
* [new branch]
-& upstream/unstable
* [new branch]
-& upstream/userpass
* [new branch]
web-modules -& upstream/web-modules
Already up-to-date.
[*] Updating gems...
Using rake (10.0.4)
Using i18n (0.6.1)
Using multi_json (1.0.4)
Using activesupport (3.2.13)
Using builder (3.0.4)
Using activemodel (3.2.13)
Using arel (3.0.2)
Using tzinfo (0.3.37)
Using activerecord (3.2.13)
Using database_cleaner (0.9.1)
Using diff-lcs (1.2.2)
Using factory_girl (4.2.0)
Using json (1.7.7)
Using pg (0.15.0)
Using metasploit_data_models (0.6.14)
Using msgpack (0.5.4)
Using nokogiri (1.5.9)
Using pcaprub (0.11.3)
Using redcarpet (2.2.2)
Using robots (0.10.1)
Using rspec-core (2.13.1)
Using rspec-expectations (2.13.0)
Using rspec-mocks (2.13.0)
Using rspec (2.13.0)
Using simplecov-html (0.5.3)
Using simplecov (0.5.4)
Using yard (0.8.5.2)
Using bundler (1.3.5)
Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.
足りないgemはbundleで入れたらいいよね
% ./msfconsole
Could not find rake-10.0.4 in any of the sources
Run `bundle install` to install missing gems.
% bundle install
Fetching gem metadata from http://rubygems.org/.........
Fetching gem metadata from http://rubygems.org/..
Installing rake (10.0.4)
Installing i18n (0.6.1)
Installing multi_json (1.0.4)
Installing activesupport (3.2.13)
Installing builder (3.0.4)
Installing activemodel (3.2.13)
Installing arel (3.0.2)
Installing tzinfo (0.3.37)
Installing activerecord (3.2.13)
Installing database_cleaner (0.9.1)
Installing diff-lcs (1.2.2)
Installing factory_girl (4.2.0)
Installing json (1.7.7)
Installing pg (0.15.0)
Installing metasploit_data_models (0.6.14)
Installing msgpack (0.5.4)
Installing nokogiri (1.5.9)
Installing pcaprub (0.11.3)
Installing redcarpet (2.2.2)
Installing robots (0.10.1)
Installing rspec-core (2.13.1)
Installing rspec-expectations (2.13.0)
Installing rspec-mocks (2.13.0)
Installing rspec (2.13.0)
Installing simplecov-html (0.5.3)
Installing simplecov (0.5.4)
Installing yard (0.8.5.2)
Using bundler (1.3.5)
Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.
こぴぺでごー:
sudo apt-get update
sudo apt-get -y install git ruby ruby-dev postgresql postgresql-server-dev-9.1 libxml2-dev libxslt1-dev libpcap-dev
sudo gem install bundler
git clone /rapid7/metasploit-framework.git
cd metasploit-framework
bundle install
metasploit v4.10.1-devに上げた時にnokogiri(他)でハマったので( 追記)
どのバージョンからは知らないけど久々にアップデートしたら。。。
$ ./msfupdate
(... 省略 ...)
Building nokogiri using packaged libraries.
Building libxml2-2.8.0 for nokogiri with the following patches applied:
- 0001-Fix-parser-local-buffers-size-problems.patch
- 0002-Fix-entities-local-buffers-size-problems.patch
- 0003-Fix-an-error-in-previous-commit.patch
- 0004-Fix-potential-out-of-bound-access.patch
- 0005-Detect-excessive-entities-expansion-upon-replacement.patch
- 0006-Do-not-fetch-external-parsed-entities.patch
- 0007-Enforce-XML_PARSER_EOF-state-handling-through-the-pa.patch
- 0008-Improve-handling-of-xmlStopParser.patch
- 0009-Fix-a-couple-of-return-without-value.patch
- 0010-Keep-non-significant-blanks-node-in-HTML-parser.patch
- 0011-Do-not-fetch-external-parameter-entities.patch
************************************************************************
IMPORTANT!
Nokogiri builds and uses a packaged version of libxml2.
If this is a concern for you and you want to use the system library
instead, abort this installation process and reinstall nokogiri as
gem install nokogiri -- --use-system-libraries
If you are using Bundler, tell it to use the option:
bundle config build.nokogiri --use-system-libraries
bundle install
However, note that nokogiri does not necessarily support all versions
of libxml2.
For example, libxml2-2.9.0 and higher are currently known to be broken
and thus unsupported by nokogiri, due to compatibility problems and
XPath optimization bugs.
************************************************************************
Building libxslt-1.1.28 for nokogiri with the following patches applied:
- 0001-Adding-doc-update-related-to-1.1.28.patch
- 0002-Fix-a-couple-of-places-where-f-printf-parameters-wer.patch
- 0003-Initialize-pseudo-random-number-generator-with-curre.patch
- 0004-EXSLT-function-str-replace-is-broken-as-is.patch
- 0006-Fix-str-padding-to-work-with-UTF-8-strings.patch
- 0007-Separate-function-for-predicate-matching-in-patterns.patch
- 0008-Fix-direct-pattern-matching.patch
- 0009-Fix-certain-patterns-with-predicates.patch
- 0010-Fix-handling-of-UTF-8-strings-in-EXSLT-crypto-module.patch
- 0013-Memory-leak-in-xsltCompileIdKeyPattern-error-path.patch
- 0014-Fix-for-bug-436589.patch
- 0015-Fix-mkdir-for-mingw.patch
************************************************************************
IMPORTANT!
Nokogiri builds and uses a packaged version of libxslt.
If this is a concern for you and you want to use the system library
instead, abort this installation process and reinstall nokogiri as
gem install nokogiri -- --use-system-libraries
If you are using Bundler, tell it to use the option:
bundle config build.nokogiri --use-system-libraries
bundle install
************************************************************************
とか言われたのでやったことメモ
$ sudo gem uninstall nokogiri
$ sudo apt-get install libxml2-dev libxslt1-dev
$ sudo gem install nokogiri -v '1.6.3.1' -- --use-system-libraries
$ ./msfupdate
robotsがLoadErrorを吐くので
$ gem list -d robots
*** LOCAL GEMS ***
robots (0.10.1)
Author: Kyle Maxwell
Homepage: /fizx/robots
Installed at: /var/lib/gems/1.9.1
Simple robots.txt parser
$ ls -l /var/lib/gems/1.9.1/gems/robots-0.10.1/lib/robots.rb
-rw-rw---- 1 root root -10 23:49 /var/lib/gems/1.9.1/gems/robots-0.10.1/lib/robots.rb
$ sudo chmod a+r /var/lib/gems/1.9.1/gems/robots-0.10.1/lib/robots.rb
$ ls -l /var/lib/gems/1.9.1/gems/robots-0.10.1/lib/robots.rb
-rw-rw-r-- 1 root root -10 23:49 /var/lib/gems/1.9.1/gems/robots-0.10.1/lib/robots.rb
& Copyright 2014, togakushi.
Created using}

我要回帖

更多关于 factory mode什么意思 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信