The Israeli Defense Forces (IDF) has uncovered a digital “honey trap” by Hamas, which used fake social media profiles to flirt with Israeli soldiers and fool them into downloading spyware on their phones.

Hamas militants posed as women on various social media platforms and messengers, including Facebook, Instagram, WhatsApp, and Telegram, IDF spokesperson Jonathan Conricus said on Sunday.

After making contact with Israeli servicemen, the fake women would offer to send nude photographs of themselves, asking the soldiers to first download a purported Snapchat-like photo-sharing app, which is actually a spyware program. That malware gave Hamas the ability to hack the phone camera, files, contacts, and GPS data.

Jonathan Conricus said that the flirtatious accounts with Jewish names claimed to be newcomers to Israel, which explained their poor grammar and spelling, and even pretended to have vision or hearing impairments to avoid a direct phone call.

The IDF would not disclose how it tracked down Hamas servers, and said Hamas failed to steal any major secrets.

This is not the first time that Hamas has tried to infiltrate soldiers’ phones to spy on the Israeli military.

In the summer 2018, the IDF command received dozens of reports from soldiers about suspicious accounts trying to make them download fake apps. Around that time, Hamas also launched a fake rocket alert app to hack cell phones.

The first attempt by Hamas to hack Israeli phones was reported in January 2017; the military said that “many dozens” of soldiers were affected by militants posing as attractive women.

However, Conricus called the latest plot “much more advanced and sophisticated” than previous ones. “We see that they’re of course learning and upping their game,” he added.