Ben Ali's government has recognized the crucial role the social network was playing in the organization of the protest and, according to The Atlantic, they tried to steal "an entire country's worth of passwords" by ordering all the country's ISP to run keyloggers and record login information.
Facebook's Chief Security Officer Joe Sullivan said that in the past they had to deal with ISPs who have tried to filter or block their site, but that they have never before had to deal with a government's attempt to intercept user information.
Putting politics aside, they treated the problem as a security issue, and decided to route all login requests coming from Tunisia to the https version of the site. For all those users whose passwords might have already been stolen, they decided to implement a "social CAPTCHA" method of authentication that would await anyone trying to access their accounts - users were asked to identify their friends in various photos.
The changes were implemented some five days after Facebook was made aware of the existing problem. Since IPSs can force a downgrade of https to http, the solution wasn't exactly foolproof, but in the end it didn't matter because the ISPs failed react.
In the meantime, civil unrest spread to another African country that suffers under a decades-long presidential rule: Egypt. Recognizing the danger that social networks pose for the stability of its rule, the Egyptian government has moved to block Twitter.
"We can confirm that Twitter was blocked in Egypt around 8am PT today. It is impacting both Twitter.com & applications," it said on one of Twitter's official accounts, followed by a statement saying that they believe that the open exchange of information and views benefits societies and helps governments better connect with their people.
Reading our newsletter every Monday will keep you up-to-date with security news.
Receive a daily digest of the latest security news.