Apple iOS and OS X are being targeted by a groundbreaking family of malware, according to the security firm Palo Alto Networks.

WireLurker is said to be the first malware family capable of infecting iOS apps and installing third-party software on iPhones that have not been "jailbroken", a process that allows apps not vetted by Apple to be installed.

Ryan Olson, intelligence director of Unit 42 at Palo Alto, said: "WireLurker is unlike anything we’ve ever seen in terms of Apple iOS and OS X malware.

"The techniques in use suggest that bad actors are getting more sophisticated when it comes to exploiting some of the world’s best-known desktop and mobile platforms."

The firm claimed that 400 infected apps had been downloaded 350,000 times, but was mostly affecting users in China, where WireLurker is thought to have originated.

It is thought to be only the second malware family that can be transferred through a USB cable connecting to a machine running Apple OS X, and is the first to automate malicious app generation through binary file replacement.

"We have provided full protection to Palo Alto Networks customers and published a detailed report so others can assess the risk and take appropriate measures to protect themselves," Olson added.