summaryrefslogtreecommitdiff
path: root/net-analyzer/metasploit
diff options
context:
space:
mode:
authorBlackNoxis <steven.darklight@gmail.com>2014-02-15 23:24:26 +0200
committerBlackNoxis <steven.darklight@gmail.com>2014-02-15 23:24:26 +0200
commit7224c1253228e5c29c78cb3f0f26ce34770f2356 (patch)
tree1684924656132935256e034f35f92abee6623265 /net-analyzer/metasploit
Added ebuilds for kogaion desktop
Diffstat (limited to 'net-analyzer/metasploit')
-rw-r--r--net-analyzer/metasploit/Manifest8
-rw-r--r--net-analyzer/metasploit/metasploit-9999.ebuild215
2 files changed, 223 insertions, 0 deletions
diff --git a/net-analyzer/metasploit/Manifest b/net-analyzer/metasploit/Manifest
new file mode 100644
index 00000000..567c4a21
--- /dev/null
+++ b/net-analyzer/metasploit/Manifest
@@ -0,0 +1,8 @@
+AUX armitage.yml 481 RMD160 d2f742ce1660a4ad43859b2ff6468d33716c2c74 SHA1 731283171a27cb2f4617c73df4ce0da6dcd3aef7 SHA256 2db3df7b05f28aa5ba6d6dedc32d8d1a2e24e020d6fd8aea15b2e76ed0f6ab46
+AUX hashdump2_script_6ac6c1d.rb 11382 RMD160 faabc47a80ae4a76f42a6364c08c38b961506555 SHA1 65a2db4982f240767b7e69b694cd900c8f908fa5 SHA256 2535f9d3bac1f559b4e5d827e5847b08fe0477bbcb8585960ad45ff15ab30c63
+AUX msfrpcd.confd 443 RMD160 03cafbafba9af1f6a4e70810942f11b7086dc98f SHA1 fb4c3aab4b1e38ddeaeafe69b1e72ce81fba3505 SHA256 8d29b5975f1c91ecd6ec552b04e8fc82e0a6fe2c782d6b214544d9a01f73eeb3
+AUX msfrpcd.initd 622 RMD160 d5923c49a9a7a4e6010c2b2e8927d13dfee8e9ef SHA1 9c664a4f8b6df69ec859e5bdcd71908b8f43856d SHA256 d6b7f865ccd3d7795e65886e2e46ce023aa56b519c12a9f41616ff21988579c9
+AUX smart_hasdump_script_6ac6c1d.rb 15510 RMD160 3ff084bf3b86df1fa37499b004ca040161b324b8 SHA1 3795c23ae5160fdc13ba1d9c7f05e3893ff6f4e9 SHA256 66dec160dd9cc2fee2f8de11bf433f40baa1f41734ecf62aca9a32e0ca8a438f
+DIST jboss_seam_remote_command_rb 3412 RMD160 c577b1bd75943f2ddceea3161bc1037dd0150c2f SHA1 b858c726d3ee26317726635373d5db3b7eeb774d SHA256 c87f1cc1b82ed105c7bf551db7e3bad0a787244c4cdd124015a3ff24cedd23df
+DIST vbsmem-1.2.1.patch 69002 RMD160 281461151b0d1e453ee613326f4457eebaddebaa SHA1 883a582552e00102be452a2a0105b9e016b3dccc SHA256 7991a5629c562817919c9bb1c8f0a3bdcd1c63cf9b9f32f322d1d266416589d2
+EBUILD metasploit-9999.ebuild 8526 RMD160 8e948baaaa24e5a0a30ad0258b2b28ae92e59759 SHA1 5893516f12bcd0a892f126d83f2ef0ae2b6d29bf SHA256 d5d7e803319d24c13f9e1ac602c3ca813f689d162a0c654f54c43d93cb371b91
diff --git a/net-analyzer/metasploit/metasploit-9999.ebuild b/net-analyzer/metasploit/metasploit-9999.ebuild
new file mode 100644
index 00000000..4310c435
--- /dev/null
+++ b/net-analyzer/metasploit/metasploit-9999.ebuild
@@ -0,0 +1,215 @@
+# Copyright 1998-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/metasploit/metasploit-3.1_p5699-r1.ebuild,v 1.3 2008/11/09 14:52:13 nixnut Exp $
+
+EAPI="4"
+inherit eutils subversion
+
+MY_P=${PN/metasploit/framework}-${PV}
+
+MTSLPT_REV=${BASH_REMATCH[2]}
+ESVN_REPO_URI="https://metasploit.com/svn/framework3/trunk"
+
+SRC_URI="https://dev.metasploit.com/redmine/attachments/download/906/vbsmem-1.2.1.patch
+ https://dev.metasploit.com/redmine/attachments/1200/jboss_seam_remote_command_rb"
+
+DESCRIPTION="Advanced open-source framework for developing, testing, and using vulnerability exploit code"
+HOMEPAGE="http://www.metasploit.org/"
+SLOT="9999"
+LICENSE="BSD"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="+armitage +kissfft unstable lorcon lorcon2 +pcaprub +postgres serialport"
+
+REQUIRED_USE="armitage? ( postgres )"
+
+# Note we use bundled gems (see data/msfweb/vendor/rails/) as upstream voted for
+# such solution, bug #247787
+RDEPEND="dev-lang/ruby
+ dev-ruby/rubygems
+ >=app-crypt/johntheripper-1.7.9-r1[-minimal]
+ !arm? ( dev-ruby/hpricot
+ virtual/jdk
+ dev-ruby/rjb
+ dev-ruby/msgpack )
+ postgres? ( dev-db/postgresql-server
+ !arm? ( dev-ruby/pg
+ dev-ruby/activerecord[postgres] ) )
+ pcaprub? ( net-libs/libpcap )
+ armitage? ( net-analyzer/nmap )
+ lorcon? ( net-wireless/lorcon-old )
+ lorcon2? ( net-wireless/lorcon )"
+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/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_compile() {
+ if use pcaprub; then
+ cd "${S}"/external/pcaprub
+ ruby extconf.rb
+ emake
+ fi
+ if use kissfft; then
+ cd "${S}"/external/ruby-kissfft
+ ruby extconf.rb
+ emake
+ fi
+ if use lorcon; then
+ cd "${S}"/external/ruby-lorcon
+ 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
+ emake
+ fi
+}
+
+src_install() {
+ # should be as simple as copying everything into the target...
+ dodir /usr/$(get_libdir)/${PN}${SLOT}
+ cp -R "${S}"/* "${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 || die
+ fowners -R root:0 /
+
+ # do not remove LICENSE, bug #238137
+ dodir /usr/share/doc/${PF}
+ cp -R "${S}"/{documentation,README} "${ED}"/usr/share/doc/${PF} || die
+ dosym /usr/share/doc/${PF}/documentation /usr/$(get_libdir)/${PN}${SLOT}/documentation
+
+
+ dodir /usr/bin/
+ for file in msf*; do
+ dosym /usr/$(get_libdir)/${PN}${SLOT}/${file} /usr/bin/${file}
+ done
+
+ newinitd "${FILESDIR}"/msfrpcd.initd msfrpcd${SLOT}
+ newconfd "${FILESDIR}"/msfrpcd.confd msfrpcd${SLOT}
+
+ # Avoid useless revdep-rebuild trigger #377617
+ dodir /etc/revdep-rebuild/
+ echo "SEARCH_DIRS_MASK=\"/usr/lib*/${PN}${SLOT}/data/john\"" > \
+ "${ED}"/etc/revdep-rebuild/70-${PN}${SLOT}
+
+ if use armitage; then
+ echo -e "#!/bin/sh \n\nexport MSF_DATABASE_CONFIG=/usr/$(get_libdir)/${PN}${SLOT}/armitage.yml\n" > armitage
+ echo -e "java -Xmx256m -jar /usr/$(get_libdir)/${PN}${SLOT}/data/armitage/armitage.jar \$* &\n" >> armitage
+ dobin armitage
+ insinto /usr/$(get_libdir)/${PN}${SLOT}/
+ doins "${FILESDIR}"/armitage.yml
+ fi
+
+ #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"
+
+ #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"
+
+ fi
+ #fi unstable
+
+ if use pcaprub; then
+ cd "${S}"/external/pcaprub
+ emake DESTDIR="${ED}" install
+ fi
+ if use lorcon; then
+ 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 kissfft; then
+ cd "${S}"/external/ruby-kissfft
+ 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...
+ rm -rf "${ED}"/usr/$(get_libdir)/${PN}${SLOT}/data/john/run.*
+ dodir /usr/$(get_libdir)/${PN}${SLOT}/data/john/run.linux.x86.any
+ for i in $(ls -1 ${ROOT}/etc/john)
+ do
+ dosym /etc/john/${i} /usr/$(get_libdir)/${PN}${SLOT}/data/john/run.linux.x86.any/${i}
+ done
+ dosym /usr/sbin/unique /usr/$(get_libdir)/${PN}${SLOT}/data/john/run.linux.x86.any/unique
+ dosym /usr/sbin/john /usr/$(get_libdir)/${PN}${SLOT}/data/john/run.linux.x86.any/john
+ dosym /usr/sbin/unafs /usr/$(get_libdir)/${PN}${SLOT}/data/john/run.linux.x86.any/unafs
+ dosym /usr/sbin/genmkvpwd /usr/$(get_libdir)/${PN}${SLOT}/data/john/run.linux.x86.any/genmkvpwd
+ dosym /usr/sbin/john-mailer /usr/$(get_libdir)/${PN}${SLOT}/data/john/run.linux.x86.any/john-mailer
+ dosym /usr/sbin/undrop /usr/$(get_libdir)/${PN}${SLOT}/data/john/run.linux.x86.any/undrop
+ dosym /usr/sbin/unshadow /usr/$(get_libdir)/${PN}${SLOT}/data/john/run.linux.x86.any/unshadow
+ dosym /usr/sbin/tgtsnarf /usr/$(get_libdir)/${PN}${SLOT}/data/john/run.linux.x86.any/tgtsnarf
+ dosym /usr/$(get_libdir)/${PN}${SLOT}/data/john/run.linux.x86.any /usr/$(get_libdir)/${PN}${SLOT}/data/john/run.linux.x64.mmx
+ dosym /usr/$(get_libdir)/${PN}${SLOT}/data/john/run.linux.x86.any /usr/$(get_libdir)/${PN}${SLOT}/data/john/run.linux.x86.mmx
+ dosym /usr/$(get_libdir)/${PN}${SLOT}/data/john/run.linux.x86.any /usr/$(get_libdir)/${PN}${SLOT}/data/john/run.linux.x86.sse2
+
+ #while we are commiting fixes for filth, let's bogart 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
+}
+pkg_postinst() {
+ if use postgres; then
+ elog "You need to prepare the database as described on the following page:"
+ use postgres && elog "https://community.rapid7.com/docs/DOC-1268"
+ elog
+ fi
+
+ elog "If you wish to update ${PN}${SLOT} manually simply run:"
+ elog
+ elog "ESVN_REVISION=<rev> emerge =${PF}"
+ elog
+ elog "where <rev> is either HEAD (in case you wish to get all updates)"
+ elog "or specific revision number. But NOTE, this update will vanish"
+ elog "next time you reemerge ${PN}${SLOT}. To make update permanent either"
+ elog "create ebuild with specific revision number inside your overlay"
+ elog "or report revision bump bug at http://bugs.gentoo.org ."
+ elog
+ elog "In case you use portage it's also possible to create"
+ elog "/etc/portage/env/${CATEGORY}/${PN}${SLOT} file with ESVN_REVISION=<rev>"
+ elog "content. Then each time you run emerge ${PN}${SLOT} you'll have said"
+ elog "<rev> installed. For example, if you run"
+ elog " # mkdir -p /etc/portage/env/${CATEGORY}"
+ elog " # echo ESVN_REVISION=HEAD >> /etc/portage/env/${CATEGORY}/${PN}${SLOT}"
+ elog "each time you reemerge ${PN}${SLOT} it'll be updated to get all possible"
+ elog "updates for framework-${PV%_p*} branch."
+ elog "You can do similar things in paludis using /etc/paludis/bashrc."
+ elog
+ elog "Adjust /usr/$(get_libdir)/${PN}${SLOT}/armitage.yml and /etc/conf.d/msfrpcd${PV} files if necessary"
+}