RoboCon 2024

MITM Unleashed: Hacking Your Network Communication with Robot Framework
2024-02-29 , RoboConOnline

Uncover the potential of Man-in-the-Middle (MITM) techniques in software testing. Discover how to use real-time network manipulation, empowering you with independence and flexibility in automation testing.


Introduction

In an ideal world, testing is straightforward, with every aspect of the system easily testable, automation seamless, and testing scenarios requiring no adjustments. The reality often falls short of this ideal. Testing environments may lack vital resources, leading to a reliance on developers to create stubs and mocks or manual testing.
This dependence on developers can introduce bottlenecks and dependencies, especially when working under time constraints or with uncooperative teams. What if testers could gain more control and independence in their testing scenarios? Let's explore the concept of using Man-in-the-Middle (MITM) techniques to revolutionize software testing.

The Pretend Game

Stubbing and mocking are established techniques in software testing. They involve manipulating specific parts of a test object to create specific testing scenarios. This is crucial when integration with external applications is impossible or when replicating desired behaviors is challenging.
However, challenges arise when it comes to automation and parallel testing, as toggling a stub or mock on and off simultaneously is impossible.

Hacking your network: The MITM Approach

Man-in-the-Middle (MITM) attacks are well-known in the cybersecurity domain for eavesdropping network communications. However, MITM techniques can be harnessed as a potent tool for software testing. This approach gives testers the ability to take control of their testing scenarios without relying on developers, external resources, or making changes to the application under test.
MITM offers several advantages:

Real-time Network Manipulation

MITM allows testers to intercept and manipulate requests sent by applications, enabling the simulation of various scenarios. This can be done in parallel, by proxying a single browser instance to manipulate payloads, by delaying or even blocking specific endpoints.

Backend Information Manipulation

MITM is a python library that provides testers with the ability to modify backend data, ensuring that the frontend displays the desired content for testing. Testers can use MITM to simulate various scenarios and verify how the application responds to different inputs. This powerful capability enhances test coverage and can help identify potential vulnerabilities faster¬.

Versatility of MITM

One of the key strengths of MITM is its independence from the application under test. Testers can fully customize and utilize MITM according to their specific testing needs, without relying on external partners or introducing changes to the application's codebase. This versatility empowers testers to be more self-sufficient and flexible in their testing efforts.

Conclusion

In an imperfect world, software testing can be a daunting task, with dependencies on developers and external resources. Man-in-the-Middle (MITM) techniques provides testers with the independence and flexibility they need to overcome these challenges.


Describe your intended audience:

The talk is most suited for people who use some sort of web testing, as this is the easiest implementation. The techniques can be used in various other applications though.

Is this suitable for ..?:

Intermediate RF user

I work as a Dev Test Expert at Sogeti Netherlands, where I have a dual role as both a Developer, specializing in Java, and a Test Automation Engineer. I'm passionate about learning and always aim to bring out the best in both myself and my colleagues. This is why I find great fulfillment in helping others grasp the nuances of Test Automation, and I've taken on the role of a Robot Framework trainer within my company. I'm perpetually curious and excited about discovering new tools, tips, and tricks that can enhance the quality of my work. During my free time, I like to unwind by building with LEGO, going for runs, and playing video games.