The "OMG Cable" works exactly like a normal Lightning to USB cable and can log keystrokes from connected Mac keyboards, iPads, and iPhones, and then send this data to a bad actor who could be over a mile away. They work by creating a Wi-Fi hotspot that a hacker can connect to, and using a simple web app they can record keystrokes.
The cables contain a small implanted chip and are physically the same size as authentic cables, making it extremely difficult to identify a malicious cable. The implant itself apparently takes up around half of the length of a USB-C connector's plastic shell, allowing the cable to continue to operate as normal.
So beware of those cheap 3rd party cables...
See Security Researcher Develops Lightning Cable With Hidden Chip to Steal Passwords
A normal-looking Lightning cable that can used to steal data like passwords and send it to a hacker has been developed, Vice reports.