hirochachacha / go-smb2

SMB2/3 client library written in Go.
BSD 2-Clause "Simplified" License
350 stars 94 forks source link

Can it command execution? It seems that we can only use the file operation. #47

Closed shadow1ng closed 3 years ago

shadow1ng commented 3 years ago

Can it command execution? It seems that we can only use the file operation.

hirochachacha commented 3 years ago

What does command execution mean? MSRPC? You can implement these protocols on top of this library. e.g. https://github.com/hirochachacha/go-smb2/blob/master/client.go#L118

shadow1ng commented 3 years ago

like smbexec

hirochachacha commented 3 years ago

I see. it's a part of MSRPC.

https://github.com/hirochachacha/go-smb2/blob/master/client.go#L129 https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-scmr/e7a38186-cde2-40ad-90c7-650822bd6333

You should open svcctl instead of srvsvc, then need to do some works.

Supporting MSRPC protocols are too broad topic to be implemented in this library. So I'll close this issue.