Determine what version of bind is running on a dns server.

dig -t txt -c chaos VERSION.BIND @<dns.server.com>
Due to the recent dynamic update vulnerability with bind, I was forced to dig a little deeper into dig...
Sample Output
; <<>> DiG 9.5.1-P2 <<>> -t txt -c chaos VERSION.BIND @192.168.1.1
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 58109
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0
;; WARNING: recursion requested but not available

;; QUESTION SECTION:
;VERSION.BIND.			CH	TXT

;; ANSWER SECTION:
VERSION.BIND.		0	CH	TXT	"9.4.2-P2"

;; AUTHORITY SECTION:
VERSION.BIND.		0	CH	NS	VERSION.BIND.

;; Query time: 27 msec
;; SERVER: 192.168.1.1#53(192.168.1.1)
;; WHEN: Thu Jul 30 13:36:14 2009
;; MSG SIZE  rcvd: 65

8
By: din7
2009-07-30 18:38:39
dig

What Others Think

does not work if the server was hidden your version :) ;; ANSWER SECTION: VERSION.BIND. 0 CH TXT "foo"
tiagocruz · 614 weeks and 1 day ago
A little shorter: dig @<nameserver> chaos txt version.bind Depending on the version authors.bind might also work: dig @<nameserver> chaos txt authors.bind
drizzt · 614 weeks ago
Wah, how many things to learn :)
j0lly · 359 weeks and 2 days ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: