Mythic icon indicating copy to clipboard operation
Mythic copied to clipboard

developing a custom payload "agent" for android

Open somaliz opened this issue 1 year ago • 6 comments

Hi, this is more of a question and not an issue, im using this repo https://github.com/MythicMeta/ExampleContainers.git in particular the python example, i want to create a custom payload for android is there a way to enforce SupportedOS.Android and use it with the http c2 profile ? basically what im trying to achieve is manipulate an AndroidManifest and in a build container recompile an apk and sign it. is that doable! :) .. i'd love any input or suggestions

Thanks <3

somaliz avatar Dec 26 '23 20:12 somaliz

Hey! Great question :)

I'm actually working on updating the docs and that example, so this is a perfect time.

When you define your agent, you can simply change this line https://github.com/MythicMeta/ExampleContainers/blob/main/Payload_Type/python_services/apfell/agent_functions/builder.py#L13 to be supported_os = ["android"] and that'll work to make an android OS option. The example already supports http and dynamichttp, but if you want to say that your agent will only support the basic http, then change this line https://github.com/MythicMeta/ExampleContainers/blob/main/Payload_Type/python_services/apfell/agent_functions/builder.py#L18 to be c2_profiles = ["http"].

its-a-feature avatar Dec 26 '23 21:12 its-a-feature

Also make sure you're checking out https://docs.mythic-c2.net/customizing/payload-type-development/first-steps. If you have requests for examples or more documentation around a certain topic, just let me know!

its-a-feature avatar Dec 26 '23 21:12 its-a-feature

Hey! I'd like to customize Athena further, mainly to change its signature further since I sometimes use it for RT engagements and have found it to be a superbly good agent. Is there some documentation that facilitates this sort of customization?

I tried to have a look into the .csproj but found it to be slightly daunting because there's a lot of moving parts haha

wir3casp3r avatar Jan 10 '24 13:01 wir3casp3r

Hey! I'd like to customize Athena further, mainly to change its signature further since I sometimes use it for RT engagements and have found it to be a superbly good agent. Is there some documentation that facilitates this sort of customization?

I tried to have a look into the .csproj but found it to be slightly daunting because there's a lot of moving parts haha

Thanks! I'm actually in the middle of a rewrite that should solve some of the problems you're seeing. You can check it out now on the rewrite branch which currently only has http and smb working, but I'm trying to finish up the rewrite so it can at least be used by people this week.

checkymander avatar Jan 10 '24 14:01 checkymander

Oh hey! great job dude! will definitely test it out at some point. Cheers!

wir3casp3r avatar Jan 10 '24 14:01 wir3casp3r

@somaliz - how's the development going?

its-a-feature avatar Feb 07 '24 02:02 its-a-feature

I'm gonna go ahead and close this, but if you run into issues with your development, please open a new issue and we can get it sorted out :)

its-a-feature avatar May 30 '24 18:05 its-a-feature