./net/py-impacket, Collection of Python classes for working with network protocols

[ CVSweb ] [ Homepage ] [ RSS ] [ Required by ]


Branch: CURRENT, Version: 0.13.1, Package name: py313-impacket-0.13.1, Maintainer: pkgsrc-users

Impacket is a collection of Python classes for working with network
protocols. Impacket is mostly focused on providing low-level
programmatic access to the packets, however some protocols (for
instance NMB and SMB) are implemented in a higher level as a
foundation for other protocols. 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.

Impacket is most useful when used together with a packet capture
utility or package such as Pcapy, an object oriented Python extension
for capturing network packets.


Required to run:
[security/py-OpenSSL] [devel/py-setuptools] [security/py-asn1] [www/py-flask] [lang/py-six] [databases/py-ldap3] [security/py-cryptodome] [lang/python37] [net/py-ldapdomaindump]

Required to build:
[pkgtools/cwrappers]

Master sites:

Filesize: 1696.977 KB

Version history: (Expand)


CVS history: (Expand)


   2026-05-28 00:52:18 by Thomas Klausner | Files touched by this commit (1)
Log message:
py-impacket: fix hardcoded Python version
   2026-05-25 10:26:24 by Adam Ciarcinski | Files touched by this commit (1) | Package updated
Log message:
py-impacket: update ALTERNATIVES
   2026-05-25 10:04:47 by Adam Ciarcinski | Files touched by this commit (3) | Package updated
Log message:
py-impacket: updated to 0.13.1

Impacket v0.13.1 (May 2026):

1. Library improvements

    * SMB: Improved server and relay behavior with SMB server signing support, \ 
optional read-only shares, Kerberos/NTLM authentication controls, graceful SMB \ 
relay packet handling, SMBv1 relay fixes, SMB 3.1.1 negotiation fixes, and \ 
clearer errors for truncated SMB responses.
    * Kerberos: Fixed S4U2Self service ticket parsing, non-ASCII authentication \ 
encoding, LSA Kerberos key decryption, GSSAPI BER length parsing, ccache/kirbi \ 
conversion edge cases, and PAC preservation/signing helpers used by ticket \ 
tooling.
    * MSSQL/TDS: Added TDS 8.0 support for Force Strict Encryption targets, EPA \ 
channel binding handling, TDS_SSVARIANT parsing, stricter TLS-backed packet \ 
handling, workstation/application name support, and more reliable SQL reply \ 
error tracking.
    * DCE/RPC and WMI: Added WMI PutClass/DeleteClass support, Remote Event Log \ 
subscription calls, Remote Desktop Services process parsing fixes, SCMR failure \ 
action marshaling fixes, and safer TCP transport handling on empty receives.
    * Directory and data parsing: Added LDAP CRUD helpers, improved LDAP \ 
attribute handling, fixed large-page ESE tag parsing for Windows Server 2025 \ 
NTDS.dit files, improved NTFS sparse and INDEX_ROOT reads, fixed DPAPI_BLOB \ 
parsing with oversized input, and corrected high-codepoint unicode structure \ 
sizing.
    * Added a reusable ACL helper module and expanded regression coverage for \ 
ACLs, NTFS, TDS, Kerberos, ESE, SCMR, WMI, SMB, and packet parsing.

2. Examples improvements

    * [ntlmrelayx.py](examples/ntlmrelayx.py):
        * Added MSSQL and RDP relay servers, strict MSSQL relay support, \ 
TLS-backed TDS frame reassembly, NTLM sign/seal removal paths for \ 
CVE-2025-33073-related relay workflows, and `--remove-mic` handling.
        * Improved WinRM relay error handling and NTLMv2 detection, fixed WinRM \ 
NTLM relay behavior, made SMB relay negotiation more conservative by avoiding \ 
unsupported NEGOEX advertisement, and added multibyte AD CS template name \ 
support.
        * Added shadow credentials commands to the interactive LDAP shell and \ 
