atlas icon indicating copy to clipboard operation
atlas copied to clipboard

Upload command!

Open Chomikmarkus opened this issue 3 years ago • 5 comments

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 avatar Dec 08 '21 16:12 Chomikmarkus

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 avatar Dec 08 '21 19:12 Chomikmarkus

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'

Chomikmarkus avatar Dec 08 '21 20:12 Chomikmarkus

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

its-a-feature avatar Dec 08 '21 20:12 its-a-feature

@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'
-----

s1lvershad0w avatar Feb 03 '22 16:02 s1lvershad0w

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.

its-a-feature avatar Feb 03 '22 16:02 its-a-feature