From nobody Fri Jun 02 21:08:20 2023 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QXwZs1sjzz4YwZC; Fri, 2 Jun 2023 21:08:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QXwZs18mzz4G24; Fri, 2 Jun 2023 21:08:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685740101; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tOBKgk8hqys4vaqyxaL1hLj8iGWRD+KxZIsRy8IEAYA=; b=R+gFTAiJMp9SWiWq2FhQGhwK/wKSm2+e/kQ1/jKOikOKQCRfmLMCOTQwKFqU4WyoP2bsnp QrDo7huRziXCL8bpFQsCJrWCNo0xpW5PoP/auG+XPuR8sX159W7m/niROJbMB0Gkyvdbb8 HwbITNerl4CM3i4ebxnj6niPvt7Jk+6XxTXrbHz6b6hIQpER7+4I05Zv/O+2y9lB+8l7AV AcPHT1OBvDMCFagyCv095B3gWfvRy3Cfjyp3k8m6jtbsV2SXo+3gB02YMdzDmOeKFtn+B+ QSudp1xlYjziE2iG4okUG10Q1pW8m/os5OWPDvP45fepb0Z2iuXdBEufbOCfNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685740101; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tOBKgk8hqys4vaqyxaL1hLj8iGWRD+KxZIsRy8IEAYA=; b=KCGh1018cNJ0bdkxaqKQznm8TcmvKSVYdhC8qb+gat4sX8hAXjBaACRyH3S7o692sxf29Z vj7kcrkvmf78VvGeh/c/8t8bk+Ked6aWalIwkbUBkuKgzLjdqvuDD1KjrB8cNArKjepcEM mRdwFI7TQZpPTP0y5NRFOPG+RufiwB+xnir1C5EpMQmo/Zg/nIxa7Ev2qxt+nHDekrzEpm IX2KX1dDpdvNYpxszwRdzFQ2kRcg1Cun1JCpkell7Br7iczEb8gdCdD3P1ikwEFj+8h6q6 vuVAPRZ1wA00tWEtccoYhVuppLAKKxeRh8e+Yo3clN1rVZNiZjqsxY+rzOV4rQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1685740101; a=rsa-sha256; cv=none; b=Ee6L81Cdt/YNvlz8YPdWpcv06Tbvk/0gLdaiKHbyh17U7jBMyv58qqu1EANlSChzHgA8za atbsQ8gGgN4khCTJYmCWfV2ccCY//OdddGl+d/3RedpQgojSd1F/ELBt9ysYmORckhg/6z NZa/CKmdKN3neiH+GG/8t0sLeRdkP8buKE/vVXnSHIUD/VNF0qmP9I5tlzRq8+CgHEntvK FUuo6u65SG6Wl9r4rDS1AKHQunKhC6kiiS3/euXXS8BYdUYYhcaFmMhJ88Gd0UpysTgHMK 3crK/CypAO0bDF0bU7Lm1yTZYAArNsuDS6ZS02yJgoRrhFKJOb3RQ3uM3wDxbQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QXwZs0CWmz1DB3; Fri, 2 Jun 2023 21:08:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 352L8KdE039446; Fri, 2 Jun 2023 21:08:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 352L8Ku5039445; Fri, 2 Jun 2023 21:08:20 GMT (envelope-from git) Date: Fri, 2 Jun 2023 21:08:20 GMT Message-Id: <202306022108.352L8Ku5039445@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Jose Alonso Cardenas Marquez Subject: git: 4ae9030d9493 - main - security/caldera: Fix permission issues with some payload directories List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: acm X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4ae9030d9493dd64b1bb2a7ee71c783ef5c75875 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by acm: URL: https://cgit.FreeBSD.org/ports/commit/?id=4ae9030d9493dd64b1bb2a7ee71c783ef5c75875 commit 4ae9030d9493dd64b1bb2a7ee71c783ef5c75875 Author: Jose Alonso Cardenas Marquez AuthorDate: 2023-06-02 21:01:16 +0000 Commit: Jose Alonso Cardenas Marquez CommitDate: 2023-06-02 21:07:58 +0000 security/caldera: Fix permission issues with some payload directories - Fix a problem in ragdoll payload - Add GOCACHE and GOMODCACHE to caldera_env into caldera rc script. It is useful for avoid issues when some payloads are compiled - Some other modifications - Bump PORTREVISION --- security/caldera/Makefile | 3 ++- security/caldera/files/caldera.in | 1 + .../caldera/files/patch-plugins_stockpile_payloads_ragdoll.py | 11 +++++++++++ security/caldera/files/pkg-message.in | 4 ++-- security/caldera/pkg-plist | 10 ++++++++++ 5 files changed, 26 insertions(+), 3 deletions(-) diff --git a/security/caldera/Makefile b/security/caldera/Makefile index 2646d77b1a21..c75659d18940 100644 --- a/security/caldera/Makefile +++ b/security/caldera/Makefile @@ -1,6 +1,6 @@ PORTNAME= caldera DISTVERSION= 4.1.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= security python MAINTAINER= acm@FreeBSD.org @@ -43,6 +43,7 @@ RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}aiohttp>0:www/py-aiohttp@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}networkx>0:math/py-networkx@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}numpy>0:math/py-numpy@${PY_FLAVOR} \ upx>0:archivers/upx \ + base64>0:converters/base64 \ git>0:devel/git \ bash>0:shells/bash diff --git a/security/caldera/files/caldera.in b/security/caldera/files/caldera.in index 081a14c8318e..d08e4fae7d5c 100644 --- a/security/caldera/files/caldera.in +++ b/security/caldera/files/caldera.in @@ -22,6 +22,7 @@ export PATH="${PATH}:/usr/local/bin:/usr/local/sbin" : ${caldera_enable:=NO} : ${caldera_flags="--insecure"} +caldera_env="GOCACHE=/tmp/caldera/.cache GOMODCACHE=/tmp/caldera/.vendor" caldera_user="caldera" caldera_wwwdir="%%WWWDIR%%" caldera_logfile="/var/log/caldera.log" diff --git a/security/caldera/files/patch-plugins_stockpile_payloads_ragdoll.py b/security/caldera/files/patch-plugins_stockpile_payloads_ragdoll.py new file mode 100644 index 000000000000..13f037f6db8b --- /dev/null +++ b/security/caldera/files/patch-plugins_stockpile_payloads_ragdoll.py @@ -0,0 +1,11 @@ +--- plugins/stockpile/payloads/ragdoll.py.orig 2023-05-16 23:53:18 UTC ++++ plugins/stockpile/payloads/ragdoll.py +@@ -63,7 +63,7 @@ class OperationLoop: + def _execute_instruction(self, i): + print('[+] Running instruction: %s' % i['id']) + cmd = self._decode_bytes(i['command']) +- execution_timestamp = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S') ++ execution_timestamp = datetime.datetime.now().strftime('%Y-%m-%dT%H:%M:%SZ') + try: + output = subprocess.check_output(cmd, shell=True, timeout=i['timeout']) + except subprocess.CalledProcessError as e: diff --git a/security/caldera/files/pkg-message.in b/security/caldera/files/pkg-message.in index 668b6828a2e9..5662ac917f51 100644 --- a/security/caldera/files/pkg-message.in +++ b/security/caldera/files/pkg-message.in @@ -17,8 +17,8 @@ Caldera port was installed 3) Before of start Caldera you must run some scripts for generate/update payload files - # cd %%WWWDIR%%/plugins/manx && sh update-shells.sh - # cd %%WWWDIR%%/plugins/sandcat && sh update-agents.sh + # su -m caldera -c 'cd %%WWWDIR%%/plugins/manx && sh update-shells.sh' + # su -m caldera -c 'cd %%WWWDIR%%/plugins/sandcat && sh update-agents.sh' 4) Do not forget modify configuration files before of run Caldera. For default it runs in insecure mode (http). Caldera configuration files are located at diff --git a/security/caldera/pkg-plist b/security/caldera/pkg-plist index aa4cf31e6fde..f036d578c394 100644 --- a/security/caldera/pkg-plist +++ b/security/caldera/pkg-plist @@ -1272,9 +1272,19 @@ @owner caldera @group caldera @dir %%WWWDIR%% +@dir %%WWWDIR%%/data @dir %%WWWDIR%%/plugins @dir %%WWWDIR%%/plugins/atomic/data +@dir %%WWWDIR%%/plugins/atomic/payloads @dir %%WWWDIR%%/plugins/atomic +@dir %%WWWDIR%%/plugins/builder/payloads +@dir %%WWWDIR%%/plugins/debrief/downloads +@dir %%WWWDIR%%/plugins/debrief/uploads +@dir %%WWWDIR%%/plugins/emu/data +@dir %%WWWDIR%%/plugins/emu/payloads +@dir %%WWWDIR%%/plugins/human/payloads +@dir %%WWWDIR%%/plugins/manx/payloads +@dir %%WWWDIR%%/plugins/sandcat/payloads @dir %%WWWDIR%%/plugins/fieldmanual/sphinx-docs/plugins @dir %%WWWDIR%%/plugins/fieldmanual/sphinx-docs @dir %%WWWDIR%%/plugins/fieldmanual