File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
lib/msf/core/exploit/smb/client Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -164,6 +164,10 @@ def modify_token()
164
164
end
165
165
166
166
def write_what_where ( what , where )
167
+ if where == 0
168
+ raise MS17_010_Error , 'Attempted to write to a NULL pointer!'
169
+ end
170
+
167
171
# modify trans2.InData on trans1 mid
168
172
pkt = create_nt_trans_secondary_packet ( mid : @ctx [ 'trans1_mid' ] ,
169
173
data : [ where ] . pack ( @ctx [ 'PTR_FMT' ] ) ,
@@ -178,6 +182,10 @@ def write_what_where(what, where)
178
182
end
179
183
180
184
def read_data ( read_addr , read_size )
185
+ if read_addr == 0
186
+ raise MS17_010_Error , 'Attempted to read from a NULL pointer!'
187
+ end
188
+
181
189
fmt = @ctx [ 'PTR_FMT' ]
182
190
# modify trans2.OutParameter to leak next transaction and trans2.OutData to leak real data
183
191
# modify trans2.*ParameterCount and trans2.*DataCount to limit data
You can’t perform that action at this time.
0 commit comments