updated KeyCreds handling for the January 2026 Windows changes.
    * [secretsdump.py](examples/secretsdump.py):
        * Added SAM history parsing, improved offline machine account and \ 
Kerberos key recovery, fixed negative timestamps on Windows, added SAM password \ 
timestamp output, and filtered offline NTDS rows by local domain SID.
    * [regsecrets.py](examples/regsecrets.py):
        * Added SAM history parsing.
    * [ticketer.py](examples/ticketer.py):
        * Improved ccache handling and preserved KDC-issued lifetimes for \ 
diamond tickets.
    * [ticketConverter.py](examples/ticketConverter.py):
        * Improved kirbi/ccache conversion, preserved ticket flags, converted \ 
all TGS entries, and added base64 output support.
    * [describeTicket.py](examples/describeTicket.py):
        * Fixed credential indexing after skipped decrypts and improved \ 
Kerberoast debug output.
    * [raiseChild.py](examples/raiseChild.py):
        * Preserved PAC buffers, added AES support for modern Windows \ 
environments, and improved ticket retry behavior.
    * [smbclient.py](examples/smbclient.py):
        * Added ACL management support, recursive `rget`, and richer share \ 
listing output with type and comments.
    * [mssqlclient.py](examples/mssqlclient.py):
        * Added workstation/application name options, linked-server RPC \ 
enable/disable commands, custom CBT support, and better MSSQL shell behavior.
    * [ntfs-read.py](examples/ntfs-read.py):
        * Improved INDEX_ROOT file listing, sparse file support, error handling, \ 
and read correctness.
    * [tstool.py](examples/tstool.py):
        * Added Remote Desktop Shadowing support.
    * [badsuccessor.py](examples/badsuccessor.py):
        * Fixed ACE filtering and ObjectType GUID parsing that could cause false \ 
negatives when searching OUs.
    * [GetUserSPNs.py](examples/GetUserSPNs.py):
        * Added an option to avoid forcing RC4-HMAC when requesting a TGT.
    * [owneredit.py](examples/owneredit.py):
        * Improved distinguished name lookup behavior.
    * [exchanger.py](examples/exchanger.py):
        * Added Basic Authentication support.
    * [reg.py](examples/reg.py):
        * Added support for persistent registry key creation.

3. New examples

    * [dpapidump.py](examples/dpapidump.py) dumps DPAPI-related secrets.
    * [checkMSSQLStatus.py](examples/checkMSSQLStatus.py) checks MSSQL status \ 
and CBT behavior.

4. Project & packaging

    * Removed the run-time dependency on setuptools.
    * Removed remaining Python 2 compatibility code from WMI and ESE modules.
   2025-11-11 15:09:00 by Adam Ciarcinski | Files touched by this commit (3) | Package updated
Log message:
py-impacket: updated to 0.13.0

Impacket v0.13.0 (Oct 2025):

1. Library improvements

* Major SMB client/server refactor adds setInfo support, CIFS datetime helpers, \ 
and safer default share access to enable remote attribute and timestamp \ 
management. (@covertivy)

* Introduced per-structure encoding selectors and UTF-8-aware SMB structures so \ 
non-Latin resource names round-trip correctly. (@alexisbalbachan)

* Strengthened LDAP/Kerberos handling with channel binding plus signing, schema \ 
alignment with ldap3, and LDAPS-based LAPS retrieval against Windows Server 2025 \ 
DCs. (@zblurx, @alexisbalbachan, @Ibrahim8879)

* Improved DCE/RPC coverage with Netlogon authenticator fixes, updated DRS bind \ 
flags, expanded EVEN6 decoding, and a new ICPR interface to support relay-aware \ 
RPC workflows. (@ThePirateWhoSmellsOfSunflowers, @h3-josh-the-engineer, \ 
@NtAlexio2, @rtpt-romankarwacik)

* Corrected SMB negotiation edge cases by fixing response padding, Unicode pipe \ 
lookups, and keyboard interrupts in SMB servers. (@rtpt-erikgeiser, @Abyss-emmm, \ 
@exploide)

