Giter Club home page Giter Club logo

scapy-dns-ninja's Introduction

DNS rendez-vous point for measurement infrastructures (like RIPE Atlas) to probe multiple IPs.

IHR instance

The current IHR instance is at content.ninja.ihr.live which is queried by all RIPE Atlas probes (measurement ID 44852121) and resolves to the domains listed in content/dests.cnames.txt.

See also: https://github.com/RIPE-Atlas-Community/ripe-atlas-tips-and-tricks/wiki/PopularContent

Feel free to ask for additional domains by creating a new issue.

Deploy your own

Installation

Create a ninja-server.conf file, as explained below, 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

Configuration

Needs a local config file called 'ninja-server.conf' in yaml format. Example:

---
ServerIP: 192.168.0.1
ServerDomain: random-ip.emileaben.com

This 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:

<listname>.<serverdomain>

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.

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.