Coder Social home page Coder Social logo

mitm-helper-vpn's Introduction

PPTP VPN Man-in-the-Middle Helper

About

These scripts are designed to make it easy and straight-forward to configure a Ubuntu virtual machine to act as a PPTP VPN endpoint, and forward traffic to your favorite web proxy or other tool. I personally use this for doing mobile testing, as both Android and iOS support PPTP VPNs out of the box.

Note: There is no black magic here - simply some utilities to make it easier to use.

The typical work flow would be a VM that has one interface, we'll call it 'eth0'. First, we start the pptpd daemon and then we configure IP forwarding and apply custom iptables rules to forward traffic to specific proxies, such as Burp.

Configuration

This tool is designed to work on Ubuntu virtual machines operating in 'bridged' mode. Your mileage will vary if you use another VM, but I suppose Kali Linux should also work fine.

To download and setup the tool, run the following commands:

$ git clone https://github.com/jakev/mitm-helper-vpn
$ cd mitm-helper-vpn
$ sudo ./install_dependencies.sh
$ sudo dpkg -i build/mitm-helper-vpn_0.1.deb

Managing Users

First, we need to add a user. This example will add a user called 'analyst', with a password of 'analyst':

$ sudo mitm-pptp-users add analyst analyst

If you want to see your current users:

$ sudo mitm-pptp-users list

To delete a user:

$ sudo mitm-pptp-users del analyst

To delete all users:

$ sudo mitm-pptp-users purge

Configuring Proxy Rules

The file /etc/mitm-pptp.conf will be used to configure how you will intercept traffic. By default, traffic is simply passed through (no proxy). This should work if you just want to observe traffic using a tool like Wireshark. In our case, let's assume we have Burp running on port 9999, and we'd like to forward traffic on ports 80 and 443 to this proxy. We configure the /etc/mitm-pptp.conf file as follows:

[HTTP Proxies]
ProxyPort:9999
ForwardPorts:80,443

Now, let's say that we determine our app/device uses a custom protocol on port 1234, and Burp is not useful for intercepting this traffic. We created a python script, and it is listening on port 8888. Let's add rules for this:

[HTTP Proxies]
ProxyPort:9999
ForwardPorts:80,443

[Binary Coolness Proxy]
ProxyPort:8888
ForwardPorts:1234

This configuration can be found in the file sample.mitm-pptp.conf.

Starting the VPN

By default, the PPTP server will be disabled and no forwarding will happen. Once you're ready to start, run:

$ sudo mitm-pptp start -v

If you want to specify a custom configuration file, you can do so with the -c argument:

$ sudo mitm-pptp start -v -c my-pptp.conf

Stopping the VPN

By hitting Ctrl+C, the script will begin the shutdown process.

mitm-helper-vpn's People

Contributors

jakev avatar

Watchers

James Cloos avatar Julian Lugod avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.