0

Need help on how to use impacket library which executes commands on remote windows servers from Linux, to not write any file on the remote server and still get the output, as wmiexec.py uses ADMIN$ folder to write a temporary file on the remote servers, please suggest.

executer = WMIEXEC(command, username, password, domain, hashes, aesKey, share, nooutput, k, dc_ip)
executer.run(address)
  • Possible duplicate of [How to run file with smb](https://stackoverflow.com/questions/46572265/how-to-run-file-with-smb) – ivan_pozdeev Sep 11 '18 at 22:39

1 Answers1

0

That could be achieved by implementing the SERVER MODE functionality already available in smbexec.py. This will require root privileges at the client machine tho, in order to launch a SMBSERVER.

beto
  • 146
  • 3
  • Thanks for the response @beto but I tried smbexec.py as well, but I could not execute a command from the client machine(Centos), I executed with root user(Linux) as stated in the documentation, yet no success. Can you please provide a working example if it worked for you? – Aniket Prajapati Mar 21 '18 at 18:09