MythicAgents / Apollo

A .NET Framework 4.0 Windows Agent
BSD 3-Clause "New" or "Revised" License
448 stars 92 forks source link

Compile error when using Apollo #147

Closed GitGrezly closed 1 week ago

GitGrezly commented 1 week ago

I pulled the latest Apollo version from Github; i'm using the following Mythic version:

Kali machine:

When i try to compile an Apollo payload i do get the following error (doesn't matter which options i choose when compiling a payload):

/tmp/tmp462e4z0b0e420e9d-ad85-46ec-81a3-31164434d2d3/Tasks/upload.cs(33,18): error CS0101: The namespace 'Tasks' already contains a definition for 'download' [/tmp/tmp462e4z0b0e420e9d-ad85-46ec-81a3-31164434d2d3/Tasks/Tasks.csproj] /tmp/tmp462e4z0b0e420e9d-ad85-46ec-81a3-31164434d2d3/Tasks/upload.cs(51,16): error CS0111: Type 'download' already defines a member called 'download' with the same parameter types [/tmp/tmp462e4z0b0e420e9d-ad85-46ec-81a3-31164434d2d3/Tasks/Tasks.csproj] /tmp/tmp462e4z0b0e420e9d-ad85-46ec-81a3-31164434d2d3/Tasks/upload.cs(56,30): error CS0111: Type 'download' already defines a member called 'Start' with the same parameter types [/tmp/tmp462e4z0b0e420e9d-ad85-46ec-81a3-31164434d2d3/Tasks/Tasks.csproj] /tmp/tmp462e4z0b0e420e9d-ad85-46ec-81a3-31164434d2d3/Tasks/upload.cs(35,10): error CS0579: Duplicate 'DataContract' attribute [/tmp/tmp462e4z0b0e420e9d-ad85-46ec-81a3-31164434d2d3/Tasks/Tasks.csproj]

I also tried this on my Debian machine (bookworm) but the same errors. For what it's worth, with other payloads i don't have any issues.

its-a-feature commented 1 week ago

Reinstall Apollo and try again (sudo ./mythic-cli install github https://github.com/mythicagents/apollo -f). Somebody identified that issue yesterday too - I did an update for a few of the tasks to try to handle an edge case better and the Download task got copied into both the Download and Upload code (thus duplicated). It's fixed in the latest though.

GitGrezly commented 1 week ago

Unfortunately this didn't work for me; the installation did work for me with the command: sudo ./mythic-cli install github https://github.com/mythicagents/apollo -f; also did restart mythic sudo ./mythic-cli restart but still the same error.

its-a-feature commented 1 week ago

depending on the Mythic settings, a restart might not force build the changes. We can force it though with sudo ./mythic-cli build apollo. Can you give that a try and see if it works? We can also go one step further:

sudo ./mythic-cli stop apollo
sudo ./mythic-cli volume rm apollo_volume
sudo ./mythic-cli build apollo

to really get rid of potentially lingering artifacts from the old build. It should should up on the Payload Type/C2 Profile page as Version: 2.2.18

GitGrezly commented 1 week ago

Thanks, the sudo ./mythic-cli build apollo alone didn't fixed it; however the 3 command's you also showed did the trick!