This is fixed now. I have made a fork that works with SMB2
Hi Colvin, I think you were getiing the NT_STATUS_OBJECT_NAME_NOT_FOUND message because SMB2 does not like the \ in the share names. SMB1 didnt seem to care. I have posted a full fix. Cheers, Mark
Finally got it all working. This is a SMB2 version only of winexe. It does not work with SMB1. The SMB3 code in samba is also a bit suspect as it works only about 10% of the time, but I am not fixing that yet. Let me know how you get on. It is based on Michael's Samba 4.4.5 fork. just type ./waf configure and ./waf build git source
Dentar / Colvin - Apologies for not checking forum for 3 days and seeing your messages. I'e had my head buried in winexe and samba source code. Drop me an email at mark_ridley@hotmail.com
Dentar / Colin - Apologies for not checking forum for 3 days and seeing your messages. I'e had my head buried in winexe and samba source code. Drop me an email at mark_ridley@hotmail.com
Hi Dentar, Thanks for sending that over. As mentioned above, I have got a new version of winexe working on SMB2, but having problems with the last little bit. It fails 9 out of 10 times. There is a timing issue somewhere and after 2 weeks, day and night I need some coding help. If I put -d99 in the winexe line to slightly slow it down, it works 50% of the time. it is reading from the named pipes from windows that is cauing the issue. Colvin - Another I had to change in the main winexe code was to...
Hi Colvin, Great to hear someone is also looking at this. I've got it to work...just. but there seems to be an issue in the async_read_recv code, but it may be down to the smb2_create. Most times I am getting an NT_STATUS_INVALID_PARAMETER returned in te read code. It works 1 in 10 times and all works great, but it is just not reliable enough, After spending weeks on this, I have just about given up, re-written the winexesvc_loop code to use temp files instead of pipes and getting winexe.c to open...
I am having problems writing to the IPC$/ahexec named pipe that the winexesvc listens on. my samba4 / SMB2 version opens IPC$ and writes to ahexec but nothing is coming through. I have put the service into debug mode and it just says the pipe gets opened but nothing comes through. the original winexe code does 'raw' comms? What is that?
Hi, The problem with centos 7 is the smb_static library just does not build. I have got it to compile and build a shared library version on centos 7 using michael's version which rewrites the debug code as the debug library is now private on later versions of samba.
OK. I've found the smb2 calls in the samba4 source. They are the smb2_connect calls in source4/libcli/smb2/connect.c I'll code winexe to call them and see what happens.
The problem with the samba4 branch is the share or tree opening code, smbcli_full_connection does not call the smb2 code if SMB2 is required to it crashes. so for example in the cifsdd or winexe or even smbclient4 when smb1 is disabled it still calls the SMB1 code which then gets cut off. I have logged a ticket with samba but no one has picked it up yet. the smbcli_full_connection calls smb_composite_connect which is only smb1. i do not have enough knowledge to call the smb2 code. any ideas? i starting...
Does anyone know if it is possible to re-write winexe to use the source3 version of samba code? source4 is broken with SMB2/3. I have emailed bugzilla at samba to let them know but do not expect a reply anytime soon. using the samba binary: cifsdd which also uses source4 it can be seen to fail to connect to windows on SMBv2: cifsdd: connecting to //192.168.1.67/C$: NT_STATUS_INVALID_PARAMETER_MIX
Hi Dentar, I have made Iots of progress and have now got winexe (Michael Stowes version) to compile and link dynamically against samba-4-4 There were lots of header files to copy to the /usr/include areas and a hack into winexe to get it to understand the -mPROTOCOL. The problem with that is the -m option is ignored by samba/source4 and only takes what is in the smb.conf file. BUT winexe does not load the smb.conf file so the samba libraries would not connect to SMB2. 1. I changed winexe.c in main:...
HI michael, thanks for getting back to me. i am using centos 7. winexe-static is the name he build gives to the static linked version of winexe. i just followed the instructions about downloading samba and using your fork. so i type waf build configure --samba-dir=../samba no joy though and after 3 days and many attempts i am no closer. i need to get it working on samba minimum 4-3-12 as that seems to have source4 connecting correctly to SMBv2 and v3 what do you think? thanks mark
I really need winexe-static to build against 4.3.12? as source4 before this is broken with SMB2/3 After the ransomware most windows systems are getting patched to block SMB1 Can anyone look at this? I am willing to pay!
Has anyone looked at this? winexe will soon stop working with most Windows systems. The reason why smbclient works is it compiles against the source3 code of samba and SMB2/3 work. Source4 though which winexe and winexe-static compile against does not work with SMB2 until around 4.3.8
Sounds good. Why do you need to run it in a docker container? I would really like to give it a go. What version of samba? was it 4.3.12? Could you let us have some build instructions please. thanks. The reason for needing at least 4.3.8 is the source4 version of samba does not work correctly with SMB2. source3 got fixed somewhere around 4.3.8 to talk correctly to SMB2. After the latest ransomware most windows servers are having SMB1 disabled to winexe-static built on before 4.3.8 will no longer work...
Please could I get a copy of your 4.3.12 winexe-static? Really appreciated. Thanks, Mark