Skip to content

Instantly share code, notes, and snippets.

@bopin2020
Created December 12, 2023 12:44
Show Gist options
  • Save bopin2020/0eedabc305e4ee49f01a8f55d7bfe8c0 to your computer and use it in GitHub Desktop.
Save bopin2020/0eedabc305e4ee49f01a8f55d7bfe8c0 to your computer and use it in GitHub Desktop.
I wanna talk about some thoughts on Client with GUI as well as used by an operator
due to a lot of efforts in the past. [1/1]
I have puzzled how to design an Command&Control and what the key point of design C2 successfully? Is that flexibility or something stuff?
I was amazing of CobaltStrike which allow operator add new UI elements dynamically when I met in first time at that time I was not similar with Compiler related knownledge. In no time, I realized that CobaltStrike UI elements just support rare UI components such as: TextBox,Button,CheckBox,ChomoBox and so on. I clearly understand that Raphael Mudge expose UI interface through sleep language that backend with java Swing. Above these techniques were very awesome and excited for me. One thought bring up from my brain:
1. design a script language or carry forward other dynamic script language. The UI language I mean directly write. For WPF I could use C# language, so If I can design a script lang just named "bp", I just write a "bp" parser enginee in order to be called dynamically in runtime. Everything is cool! In this way, I can finished and carryed forward to Client UI capabilities on flexibility. [2/2]
What about other things?
As C2 developer and designer, I should allow operators register their custom commands to beacon console. How should I design this?
Fortunately, I often debug somethings on windows using windbg. I believe it's a very great product. Windbg support three types: inside commands, metadata commands, extensible command by native dll export function And Windbg written by c++ there are many awesome minds for me to use for reference. Most importantly, I gradually understand what is data model.
For example,in many C2 beacon console, there is no support to filter beacon results. I must roll up my mouse continuously If I were concerned with plain/password or some privileges of current user or session. However there is no solution!
Windbg dx data model support more advanced features binding with debuggee. I think it just like expander SDK but It has relative contexts module.submodule.class and so on. [3/3]
Microsoft COM is the master on flexibility from the history prespective.
Recently I dived into (D)COM for learning that how micosoft designed their products before 20 years?
To be honest, I'm not familiar with this.But I'm very sure that Don Box <Essential COM> is very valuable for enjoying.
As a malware developer, I make an seldom effort at beacon side, so my C2 is just a demo so far, but that's not important. I think writting code improve my thoughts which is better worderful in fact. [4/4]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment