{"id":20509066,"url":"https://github.com/abeluck/mitm-in-a-box","last_synced_at":"2025-04-13T22:21:44.191Z","repository":{"id":146550516,"uuid":"149492644","full_name":"abeluck/mitm-in-a-box","owner":"abeluck","description":"put your man in the middle in a middle box so your outer boxes can be man in the middled","archived":false,"fork":false,"pushed_at":"2018-09-19T18:26:02.000Z","size":5,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T12:39:17.283Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abeluck.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-09-19T18:09:29.000Z","updated_at":"2024-08-10T21:31:15.000Z","dependencies_parsed_at":"2023-06-04T18:30:28.940Z","dependency_job_id":null,"html_url":"https://github.com/abeluck/mitm-in-a-box","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abeluck%2Fmitm-in-a-box","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abeluck%2Fmitm-in-a-box/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abeluck%2Fmitm-in-a-box/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abeluck%2Fmitm-in-a-box/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abeluck","download_url":"https://codeload.github.com/abeluck/mitm-in-a-box/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248789755,"owners_count":21161888,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-15T20:22:18.962Z","updated_at":"2025-04-13T22:21:44.157Z","avatar_url":"https://github.com/abeluck.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mitm-in-a-box\n\n\u003e A vagrant + ansible setup for running mitm'ing your vms.\n\n## What now?\n\nThis repo will create an internal network and configure a `mitm-server` vm\nwhich acts as the gateway router (DHCP + NAT) for all machines on that internal\nnetwork. This `mitm-server` will also transparently mitm all HTTP(S)\ntraffic that passes through it with [mitmproxy](https://mitmproxy.org/)\n\nIt also provides you with a vagrant + ansible quickstart for configuring your\nown vms to run inside the network.\n\n## Dependencies\n\nYou need this software on your host box:\n\n* vagrant\n* virtualbox\n* ansible \u003e= 2.4\n* mitmproxy \u003e= 4.x\n\n## Quickstart\n\n1. Install `mitmproxy` \u003e 4.x.  - we only need it for generating the ca cert,\n   all actually mitming will happen in a vm.  Don't use apt. I recommend\n   downloading the binaries directly from: https://mitmproxy.org/\n\n2. Generate the ca cert\n\n    ```\n    make\n    ```\n\n3. Setup the `mitm-server`\n\n    ```\n    cd mitm-server\n    vagrant up\n    ```\n\n    At this point you have an internal virtualbox network (named `mitmnet`)\n    running. The `mitm-server` has ip address `10.0.3.3` on this network, and is\n    serving DHCP and NATing for clients.\n\n4. Setup a test client\n\n    ```\n    cd ../mitm-client\n    vagrant up\n    ```\n\n    Now you have the vm `mitm-client` with an ip address in the `10.0.3.50 - 250`\n    range which is using `mitm-server` as its default gateway. It has the\n    mitmproxy ca certs installed so it will trust our non-valid ca cert.\n\n5. Test it out\n\n    **Console 1**\n\n    ```\n    cd mitm-client\n    vagrant ssh\n    curl https://yahoo.com # request completes succesfully\n    ```\n\n    **Console 2**\n\n    ```\n    cd mitm-server\n    vagrant ssh\n    mitmproxy -r mitmdump.log --showhost --no-server # view the stored log\n    ```\n\n## Credits\n\nThis fine repo you're browsin' was cooked up by Abel Luck in the fall of 2018.\n\nprops to those who blazed the trail 🤘 🔥:\n\n* [Setting up Transparent Proxying VMs for mitmproxy](https://nickcharlton.net/posts/transparent-proxy-virtual-machines-mitmproxy.html) by Nick Charlton\n* [MITM-VM](https://github.com/praetorian-inc/mitm-vm) by Kelby Ludwig\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabeluck%2Fmitm-in-a-box","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabeluck%2Fmitm-in-a-box","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabeluck%2Fmitm-in-a-box/lists"}