Skip to content

Commit 8219766

Browse files
committed
Land rapid7#6760, llmnr_response TTL fix
2 parents 437c6e1 + fa5acba commit 8219766

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

modules/auxiliary/spoof/llmnr/llmnr_response.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def initialize
4444
register_options([
4545
OptAddress.new('SPOOFIP', [ true, "IP address with which to poison responses", ""]),
4646
OptRegexp.new('REGEX', [ true, "Regex applied to the LLMNR Name to determine if spoofed reply is sent", '.*']),
47-
OptInt.new('TTL', [ false, "Time To Live for the spoofed response", 300]),
47+
OptInt.new('TTL', [ false, "Time To Live for the spoofed response", 30]),
4848
])
4949

5050
deregister_options('RHOST', 'PCAPFILE', 'SNAPLEN', 'FILTER')
@@ -85,15 +85,15 @@ def dispatch_request(packet, rhost, src_port)
8585
when ::Net::DNS::A
8686
dns_pkt.answer << ::Net::DNS::RR::A.new(
8787
:name => name,
88-
:ttl => 30,
88+
:ttl => datastore['TTL'],
8989
:cls => ::Net::DNS::IN,
9090
:type => ::Net::DNS::A,
9191
:address => spoof.to_s
9292
)
9393
when ::Net::DNS::AAAA
9494
dns_pkt.answer << ::Net::DNS::RR::AAAA.new(
9595
:name => name,
96-
:ttl => 30,
96+
:ttl => datastore['TTL'],
9797
:cls => ::Net::DNS::IN,
9898
:type => ::Net::DNS::AAAA,
9999
:address => (spoof.ipv6? ? spoof : spoof.ipv4_mapped).to_s

0 commit comments

Comments
 (0)