# PowerBridge: Covert Air-Gap Exfiltration/Infiltration via Smart Plug
## 6 Data Encoding and Decoding
### Communication Modulation  
#### 6.1.1 Modulation of Exfiltration Communication  
In the event of exfiltration, we can manipulate the CPU load size to influence the amplitude of the current signal or regulate the frequency of current signal fluctuations by controlling load duration and utilizing inter-load time intervals. Amplitude and frequency represent two pivotal parameters in a signal, enabling diverse modulation techniques such as amplitude-shift keying (ASK), frequency-shift keying (FSK), and phase-shift keying (PSK) through their manipulation. Subsequent sections will elaborate on these three modulation methods. 1. ASK is a digital modulation technique that utilizes the amplitude of the carrier wave to transmit information by varying the digital baseband signal. The program can regulate the power line current's magnitude (amplitude) through different CPU load sizes. In the Binary Amplitude Key (2 ASK), binary digits \"0\" and \"1\" correspond to two distinct states of carrier amplitude, and analog modulation and keying methods can generate the 2 ASK signal. Although this modulation algorithm is relatively straightforward and intuitive, it suffers from low communication rate issues. To enhance transmission rate, multi-amplitude-shift keying (MASK) can be employed, where M represents the controllable number of CPU cores. MASK exhibits two notable characteristics: Firstly, in the same channel code source modulation scheme, each symbol has the capacity to carry log2M bits of information. Consequently, when the channel frequency band is constrained, it enables an increase in the transmission rate of information and enhances frequency band utilization. However, this advantage comes at the expense of amplified signal power and increased implementation complexity. Secondly, for a given information rate, multi-level base methods exhibit lower channel transmission rates compared to binary methods. As a result, the duration of multi-level signal code sources is wider than that of binary methods. Expanding the symbol width augments energy within signal symbols, while simultaneously mitigating the inter-symbol interference arising from channel characteristics [43]. Although multi-level MASK modulation serves as an efficient transmission technique, its susceptibility to noise and fading renders it more suitable for scenarios with minimal channel interference. Figure 19 shows the waveform of computer power consumption; with 0-8 cores gradually reaching full load on an 8-core CPU, it can display 24-bit binary sequence data. 2. FSK is a digital modulation technique that utilizes the frequency of the carrier wave to transmit information by varying the digital baseband signal. It is well-known that the signal frequency can be manipulated by adjusting the time interval between two CPU loads. Hence, in an exfiltration scenario, binary information \"0\" and \"1\" correspond to two distinct frequencies _f1_ and _f2_ of the carrier signal, respectively. The implementation of 2 FSK is relatively straightforward, exhibiting excellent performance in terms of noise and attenuation resistance, making it extensively employed for medium- and low-speed data transmission applications. When employing a multi-base system for modulation, it is referred to as MFSK, which employs multiple carrier frequencies to represent diverse methods of digital information modulation. Figure 20 illustrates both time-domain signals and the corresponding spectra of a synthesized 4-frequency FSK achieved through fluctuations in CPU power consumption at frequencies of 7 Hz, 13 Hz, 17 Hz, and 23 Hz. 3. PSK is a digital modulation scheme that utilizes the phase of the carrier signal to encode input information. Phase-shift keying can be categorized into two types: absolute phase shift and relative phase shift. Absolute phase-shifting refers to phase modulation based on the unmodulated carrier's initial phase.