Update smb_error on Exploit::Remote::SMB::Server
parent
0f0c955287
commit
39ceb5b90f
|
@ -135,9 +135,16 @@ module Msf
|
|||
pkt['Payload']['SMB'].v['Command'] = cmd
|
||||
pkt['Payload']['SMB'].v['Flags1'] = 0x88
|
||||
if esn
|
||||
pkt['Payload']['SMB'].v['Flags2'] = 0xc801
|
||||
pkt['Payload']['SMB'].v['Flags2'] =
|
||||
CONST::FLAGS2_UNICODE_STRINGS +
|
||||
CONST::FLAGS2_EXTENDED_SECURITY +
|
||||
CONST::FLAGS2_32_BIT_ERROR_CODES +
|
||||
CONST::FLAGS2_LONG_PATH_COMPONENTS
|
||||
else
|
||||
pkt['Payload']['SMB'].v['Flags2'] = 0xc001
|
||||
pkt['Payload']['SMB'].v['Flags2'] =
|
||||
CONST::FLAGS2_UNICODE_STRINGS +
|
||||
CONST::FLAGS2_32_BIT_ERROR_CODES +
|
||||
CONST::FLAGS2_LONG_PATH_COMPONENTS
|
||||
end
|
||||
pkt['Payload']['SMB'].v['ErrorClass'] = errorclass
|
||||
c.put(pkt.to_s)
|
||||
|
|
|
@ -102,28 +102,6 @@ module Msf
|
|||
}
|
||||
end
|
||||
|
||||
#
|
||||
# Returns an smb error packet
|
||||
#
|
||||
def smb_error(cmd, c, errorclass, esn = false)
|
||||
# 0xc0000022 = Deny
|
||||
# 0xc000006D = Logon_Failure
|
||||
# 0x00000000 = Ignore
|
||||
pkt = CONST::SMB_BASE_PKT.make_struct
|
||||
smb_set_defaults(c, pkt)
|
||||
pkt['Payload']['SMB'].v['Command'] = cmd
|
||||
pkt['Payload']['SMB'].v['Flags1'] = 0x88
|
||||
if esn
|
||||
pkt['Payload']['SMB'].v['Flags2'] = flags2
|
||||
else
|
||||
pkt['Payload']['SMB'].v['Flags2'] = CONST::FLAGS2_UNICODE_STRINGS +
|
||||
CONST::FLAGS2_32_BIT_ERROR_CODES +
|
||||
CONST::FLAGS2_LONG_PATH_COMPONENTS
|
||||
end
|
||||
pkt['Payload']['SMB'].v['ErrorClass'] = errorclass
|
||||
c.put(pkt.to_s)
|
||||
end
|
||||
|
||||
#
|
||||
# Main dispatcher function
|
||||
# Takes the client data and performs a case switch
|
||||
|
|
Loading…
Reference in New Issue