Adds script to extract SMB Enum Services #987
The above comment explains that I got error as ERROR_BAD_FORMAT, even after sending the correct request(I think so). So, here is something new I found.
The last 2 commits tries adding new function, enumservicestatusexw to retrieve the list of services. Reasons to add this service.
The issue with this service is,
From these series of errors and debugging I think there is some issue with the crafting the request packets before being sent.
Any kind of help is highly appreciated !!
You can ignore the above 2 comments for now(I think so).
The final code as of now, captures the entire buffer and unmarshalls pcbBytesNeeded, lpServicesReturned, lpResumeHandle, ReturnValue, pcbBytesAcquired successfully. The next issue I'm having is unmarshalling the LPENUM_SERVICE_STATUS data type as mentioned in here.
I tried unmarshalling the captured lpservices but the SERVICE_STATUS of all services are present in the beginning of the hexdump while lpDisplayName and lpServiceName of all services are at the ending of the buffer. I tried by unmarshalling it the lpservices with