An Israeli soldier looks at his phone during clashes with Palestinian stone-throwers in the West Bank city of Hebron, March 6, 2015. Reuters

A number of Israeli soldiers have fallen victim to an online spy plot engineered by Palestinian militant group Hamas involving fake profiles of women, Israeli defense officials told reporters Wednesday.

Dozens of soldiers had befriended social media accounts seemingly belonging to women and began flirtatious exchanges, according to the presentation hosted by the Israeli military. The fake accounts then convinced Israeli soldiers to download applications infected by Trojan viruses on their phones. The malware was capable of monitoring the soldiers' personal private information.

Many scammers reached out to Israeli soldiers on Facebook and got them to download infected data through applications such as Wowo Messenger, SR Chat and Yeecall Pro, the reported. Once in, the programs reportedly gave hackers nearly complete access of the soldier's phone, including the camera and microphone. Targets were mostly low-ranking males, but a major and a number of females had fallen into the trap as well, according to a senior military official.

"Just a second, I'll send you a photo, my dear," one profile posing as a woman wrote in a private message.

"OK. Ha-ha," the soldier replied, before a photo of a blonde woman in a swimsuit popped up.

Once the applications were downloaded, many accounts stopped answering and suspicions were raised. Investigations by the Israeli military and intelligence agencies were conducted for months under the name "Operation Hunter's Network" and officials determined that Hamas, the Palestinian Islamic militant group in charge of the Gaza Strip, was responsible for the hacks.

“There is, of course, a potential of serious harm to national security, but the damage that was actually done was minor,” the official told the Jerusalem Post.

The military has since wiped the compromised devices and said soldiers involved would not be disciplined. In response to the espionage, however, Israeli military officials launched a campaign to raise awareness of threats its soldiers face online and suggested increasing restrictions. Current rules prohibit those in the Lieutenant-colonel rank or above from revealing their military service on social media.

Hamas was formed in the 80s with funding from Egyptian's Muslim Brotherhood during the First Intifada, a Palestinian uprising against Israeli control over Palestinian territories. Since then, the militant group has split from the central government in Ramallah and consolidated its control over the coastal Gaza Strip, separated from the West Bank by Israel.

Israel has been accused of using similar spying techniques to blackmail Palestinians and, in some cases, recruit civilians as spies.