4.9.11. wkssvc interface

The wkssvc interface is used to manage the lanmanworkstation service.

IDL (Interface Definition Language) for the wkssvc interface is available in Samba 4 [62].

Table 4.26. wkssvc operations

InterfaceOperation numberOperation nameWindows API
6bffd098-a112-3610-9833-46c3f87e345a v1.0: wkssvc   
 0x00NetrWkstaGetInfoNetWkstaGetInfo
 0x01NetrWkstaSetInfoNetWkstaSetInfo
 0x02NetrWkstaUserEnumNetWkstaUserEnum
 0x03NetrWkstaUserGetInfoNetWkstaUserGetInfo
 0x04NetrWkstaUserSetInfoNetWkstaUserSetInfo
 0x05NetrWkstaTransportEnumNetWkstaTransportEnum
 0x06NetrWkstaTransportAddNetWkstaTransportAdd
 0x07NetrWkstaTransportDelNetWkstaTransportDel
 0x08NetrUseAddNetUseAdd
 0x09NetrUseGetInfoNetUseGetInfo
 0x0aNetrUseDelNetUseDel
 0x0bNetrUseEnumNetUseEnum
 0x0cNetrMessageBufferSendNetMessageBufferSend
 0x0dNetrWorkstationStatisticsGetNetWkstaStatisticsGet
 0x0eNetrLogonDomainNameAdd 
> Windows 20000x0fNetrLogonDomainNameDel 
-0x10NetrJoinDomainNetJoinDomain
-0x11NetrUnjoinDomainNetUnjoinDomain
-0x12NetrValidateNameNetValidateName
-0x13NetrRenameMachineInDomainNetRenameMachineInDomain
-0x14NetrGetJoinInformationNetGetJoinInformation
-0x15NetrGetJoinableOUsNetGetJoinableOUs
-0x16NetrJoinDomain2NetJoinDomain
-0x17NetrUnjoinDomain2NetUnjoinDomain
-0x18NetrRenameMachineInDomain2NetRenameMachineInDomain
-0x19NetrValidateName2NetValidateName
-0x1aNetrGetJoinableOUs2NetGetJoinableOUs
> Windows XP and Windows Server 20030x1bNetrAddAlternateComputerNameNetAddAlternateComputerName
-0x1cNetrRemoveAlternateComputerNameNetRemoveAlternateComputerName
-0x1dNetrSetPrimaryComputerNameNetSetPrimaryComputerName
-0x1eNetrEnumerateComputerNamesNetEnumerateComputerNames
-0x1fNetrWorkstationResetDfsCache 

A vulnerability in the workstation service was discovered by Yuji Ukai [64] and fixed by Microsoft in November 2003 in the MS03-049 security bulletin [65]. It can be exploited anonymously because it is always possible to open the wkssvc named pipe in the context of a NULL session, as explained earlier.

Obtaining general information on the workstation service:

Managing SMB sessions (client-side):

Managing transport mappings for the SMB redirector:

Preparing a join operation:

Joining or unjoining a remote machine to a domain:

Managing computer names: