# PowerBridge: Covert Air-Gap Exfiltration/Infiltration via Smart Plug
## 4 Power Line Communication and Smart Plug
### Computer Power Management  
The current computer system encompasses a wide range of devices, including desktops, mobile platforms, workstations, and servers. These devices primarily utilize the ACPI (Advanced Configuration and Power Interface) for efficient power management.  
Figure 12: Intelligent plug usage scenarios.  
Figure 13: Smart plug electrical structure diagram.  
Developed collaboratively by Intel, Microsoft, and Toshiba in 1997, the ACPI offers comprehensive power management interfaces for operating system application management. The latest version available is 5.0 [38]. The ACPI serves as a powerful specification that allows an operating system to obtain hardware status information such as the source of power (battery or external supply). Consequently, third-party software programs can also determine whether the computer is currently running on battery or connected to a power source based on the provided power management interface offered by the ACPI. The architecture of the ACPI is illustrated in Figure 14 [39].  
In practical circuits, the power adapter serves as the central module of the entire system. The AC-DC adapter is commonly employed to convert AC main power into DC power, enabling direct supply to various electronic devices. To enhance power supply efficiency, it becomes imperative to switch between the low-power mode and the normal mode. Figure 15 illustrates common physical components utilized in this process. Initially, the input conditioning circuit rectifies and filters the AC signal, generating the first AC signal that drives the primary winding of the transformer. The secondary winding then converts this into a second AC signal with a desired amplitude. Finally, through regulation and power transmission circuitry, further rectification and filtering of the AC signal occurs, resulting in the generation of DC output voltage, Vout. Figure 16 depicts an electrical structure typical for a standard power adapter [40].  
Figure 14: The ACPI is the power management architecture.  
Figure 15: Physical picture of common power adapters.  
There are two methods for communication between the air-gapped computer and the smart plug: the exfiltration and infiltration scenarios.  
In the exfiltration scenario, a fluctuation signal of computer power consumption is generated using the CPU, which is then captured by the power measurement module of the smart plug and transmitted to a remote receiver for decoding, thereby completing the exfiltration process.  
For infiltration scenarios, smart plugs serve as intermediary transfer bridges to transmit commands to air-gapped computers through power lines. The Advanced Configuration and Power Interface (ACPI) provides an interface for detecting the external power supply status, enabling the computer operating system itself to offer tools for accessing this interface, such as the 'powercfg' command on Windows systems and the 'upower' command on Linux systems. These tools can be utilized to manage power plans, utilize available sleep states, control individual device power statuses, and analyze common energy efficiency and battery life issues within the system. The Windows operating system's 'powercfg' command encompasses various functions including creating, initiating, or pausing power plans. Notably, one of these commands, '/batteryreport', generates a report detailing battery usage (as depicted in Figure 17).  
The graph clearly illustrates the logged records of whether the laptop is powered by an external power supply or a battery. These log records enable analysis of the timing when the external power supply is initiated and disconnected, i.e., when the smart plug switch is turned on and off, providing a viable pathway for infiltration.