* SMB Server enhancements to align Impacket's implementation with standard \ 
(@jborean93)

2. Authentication & relay tooling

* Added WinRMS relay clients/servers. (@Defte_)

* Improved IPv6 support, richer logging, and consistent console status \ 
reporting, plus an identity log to track compromised principals ( @gabrielg5)

* Introduced an RPC relay server with Endpoint Mapper discovery . \ 
(@rtpt-romankarwacik)

* Delivered SCCM Management/Distribution Point relay attacks. (@q-roland)

* Enhanced shadow credentials, SOCKS plugins, and target rotation with better \ 
IPv6 awareness and stability. (@anadrianmanrique, @gabrielg5)

* Added options to strip SSP from Net-NTLMv1 captures and write relay-captured \ 
hashes for cracking workflows. (@TurtleARM, @p0rtL6)

3. Examples improvements

* secretsdump.py gained a WMI shadow snapshot path, export hive boot key \ 
recovery, safer DRS flags, user-status reporting, and refined NTDS parsing. \ 
(@PeterGabaldon, @MaxToffy, @h3-josh-the-engineer, @Markb1337, @snovvcrash)

* MSSQL tooling gained channel binding tokens, restored reliable connections, \ 
richer linked-server file transfers, and inline command execution. (@Defte_, \ 
@rtpt-romankarwacik, @trietend, @kiriknik, @Signum21)

* Directory ACL helpers (`dacledit`, `owneredit`, `rbcd`, `ldapshell`) picked up \ 
mask selection, safer queries, and consistent `-dc-host` handling. (@dadevel, \ 
@shellinvictus, @Fabrizzio53, @ICheer_No0M, @gabrielg5)

* SMB operator utilities add reconnect and autocomplete options in smbclient and \ 
prevent smbexec from hanging on completion. (@daddycocoaman, @trietend, \ 
@Vincent550102)

* Remote access helpers such as rdp_check and wmiexec now support IPv6 targets \ 
and display created Process IDs for easier triage. (@gabrielg5, \ 
@alexisbalbachan)

4. New examples

* [attrib.py](examples/attrib.py) manipulates file attributes over SMB to \ 
showcase the new setInfo workflow. (@covertivy)

* [filetime.py](examples/filetime.py) inspects and updates SMB file timestamps \ 
using the refreshed SMBConnection APIs. (@covertivy)

* [badsuccessor.py](examples/badsuccessor.py) demonstrates the AD CS “bad \ 
successor” attack path. (@fulc2um)

* [regsecrets.py](examples/regsecrets.py) extracts LSA secrets from remote \ 
registry hives through [MS-RRP]. (@laxaa, @laxa)

* [samedit.py](examples/samedit.py) edits local SAM password hashes offline. \ 
(@iorpim)

* [CheckLDAPStatus.py](examples/CheckLDAPStatus.py) checks LDAP signing status \ 
and LDAPS channel binding status. (@zblurx)

5. Project & packaging

* Added the `impacket.mssql` namespace, relaxed the pyOpenSSL pin, and declared \ 
Python 3.13 support while dropping 3.8. (@anadrianmanrique, @Defte_)

* Replaced pkg_resources with importlib.metadata for lightweight version \ 
discovery. (@AdrianVollmer)
   2025-04-15 10:15:59 by Adam Ciarcinski | Files touched by this commit (21) | Package updated
Log message:
Fix PLIST after py-setuptools update; bump depends and revision
   2024-11-11 08:29:31 by Thomas Klausner | Files touched by this commit (862)
Log message:
py-*: remove unused tool dependency

py-setuptools includes the py-wheel functionality nowadays
   2024-09-18 11:13:09 by Adam Ciarcinski | Files touched by this commit (4) | Package updated
Log message:
py-impacket: updated to 0.12.0

Impacket v0.12.0-dev:
1. Library improvements
    * Fixed broken hRSetServiceObjectSecurity method (@rkivys)
    * Removed dsinternals dependency (@anadrianmanrique)
    * Fixed srvs.hNetrShareEnum returning erronous shares (@cnotin)
    * Fixed lmhash computing to support non standard characters in the password \ 
