USB connection is the easiest and most simple way to share files from a smartphone to a PC but seem like with this function, hacker can turn it to be an attack too.
According to Angelos Stavrou, an assistant professor of computer science at George Mason University, and student Zhaohui Wang:
The exploit works by adding keyboard or mouse functionality to the connection so an attacker can then start typing commands or click the mouse in order to steal files, download additional malware, or do other things to take control of the computer.
All of the above activities can be done because USB protocol can be used to connect any device to a computing platform without authentication.
At the moment of time seem like there is no way to stop this attack since any activities coming from keyboard can’t be clearly told as good or bad.