How to run file with smb

后端 未结 1 1085
暗喜
暗喜 2021-01-28 17:31

How can I use smb.py and smbConnection.py from impacket to run a file? I\'m looking for something like:

dir = smbConn.connectTree(\'C$\')
smbConn.op         


        
相关标签:
1条回答
  • 2021-01-28 18:12

    The SMB Protocol (in all its version) doesn't provide functionality to execute files at the remote systems. Its main objective is to support the sharing of file and print resource between machines.

    There are several approaches for executing files remotely on Windows machines. Some of these approaches include the following techniques:

    1) https://github.com/CoreSecurity/impacket/blob/master/examples/wmiexec.py: Calling WMI Win32_Process.Create()

    2) https://github.com/CoreSecurity/impacket/blob/master/examples/atexec.py: Using the Windows Task Scheduler remotely.

    3) https://github.com/CoreSecurity/impacket/blob/master/examples/smbexec.py: Creates a Windows Service with the command string to execute.

    4) https://github.com/CoreSecurity/impacket/blob/master/examples/psexec.py: Uploads a Windows Service that provides a remote shell capability.

    5) https://github.com/CoreSecurity/impacket/blob/master/examples/mmcexec.py: Executes files remotely through the MMC DCOM Object.

    Although there are several more (and constantly newer ones discovered).

    0 讨论(0)
提交回复
热议问题