(@anadrianmanrique)
    * Assorted fixes when processing Unicode data (@alexisbalbachan)
    * Added `[MS-GKDI]` Group Key Distribution Protocol implementation (@zblurx)
    * Fixed incorrect padding in SMBSessionSetupAndX_Extended_ResponseData \ 
(@rtpt-erikgeiser)
    * Upgraded dependency pyreadline -> pyreadline3 (@anadrianmanrique)
    * SMB Server:
        * Added query information level 0x0109 for smb1 \ 
"SMB_QUERY_FILE_STREAM_INFO" (@Adamkadaban)
        * Fixed filename encoding in queryPathInformation (@JerAxxxxxxx)
        * Fixed NextEntryOffset for large directory listings (@robnanola)
        * Fixed server returning an empty folder when cutting and pasting \ 
recursive directories (@robnanola)
    * DHCP: Fixed encoding issues (@ujwalkomarla)

3. Examples improvements
    * [secretsdump.py](examples/secretsdump.py):
        * Double DC Sync performance for DCs supporting SID lookups (@tomspencer)
        * Added ability to skip dumping of SAM or SECURITY hives when performing \ 
remote operations (@RazzburyPi)
        * Added ability to specify users to skip when dumping NTDS (@RazzburyPi)
    * [ticketer.py](examples/ticketer.py):
        * Support to create Sapphire tickets (@ShutdownRepo)
    * [GetUserSPNs.py](examples/GetUserSPNs.py), [getTGT.py](examples/getTGT.py):
        * Support for Kerberoasting without pre-authentication and ST request \ 
through AS-REQ (@ShutdownRepo)
    * [wmiexec.py](examples/wmiexec.py):
        * Fix kerberos with remoteHost & add '-target-ip'(@XiaoliChan)
    * [ntlmrelayx.py](examples/ntlmrelayx.py):
        * Added the creation of a new machine account through SMB (@BlWasp)
        * NTLMRelayX Multirelay fixes for target handling, added --keep-relaying \ 
flag (@alexisbalbachan)
        * Logging multirelay status when triggering the example (@gabrielg5)
        * Write certificates to file rather than outputting b64 to console \ 
(@RazzburyPi)
        * Improved ability to continue relaying to ADCS web enrollment endpoint \ 
in order to request multiple certificates for different users (@RazzburyPi)
        * Fixed compatibility issue with other SMB clients connecting to the \ 
SOCKS proxy created by ntlmrelayx (@jfjallid)
        * Allow configuration of the SOCKS5 address and port (@rtpt-erikgeiser)
        * Fixed implementation of MSSQLShell (@gabrielg5)
        * Logging notification of received connections in all relay servers \ 
(@gabrielg5)
        * Add domain and username to interactive Ldap shell message (@minniear)
        * Enhanced MSSQLShell in NTLMRelayX leveraging TcpShell & output \ 
messages (@gabrielg5)
        * LDAP Attack: Bugfixes when parsing responses (@SAERXCIT)
    * [getST.py](examples/getST.py):
        * Added -self, -altservice and -u2u  for S4U2self abuse, S4U2self+u2u, \ 
and service substitution (@ShutdownRepo)
        * Added ability to set the RENEW ticket option to renew a TGT (@shikatano)
        * Fixed unicode encoding error when using the -impersonate flag \ 
(@alexisbalbachan)
    * [getTGT.py](examples/getTGT.py):
        * Added principalType as new parameter (@DevSpork)
    * [reg.py](examples/reg.py):
        * Start remote registry as unprivileged user in reg.py (@dadevel)
        * Allow adding Binary values (@dc3l1ne)
        * Add missing Null byte for REG_SZ values (@PfiatDe)
        * Support for adding REG_MULTI_SZ values through (@garbrielg5)
    * [smbclient.py](examples/smbclient.py):
        * Added ability to provide an output file that the smbclient mini shell \ 
