Skip to content

Commit 4317114

Browse files
committed
update for ntp modules
1 parent c216cf8 commit 4317114

File tree

6 files changed

+42
-6
lines changed

6 files changed

+42
-6
lines changed

modules/auxiliary/scanner/ntp/ntp_monlist.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
class Metasploit3 < Msf::Auxiliary
99

1010
include Msf::Auxiliary::Report
11+
include Msf::Exploit::Capture
1112
include Msf::Exploit::Remote::Udp
1213
include Msf::Auxiliary::UDPScanner
1314
include Msf::Auxiliary::NTP
@@ -48,7 +49,12 @@ def initialize
4849

4950
# Called for each IP in the batch
5051
def scan_host(ip)
51-
scanner_send(@probe, ip, datastore['RPORT'])
52+
if spoofed?
53+
datastore['ScannerRecvWindow'] = 0
54+
scanner_spoof_send(@probe, ip, datastore['RPORT'], datastore['SRCIP'], datastore['NUM_REQUESTS'])
55+
else
56+
scanner_send(@probe, ip, datastore['RPORT'])
57+
end
5258
end
5359

5460
# Called for each response packet

modules/auxiliary/scanner/ntp/ntp_peer_list_dos.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
class Metasploit3 < Msf::Auxiliary
99

1010
include Msf::Auxiliary::Report
11+
include Msf::Exploit::Capture
1112
include Msf::Exploit::Remote::Udp
1213
include Msf::Auxiliary::UDPScanner
1314
include Msf::Auxiliary::NTP
@@ -36,7 +37,12 @@ def initialize
3637

3738
# Called for each IP in the batch
3839
def scan_host(ip)
39-
scanner_send(@probe, ip, datastore['RPORT'])
40+
if spoofed?
41+
datastore['ScannerRecvWindow'] = 0
42+
scanner_spoof_send(@probe, ip, datastore['RPORT'], datastore['SRCIP'], datastore['NUM_REQUESTS'])
43+
else
44+
scanner_send(@probe, ip, datastore['RPORT'])
45+
end
4046
end
4147

4248
# Called before the scan block

modules/auxiliary/scanner/ntp/ntp_peer_list_sum_dos.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
class Metasploit3 < Msf::Auxiliary
99

1010
include Msf::Auxiliary::Report
11+
include Msf::Exploit::Capture
1112
include Msf::Exploit::Remote::Udp
1213
include Msf::Auxiliary::UDPScanner
1314
include Msf::Auxiliary::NTP
@@ -36,7 +37,12 @@ def initialize
3637

3738
# Called for each IP in the batch
3839
def scan_host(ip)
39-
scanner_send(@probe, ip, datastore['RPORT'])
40+
if spoofed?
41+
datastore['ScannerRecvWindow'] = 0
42+
scanner_spoof_send(@probe, ip, datastore['RPORT'], datastore['SRCIP'], datastore['NUM_REQUESTS'])
43+
else
44+
scanner_send(@probe, ip, datastore['RPORT'])
45+
end
4046
end
4147

4248
# Called for each response packet

modules/auxiliary/scanner/ntp/ntp_req_nonce_dos.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
class Metasploit3 < Msf::Auxiliary
99

1010
include Msf::Auxiliary::Report
11+
include Msf::Exploit::Capture
1112
include Msf::Exploit::Remote::Udp
1213
include Msf::Auxiliary::UDPScanner
1314
include Msf::Auxiliary::NTP
@@ -37,7 +38,12 @@ def initialize
3738

3839
# Called for each IP in the batch
3940
def scan_host(ip)
40-
scanner_send(@probe, ip, datastore['RPORT'])
41+
if spoofed?
42+
datastore['ScannerRecvWindow'] = 0
43+
scanner_spoof_send(@probe, ip, datastore['RPORT'], datastore['SRCIP'], datastore['NUM_REQUESTS'])
44+
else
45+
scanner_send(@probe, ip, datastore['RPORT'])
46+
end
4147
end
4248

4349
# Called for each response packet

modules/auxiliary/scanner/ntp/ntp_reslist_dos.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
class Metasploit3 < Msf::Auxiliary
99

1010
include Msf::Auxiliary::Report
11+
include Msf::Exploit::Capture
1112
include Msf::Exploit::Remote::Udp
1213
include Msf::Auxiliary::UDPScanner
1314
include Msf::Auxiliary::NTP
@@ -38,7 +39,12 @@ def initialize
3839

3940
# Called for each IP in the batch
4041
def scan_host(ip)
41-
scanner_send(@probe, ip, datastore['RPORT'])
42+
if spoofed?
43+
datastore['ScannerRecvWindow'] = 0
44+
scanner_spoof_send(@probe, ip, datastore['RPORT'], datastore['SRCIP'], datastore['NUM_REQUESTS'])
45+
else
46+
scanner_send(@probe, ip, datastore['RPORT'])
47+
end
4248
end
4349

4450
# Called for each response packet

modules/auxiliary/scanner/ntp/ntp_unsettrap_dos.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
class Metasploit3 < Msf::Auxiliary
99

1010
include Msf::Auxiliary::Report
11+
include Msf::Exploit::Capture
1112
include Msf::Exploit::Remote::Udp
1213
include Msf::Auxiliary::UDPScanner
1314
include Msf::Auxiliary::NTP
@@ -36,7 +37,12 @@ def initialize
3637

3738
# Called for each IP in the batch
3839
def scan_host(ip)
39-
scanner_send(@probe, ip, datastore['RPORT'])
40+
if spoofed?
41+
datastore['ScannerRecvWindow'] = 0
42+
scanner_spoof_send(@probe, ip, datastore['RPORT'], datastore['SRCIP'], datastore['NUM_REQUESTS'])
43+
else
44+
scanner_send(@probe, ip, datastore['RPORT'])
45+
end
4046
end
4147

4248
# Called for each response packet

0 commit comments

Comments
 (0)