https://github.com/fortra/impacket
Setup
Requirements:
Installing:
- Grab the latest stable release (gzip’d tarbal), unpack it and run: python3 -m pip install . from the directory where you placed it. This will install the classes into the default Python modules path; note that you might need special permissions to write there.
Docker Support:
- Build Impacket’s image: docker build -t “impacket:latest” .
- Using Impacket’s image: docker run -it –rm “impacket:latest”
Reference
Impacket
Remote Execution
- psexec.py: PSEXEC like functionality example using RemComSvc (https://github.com/kavika13/RemCom).
- smbexec.py: A similar approach to PSEXEC w/o using RemComSvc. The technique is described here. Our implementation goes one step further, instantiating a local smbserver to receive the output of the commands. This is useful in the situation where the target machine does NOT have a writeable share available.
- atexec.py: This example executes a command on the target machine through the Task Scheduler service and returns the output of the executed command.