rapid7 / ruby_smb

A native Ruby implementation of the SMB Protocol Family
Other
80 stars 80 forks source link

Revert "Always track sequence counter regardless of having a session key present" #232

Closed adfoster-r7 closed 2 years ago

adfoster-r7 commented 2 years ago

Reverts rapid7/ruby_smb#230

Going to revert this for now to reduce the possibility of introducing a regression in Metasploit. It looks like negotiation packets shouldn't increment the sequence number in ruby_smb, and there's the possibility other edgecases/assumptions in Metasploit that are invalidated by this change - for instance ms17_010_eternal blue has copy/pasted the old implementation and assumes that smb1_sign has the side effect of incrementing sequence counter.

https://github.com/rapid7/metasploit-framework/blob/be48b1481ad80f79862c91a56bf2c584845b163e/modules/exploits/windows/smb/ms17_010_eternalblue.rb#L934-L942

This should all be easy enough to patch up / resolve / retest, but I don't want this to block the main focus of delivering Kerberos work