The Israeli military said operatives of the Palestinian militant group Hamas targeted its soldiers in a monthslong operation that duped them into downloading spyware with the false promise of exchanging illicit photos with young women.

Dozens of Israeli soldiers downloaded the spyware, but the scheme was detected early enough to prevent important secrets from getting out and the Hamas servers hosting the operation were destroyed, the military said on Sunday.

The phishing operation, known as a honey trap, is the third such scheme since 2017 and shows how Hamas exploits social media to elicit information from enemy soldiers—and how difficult it is for Israel and others to prevent such attacks.

“The level of social engineering is much higher and more advanced and sophisticated compared to previous attempts,” Israeli military spokesman Jonathan Conricus said.

Using fake profiles purporting to be young Israeli women, operatives for the Islamist militant group contacted Israeli soldiers through Facebook , WhatsApp, Instagram—and for the first time since such operations began—the popular messaging app Telegram, highlighting the widening scope of these cyberspying attempts.