In current wireless communication systems, sophisticated attack strategies at the physical layer—the electromagnetic wave signals carrying the information—leave traces in the physical environment, which mean such attacks are typically detectable. This may not be the case for future—sixth generation and beyond—wireless networks, whose current vision relies on the concept of smart radio environments, which use metasurfaces to manipulate wave signals in unconventional ways. Here we report metasurface-enabled smart wireless attacks at the physical layer. We illustrate both passive and active operational modes. In the passive mode, an attacker is capable of eavesdropping on the wireless information transfer of a target by controlling the programmable metasurface, without actively radiating any signal. In the active mode, an attacker can eavesdrop as well as falsify the wireless communications by sending deceptive information to the target. In both operational modes, the detectability of the attacker can be minimized. As a proof of concept, we create an attacker prototype working in the Wi-Fi band at around 2.4 GHz, and demonstrate its ability to hack wireless data streams. Our results highlight potential security threats for next-generation wireless networks, and emphasize the need to develop suitable mitigation strategies and specific security protocols at an early stage.