Payton Flint's Tech Blog
Menu
  • Home
  • Blog
  • Categories
  • Resources
  • About
  • Contact
Menu

Thoughts on Obfuscation of Botnet C2 Communications

Posted on July 4, 2023July 12, 2023 by paytonflint

This afternoon, while mountain biking, I was listening to a cybersecurity podcast about botnets. The gentleman on the episode was discussing detection of unknown botnets by looking at recurring patterns from the level of a dynamic DNS provider. A provider like this has incredible insight into web traffic on a global scale. The man described observing synchronized events of large numbers of distributed endpoints checking in with their Command and Control server (C2). He used DNS to sinkhole C2 communications traffic from the endpoints. Instantly my mind wandered back to seeing the recurring malicious events I had seen days prior in Azure sign-in logs.

The malicious authentication attempts, while unlikely to have been generated by a botnet, demonstrated clear and obvious patterns that are easily recognizable by humans. A signature is easily developed and used to block such recurrent events.

However, it occurred to me that if one were attempting to obscure such events, they should distribute the desired mean time of occurrence to their endpoint clients along with a desired delta range (which could also correspond with action urgency). Then, on the client side, allow for a pseudo-randomized delta within the C2-provided parameter to be locally generated for determining actual client event execution time. This technique could be instrumental in the obfuscation of a given event, as the actual event occurrence time for any given client would be randomized.

This concept extrapolates quite nicely to the distribution of C2 servers as well. An entity could establish their C2 by mirroring the server across several dozen relay nodes across different domains. The endpoint clients could have provisions to make a pseudo-random selection of a relay node to communicate with for a timeframe that has been randomized within a specified parameter as well. Using the above method to generate event randomness, communications with a randomly selected C2 relay node would be extremely difficult to detect by humans. 

Savvy readers may notice the conceptual resemblance to TOR network, with relay nodes and random selection taking place.

Update: as I have continued in my studies, I’ve found that these concepts are already integrated into the malleable options within Cobalt Strike beacons. This is referred to as “jitter,” and is specified as a percentage value. Palo Alto Networks has released an article titled, “How Malleable C2 Profiles Make Cobalt Strike Difficult to Detect,” detailing the subject, and it would appear that my thoughts are correct- this technique can prove highly effective in obscuring C2 communications.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

About The Author

Author's Portrait

In my journey as a technologist and 11 years of experience as an IT professional, I have found my niche as Director of Infrastructure Services; developing my skillsets in management, scripting, cloud infrastructure, identity management, and networking.

I have experience as a Systems Administrator and Engineer for large enterprises including the DoD, government agencies, and a nuclear-generation site.

I've been blessed to collaborate with engineers at esteemed Fortune 50 corporations, and one of Africa's largest, to ensure successful implementation of my work.

GitHub Button

Credentials

M365 Endpoint Administrator Associate
M365 Fundamentals
Microsoft AZ-900
CompTIA CSIS
CompTIA CIOS
CompTIA Security+
CompTIA Network+
CompTIA A+
  • April 2025
  • December 2024
  • November 2024
  • October 2024
  • September 2024
  • August 2024
  • May 2024
  • April 2024
  • March 2024
  • February 2024
  • January 2024
  • December 2023
  • November 2023
  • October 2023
  • September 2023
  • August 2023
  • July 2023
  • June 2023
  • May 2023
  • April 2023
  • March 2023
  • February 2023
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022
  • August 2022
© 2022 Payton Flint | The views and opinions expressed on this website belong solely to the author/owner and do not represent the perspectives of any individuals, institutions, or organizations, whether affiliated personally or professionally, unless explicitly stated otherwise. The content and products on this website are provided as-is with no warranties or guaranties, are for informational/demonstrative purposes only, do not constitute professional advice, and are not to be used maliciously. The author/owner is not responsible for any consequences arising from actions taken based on information provided on this website, nor from the use/misuse of products from this site. All trademarks are the property of their respective owners.