MythicAgents / poseidon

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

Payload compilation failed on latest version #49

Closed timukas closed 1 year ago

timukas commented 1 year ago

Morning,

On clean/fresh installation of mythic and poseidon, compilation of new payload is failing. Following error shown:

Build Message:
Processing C2 Profile - http:
Step 1/3 - Issuing OPSEC Check
No immediate issues with configuration
Step 2/3 - Issuing Config Check
C2 Profile container and agent configuration match port, 80, and SSL expectations (false)

Step 3/3 - Issuing Start command

Sending Build command
Compilation failed with errors
StdErr: 
go: downloading github.com/xorrior/keyctl v1.0.1-0.20210425144957-8746c535bf58
go: downloading github.com/djherbis/atime v1.1.0
go: downloading howett.net/plist v1.0.0
go: downloading github.com/google/uuid v1.3.1
go: downloading golang.org/x/sync v0.3.0
go: downloading github.com/creack/pty v1.1.18
go: downloading github.com/kbinani/screenshot v0.0.0-20210720154843-7d3a670d8329
go: downloading github.com/tmc/scp v0.0.0-20170824174625-f7b48647feef
go: downloading golang.org/x/crypto v0.13.0
go: downloading golang.org/x/sys v0.12.0
go: downloading github.com/jezek/xgb v1.1.0
go: downloading github.com/gen2brain/shm v0.0.0-20221026125803-c33c9e32b1c8
go: downloading github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
poseidon.go:7:2: no required module provides package github.com/MythicAgents/poseidon/Payload_Type/poseidon/agent_code/pkg/utils/files; to add it:
    go get github.com/MythicAgents/poseidon/Payload_Type/poseidon/agent_code/pkg/utils/files

exit status 1
StdOut: 

Checked the repo and github.com/MythicAgents/poseidon/Payload_Type/poseidon/agent_code/pkg/utils/files is missing there.

Any chance to have repo updated/fixed?

its-a-feature commented 1 year ago

I didn't realize the .gitignore included that folder, so i updated that and pushed those files. Sorry about that!

timukas commented 1 year ago

Just updated poseidon agent and tried to build new default payload, but got this error:

Sending Build command
Compilation failed with errors
StdErr: 
# github.com/MythicAgents/poseidon/Payload_Type/poseidon/agent_code/pty
pty/pty.go:74:42: undefined: syscall.TIOCPTYGNAME
pty/pty.go:76:31: undefined: syscall.TIOCPTYGNAME
pty/pty.go:89:31: undefined: syscall.TIOCPTYGRANT
pty/pty.go:92:31: undefined: syscall.TIOCPTYUNLK

exit status 1
StdOut: 
its-a-feature commented 1 year ago

are you building for mac or linux?

timukas commented 1 year ago

Building ELF for Linux amd_x64.

its-a-feature commented 1 year ago

ok, i had some macos specific stuff in there, so i split it out with this latest push. give that a try

timukas commented 1 year ago

Now i was able to compile elf for linux. Callbacks are now coming in. Thanks!

p.s. browserscript does not work for built-in "ls" command (it just shows json output). But broswerscript works fine for "ps".

its-a-feature commented 1 year ago

good catch, just updated the script if you wanted to reinstall poseidon (it won't mess with any of your callbacks or anything)

timukas commented 1 year ago

All works as it should. Thanks for fixes.