MythicAgents / thanatos

Mythic C2 agent targeting Linux and Windows hosts written in Rust
BSD 3-Clause "New" or "Revised" License
310 stars 42 forks source link

Shell, ps, ls commands fire errors. #13

Closed timukas closed 10 months ago

timukas commented 11 months ago

Hello,

Now i'm able to compile the payload for Linux x64.

With default payload, 'cat' command works well, but when i run "shell id", then i get an error:

image

Following error in callback:

[STDOUT]:

[STDERR]:
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/mythic_container/agent_utils.py", line 337, in createTasking
    createTaskingResponse = await cmd.create_tasking(task=task)
  File "/Mythic/thanatos/mythic/agent_functions/shell.py", line 63, in create_tasking
    MythicRPCArtifactCreateMessage(
TypeError: MythicRPCArtifactCreateMessage.__init__() missing 1 required positional argument: 'ArtifactMessage'

'docker logs thanatos' show this error:

ERROR 2023-11-30 17:54:55,644 createTasking  358 : Failed to run create tasking: MythicRPCArtifactCreateMessage.__init__() missing 1 required positional argument: 'ArtifactMessage'
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/mythic_container/agent_utils.py", line 337, in createTasking
    createTaskingResponse = await cmd.create_tasking(task=task)
  File "/Mythic/thanatos/mythic/agent_functions/shell.py", line 63, in create_tasking
    MythicRPCArtifactCreateMessage(
TypeError: MythicRPCArtifactCreateMessage.__init__() missing 1 required positional argument: 'ArtifactMessage'

When i run built-in commands 'ps' or 'ls', then payload exits with following message:

thread 'main' panicked at src/profiles/mod.rs:117:49:
called `Result::unwrap()` on an `Err` value: Custom { kind: ConnectionRefused, error: "Failed to make post request" }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
MEhrn00 commented 10 months ago

This should be fixed now

timukas commented 10 months ago

Tested with latest version - all works.

Thanks.