{"id":13827224,"url":"https://github.com/syss-research/dns-mitm","last_synced_at":"2025-04-10T16:06:59.815Z","repository":{"id":50614827,"uuid":"84533385","full_name":"SySS-Research/dns-mitm","owner":"SySS-Research","description":"A minimal DNS service that can provide spoofed replies","archived":false,"fork":false,"pushed_at":"2023-04-24T06:54:13.000Z","size":10,"stargazers_count":103,"open_issues_count":3,"forks_count":31,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-24T13:51:23.306Z","etag":null,"topics":["dns","mitm","security","tools"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SySS-Research.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2017-03-10T07:44:31.000Z","updated_at":"2025-02-08T02:21:15.000Z","dependencies_parsed_at":"2024-01-07T22:50:17.012Z","dependency_job_id":"eea6ad57-219f-43e1-8d8a-30329d56bd8b","html_url":"https://github.com/SySS-Research/dns-mitm","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/SySS-Research%2Fdns-mitm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SySS-Research%2Fdns-mitm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SySS-Research%2Fdns-mitm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SySS-Research%2Fdns-mitm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SySS-Research","download_url":"https://codeload.github.com/SySS-Research/dns-mitm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248250743,"owners_count":21072682,"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":["dns","mitm","security","tools"],"created_at":"2024-08-04T09:01:52.293Z","updated_at":"2025-04-10T16:06:59.798Z","avatar_url":"https://github.com/SySS-Research.png","language":"Python","funding_links":[],"categories":["\u003ca id=\"42f9e068b6511bcbb47d6b2b273097da\"\u003e\u003c/a\u003e未分类"],"sub_categories":["\u003ca id=\"3bd67ee9f322e2c85854991c85ed6da0\"\u003e\u003c/a\u003e投毒\u0026\u0026Poisoning"],"readme":"dns-mitm.py\n===========\n\nThis is a fake DNS server that answers requests for a domain's A record with\na custom IP address. It is intended to be used in an isolated network for\npentests. You could also use `dnsmasq` for that, but sometimes you just want\nto use a small script.\n\nIf you want to put yourself in a MitM position of a given connection, you\nwould usually do so by modifying the network setup: either in software\n(ARP-spoofing etc.) or in hardware (unplugging network cables). This script\nis for situations in which you are unable or unwilling to change the network\nsetup but have control over the \"victim\" device.\n\nPossible use cases could be:\n * You want to analyze traffic of a mobile app you are testing, so you\n change the DNS server on your mobile device\n * You want to filter ads on your TV, so you set its DNS server to your\n Raspberry Pi on the same network which is running this script\n\nIt makes sense to assign multiple IP addresses to your device, for example\nwith `ip address add 192.168.1.16/28 dev eth0`.\n\nThis way you can spoof multiple domains with an indiviual IP address each.\nOtherwise, you won't know the original destination of the intercepted\ntraffic arriving at your machine without deep package inspection.\n\nUsage\n-----\n\nYou can specify IP addresses on the command line or in a separate hosts\nfile, e.g. to answer all requests to `.*.example.com` to `192.168.1.42`:\n\n    $ ./dns-mitm.py .*.example.com,192.168.1.42\n\nor\n\n    $ ./dns-mitm.py -f hosts.dat\n\nwhere `hosts.dat` uses the same syntax as `/etc/hosts`.\n\nBy default, the script tries to determine the DNS server that the system is\nusing. You may want to specify a different DNS server with the `-d` option.\n\nFor more information, type `./dns-mitm.py -h`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyss-research%2Fdns-mitm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsyss-research%2Fdns-mitm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyss-research%2Fdns-mitm/lists"}