MythicAgents / atlas

13 stars 7 forks source link

Upload command! #6

Open Chomikmarkus opened 2 years ago

Chomikmarkus commented 2 years ago

Seems that upload command is not working! When i issue upload command its freeze agent and seems that agent disconnects as no callbacks is made! From proccess hacker on windows machine i can see that proccess is running but no callbacks made! Command itself does not produce any error output and agent built itself works fine

Chomikmarkus commented 2 years ago

V2.3-Testing upload.py error output: [-] atlas ran into an error processing upload: 'File to Upload' Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/mythic_payloadtype_container/mythic_service.py", line 269, in callback final_task = await Command.create_tasking(task) File "/Mythic/mythic/agent_functions/upload.py", line 51, in create_tasking filename = json.loads(task.original_params)["File to Upload"] KeyError: 'File to Upload'

Chomikmarkus commented 2 years ago

also load_assembly runs into error [-] atlas ran into an error processing loadassembly: Error from Mythic: 73 : add_arg() got an unexpected keyword argument 'name'

its-a-feature commented 2 years ago

just fixed those two parsing issues, i'll wait for @airzero24 to update the underlying code though

s1lvershad0w commented 2 years ago

@its-a-feature - I'm facing the below error when I try to upload files(.exe, .txt). Could you help me resolve this? :

-----error-creating task
[-] atlas ran into an error processing upload: 
a bytes-like object is required, not 'str'
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/mythic_payloadtype_container/mythic_service.py", line 277, in callback
    final_task = await Command.create_tasking(task)
  File "/Mythic/mythic/agent_functions/upload.py", line 53, in create_tasking
    file=base64.b64encode(task.args.get_arg("assembly_id")).decode(),
  File "/usr/local/lib/python3.8/base64.py", line 58, in b64encode
    encoded = binascii.b2a_base64(s, newline=False)
TypeError: a bytes-like object is required, not 'str'
-----
its-a-feature commented 2 years ago

Hey! I just updated the python files, so you should be able to do sudo ./mythic-cli install github https://github.com/MythicAgents/atlas -f to just pull in the latest (or you can look at the merge i just did from the v2.3 branch to see what i updated).

However, there's an outstanding issue that @airzero24 is aware of that's causing an issue with files in atlas. For some reason, when uploading (or registering an assembly), atlas isn't processing the final success message, so it gets stuck in a weird loop reporting that it's loaded or uploaded an infinite number of times.