@@ -47,6 +47,11 @@ def initialize(info = {})
47
47
] ,
48
48
'License' => MSF_LICENSE
49
49
) )
50
+
51
+ register_options (
52
+ [
53
+ OptBool . new ( 'CHECK_DOPU' , [ true , 'Check for DOUBLEPULSAR on vulnerable hosts' , true ] )
54
+ ] )
50
55
end
51
56
52
57
# algorithm to calculate the XOR Key for DoublePulsar knocks
@@ -80,18 +85,20 @@ def run_host(ip)
80
85
)
81
86
82
87
# vulnerable to MS17-010, check for DoublePulsar infection
83
- code , signature1 , signature2 = do_smb_doublepulsar_probe ( tree_id )
84
-
85
- if code == 0x51
86
- xor_key = calculate_doublepulsar_xor_key ( signature1 ) . to_s ( 16 ) . upcase
87
- arch = calculate_doublepulsar_arch ( signature2 )
88
- print_warning ( "Host is likely INFECTED with DoublePulsar! - Arch: #{ arch } , XOR Key: 0x#{ xor_key } " )
89
- report_vuln (
90
- host : ip ,
91
- name : "MS17-010 DoublePulsar Infection" ,
92
- refs : self . references ,
93
- info : "MultiPlexID += 0x10 on Trans2 request - Arch: #{ arch } , XOR Key: 0x#{ xor_key } "
94
- )
88
+ if datastore [ 'CHECK_DOPU' ]
89
+ code , signature1 , signature2 = do_smb_doublepulsar_probe ( tree_id )
90
+
91
+ if code == 0x51
92
+ xor_key = calculate_doublepulsar_xor_key ( signature1 ) . to_s ( 16 ) . upcase
93
+ arch = calculate_doublepulsar_arch ( signature2 )
94
+ print_warning ( "Host is likely INFECTED with DoublePulsar! - Arch: #{ arch } , XOR Key: 0x#{ xor_key } " )
95
+ report_vuln (
96
+ host : ip ,
97
+ name : "MS17-010 DoublePulsar Infection" ,
98
+ refs : self . references ,
99
+ info : "MultiPlexID += 0x10 on Trans2 request - Arch: #{ arch } , XOR Key: 0x#{ xor_key } "
100
+ )
101
+ end
95
102
end
96
103
elsif status == "STATUS_ACCESS_DENIED" or status == "STATUS_INVALID_HANDLE"
97
104
# STATUS_ACCESS_DENIED (Windows 10) and STATUS_INVALID_HANDLE (others)
0 commit comments