Along with bloodlust and brawn, Hamas proved last week that it also has brains, at least where its enemies’ weaknesses are concerned. But even though the terrorist organization that controls the Gaza Strip has grown quite proficient at using the Internet to incite violence against Jews, it clearly is still no match for Israel in the realm of cyberspace.Unbeknownst to the Israeli public until Tuesday, while Hamas was distributing candy in the streets of Gaza to celebrate last Sunday’s truck-ramming attack – which killed four IDF soldiers who were about to embark on an educational field trip – the Islamist goons had been engaged in a clever sting operation to obtain classified information from the Israeli military.Posing as beautiful girls on social media, with enticing photos and hip Hebrew lingo, Hamas operatives succeeded in seducing boys in uniform.As in the documentary film and later MTV series Catfish, these young guys believed that the scantily clad women they were chatting, flirting and exchanging messages with were genuine bombshells, and even potential girlfriends. Well, until the “girls” stopped responding, that is, as soon as they got their targets to download a certain app, which was actually spyware.According to the IDF blog, this app “can turn a mobile device into an open book – leaving contacts, location, apps, pictures and files accessible ... [and] can stream video from the camera and audio from the microphone.”This was a case, the blog said, of Hamas using a weapon that was not a bomb, gun or vehicle, but rather a simple friend request.It is not clear how many soldiers initially fell for the trap, but the scheme was uncovered by the IDF Military Intelligence Directorate’s information security department when complaints of other suspicious online activity were lodged. In the process of investigating those issues, the Hamas “honey plot” was uncovered.To counteract such threats, which the IDF reported resulted in no security breaches, a campaign has been launched to warn soldiers about cyber entrapment and provide guidelines for those whose phones have already been compromised.Meanwhile, the IDF may expand its social media rules for soldiers to forbid them from revealing any information about their military service over the Internet.The irony of this foiled attempt on the part of Hamas is two-fold. In the first place, one of the aspects of Western democracies that the Islamist terrorist organization aims to eradicate by way of the sword is the freedom of men and women to behave as they wish, consensually, anywhere from the boardroom to the bedroom.Choosing to lure the Israeli boys with stolen profiles of overtly sensual females was a way of trying to topple the Jewish state from within, through its own “immoral decadence.” Yet what it revealed was Hamas’ deep sexual perversion, coupled with a whole lot of envy.The second irony has to do with Israel’s grasp of the depth of cyber threats – something other countries are now scrambling to confront – and concerted efforts to thwart and combat them.Early last summer, the IDF completed the construction of a cyber control center to protect the army’s data. This came two years after a cyber defense situation room was established, and soon after that, special units were created to repel attacks against Israeli infrastructure, such as the electrical grid, the water and banking systems and telephone networks. But while rightly worried about the dire consequences of a cyber attack that could shut down civilian functioning and impair military capabilities, it missed such a basic – almost primitive – bit of Hamas foreplay.Israel has learned that it is easier to fight an actual war than to keep “lone-wolf” terrorism – such as the truck-ramming attack in Jerusalem – at bay. Now it must figure out what to do about the havoc that can be wreaked by dangerous identity-theft cyber pests posing in bikinis.Indeed, Israel may be able to infiltrate Iran’s nuclear mechanisms with worms, but getting its populace to stay away from chat rooms is a mission that even the mighty IDF will find impossible.The writer is the managing editor of The Algemeiner.