Bypassing IPS with handmade XOR encryption

In this section, we will build a simple XOR encryption in Python. Now, traffic encryption is one of the most powerful techniques to evade network analyzer or IPS sensors but first, before jumping into the coding part, let's have a quick overview on how these devices work in the first place.

Generally speaking, these devices can operate in two modes: the first mode, which is the signature-based mode, where it inspects the packet parameters and data payloads, which are passing through the sensor. Then, similar to an antivirus, it checks whether there is any match against its signature database and based on the action specified for the matched rule, it may drop or log the traffic. The second mode is ...

Get Python for Offensive PenTest now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.