From 3ff7cc9b9c4371a276db5ba5b8b45d59e0ba6111 Mon Sep 17 00:00:00 2001 From: "Rick Farina (Zero_Chaos)" Date: Thu, 19 Dec 2024 16:45:12 -0500 Subject: [PATCH] veil: it still doesn't work but now it tries to run at least --- app-antivirus/veil/Manifest | 1 + app-antivirus/veil/veil-3.1.14-r2.ebuild | 3 +- .../veil/veil-3.1.14_p20221014.ebuild | 67 +++++++++++++++++++ 3 files changed, 69 insertions(+), 2 deletions(-) create mode 100644 app-antivirus/veil/veil-3.1.14_p20221014.ebuild diff --git a/app-antivirus/veil/Manifest b/app-antivirus/veil/Manifest index 7a9639d17c..09609b1a79 100644 --- a/app-antivirus/veil/Manifest +++ b/app-antivirus/veil/Manifest @@ -1 +1,2 @@ DIST veil-3.1.14.tar.gz 199315 BLAKE2B cc75d5f43d4d32bcb107cdae9026b1a8f80279de032c80e6e5de60a7210aed9a8d882e04629bebb4ad083f162fa067bb310fc11ed9b4a16558018d67b5d8dfce SHA512 1f324ec84b19b284a0b2c342e7cabaeb84dd5952352e64080b7473bd583f26c0c9bcd54c04696548c333b1ed715062c95303ee7f0e1a1d77c6587144820294cc +DIST veil-3.1.14_p20221014.tar.gz 199398 BLAKE2B a42987a4e279fea977eb64a6022f70878e04f10a1e3105e9de49049a293f7021fdb1f9f934e2e6b208249effa8bb400666849fafaec91f0453a0cead36b9e884 SHA512 c8ec2fe84200879ed89c13d35d6db65a4b811b30545a97bbeed93dac1c3b0928a4afda3fdda54e11882c4b5e24895db87e11008f090f82a82b0fd1838d0e7974 diff --git a/app-antivirus/veil/veil-3.1.14-r2.ebuild b/app-antivirus/veil/veil-3.1.14-r2.ebuild index 32de5a311a..9bf3d6abb6 100644 --- a/app-antivirus/veil/veil-3.1.14-r2.ebuild +++ b/app-antivirus/veil/veil-3.1.14-r2.ebuild @@ -13,7 +13,6 @@ SRC_URI="https://github.com/Veil-Framework/Veil/archive/${PV}.tar.gz -> ${P}.tar S="${WORKDIR}/Veil-${PV}" LICENSE="GPL-3" SLOT="0" -KEYWORDS="~amd64" IUSE="tools" REQUIRED_USE="${PYTHON_REQUIRED_USE}" @@ -52,7 +51,7 @@ src_install() { # dosym "${EPREFIX}"/usr/$(get_libdir)/veil/Veil.py /usr/bin/veil newbin - veil <<-EOF #!/bin/sh - cd /usr/lib/veil + cd /usr/$(get_libdir)/veil || exit 1 python ./Veil.py \${@} EOF } diff --git a/app-antivirus/veil/veil-3.1.14_p20221014.ebuild b/app-antivirus/veil/veil-3.1.14_p20221014.ebuild new file mode 100644 index 0000000000..54bbec862c --- /dev/null +++ b/app-antivirus/veil/veil-3.1.14_p20221014.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2024 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) +inherit python-single-r1 + +DESCRIPTION="A tool for payloads generation that bypass common anti-virus solutions" +HOMEPAGE="https://github.com/Veil-Framework/Veil" +COMMIT="d8acd4cc95eeb0216826aab8d4cff40179d9bf76" +SRC_URI="https://github.com/Veil-Framework/Veil/archive/${COMMIT}.tar.gz -> ${P}.tar.gz" + +S="${WORKDIR}/Veil-${PV}" +LICENSE="GPL-3" +SLOT="0" +IUSE="tools" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" +S="${WORKDIR}/Veil-${COMMIT}" + +RDEPEND="dev-python/pycryptodome + dev-python/pefile + ${PYTHON_DEPS} + tools? ( dev-lang/go ) + " + +#mingw-w64 monodevelop mono-mcs ruby +# ca-certificates winbind + +# dev-python/symmetricjsonrpc +# dev-python/capstone-python +# windows? ( +# dev-python/pyinstaller +# app-emulation/wine +# ) + +src_prepare() { + eapply "${FILESDIR}"/veil-3-nodeps.patch + eapply_user +} + +src_install() { + rm -r config/ +# rm -r setup/ + + dodir /usr/$(get_libdir)/${PN} + cp -R * "${ED}"/usr/$(get_libdir)/${PN} || die "Copy files failed" + + #use our custom settings + insinto /etc/veil + newins "${FILESDIR}"/${PN}-3_settings.py settings.py + +# dosym "${EPREFIX}"/usr/$(get_libdir)/veil/Veil.py /usr/bin/veil + newbin - veil <<-EOF + #!/bin/sh + cd /usr/$(get_libdir)/veil || exit 1 + python ./Veil.py \${@} + EOF +} + +pkg_postinst(){ + einfo "you need to setup wine env for pyinstaller" + einfo "wine msiexec /i python-2.7.12.msi" + #https://github.com/Veil-Framework/Veil/issues/259 + einfo "Please also create the follow directories:" + einfo "mkdir -p ~/.veil/output/{compiled,handlers,source}/" +}