* Added flag functionality to specify that a created registry key should be volatile, and changed the default behavior to instead create non-volatile keys
* Reverted to default behavior and clarified description
- Reverted default behavior back to volatile keys
- Changed --volatile flag to --persistent
- Moved flag verification to subkey creation section
- Added printed warning that key is volatile if --permanent is not set (only in subkey creation)
- Clarified flag description.
* Standardized examples logger init method
* Fixing missing import
* Standardized examples init_ldap_session function #1
* Calling new shared function _ldap3_kerberos_login from example addcomputer
* Removed considering -debug in each example. Now it's handled in utils.
* Standardized EMPTY_LM_HASH in impacket.examples.utils
* Unify parse_identity function (phase 1)
* Standardized parse_identity
* Renamed "_ldap3_kerberos_login" to "ldap3_kerberos_login" (as it is called from outside)
* Standardize "logger" init in regsecrets.py
* Standardized LDAP login into a single function in utils.py:ldap_login
* fixed SyntaxWarnings due to invalid escape sequence
* fixed DeprecationWarning since datetime.datetime.utcnow() is deprecated in Python 3.12+
* fixed DeprecationWarning since datetime.datetime.utcfromtimestamp() is deprecated in Python 3.12+
* Support for adding REG_MULTI_SZ values through reg.py
* Fixing default value for "-vd" in reg.py
* Fixing 2x null-bytes handling for REG_MULTI_SZ values in rrp.py
* Fixing check of 2x null-bytes ending REG_MULTI_SZ values
* Fixing how REG_MULTI_SZ are printed to stdout (query, add) - replacing \0 with \n
* Fixing output message when adding a new value in the registry using the "add" command of reg.py
* fix can't add when value is REG_BINARY
fix the issue that can't add key when value type is REG_BINARY
* Update examples/reg.py
Validate HEX length
Co-authored-by: Gabriel Gonzalez <gabriel.gonzalez@fortra.com>
---------
Co-authored-by: Dc3 <admin@dc3.es>
Co-authored-by: Gabriel Gonzalez <gabriel.gonzalez@fortra.com>
* start remote registry as unprivileged user in reg.py
Trigger the start of the RemoteRegistry service as unprivileged user by opening the winreg named pipe.
* enable access to HKEY_USERS trough reg.py
This was a pending change to:
- Use the same tagline, copyright and license notice across files.
- Remove authors' contacts that are no longer valid (due to affiliation changes).
- Update repository location.
- Update license file with missing licenses (althought those were already in source files).
This doesn't include any change on the source code, nor any change on current copyright or licenses. Just formatting and phrasing to make our and distro's maintainers life easier.
In reviewing #1051 (and related #347) we found out that there's some ugly duplicated code that's better suited for an utils function.
The expected target format is:
`<DOMAIN></USERNAME><:PASSWORD>@HOSTNAME`
This PR:
- Moved target parsing routine to an utils module.
- Added unit tests for the new function.
- Using the new function across example scripts that accept a target.
Replaced all instances of `#!/usr/bin/python` with `#!/usr/bin/env python` so impacket's examples and scripts can be run inside a virtualenv without having to call python.
* Changing logic for __print_all_subkeys_and_entries() method
* Striping NULL character when printing lpNameOut
* Better error control when an exception is triggered