How the Macron Campaign Fought Back Against Putin's Hackers in the Final Hour

French presidential election candidate Emmanuel Macron, head of the political movement En Marche !, or Onwards ! greeting supporters as he left a polling station during the second round of the French presidential election, in Le Touquet, France, May 7. Reuters

Far right nationalist Marine Le Pen was offered a controversial photo op she happily accepted when touring Moscow in March during the French presidential election campaign. Russian President Vladimir Putin expressed his desire to shake hands with the populist candidate and wished her luck in the upcoming vote.

Le Pen walked out of her meeting with the Kremlin leader to tell reporters: "A new world has emerged in these past years. It's the world of Vladimir Putin, it's the world of Donald Trump in the United States ... and I think that probably I am the one who shares with these great nations a vision of cooperation and not a vision of submission."

A month earlier, Le Pen's main opponent, Emmanuel Macron, was gaining steam as an insurgent, albeit centrist candidate also vowing to shakeup the nation's status quo. Shortly after, his campaign reportedly fell victim to cyber attacks by the same group of hackers that targeted former Democratic candidate Hillary Clinton's campaign in last year's U.S. elections. That group was comprised of infamous hackers like STRONTIUM, Apt28 and Pawn Storm, which most experts throughout the intelligence community agree work—at least in part—for the Russian government.

The only difference was, Putin's hackers had finally met their match in Macron.

French President-elect Emmanuel Macron celebrated on the stage at his victory rally near the Louvre in Paris, France May 7, 2017. Reuters

The French president-elect cruised to victory Sunday, garnering nearly two-to-one of the total votes against Le Pen with final projections placing him above 65 percent. And yet the world watched the election on the edge of their seats, following a last-minute "massive" hacking attack against Macron's new one-year-old political party, En Marche!, as well as his campaign.

Related: Emmanuel Macron's French Election Win Sours the Mood in Moscow

Both Macron and France were well-prepared for any sort of last-minute shakeup that had the promise of throwing a historic election on its head, however. The incoming French president and his campaign refused to take such attacks lying down, after first reporting several of its members were targeted in online phishing incidents weeks before Le Pen visited Russia and met with Putin.

Macron's En Marche!campaign unleashed an operation attacking those hackers and their ability to gain accurate log-in information. "Every week we send to the team screen captures of all the phishing addresses we have found during the week … we also do counteroffensive against them," Mounir Mahjoubi, Macron's head of digital, told the Daily Beast in the final weeks of the election.

News Update: French presidential candidate Emmanuel Macron's campaign says it was the victim of a massive hack.

— PBS NewsHour (@NewsHour) May 5, 2017

When staff members received fake emails leading them to log-in pages hackers could use to record keystrokes, Macron's digital team flooded those landing pages with fake passwords and other data, confusing the hackers and making it virtually impossible to gain access to the campaign's emails.

"You can flood these addresses with multiple passwords and log-ins, true ones, false ones, so the people behind them use up a lot of time trying to figure them out," Mahjoubi said.

Meanwhile, France has several measures in place to avoid damaging the integrity of the national ballot in the eleventh hour; the country restricts all election campaigning, reporting and polling on Friday at 6 p.m. before the Sunday vote in an effort to avoid sensationalized reporting—like, for example, more than 14 gigabytes of both private- and business-related emails and data dumped onto Pastebin on the eve of the election, which happened Friday at 2 p.m.

Eventually, the hacking group was successful in its attempt to unleash an assault on Macron's campaign. But it was too late to affect the vote.

Supporters of French President-elect Emmanuel Macron, head of the political movement En Marche !, or Onwards !, reacted after announcement in the second round of 2017 French presidential election at En Marche local headquarters in Marseille, France, May 7, 2017. Reuters

Still, those hackers haven't retreated offline; instead, they could look to the upcoming U.K. general election vote as their next opportunity for disruption.

"The only way to be ready is to train the people," Mahjoubi said. "Because what happened during the Hillary Clinton campaign is that one man, the most powerful, [campaign chairman] John Podesta, logged on to his [fake] page."