Skip to content

Java implementation of a recursive DNS sinkhole server that returns a false result for pre-defined blocked domains list. Built for educational purposes ๐ŸŽ“

Notifications You must be signed in to change notification settings

tomerbg2911/DNS-Sinkhole

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

28 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

DNS-Sinkhole

A Java implementation of a recursive DNS sinkhole server that returns a false result for pre-defined blocked domains.

Project Structure

SinkholeServer - The server's entry point (including main function)

DNSRecursiveServer - The main class for the DNS RecursiveServer

DNSQuery - A class representing and analyzing DNS query bytes

BlockListFilter - Stores a HashSet of domains to be blocked from the input txt file and validates if a given domain should be blocked.

Question - Represents a DNS Question record.

ResourceRecord - Represents a DNS Resource record (Answer / Authority).

BytesOperations - Helper class with useful bit-wise operations on bytes.

Credits

Tomer Ben-Gigi & Etamar Romano

IDC (Interdisciplinary Center Herzliya)

TODO (someday, maybe)

  • Implement a fully independent iterative resolver, I.e. not relying on local resolver for intermediate DNS server names

  • Add some level of answers caching

  • Handling network issues - handle a query/response to root/intermediate DNS being lost.

  • Reacting more error types (we now only support RCODE=3).

About

Java implementation of a recursive DNS sinkhole server that returns a false result for pre-defined blocked domains list. Built for educational purposes ๐ŸŽ“

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages