dert 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/dert +5 -4
- data/lib/dert.rb +2 -2
- data/lib/dert/dns.rb +13 -24
- data/lib/dert/methods/gtld.rb +105 -0
- data/lib/dert/methods/init.rb +2 -1
- data/lib/dert/version.rb +1 -1
- data/test/arin.rb +2 -1
- data/test/axfr.rb +2 -1
- data/test/brt.rb +2 -1
- data/test/gtld.rb +22 -0
- data/test/ipv6.rb +2 -1
- data/test/rvl.rb +2 -1
- data/test/srv.rb +2 -1
- data/test/std.rb +2 -1
- data/test/tld.rb +2 -1
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c8ac81eaa739a0096ac5ff32d0c23467d85e2e44
|
4
|
+
data.tar.gz: 818aaf13d944345569dd1e4154503a97f9001a9d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 824bf981dde81b0636cbe26b87c4663edc48b5d7b98b51b2c9890dddc667a65d97b48bad55ee0cb6d4eca43b44e95176a455964700c17f8ea2c0694729704d9a
|
7
|
+
data.tar.gz: baf9c7ad9c125da273f8047f76ec660bc352a63015d2b973adecd438bc9b6ee61d98acdc56fefecb5157a2159ca7d42fd2aa4c2c7f50e4467c3a2c659dd4fd80
|
data/bin/dert
CHANGED
@@ -9,7 +9,7 @@
|
|
9
9
|
###########################################################################
|
10
10
|
path = File.dirname(__FILE__)
|
11
11
|
require 'optparse'
|
12
|
-
require
|
12
|
+
require "#{path}/../lib/dert"
|
13
13
|
|
14
14
|
if __FILE__ == $0
|
15
15
|
options = {}
|
@@ -29,9 +29,10 @@ if __FILE__ == $0
|
|
29
29
|
dns_string = dns_string + the_break + 'RVL: "rvl (PRT records)"'
|
30
30
|
dns_string = dns_string + the_break + 'SRV: "srv (SRV records)"'
|
31
31
|
dns_string = dns_string + the_break + 'STD: "std (SOA, A, MX, NS, TXT records)"'
|
32
|
-
dns_string = dns_string + the_break + 'TDL: "tdl (Bruteforce, A records)"'
|
32
|
+
dns_string = dns_string + the_break + 'TDL: "tdl (Top Level Domain [~250] Bruteforce, A records)"'
|
33
|
+
dns_string = dns_string + the_break + 'TDL: "gtdl (Generic Top Level Domain [~1000] Bruteforce, A records)"'
|
33
34
|
opts.on( '-e enumeration', '--enumeration type', String, 'DNS Enumeration Types:' + dns_string) do |type|
|
34
|
-
options[:type] = type
|
35
|
+
options[:type] = type.downcase
|
35
36
|
end
|
36
37
|
|
37
38
|
opts.on( '-t thread', '--thread number', Integer, 'Number of threads') do |thread|
|
@@ -66,7 +67,7 @@ if __FILE__ == $0
|
|
66
67
|
optparse.parse!
|
67
68
|
Dert.run(options)
|
68
69
|
rescue => e
|
69
|
-
puts
|
70
|
+
puts e.message
|
70
71
|
puts "Usage: #{File.basename($0)} [options]"
|
71
72
|
end
|
72
73
|
|
data/lib/dert.rb
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
path = File.dirname(__FILE__)
|
2
|
-
require
|
3
|
-
require
|
2
|
+
require "#{path}/dert/dns"
|
3
|
+
require "#{path}/dert/version"
|
data/lib/dert/dns.rb
CHANGED
@@ -30,7 +30,7 @@ module Dert
|
|
30
30
|
SRV = 6
|
31
31
|
STD = 7
|
32
32
|
TLD = 8
|
33
|
-
|
33
|
+
GTLD = 9
|
34
34
|
end
|
35
35
|
|
36
36
|
|
@@ -59,6 +59,8 @@ module Dert
|
|
59
59
|
return STD.query(domain)
|
60
60
|
when CONSTANTS::TLD
|
61
61
|
return TLD.query(domain)
|
62
|
+
when CONSTANTS::GTLD
|
63
|
+
return GTLD.query(domain)
|
62
64
|
end
|
63
65
|
end
|
64
66
|
|
@@ -76,7 +78,7 @@ module Dert
|
|
76
78
|
results = []
|
77
79
|
|
78
80
|
# Process for Brute Force DNS Enumeration
|
79
|
-
if method == CONSTANTS::BRT or method == CONSTANTS::IPV6 or method == CONSTANTS::RVL
|
81
|
+
if method == CONSTANTS::BRT or method == CONSTANTS::IPV6 or (method == CONSTANTS::RVL and word_list)
|
80
82
|
|
81
83
|
# Count words/ips in list.
|
82
84
|
count = File.foreach(word_list).inject(0) { |c, line| c+1 }
|
@@ -160,24 +162,6 @@ module Dert
|
|
160
162
|
def self.run(options)
|
161
163
|
type = 0
|
162
164
|
|
163
|
-
# RVL does not require a domain
|
164
|
-
unless options[:type] == 'rvl'
|
165
|
-
unless options[:domain]
|
166
|
-
puts 'Invalid command. Try --help to view options.'
|
167
|
-
exit
|
168
|
-
end
|
169
|
-
|
170
|
-
# remove http/https
|
171
|
-
options[:domain].gsub!('https://', '')
|
172
|
-
options[:domain].gsub!('http://', '')
|
173
|
-
|
174
|
-
# Validate Domain
|
175
|
-
unless options[:domain].match(/[a-zA-Z0-9\-]+\.[a-zA-z]{2,6}/)
|
176
|
-
puts 'Invalid domain.'
|
177
|
-
exit
|
178
|
-
end
|
179
|
-
end
|
180
|
-
|
181
165
|
# Validate settings for brute force
|
182
166
|
if %w(ipv6 brt).include? options[:type]
|
183
167
|
if options[:threads] == nil or options[:domain] == nil or options[:wordlist] == nil
|
@@ -186,10 +170,11 @@ module Dert
|
|
186
170
|
end
|
187
171
|
end
|
188
172
|
|
189
|
-
# RVL requires
|
173
|
+
# RVL requires domain or a word list
|
190
174
|
if options[:type] == 'rvl'
|
191
|
-
if options[:
|
192
|
-
puts "Usage #{File.basename($0)} -e rvl -
|
175
|
+
if options[:domain] == nil and options[:wordlist] == nil
|
176
|
+
puts "Usage #{File.basename($0)} -e rvl -d IP"
|
177
|
+
puts "Usage #{File.basename($0)} -e rvl -w IPLIST"
|
193
178
|
exit
|
194
179
|
end
|
195
180
|
end
|
@@ -208,6 +193,8 @@ module Dert
|
|
208
193
|
puts 'Thread count must be between 1 and 100'
|
209
194
|
exit
|
210
195
|
end
|
196
|
+
else
|
197
|
+
options[:threads] = 1
|
211
198
|
end
|
212
199
|
|
213
200
|
# Validate Output
|
@@ -219,7 +206,7 @@ module Dert
|
|
219
206
|
end
|
220
207
|
|
221
208
|
# Convert string type to integer type
|
222
|
-
case options[:type]
|
209
|
+
case options[:type].downcase
|
223
210
|
when 'arin'
|
224
211
|
type = 1
|
225
212
|
when 'axfr'
|
@@ -236,6 +223,8 @@ module Dert
|
|
236
223
|
type = 7
|
237
224
|
when 'tld'
|
238
225
|
type = 8
|
226
|
+
when 'gtld'
|
227
|
+
type = 9
|
239
228
|
else
|
240
229
|
puts 'Wrong enumeration type. Try --help to view accepted enumeration inputs.'
|
241
230
|
exit
|
@@ -0,0 +1,105 @@
|
|
1
|
+
module Dert
|
2
|
+
class GTLD
|
3
|
+
|
4
|
+
@res = Dnsruby::Resolver.new
|
5
|
+
|
6
|
+
def self.query(domain)
|
7
|
+
results = []
|
8
|
+
|
9
|
+
# List from:
|
10
|
+
# http://data.iana.org/TLD/tlds-alpha-by-domain.txt
|
11
|
+
|
12
|
+
tlds = %w(
|
13
|
+
aaa abb abbott abogado ac academy accenture accountant accountants aco active actor ad ads adult
|
14
|
+
ae aeg aero af afl ag agency ai aig airforce airtel al allfinanz alsace am amica amsterdam android
|
15
|
+
ao apartments app aq aquarelle ar aramco archi army arpa arte as asia associates at attorney au auction
|
16
|
+
audio auto autos aw ax axa az azure ba band bank bar barcelona barclaycard barclays bargains bauhaus
|
17
|
+
bayern bb bbc bbva bcn bd be beer bentley berlin best bet bf bg bh bharti bi bible bid bike bing bingo
|
18
|
+
bio biz bj black blackfriday bloomberg blue bm bms bmw bn bnl bnpparibas bo boats bom bond boo boots
|
19
|
+
boutique br bradesco bridgestone broker brother brussels bs bt budapest build builders business buzz
|
20
|
+
bv bw by bz bzh ca cab cafe cal camera camp cancerresearch canon capetown capital car caravan cards
|
21
|
+
care career careers cars cartier casa cash casino cat catering cba cbn cc cd ceb center ceo cern cf
|
22
|
+
cfa cfd cg ch chanel channel chat cheap chloe christmas chrome church ci cipriani cisco citic city ck
|
23
|
+
cl claims cleaning click clinic clothing cloud club clubmed cm cn co coach codes coffee college cologne
|
24
|
+
com commbank community company computer condos construction consulting contractors cooking cool coop
|
25
|
+
corsica country coupons courses cr credit creditcard cricket crown crs cruises csc cu cuisinella cv cw
|
26
|
+
cx cy cymru cyou cz dabur dad dance date dating datsun day dclk de deals degree delivery dell delta
|
27
|
+
democrat dental dentist desi design dev diamonds diet digital direct directory discount dj dk dm dnp do
|
28
|
+
docs dog doha domains doosan download drive durban dvag dz earth eat ec edu education ee eg email emerck
|
29
|
+
energy engineer engineering enterprises epson equipment er erni es esq estate et eu eurovision eus events
|
30
|
+
everbank exchange expert exposed express fage fail faith family fan fans farm fashion feedback fi film
|
31
|
+
final finance financial firmdale fish fishing fit fitness fj fk flights florist flowers flsmidth fly fm
|
32
|
+
fo foo football forex forsale forum foundation fr frl frogans fund furniture futbol fyi ga gal gallery
|
33
|
+
game garden gb gbiz gd gdn ge gea gent genting gf gg ggee gh gi gift gifts gives giving gl glass gle
|
34
|
+
global globo gm gmail gmo gmx gn gold goldpoint golf goo goog google gop gov gp gq gr graphics gratis
|
35
|
+
green gripe group gs gt gu gucci guge guide guitars guru gw gy hamburg hangout haus healthcare help here
|
36
|
+
hermes hiphop hitachi hiv hk hm hn hockey holdings holiday homedepot homes honda horse host hosting hoteles
|
37
|
+
hotmail house how hr hsbc ht hu hyundai ibm icbc ice icu id ie ifm iinet il im immo immobilien in
|
38
|
+
industries infiniti info ing ink institute insure int international investments io ipiranga iq ir irish
|
39
|
+
is ist istanbul it itau iwc jaguar java jcb je jetzt jewelry jlc jll jm jo jobs joburg jp jprs juegos
|
40
|
+
kaufen kddi ke kg kh ki kia kim kinder kitchen kiwi km kn koeln komatsu kp kr krd kred kw ky kyoto kz la
|
41
|
+
lacaixa lancaster land landrover lasalle lat latrobe law lawyer lb lc lds lease leclerc legal lexus lgbt
|
42
|
+
li liaison lidl life lighting limited limo linde link live lixil lk loan loans lol london lotte lotto
|
43
|
+
love lr ls lt ltd ltda lu lupin luxe luxury lv ly ma madrid maif maison man management mango market
|
44
|
+
marketing markets marriott mba mc md me media meet melbourne meme memorial men menu meo mg mh miami
|
45
|
+
microsoft mil mini mk ml mm mma mn mo mobi moda moe moi mom monash money montblanc mormon mortgage
|
46
|
+
moscow motorcycles mov movie movistar mp mq mr ms mt mtn mtpc mtr mu museum mutuelle mv mw mx my mz na
|
47
|
+
nadex nagoya name navy nc ne nec net netbank network neustar new news nexus nf ng ngo nhk ni nico ninja
|
48
|
+
nissan nl no nokia np nr nra nrw ntt nu nyc nz obi office okinawa om omega one ong onl online ooo oracle
|
49
|
+
orange org organic osaka otsuka ovh pa page panerai paris partners parts party pe pet pf pg ph pharmacy
|
50
|
+
philips photo photography photos physio piaget pics pictet pictures ping pink pizza pk pl place play
|
51
|
+
plumbing plus pm pn pohl poker porn post pr praxi press pro prod productions prof properties property
|
52
|
+
protection ps pt pub pw py qa qpon quebec racing re realtor realty recipes red redstone rehab reise
|
53
|
+
reisen reit ren rent rentals repair report republican rest restaurant review reviews rich ricoh rio rip
|
54
|
+
ro rocks rodeo rs rsvp ru ruhr run rw rwe ryukyu sa saarland sakura sale samsung sandvik sandvikcoromant
|
55
|
+
sanofi sap sapo sarl saxo sb sbs sc sca scb schmidt scholarships school schule schwarz science scor scot
|
56
|
+
sd se seat security seek sener services seven sew sex sexy sg sh shiksha shoes show shriram si singles
|
57
|
+
site sj sk ski sky skype sl sm sn sncf so soccer social software sohu solar solutions sony soy space
|
58
|
+
spiegel spreadbetting sr srl st stada starhub statoil stc stcgroup stockholm studio study style su sucks
|
59
|
+
supplies supply support surf surgery suzuki sv swatch swiss sx sy sydney systems sz taipei tatamotors
|
60
|
+
tatar tattoo tax taxi tc td team tech technology tel telefonica temasek tennis tf tg th thd theater
|
61
|
+
theatre tickets tienda tips tires tirol tj tk tl tm tn to today tokyo tools top toray toshiba tours town
|
62
|
+
toyota toys tr trade trading training travel trust tt tui tv tw tz ua ubs ug uk university uno uol us uy
|
63
|
+
uz va vacations vc ve vegas ventures versicherung vet vg vi viajes video villas vin virgin vision vista
|
64
|
+
vistaprint viva vlaanderen vn vodka vote voting voto voyage vu wales walter wang watch webcam website
|
65
|
+
wed wedding weir wf whoswho wien wiki williamhill win windows wine wme work works world ws wtc wtf xbox
|
66
|
+
xerox xin xn--11b4c3d xn--1qqw23a xn--30rr7y xn--3bst00m xn--3ds443g xn--3e0b707e xn--3pxu8k xn--42c2d9a
|
67
|
+
xn--45brj9c xn--45q11c xn--4gbrim xn--55qw42g xn--55qx5d xn--6frz82g xn--6qq986b3xl xn--80adxhks
|
68
|
+
xn--80ao21a xn--80asehdb xn--80aswg xn--90a3ac xn--90ais xn--9dbq2a xn--9et52u xn--b4w605ferd xn--c1avg
|
69
|
+
xn--c2br7g xn--cg4bki xn--clchc0ea0b2g2a9gcd xn--czr694b xn--czrs0t xn--czru2d xn--d1acj3b xn--d1alf
|
70
|
+
xn--efvy88h xn--estv75g xn--fhbei xn--fiq228c5hs xn--fiq64b xn--fiqs8s xn--fiqz9s xn--fjq720a xn--flw351e
|
71
|
+
xn--fpcrj9c3d xn--fzc2c9e2c xn--gecrj9c xn--h2brj9c xn--hxt814e xn--i1b6b1a6a2e xn--imr513n xn--io0a7i
|
72
|
+
xn--j1aef xn--j1amh xn--j6w193g xn--kcrx77d1x4a xn--kprw13d xn--kpry57d xn--kput3i xn--l1acc xn--lgbbat1ad8j
|
73
|
+
xn--mgb9awbf xn--mgba3a3ejt xn--mgba3a4f16a xn--mgbaam7a8h xn--mgbab2bd xn--mgbayh7gpa xn--mgbbh1a71e
|
74
|
+
xn--mgbc0a9azcg xn--mgberp4a5d4ar xn--mgbpl2fh xn--mgbx4cd0ab xn--mk1bu44c xn--mxtq1m xn--ngbc5azd xn--node
|
75
|
+
xn--nqv7f xn--nqv7fs00ema xn--nyqy26a xn--o3cw4h xn--ogbpf8fl xn--p1acf xn--p1ai xn--pgbs0dh xn--pssy2u
|
76
|
+
xn--q9jyb4c xn--qcka1pmc xn--rhqv96g xn--s9brj9c xn--ses554g xn--t60b56a xn--tckwe xn--unup4y
|
77
|
+
xn--vermgensberater-ctb xn--vermgensberatung-pwb xn--vhquv xn--vuq861b xn--wgbh1c xn--wgbl6a xn--xhq521b
|
78
|
+
xn--xkc2al3hye2a xn--xkc2dl3a5ee0h xn--y9a3aq xn--yfro4i67o xn--ygbi2ammx xn--zfr164b xperia xxx xyz
|
79
|
+
yachts yamaxun yandex ye yodobashi yoga yokohama youtube yt za zara zip zm zone zuerich zw
|
80
|
+
)
|
81
|
+
|
82
|
+
target = domain.scan(/(\S*)[.]\w*\z/).join
|
83
|
+
target.chomp!
|
84
|
+
|
85
|
+
tlds.each do |a|
|
86
|
+
# A
|
87
|
+
begin
|
88
|
+
ret = @res.query("#{target}.#{a}", Dnsruby::Types.A)
|
89
|
+
ret.answer.each do |x|
|
90
|
+
results << {
|
91
|
+
address: x.address.to_s,
|
92
|
+
type: x.type,
|
93
|
+
hostname: x.name.to_s,
|
94
|
+
ttl: x.ttl,
|
95
|
+
klass: x.klass,
|
96
|
+
}
|
97
|
+
end
|
98
|
+
rescue
|
99
|
+
#
|
100
|
+
end
|
101
|
+
end
|
102
|
+
results
|
103
|
+
end
|
104
|
+
end
|
105
|
+
end
|
data/lib/dert/methods/init.rb
CHANGED
data/lib/dert/version.rb
CHANGED
data/test/arin.rb
CHANGED
data/test/axfr.rb
CHANGED
data/test/brt.rb
CHANGED
data/test/gtld.rb
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'minitest/unit'
|
2
|
+
require 'minitest/autorun'
|
3
|
+
|
4
|
+
path = File.dirname(__FILE__)
|
5
|
+
require "#{path}/../lib/dert"
|
6
|
+
require 'yaml'
|
7
|
+
|
8
|
+
class TestGTLD < MiniTest::Unit::TestCase
|
9
|
+
def setup
|
10
|
+
@options = {}
|
11
|
+
@options[:domain] = 'google.com'
|
12
|
+
@options[:type] = 'gtld'
|
13
|
+
@options[:threads] = 7
|
14
|
+
@options[:silent] = true
|
15
|
+
end
|
16
|
+
|
17
|
+
def test_equal_results
|
18
|
+
results = Dert.run(@options)
|
19
|
+
pp results
|
20
|
+
assert results.to_s
|
21
|
+
end
|
22
|
+
end
|
data/test/ipv6.rb
CHANGED
data/test/rvl.rb
CHANGED
data/test/srv.rb
CHANGED
data/test/std.rb
CHANGED
data/test/tld.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dert
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Coleton Pierson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-11-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -89,6 +89,7 @@ files:
|
|
89
89
|
- lib/dert/methods/arin.rb
|
90
90
|
- lib/dert/methods/axfr.rb
|
91
91
|
- lib/dert/methods/brt.rb
|
92
|
+
- lib/dert/methods/gtld.rb
|
92
93
|
- lib/dert/methods/init.rb
|
93
94
|
- lib/dert/methods/ipv6.rb
|
94
95
|
- lib/dert/methods/rvl.rb
|
@@ -99,6 +100,7 @@ files:
|
|
99
100
|
- test/arin.rb
|
100
101
|
- test/axfr.rb
|
101
102
|
- test/brt.rb
|
103
|
+
- test/gtld.rb
|
102
104
|
- test/ipv6.rb
|
103
105
|
- test/rvl.rb
|
104
106
|
- test/srv.rb
|
@@ -136,6 +138,7 @@ test_files:
|
|
136
138
|
- test/arin.rb
|
137
139
|
- test/axfr.rb
|
138
140
|
- test/brt.rb
|
141
|
+
- test/gtld.rb
|
139
142
|
- test/ipv6.rb
|
140
143
|
- test/rvl.rb
|
141
144
|
- test/srv.rb
|