metasploit: unbundle gems in -9999, minor cleanup of 4.4.

This commit is contained in:
Zero_Chaos 2013-01-10 04:56:24 +00:00
parent 72d810f232
commit 4e6a79dcbf
4 changed files with 65 additions and 76 deletions

View file

@ -1,5 +1,5 @@
AUX 91metasploit-4.4 100 SHA256 586e817f19c43ae74bea41c3643ca276908dbece4fbfb6ddbbc6ee93d8e8dd25 SHA512 a03d3cc9aef45e98eb675ebf9aad187d4c7027b2280aeec1b1cb874222001d7222eeb51e7219c849833d59e2f9d25761cd4ea1c7cb0dbfdf2d0324ba8cf68244 WHIRLPOOL 67ef1a08fc70f2f9419338ffafbecd59012b77e7ece477b5efd05e705477ab99d17232a42b38f7270e93f6c079614814a426d595aaa16efde4f569f819b1f686
AUX 91metasploit-9999 315 SHA256 e546cba0a2bb1c0f340757ef95542b231a0c52885eedda6183ccaa7e05fb1c36 SHA512 faa420ab88a7dc646f95a7edc0a6e0c1f2e22b9508205f1c17c5550d5fbfd6ebf74bcaef974e83c2717a77144c54f9b0ddb3ba0beb2cb4160575993e4ba04af6 WHIRLPOOL 4cfdd4935f6974af999c806032e08e16065ed66b319735d8c239b6a0431f6604633bb3dfb909302d4c88987c82a2a5d565758b612545df00982313c7c84cc11b
AUX 91metasploit-9999 196 SHA256 bc61578ced5ae15aee404feebd102d9da6d3f42840d765069a39ea53d9b860b7 SHA512 6a54f7d729331a84b593850e98ca80990ca8c45a0ab19e8bd202261a100b26ade1c55c61312ba1692ec9e29162fb8caa83188933763480f90ebaffe68f27bad2 WHIRLPOOL 10caf6d8f04e46b553b3a77d0d952887bae383a1cba37d6a8cbc7e54c0636fa7e8f200cc7743396b4969c46f1eb9b46058891bd1806534288b8871fd2287cd67
AUX armitage.yml 481 SHA256 2db3df7b05f28aa5ba6d6dedc32d8d1a2e24e020d6fd8aea15b2e76ed0f6ab46 SHA512 98a83f972f78ee63d241b58fbdce3171a24b2435371d46cad609f2f2ad50a5853cbfda5cf4632cfd9e69b2fb7ba3ce3c6aa765c7b44fbeb3eed868ffc068241d WHIRLPOOL ac85e47c26dcf56d69028af91513802767a2243ff52f6e031d447dfbda9120bd6436b4a0c6ab118cf3fd09dc3b47613e4e75c8ef83f4528783402bba1ab5e2ba
AUX hashdump2_script_6ac6c1d.rb 11382 SHA256 2535f9d3bac1f559b4e5d827e5847b08fe0477bbcb8585960ad45ff15ab30c63 SHA512 230f3ac021f768a2e00105c0a8b348e4b06ca16272590e9bc552b56741531feeb6e0ad44ef5ecd2cfd54e2dc67c6b5c500a81c061e847e6c43844a47e70c8fbc WHIRLPOOL dcbb80336a83a1ab0fee16b282fa4dec8c20fc00716d0d4fff6d963eb42d13671dda47732e87fe07f21b2da619fc6e14e9ba3e41f3f0eee2e10f665b5150a96a
AUX metasploit.icon 7630 SHA256 d197dd3b939c35d951c2cd5c19b51200ada7f8f92d90775a9eaebdccf18e3949 SHA512 569db261a3782f3874c30ccaf076be512437a9a5a9df835baf29bacec48dd76b2896e009b5ab165ba82aff72ab15d067155f257787e69c3a7cd034dafa5a9066 WHIRLPOOL 3f66eb2a3b51dc787f5da6b2fd93165fdca3e9ae391db0ea69cb0ea5c6c1d9f2d85fffbdb117da4065e0b3e29daa5b7d7e62740cd3210768aa0cfc4a63679376
@ -13,6 +13,6 @@ DIST framework-4.4.0.tar.bz2 148529027 SHA256 ddcc7890a394d8154120a163c90b11119a
DIST jboss_seam_remote_command_rb 3412 SHA256 c87f1cc1b82ed105c7bf551db7e3bad0a787244c4cdd124015a3ff24cedd23df SHA512 bc1bfa174086534ef0ac3168d072209dc7c944d4ad4f9f0841c45b748bedf4eb0464d19c018ac20c6dd0c8c52cde136d4c30b407f251477c33feebf3daa4ef7d WHIRLPOOL 4478404af4df5b2f723e52907c294a6d788a50dd1c9ed6d630b8302f8cd4d4a32942599a7397574d99eb10148af75eb51c1e33ec2b762ab8dbeff9a35ce56300
DIST vbsmem-1.2.1.patch 69002 SHA256 7991a5629c562817919c9bb1c8f0a3bdcd1c63cf9b9f32f322d1d266416589d2 SHA512 c68a246ad8b06f902148a5b63d0d47571fc075109e73aad302cec56cab436ba8e377e2fe5c3760d2a6834fb48b3a0bd345fc572b02b027f393612598f6a041e0 WHIRLPOOL 87a720033db70e8a1534889ecfa811b3b2fb5bf3dee64fa798ab8065d3f8a9d448991e0d1db52b1bf7a123bd536531a6be0d98a69090dadc7921097d876ed9ea
EBUILD metasploit-2.7-r1.ebuild 1831 SHA256 0a79d6da73d6d1ef52d585674de9b7ffae4756bbd8ee524f0f9cb22a330facb8 SHA512 fb4a09d078623dd98a98dea701adfedaf94bd47ac40b9692b7494022e829658e1f3ef59ab1a83000e99792fe118c54971c1b449ab1bb8b098d9275741037794f WHIRLPOOL 5eb501477942b5c523ae206347efb4672563e6bd1f1312589d16a585d31fd1696d0a2ba4f63e635d05e86997a71352c42190ccf7be95d88026da46abcb601fd3
EBUILD metasploit-4.4.0-r1.ebuild 8090 SHA256 685d8ada5cbbba9c7d0d1b58f559fc6c5079f55b6e8804a6c82be8703d5bf71e SHA512 7fe1774d7ad7c36488d399c3a0a0c663578539ef75582e5ae73f58870a9364c2a14088a30caf67c2ebbe160ffdc21aab076e271069dc444c03891d1bb6314970 WHIRLPOOL 6c5828198facc728b78f2e7b62e18f17357b2ff67c4ed40f3b99bb31b4c4683ac18f2ea0375356d7b041c22c3d797901e871efdfc93630262f4aa55fe0817de8
EBUILD metasploit-4.4.0-r1.ebuild 8501 SHA256 1224d77770f59a38805913c6a28e62469189dfe6620f8339cdf9d43a07e5885e SHA512 d1ca3507f8db1eda16946c402c9e63cb570bd63bad7337c43eb8c45fb1e232f0babfe317d71b5c625ab9c41e6979af756428141a39fe7a323b91c2ea37b7b44c WHIRLPOOL 08e68b464219b2374edefaede5f4e9b980924ef092c8cac85fd3e7cddf8968360f2f35831ea4fd2b0e7e2d255f1d25eb1df99efdfd0b3cf365659405e999e5d1
EBUILD metasploit-4.4.0.ebuild 8259 SHA256 1e617e40d11dca877e13045d068adb61be4f83474e65fba8b10602ab4c2371fb SHA512 50d4ba4d16fc0b479bad466b0482da1610313c55eac8494be3d8fbb214c1a63ece0fde6723056127e307295da39295213e06d759892690426bf2ff0ce93dab42 WHIRLPOOL 18895ff276a0a857c9c7a56f069ca61bd01b97bcd1310748c6b2f321b7dfd2712ba343dfa1be539965ee04be09864dd3bf3e26bc3ca94cf18f12f6d096f43286
EBUILD metasploit-9999.ebuild 7642 SHA256 ca9fc713cef7800882b0f67cbc38d101761127b604d663fa810d69aa428c7a71 SHA512 e0b78527f7f54d782bd16c6a8206a343b6ec76a72cd44f5d6f2b5c64b7fc5247621ee93bb02b95aea3cc5b8cc1d16daec051e65010b515d31d264e2eb41aa674 WHIRLPOOL bbca83d7819a48e9cf2ba900932c4c050b1a09be89bbd2b21fe173af5626dceee89e8af60d3e6afa8e7c156e3f4150221701042011e80295f5d69cb59f5f9496
EBUILD metasploit-9999.ebuild 7592 SHA256 775cd529cbfc44ed40c32d7915d79f48a984e8e83229a49ddaded38b80ad1a8f SHA512 a8db0c1640c3e89e97f9b6b2f64a876c9d972befaa256f0ec3e7703f93f148daf212ec5b6227afce1fa199fdbfc56e88503e3e2d33f01549673cfcfa1c89eb27 WHIRLPOOL 8d5c0a7e6a59ea09f4b419b3a202f6b315f255a0e07cd757fc9052e67382363a4f2b74a68bc2fea13d2b637f90398e16f16bf2e44df3312f4039c22360e6cfa3

