O'Reilly logo

Kali Linux Web Penetration Testing Cookbook by Gilberto Nájera-Gutiérrez

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Modifying data between the server and the client

When performing a MITM attack, we are able not only to listen to everything being sent between the victim systems but also to modify requests and responses and, thus, make them behave as we want.

In this recipe, we will use Ettercap filters to detect whether or not a packet contains the information we are interested in and to trigger the change operations.

Getting ready

We need to have MITM working before starting this recipe.

How to do it...

  1. Our first step is to create a filter file. Save the following code in a text file (we will call it regex-replace-filter.filter) as is shown here:
    # If the packet goes to vulnerable_vm on TCP port 80 (HTTP) if (ip.dst == '192.168.56.102'&& tcp.dst == 80) { # if the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required