MirLabs / The blog / Security / Open source
Blocking a bot without blocking a whole office
A shared IP address can get blocked because of a single infected machine. Sentinelle 0.5 keeps permanent bans, but lets humans through in one click.
Sentinelle, my Symfony security bundle, blocks the addresses that look for your secrets: a .env, a .git folder, a key. Bans escalate: 24 hours the first time, 7 days the second, then permanent. An address that comes back after a week to look for your .env again is not passing by chance.
That choice has a blind spot, and I did not want to hide it.
One address, several people
Behind a single IP address there can be a lot of people: a company network, a school, a mobile operator sharing its addresses among thousands of customers. One infected machine on that network scans your site, and the whole address ends up blocked. With a permanent ban, real visitors, maybe customers, can no longer get in, without knowing why.
The easy answer would be never to ban permanently again. I did not take it: scanners come back, and a ban that expires lets them back in.
Letting humans through
Since version 0.5, a browser whose address is blocked no longer hits a wall. It sees a page that explains: "Your network was blocked after suspicious requests." With a button.
On a click, the browser does a small calculation in JavaScript, under a second, with no captcha and no outside service. Once it is done, it gets a signed pass, valid 24 hours, tied to that address. The innocent colleague carries on with their visit. The bot, which does not do the calculation, stays outside.
Three safeguards:
- sensitive files stay closed to everyone, pass or not;
- attempts are limited, and each challenge works only once;
- if a browser holding a pass tries an attack, the pass is withdrawn for the whole address.
Protection that breaks the site destroys more than it defends
That is the rule that has guided Sentinelle from the start. It was born of an incident: I nearly blocked a Mailgun server by hand, which would have silently cut off all incoming email for one of my sites. Since then, critical providers cannot be blocked, and webhooks never trigger a ban.
The pass page applies the same rule to people: be hard on bots, without making the humans who share their address pay for it.
Sentinelle is free and open source. The documentation also explains the setting not to forget behind a proxy (trusted_proxies), without which all your visitors share the same address.
Read next
LocService: a cyberattack copied links to rental files
The rental platform LocService, published by Gobocom, says it suffered an intrusion detected on 30 October: names, contact details, invoices and share links to DossierFacile rental files were copied. ID documents and supporting papers were not copied directly.
Ipsos: the Qilin group claims a data theft, ten days after an acknowledged intrusion
Ipsos acknowledged an intrusion into an internal system on 16 November, with no disruption to its business. On 23 November the Qilin group listed it on its site and showed five screenshots of documents. Nothing confirms that these documents come from the acknowledged intrusion.
1Password: a stolen GitHub account was used to copy customer data, without touching the vaults
1Password says an attacker took an employee's GitHub account, slipped malicious code into services and copied customer data: login addresses, identifiers, public keys, some tokens. According to the company, the vaults and master passwords were not reached.