will write commands and output to (@RazzburyPi)
        * Fixed path parse issue when running `tree` command (@trietend)
    * [smbserver.py](examples/smbserver.py):
        * Added parameter "-outputfile" to set smbserver log \ 
file(gabrielg5)
    * [DumpNTLMInfo.py](examples/DumpNTLMInfo.py):
        * Allow execution on non-default ports (@jeffmcjunkin)
        * Fixed KeyError exception when running with a Windows 2003 target \ 
(@XiaoliChan)
    * [findDelegation.py](examples/findDelegation.py):
        * Added new column to show if SPN exists (@p0dalirius)
    * [mssqlclient.py](examples/mssqlclient.py):
        * Added `-target-ip` parameter to allow Kerberos authentication without \ 
much change in the DNS configuration of the local machine (@Palkovsky)
    * [mssqlshell.py](examples/mssqlshell.py):
        * Switching back to original DB after running `enum_impersonate` command \ 
(@exploide)
        * Fixed logging in printReplies showing error messages (@gabrielg5)
    * [registry-read.py](examples/registry-read.py):
        * Fixed scenario where value name contains backlash (@DidierA)
    * [net.py](examples/net.py):
        * Fixed User "Account Active" property value (@marcobarlottini)
        * Fixed log messages printing variables in the wrong order (@Cyb3rC3lt)
    * [rbcd.py](examples/rbcd.py):
        * Handled SID not found in LDAP error (@ShutdownRepo)
    * [GetUserSPNs.py](examples/GetUserSPNs.py):
        * Updated the help information for -outputfile to be consistent with \ 
-save (@scarvell)
    * [ntfs-read.py](examples/ntfs-read.py):
        * Minor refactor in ntfs-read.py to make it more human-readable (@NtAlexio2)
    * [ldap_shell.py](examples/ldap_shell.py):
        * Added support for dirsync and whoami commands (@nurfed1)
    * [lookupsid.py](examples/lookupsid.py):
        * Now supports kerberos auth (@A1vinSmith)
    * [samrdump.py](examples/samrdump.py):
        * Will fetch AdminComment using MSRPC (@joeldeleep)
    * [tstool.py](examples/tstool.py):
        * Added support for kerberos auth, resolves SIDs (@nopernik)

4. New examples
    * [describeTicket.py](examples/describeTicket.py): Ticket describer and \ 
decrypter. (@ShutdownRepo)
    * [GetADComputers.py](examples/GetADComputers.py): Query's DC via LDAP \ 
and returns the COMPUTER objects and the useful attributes such as full dns \ 
name, operating system name and version. (@F-Masood)
    * [GetLAPSPassword.py](examples/GetLAPSPassword.py): Extract LAPS passwords \ 
from LDAP (@zblurx and @dru1d-foofus)
    * [dacledit.py](examples/dacledit.py): This script can be used to read, \ 
write, remove, backup, restore ACEs (Access Control Entries) in an object DACL \ 
(Discretionary Access Control List). (@_nwodtuhs) (@BlWasp_) (@Wlayzz)
   2024-02-29 21:56:49 by Adam Ciarcinski | Files touched by this commit (5) | Package updated
Log message:
py-impacket: updated to 0.11.0

Impacket v0.11.0 (Aug 2023):
1. Library improvements
    * Added new Kerberos error codes (@ly4k).
        * Added `[MS-TSTS]` Terminal Services Terminal Server Runtime Interface \ 
Protocol implementation (@nopernik).
    * Changed the setting up for new SSL connections (@mpgn, @CT-H00K and \ 
@0xdeaddood).
    * Added a callback function to smbserver for incoming authentications \ 
(@p0dalirius).
    * Fix crash in winregistry (@laxa)
    * Fixes in IDispatch derived classes in comev implementation (@NtAlexio2)
    * Fix CVE-2020-17049 in ccache.py (@godylockz)
    * Smbserver: Added SMB2_FILE_ALLOCATION_INFO type determination (@JerAxxxxxxx)
    * tds: Fixed python3 incompatibility when receiving over TLS socket (@exploide)
    * crypto: Ensure passwords are utf-8 encoded before deriving Kerberos keys \ 
