Me
by jordanjoewatson
The following github repo includes Prolog PoC attempting to use this method to identify C2 channels. https://github.com/jordanjoewatson/swi2 Although the code runs successfully, it takes too much time due to iterating over all possible combinations of packets.
The following approach was used to collect and prepare data.
Milliseconds were removed from timestamps and duplicated rows were removed.
Amount of packets: 4820
Entropy value: 0.994
Amount of packets: 32
Entropy value: 0.877
Amount of packets: 186
Entropy: 0.783
Amount of packets: 558
Entropy: 0.348
Amount of packets: 748
Entropy: 0
High entropy can be an indicator for Command and Control channels. The Prolog code provided is also able to identify malicious C2 traffic masquerading in benign traffic, this is possible because of the Depth First Search algorithm built into Prolog. However, identifying channels using this approach is infeasable due to the time required when searching all possible combination of packets.
tags: