From aaee9ca0c75f81c2c6990113adffd89e71480d78 Mon Sep 17 00:00:00 2001 From: its-a-feature Date: Thu, 11 Jul 2024 13:10:29 -0500 Subject: [PATCH] hopefully fixing issues with ps --- Payload_Type/poseidon/poseidon/agent_code/CHANGELOG.MD | 5 +++++ .../poseidon/poseidon/agent_code/ps/rdprocess_darwin.h | 3 +++ .../poseidon/poseidon/agent_code/ps/rdprocess_darwin.m | 2 +- Payload_Type/poseidon/poseidon/agentfunctions/builder.go | 2 +- 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Payload_Type/poseidon/poseidon/agent_code/CHANGELOG.MD b/Payload_Type/poseidon/poseidon/agent_code/CHANGELOG.MD index 42de9b9..0070fa2 100644 --- a/Payload_Type/poseidon/poseidon/agent_code/CHANGELOG.MD +++ b/Payload_Type/poseidon/poseidon/agent_code/CHANGELOG.MD @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## 2.1.1 - 2024-07-11 + +### Changed + +- fixed another issue with `ps` on some macOS machines that would cause issues with the RDProcess library used ## 2.0.36 - 2024-04-24 ### Changed diff --git a/Payload_Type/poseidon/poseidon/agent_code/ps/rdprocess_darwin.h b/Payload_Type/poseidon/poseidon/agent_code/ps/rdprocess_darwin.h index f633244..d7149b1 100644 --- a/Payload_Type/poseidon/poseidon/agent_code/ps/rdprocess_darwin.h +++ b/Payload_Type/poseidon/poseidon/agent_code/ps/rdprocess_darwin.h @@ -1,3 +1,6 @@ +/** + https://github.com/rodionovd/RDProcess +*/ #import #import diff --git a/Payload_Type/poseidon/poseidon/agent_code/ps/rdprocess_darwin.m b/Payload_Type/poseidon/poseidon/agent_code/ps/rdprocess_darwin.m index 7f4758a..d82eb5c 100644 --- a/Payload_Type/poseidon/poseidon/agent_code/ps/rdprocess_darwin.m +++ b/Payload_Type/poseidon/poseidon/agent_code/ps/rdprocess_darwin.m @@ -503,7 +503,7 @@ - (BOOL)_requestProcessArgumentsAndEnvironment i++; } const char *arg = (const char *)(arguments+i); - if (strlen(arg) > 0) { + if (arg != nil && strlen(arg) > 0) { if (counter < argc) { [tmp_argv addObject: [NSString stringWithUTF8String: arg]]; diff --git a/Payload_Type/poseidon/poseidon/agentfunctions/builder.go b/Payload_Type/poseidon/poseidon/agentfunctions/builder.go index a581cce..8192a33 100644 --- a/Payload_Type/poseidon/poseidon/agentfunctions/builder.go +++ b/Payload_Type/poseidon/poseidon/agentfunctions/builder.go @@ -21,7 +21,7 @@ import ( "time" ) -const version = "2.1.0" +const version = "2.1.1" type sleepInfoStruct struct { Interval int `json:"interval"`