The DNS protocol is pretty simple, all you need is the ability to catch UDP requests. Once you have captured the query, you will use the appropriate response or iterative / recursive methods to get the unusual DNS records. [This requires prior knowledge of DNS servers]
RFC DNS
About DNS
JDNSS may be what you are looking for. It is hosted on SF, and it is open source.