Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/emileaben/scapy-dns-ninja
Minimal DNS answering machine, for customized/programmable answers
https://github.com/emileaben/scapy-dns-ninja
Last synced: 26 days ago
JSON representation
Minimal DNS answering machine, for customized/programmable answers
- Host: GitHub
- URL: https://github.com/emileaben/scapy-dns-ninja
- Owner: emileaben
- Created: 2014-11-17T10:22:05.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2015-02-02T05:02:47.000Z (almost 10 years ago)
- Last Synced: 2024-08-03T17:11:12.685Z (4 months ago)
- Language: Python
- Size: 195 KB
- Stars: 13
- Watchers: 4
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-network-stuff - **10**星
README
Scapy experiment for measurement infrastructures (like RIPE Atlas) to probe multiple IP lists.
needs a local config file called 'ninja-server.conf' in yaml format. Example:
---
ServerIP: 192.168.0.1
ServerDomain: random-ip.emileaben.comThis code acts as a DNS server, and when it receives an A or AAAA request it returns an IP address from a specified list.
For DNS A queries lists are called *dests.v4.txt*, for AAAA queries *dests.v6.txt*. If both of these don't exist but a file called *dests.cnames.txt* exists, this file will be used and will generate CNAME redirects towards the hostnames in this file.
If the server is queried for a label in this form:
.
it will try to find a dests.v[46].txt file in the local directory, and serve IPs from there.
If there is no match it will use the IP-lists file(s) in the `_default` directory.example (with config file above):
query for amsterdam-nl.random-ip.emilaben.com
will cause the server to look for an ip-list file (either dests.v[46].txt) in the local ./amsterdam-nl/ directory. If it exists it will load it, randomize the list, and serve an IP from it. The next query for this name will get the next IP from the randomized list.
At the end of the list, it will be randomized again, and the first IP from the randomized list will be returned again.INSTALL
=======Create a *ninja-server.conf* file, as explained above, and then run the ./dns-ninja-server.py process. Because this doesn't listen on a UDP port, but sniffs traffic coming in, care should be taken not to send out ICMP destination unreachable messages. For example, Linux/iptables:
iptables -I OUTPUT -p icmp --icmp-type destination-unreachable -j DROP