如何从impacket使用smb.py
和smbConnection.py
运行文件?我正在寻找类似的东西:如何使用smb运行文件
dir = smbConn.connectTree('C$')
smbConn.openFile(dir, '/picture.jpg')
如何从impacket使用smb.py
和smbConnection.py
运行文件?我正在寻找类似的东西:如何使用smb运行文件
dir = smbConn.connectTree('C$')
smbConn.openFile(dir, '/picture.jpg')
SMB协议(在其所有版本中)不提供在远程系统上执行文件的功能。其主要目标是支持在机器之间共享文件和打印资源。
在Windows机器上远程执行文件有几种方法。其中一些方法包括以下技术:
1)https://github.com/CoreSecurity/impacket/blob/master/examples/wmiexec.py:调用WMI Win32_Process.Create()
2)https://github.com/CoreSecurity/impacket/blob/master/examples/atexec.py:远程使用Windows任务计划程序。
3)https://github.com/CoreSecurity/impacket/blob/master/examples/smbexec.py:使用要执行的命令字符串创建Windows服务。
4)https://github.com/CoreSecurity/impacket/blob/master/examples/psexec.py:上传一个提供远程shell功能的Windows服务。
5)https://github.com/CoreSecurity/impacket/blob/master/examples/mmcexec.py:通过MMC DCOM对象远程执行文件。
虽然还有几个(不断更新的发现)。