rapid7 / ruby_smb

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

Add more svcctl packets for creating and deleting services #186

Closed usiegl00 closed 2 years ago

usiegl00 commented 2 years ago

This pr adds support for more svcctl packets.

The two new svcctl functions are create_service_w and delete_service.

I will update the smb_shadow metasploit module to use the new packets once this is merged.

usiegl00 commented 2 years ago

I will make a pr to metasploit-framework that depends on this one.

cdelafuente-r7 commented 2 years ago

Thanks for updating this @usiegl00 ! The code looks good to me. I tested against Windows 10 and Windows Server 2019 and verified the code was executed correctly.

Before it lands, that would be great to have unit tests for this. This will ensure any future updates to ruby_smb won't break anything. Would you mind adding specs?