Configure Fail2Ban for permanent and persistent bans

NB: This article is not about how Fail2Ban works or how to install it.

If you’re running an Internet facing server, you probably know its exposed services are constantly being probed and attacks are being attempted against it. Fortunately, an extremely useful, nice and nifty tool is here to help: Fail2Ban.

Fail2Ban scans service’s log files for patterns defined as regular expressions and, if an offending pattern is found a certain number of times within a given timeframe, the corresponding source IP is banned (ie: blocked) for a configurable time, using local firewall rules such as iptables.

I’m very touchy when it comes to my server security so I’m using Fail2Ban to perform permanent bans of involved source IPs and I’m going to show you how. The problem however is that those bans do not persist across a Fail2ban server restart or a server reboot.

In this article I will show you how to add two simple lines in Fail2Ban configuration file in order to add persistency across restart.

Lire la suite

Hacking voice over IP communications

Corporate voice network, also known as Voice over IP (VoIP) network, turns out to be an interesting target for those looking for confidential and private information. In my experience though, this target is often underestimated both by intruders or ethical hackers during their engagement, but also by company security officers.

In this article, I will go through a very practical case, using some well known tools to demonstrate the potential lack of security on VoIP networks. I’ll explain, step by step, how I’ve been using these tools, sometimes not exactly how they’re supposed to be used but that’s just how I managed to make it work altogether.

This example focuses on a specific VoIP technical environment and setup, and serves the only purpose of raising awareness on how easy it is to hack VoIP communications.

Lire la suite

End-to-end email encryption – A case study on ProtonMail design limits and security flaws

In the wake of Edward Snowden revelations on the NSA program, focus progressively increased on various tools aiming at escaping governments and various intelligence agencies mass surveillance. It also brought to light the general matter of online privacy at stake in a GAFAM world (GAFAM = Google Apple Facebook Amazon Microsoft). These are however two different topics: in the first case people want to avoid being watched by their governments, and in the second case people want to take control back over their digital life, a control they willingly relinquished to some companies that do not have privacy protection in their genes. Still, both share a common thing: the sake of privacy for which some tools try to propose a solution to.

These tools might be new, but the actual technology has been around for a while, essentially solid encryption standards such as PGP, RSA, AES and so on. Some other applications are meant to ease self-hosting services such as email, cloud file storage, calendar, which definitely is a good way of protecting one’s privacy. And this has become something possible at an affordable price (VPS, Raspberry Pi at home, etc.). The whole point being to offer people proper tools, ie tools anyone can use, as well as lower the complexity of using such technologies, if not making it transparent to the end-user.

Lire la suite

Un capteur de température sans fil à base de Xbee (partie 2)

EDIT (30/01/2016): Le régulateur de tension (LD1117V33C) proposé initialement dans cet article fonctionne parfaitement mais possède une consommation interne trop importante, ce qui m’a causé une surconsommation des piles et une tenue d’à peine 3 semaines. Je l’ai donc avantageusement remplacé par un LP2950CZ-3.3, qui délivre 100mA maximum, ce qui s’avère bien suffisant pour ce petit montage. La consommation des piles semblent correct et je pense avoir une durée de vie de plusieurs mois. Attention à vérifier l’ordre de broches (Vin, Vout, GND) car il diffère du LD1117.

De l’eau a coulé sous les ponts depuis la première partie de cette série d’article sur les XBee, mais les beaux jours passent toujours plus vite, et puis comme vous le verrez, je n’ai pas chômé sur d’autres sujets qui feront bientôt l’objet de nouveaux articles.

Voici donc la deuxième (et dernière) partie sur la réalisation d’un capteur de température sans fil à base de XBee. Pour ceux qui ne l’ont pas encore lue, je vous invite à aller lire la première partie, qui introduit de façon détaillée les XBee, leur programmation, et également le principe de réalisation de ce capteur de température sans fil.

Dans cet article, je vous propose de voir comment passer du prototypage sur breadboard, à un packaging un peu plus fini pour la partie électronique (toutes proportions gardées, ça reste du bricolage). On verra également comment faire en sorte que le code NodeJS tourne en tâche de fond, à la façon d’un service Unix.

Lire la suite