File tree Expand file tree Collapse file tree 1 file changed +10
-15
lines changed Expand file tree Collapse file tree 1 file changed +10
-15
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ def scrape_dns(domain)
59
59
return
60
60
end
61
61
62
+ @is_vulnerable = true
62
63
print_good ( "#{ domain } - Found" )
63
64
report_goods ( domain )
64
65
end
@@ -78,39 +79,33 @@ def report_goods(domain)
78
79
proto = "udp"
79
80
end
80
81
81
- report_service (
82
- :host => datastore [ 'NS' ] ,
83
- :name => "dns" ,
84
- :port => 53 ,
85
- :proto => proto ,
86
- :info => "#{ domain } cached"
87
- )
88
-
89
82
report_note (
90
83
:host => datastore [ 'NS' ] ,
91
84
:name => "dns" ,
92
85
:port => 53 ,
93
86
:proto => proto ,
94
87
:type => "dns.cache.scrape" ,
95
- :data => "#{ domain } cached"
96
- )
97
-
98
- report_host (
99
- :address => datastore [ 'NS' ] ,
100
- :info => "#{ domain } cached" ,
101
- :comments => "DNS Cache Scraper"
88
+ :data => "#{ domain } cached" ,
89
+ :update => :unique_data
102
90
)
103
91
end
104
92
105
93
# main control method
106
94
def run
95
+ @is_vulnerable = false
96
+
107
97
print_status ( "Making queries against #{ datastore [ 'NS' ] } " )
108
98
109
99
if datastore [ 'DOMAIN' ] . blank?
110
100
read_file
111
101
else
112
102
scrape_dns ( datastore [ 'DOMAIN' ] )
113
103
end
104
+
105
+ report_vuln (
106
+ :host => datastore [ 'NS' ] ,
107
+ :name => "DNS Cache Snooping" ,
108
+ ) if @is_vulnerable
114
109
end
115
110
end
116
111
You can’t perform that action at this time.
0 commit comments