View file

@ -3,8 +3,3 @@ MSF_DATABASE_CONFIG=/usr/lib/metasploit/armitage.yml
# needed because MSF ships an old version of metasm
# which isn't compatible with the new one
MSF_LOCAL_LIB="/usr/lib/metasploit/lib/metasm"
# Use system gems instead of bundled ones
#we are not ready for this yet
#MSF_BUNDLE_BINARY_GEMS=0
#MSF_BUNDLE_GEMS=0

View file

@ -55,7 +55,14 @@ QA_PREBUILT="
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/templates/template_x86_solaris.bin
usr/$(get_libdir)/${PN}${SLOT}/data/templates/template_x86_bsd.bin"
usr/$(get_libdir)/${PN}${SLOT}/data/templates/template_x86_bsd.bin
usr/$(get_libdir)/${PN}${SLOT}/data/cpuinfo/cpuinfo.ia32.bin
usr/$(get_libdir)/${PN}${SLOT}/data/cpuinfo/cpuinfo.ia64.bin
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_x64_linux.bin
usr/$(get_libdir)/${PN}${SLOT}/data/meterpreter/msflinker_linux_x86.bin
"
S=${WORKDIR}/msf3

View file

@ -17,52 +17,58 @@ HOMEPAGE="http://www.metasploit.org/"
SLOT="9999"
LICENSE="BSD"
KEYWORDS="~amd64 ~arm ~x86"
IUSE="+armitage +java gui unstable lorcon lorcon2 +pcaprub +postgres serialport"
IUSE="+armitage +java gui unstable lorcon lorcon2 +pcaprub serialport"
REQUIRED_USE="armitage? ( postgres )"
# Note we use bundled gems (see data/msfweb/vendor/rails/) as upstream voted for
# such solution, bug #247787
#Note: we no longer use bundled gems.
#because of this we must block all older version if we install this one
RDEPEND="dev-lang/ruby[ssl]
dev-ruby/rubygems
dev-ruby/activesupport
dev-ruby/activerecord
dev-ruby/json
>=dev-ruby/metasploit_data_models-0.3.1
dev-ruby/msgpack
dev-ruby/nokogiri
dev-ruby/pg
dev-ruby/robots
dev-ruby/kissfft
app-admin/eselect-metasploit
>=app-crypt/johntheripper-1.7.9-r1[-minimal]
!arm? ( dev-ruby/hpricot
gui? ( virtual/jre )
java? ( dev-ruby/rjb )
>=dev-ruby/msgpack-0.4.6
>=dev-ruby/json-1.6.6
>=dev-ruby/nokogiri-1.5.2 )
postgres? ( dev-db/postgresql-server
!arm? ( >=dev-ruby/pg-0.13.2
>=dev-ruby/activerecord-3.2.2[postgres] ) )
!arm? ( gui? ( virtual/jre )
java? ( dev-ruby/rjb ) )
dev-db/postgresql-server
pcaprub? ( net-libs/libpcap )
armitage? ( net-analyzer/nmap )
lorcon? ( net-wireless/lorcon-old )
lorcon2? ( net-wireless/lorcon )"
lorcon2? ( net-wireless/lorcon[ruby] )"
DEPEND=""
RESTRICT="strip"
QA_EXECSTACK="
usr/$(get_libdir)/${PN}${SLOT}/data/meterpreter/msflinker_linux_x86.bin"
QA_WX_LOAD="
usr/$(get_libdir)/${PN}${SLOT}/data/templates/template_*_linux.bin"
QA_PREBUILT="
usr/$(get_libdir)/${PN}${SLOT}/data/cpuinfo/cpuinfo.ia32.bin
usr/$(get_libdir)/${PN}${SLOT}/data/cpuinfo/cpuinfo.ia64.bin
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_x86_bsd.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/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_x86_bsd.bin"
usr/$(get_libdir)/${PN}${SLOT}/data/templates/template_x64_linux.bin
usr/$(get_libdir)/${PN}${SLOT}/data/templates/template_x86_bsd.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
"
S=${WORKDIR}/${MY_P}
src_prepare() {
rm "${S}"/msfupdate
use gui || rm msfgui
}
src_compile() {
if use pcaprub; then
cd "${S}"/external/pcaprub
@ -74,11 +80,6 @@ src_compile() {
ruby extconf.rb
emake
fi
if use lorcon2; then
cd "${S}"/external/ruby-lorcon2
ruby extconf.rb
emake
fi
if use serialport; then
cd "${S}"/external/serialport
ruby extconf.rb
@ -114,20 +115,14 @@ src_install() {
#Add new modules from metasploit bug report system not in the main tree yet
if use unstable; then
#smart hasdump from http://www.darkoperator.com/blog/2011/5/19/metasploit-post-module-smart_hashdump.html
#https://github.com/darkoperator/Meterpreter-Scripts
cp "${FILESDIR}"/smart_hasdump_script_6ac6c1d.rb "${ED}"/usr/$(get_libdir)/${PN}${SLOT}/scripts/meterpreter/smart_hasdump.rb || die "Copy files failed"
cp "${FILESDIR}"/hashdump2_script_6ac6c1d.rb "${ED}"/usr/$(get_libdir)/${PN}${SLOT}/scripts/meterpreter/hashdump2.rb || die "Copy files failed"
#smart hasdump from http://www.darkoperator.com/blog/2011/5/19/metasploit-post-module-smart_hashdump.html
#https://github.com/darkoperator/Meterpreter-Scripts
cp "${FILESDIR}"/smart_hasdump_script_6ac6c1d.rb "${ED}"/usr/$(get_libdir)/${PN}${SLOT}/scripts/meterpreter/smart_hasdump.rb || die "Copy files failed"
cp "${FILESDIR}"/hashdump2_script_6ac6c1d.rb "${ED}"/usr/$(get_libdir)/${PN}${SLOT}/scripts/meterpreter/hashdump2.rb || die "Copy files failed"
#Slow HTTP POST Denial Of Service
#https://dev.metasploit.com/redmine/issues/3638
#EAP-MD5 offline dictionary attack
#https://dev.metasploit.com/redmine/issues/4439
#JBoss remote command execution exploit
#https://dev.metasploit.com/redmine/issues/4585
cp "${DISTDIR}"/jboss_seam_remote_command_rb "${ED}"/usr/$(get_libdir)/${PN}${SLOT}/modules/exploits/multi/http/jboss_seam_remote_command.rb || die "Copy files failed"
#JBoss remote command execution exploit
#https://dev.metasploit.com/redmine/issues/4585
cp "${DISTDIR}"/jboss_seam_remote_command_rb "${ED}"/usr/$(get_libdir)/${PN}${SLOT}/modules/exploits/multi/http/jboss_seam_remote_command.rb || die "Copy files failed"
fi
#fi unstable
@ -140,52 +135,44 @@ src_install() {
cd "${S}"/external/ruby-lorcon
emake DESTDIR="${ED}" install
fi
if use lorcon2; then
cd "${S}"/external/ruby-lorcon2
emake DESTDIR="${ED}" install
fi
if use serialport; then
cd "${S}"/external/serialport
emake DESTDIR="${ED}" install
fi
#unbundle johntheripper, it makes me sick to have to do this...
#unbundle johntheripper, at least it now defaults to running the system version
rm -rf "${ED}"/usr/$(get_libdir)/${PN}${SLOT}/data/john/run.*
#unbundle the key ruby gems and the ones which install binaries so we don't have to allow (more) QA violations
rm -rf "${ED}"/usr/$(get_libdir)/${PN}${SLOT}/lib/gemcache/ruby/1.9.1/arch
rm -rf "${ED}"/usr/$(get_libdir)/${PN}${SLOT}/lib/gemcache/ruby/1.9.1/arch-old
rm -rf "${ED}"/usr/$(get_libdir)/${PN}${SLOT}/lib/gemcache/ruby/1.9.1/specifications/activerecord-*.gemspec
rm -rf "${ED}"/usr/$(get_libdir)/${PN}${SLOT}/lib/gemcache/ruby/1.9.1/specifications/msgpack-*.gemspec
rm -rf "${ED}"/usr/$(get_libdir)/${PN}${SLOT}/lib/gemcache/ruby/1.9.1/specifications/json-*.gemspec
rm -rf "${ED}"/usr/$(get_libdir)/${PN}${SLOT}/lib/gemcache/ruby/1.9.1/specifications/nokogiri-*.gemspec
rm -rf "${ED}"/usr/$(get_libdir)/${PN}${SLOT}/lib/gemcache/ruby/1.9.1/specifications/pg-*.gemspec
rm -rf "${ED}"/usr/$(get_libdir)/${PN}${SLOT}/lib/gemcache/ruby/1.9.1/gems/activerecord*
rm -rf "${ED}"/usr/$(get_libdir)/${PN}${SLOT}/lib/gemcache/ruby/1.9.1/gems/msgpack*
#unbundle the ruby gems, we now use system gems
rm -rf "${ED}"/usr/$(get_libdir)/${PN}${SLOT}/lib/gemcache/
rm -rf "${ED}"/usr/$(get_libdir)/${PN}${SLOT}/Gemfile
rm -rf "${ED}"/usr/$(get_libdir)/${PN}${SLOT}/Gemfile.lock
#sed -i "s#, :git => 'git://github.com/rapid7/metasploit_data_models.git', :tag => '0.3.0'##" "${ED}"/usr/$(get_libdir)/${PN}${SLOT}/Gemfile
#force to use the outdated bundled version of metasm
doenvd "${FILESDIR}"/91metasploit-${SLOT}
#while we are commiting fixes for filth, let's bogart msfupdate
rm "${ED}"/usr/$(get_libdir)/${PN}${SLOT}/msfupdate
echo "#!/bin/sh" > "${ED}"/usr/$(get_libdir)/${PN}${SLOT}/msfupdate
echo "echo \"[*]\"" >> "${ED}"/usr/$(get_libdir)/${PN}${SLOT}/msfupdate
echo "echo \"[*] Attempting to update the Metasploit Framework...\"" >> "${ED}"/usr/$(get_libdir)/${PN}${SLOT}/msfupdate
echo "echo \"[*]\"" >> "${ED}"/usr/$(get_libdir)/${PN}${SLOT}/msfupdate
echo "echo \"\"" >> "${ED}"/usr/$(get_libdir)/${PN}${SLOT}/msfupdate
echo "ESVN_REVISION=HEAD emerge --oneshot \"=${CATEGORY}/${PF}\"" >> "${ED}"/usr/$(get_libdir)/${PN}${SLOT}/msfupdate
fperms +x /usr/$(get_libdir)/${PN}${SLOT}/msfupdate
use gui && make_desktop_entry msfgui${SLOT} \
"Metasploit Framework" \
metasploit \
'GNOME;System;Network;' &&
if use gui; then
make_desktop_entry msfgui${SLOT} "Metasploit Framework" metasploit 'GNOME;System;Network;'
doicon "${FILESDIR}"/metasploit.icon
else
rm "${ED}"/usr/$(get_libdir)/${PN}${SLOT}/msfgui
fi
}
pkg_postinst() {
if use postgres; then
elog "You need to prepare the database as described on the following page:"
elog "https://community.rapid7.com/docs/DOC-1268"
fi
elog "You need to prepare the database as described on the following page:"
elog "https://community.rapid7.com/docs/DOC-1268"
"${EROOT}"/usr/bin/eselect metasploit set --use-old ${PN}${SLOT}