# Power-Based Side-Channel Attacks on Program Control Flow with Machine Learning Models
## 5 Discussion  
A number of conclusions can be drawn from the results achieved across these classification problems. Beyond the minimal proof of concept that control flow can be significantly recovered even when the work in different states of a limited purpose finite-state machine  
Figure 6: A heatmap demonstrating the accuracy of the testing phase for firmware with two operations executed in each state (\(w=2\)). This firmware exhibits a similar difference between each classifier as seen in Figure 5 but shifted to the high end of classification accuracy. The random forest classifier mixes out at 100% accuracy for this firmware. Figure 7: A series of dot plots which illustrate the performance of various classifiers for firmware with various amounts of computation. Accuracy for firmware of \(w=1\) is not included since it was less than 3% for all four tested classifiers. See Figure 5 for specific performance on firmware with \(w=1\) for each classification algorithm. are identical, these findings suggest that obfuscation techniques may be necessary to obscure the control flow of the program when said control flow conveys security-relevant information. As an example, an attacker should not be able to purchase a smart lock, determine the device's control flow from the embedded finite-state machine, and then gain the ability to access a home using the same smart lock model. Since the results show that this information was exfiltrated from the underlying micro-controller, this is a potential vulnerability that may require more sophisticated protections than traditional, software-based ones. One surprising result was the extremely low accuracy while applying machine learning classifiers to the firmware which has only one operation (\(w=1\)). It was hypothesized before data analysis was completed that the average accuracy would decrease monotonically as the number of operations increased. The intuition used to develop this hypothesis was that as the proportional time spent in the control flow code sections increased, the more accurate the transition recovery would be. This followed from the observation that, when more relative time is spent in control flow, more of the data points captured within the power trace would be directly related to the process of determining state machine transitions. The subversion of this hypothesized outcome indicates that the number of operations has much less influence in the classification of transitions than it was initially assumed. It is clear that the amount of work performed in a state still has influence, as evidenced by the variation in classification accuracy in correlation with the number of operations within each state. However, this role may not be nearly as important as the actual work performed and the state transitions executed by a low-powered device. The first research question sought to identify whether different behavior is required in each state of an embedded state machine in order to completely recover the transitions. This question is answered firmly in the negative. While prior works made use of the different behavior of a heterogeneous, two-state FSM to more easily perform the classification [1], this difference is not required. This work clearly demonstrates that, while differences in state behavior can allow for recoverable transition sequences, it is not strictly necessary since high transition recovery accuracy was achieved with homogeneous state behavior. Even when applying the same techniques and classifiers as were used in prior work, meaningful levels of accuracy were achieved with said states. This finding suggests that power-based side-channel attacks will be an applicable tool to recover state transition information regardless of what kind of work is performed by the states within an FSM. For devices with minimal numbers of states which do a meaningful amount of work (i.e., they are not comparable to the \(w=1\) firmware tested in these experiments), these results suggest it is possible to recover the transition order of the underlying FSM.