(@jojonas)
    * ese: Fixed python3 incompatibility when reading from db (@alexisbalbachan)
    * ldap queries: Escaped characters are now correctly parsed (@alexisbalbachan)
    * Support SASL authentication in ldap protocol (@NtAlexio2)

2. Examples improvements
    * [GetADUsers.py](examples/GetADUsers.py), \ 
[GetNPUsers.py](examples/GetNPUsers.py), \ 
[GetUserSPNs.py](examples/GetUserSPNs.py) and \ 
[findDelegation.py](examples/findDelegation.py):
      * Added dc-host option to connect to specific KDC using its FQDN or \ 
NetBIOS name (@rmaksimov and @0xdeaddood).
    * [GetNPUsers.py](examples/GetNPUsers.py)
      * Printing TGT in stdout despite -outputfile parameter (@alexisbalbachan \ 
and @Zamanry)
      * Fixed output hash format for AES128/256 (etype 17/18) (@erasmusc)
    * [GetUserSPNs.py](examples/GetUserSPNs.py):
      * Added LDAP paged search (@ThePirateWhoSmellsOfSunflowers and @SAERXCIT).
      * Added a -stealth flag to remove the SPN filter from the LDAP query \ 
(@clavoillotte).
      * Improved searchFilter (@ShutdownRepo)
      * Use LDAP paged search (@ThePirateWhoSmellsOfSunflowers)
    * [psexec.py](examples/psexec.py):
      * Added support for name customization using a custom binary file (@Dramelac).
    * [smbexec.py](examples/smbexec.py):
      * Security fixes for privilege escalation vulnerabilities (@bugch3ck).
      * Fixed python3 compatibility issues, added workaround TCP over NetBIOS \ 
being disabled (@ljrk0)
    * [secretsdump.py](examples/secretsdump.py):
      * Added a new option to extract only NTDS.DIT data for specific users \ 
based on an LDAP filter (@snovvcrash).
      * Security fixes for privilege escalation vulnerabilities (@bugch3ck).
    * [mssqlclient.py](examples/mssqlclient.py):
      * Added multiple new commands. Now supports xp_dirtree execution \ 
(@Mayfly277, @trietend and @TurtleARM).
    * [ntlmrelayx.py](examples/ntlmrelayx.py):
      * Added ability to trigger SQLShell when running ntlmrelayx in interactive \ 
mode (@sploutchy).
      * Added filter option to the socks command in ntlmrelayx CLI (@shoxxdj)
      * Added ability to register DNS records through LDAP.
    * [addcomputer.py](examples/addcomputer.py), [rbcd.py](examples/rbcd.py):
      * Allow weak TLS ciphers for LDAP connections (@AdrianVollmer)
    * [Get-GPPPassword.py](examples/Get-GPPPassword.py):
      * Better handling of various XML files in Group Policy Preferences \ 
(@p0dalirius)
    * [smbclient.py](examples/smbclient.py):
      * Added recursive file listing (@Sq00ky)
    * [ticketer.py](examples/ticketer.py):
      * Ticket duration is now specified in hours instead of days (@Dramelac)
      * Added extra-pac implementation (@Dramelac)

3. New examples
    * [net.py](examples/net.py) Implementation of windows net.exe builtin tool \ 
(@NtAlexio2)
    * [changepasswd.py](examples/changepasswd.py) New example that allows \ 
password changing or reseting through multiple protocols (@Alef-Burzmali, \ 
@snovvcrash, @bransh, @api0cradle and @p0dalirius)
    * [DumpNTLMInfo.py](examples/DumpNTLMInfo.py) New example that dumps remote \ 
host information in ntlm authentication model, without credentials. For SMB \ 
protocols v1, v2 and v3. (@NtAlexio2)