MythicAgents / poseidon

Poseidon is a Golang agent targeting Linux and macOS
Other
118 stars 32 forks source link

Compilation of ARM payloads #28

Closed asaurusrex closed 2 years ago

asaurusrex commented 2 years ago

This is just a suggested change to include options to allow users to compile to ARM vs. x86. To compile ARM payloads I had to change two files: https://github.com/MythicAgents/poseidon/blob/master/Payload_Type/poseidon/mythic/agent_functions/builder.py, change

command = f"rm -rf /build; rm -rf /deps; CGO_ENABLED=1 GOOS={target_os} GOARCH=amd64 "

to

command = f"rm -rf /build; rm -rf /deps; CGO_ENABLED=1 GOOS={target_os} GOARCH=arm64 "

and in https://github.com/MythicAgents/poseidon/blob/master/Payload_Type/poseidon/agent_code/poseidon.go, comment out all references to libinject from the code (this module does not work as written for ARM and will cause compile errors). After that you should be good to go.

its-a-feature commented 2 years ago

Added in!