Commit Graph

27 Commits

Author SHA1 Message Date
MaxToffy 77988233c0 Add parsing for 'Export' hives and boot key computation from class names (#1840)
* Added support for "export" hive format + compute  bootkey from class names

* Fixing bug when key does not exist

* Better data extraction to avoid special characters errors

* Fix remote dumping errors

* Fix conflicts

* Reverting changes in examples/secretsdump and impacket/examples/secretsdump. Will be handled in a new PR

* Implemented Registry as an abstract class. Implemented winregistry.get_registry_parser as a factory function to instantiate right parser based in given hive parameter. Refactor registry-read and secretsdump to leverage this factory.

* Enhancing -system description in secretsdump\nClarifying that SYSTEM hive has to be in binary format

* Update the description of the `system` flag

---------

Co-authored-by: gabrielg5 <gabriel.gonzalez@fortra.com>
2025-09-26 15:58:09 -03:00
Gabriel Gonzalez ae0ec300f8 Techdebt examples bootstrapping v2 (#1928)
* 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
2025-03-26 22:58:39 -03:00
gabrielg5 27e7e7478d Updating copyright banner... 2024-08-28 17:52:57 -03:00
Didier A f98c987043 winregistry.py: handle value name containting backslash character (#1767)
* winregistry: handle value name containting backslash character

* Update examples/registry-read.py

* Update impacket/winregistry.py

* Update impacket/winregistry.py

* Update impacket/winregistry.py

* Update impacket/winregistry.py

---------

Co-authored-by: DidierA <1620015+didiera@users.noreply.github.com>
Co-authored-by: Gabriel Gonzalez <gabriel.gonzalez@fortra.com>
2024-08-19 16:57:05 -03:00
Gabriel Gonzalez 9b4a139405 Updated Copyright to 2023 2023-07-31 11:48:28 -03:00
Gabriel Gonzalez 8799a1a2c4 Update file banners to reflect Fortra ownership 2022-12-14 17:28:23 -03:00
Martin Gallo cd4fe47cfc Arrange tagline, copyright and license notes across all source files
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.
2021-07-20 10:04:27 -03:00
asolino 553881b9da Merge branch 'master' into python36 2018-12-05 12:16:54 -03:00
asolino c328de8252 Changing Copyright notice 2018-12-05 12:14:55 -03:00
asolino 7eeff437c7 More code cleanup homework
- Optimizing imports
- Removing unused variables
- Still a lot to do.
- Test cases passing OK
2018-12-04 17:07:52 -03:00
asolino ec77ea3d06 Code cleanup homework
- Optimizing imports
- Removing unused variables
- Still a lot to do.
- Test cases passing OK
2018-12-04 14:47:16 -03:00
asolino a339e62611 registry-read.py Python3 port 2018-10-16 14:03:22 -03:00
Martin Gallo 4152e128b8 Replaced shebang with a virtualenv friendly one
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.
2017-01-11 12:43:54 -03:00
asolino 8c04d96979 Updating copyright notice. Welcome 2016 2016-01-06 14:08:30 -03:00
asolino 8c094b7998 Adding eXecute permissions to the scripts, fixing https://github.com/CoreSecurity/impacket/issues/71 2015-06-25 09:50:19 -03:00
asolino 6ef8ae60bb Replacing decode('hex')/encode('hex')
for binascii's hexlify/unhexlify, mainly because of http://bugs.python.org/issue7475
and Python3 not having it.
2015-05-26 19:41:31 -03:00
asolino 4e32a0d498 Removing some pyCharm's erros/warnings
More scripts/libs changed. Hopefully doesn't break a thing. Test cases are passing
2015-05-25 20:40:17 -03:00
asolino 8b8f8a6947 Pyton imports fixups
1) Removed unnecesary imports, avoid import * whenever possible
2) Copyright updated
3) Minor typos fixed
4) File formats to Unix (LF)
2015-05-23 11:56:59 -03:00
asolino 4c2e64ad3a Second round of logging change.
Now there should be a single logger called 'impacket' the library uses.
By default is has a NullHandler so nothing is printed, but messages are
forwarded to the upstream logger.

If you are a script using the library and want to set the root logger
with a custom formatter, you can import impacket.examples.logger.

After some testing I'll merge it into master
2015-04-25 14:40:42 -03:00
asolino 119e4438dd Changing logging mechanisms everywhere.
Full details coming soon
2015-04-25 14:40:41 -03:00
bethus@gmail.com d5238f0817 Adding small description when calling the scripts w/no arguments 2015-03-20 19:25:53 +00:00
bethus@gmail.com 29d18e8cfd Updated copyright 2015-01-20 22:53:16 +00:00
bethus@gmail.com 6fc2a346fa ntfs-read: stripping CRLF
registry-read: forgot #!/usr/bin/python at the beginning
2014-01-21 20:58:34 +00:00
bethus@gmail.com d32080ea62 Indentation when printing values 2013-10-15 21:58:09 +00:00
bethus e7623de969 Moving the file parameter to positional arguments 2013-10-14 05:37:51 +00:00
bethus@gmail.com ffbb0d2062 Added walk option 2013-09-24 17:02:12 +00:00
bethus 92bd98ee6d Example for windows registry reader.. you will need a registry file (you can grab it with ntfs-read) 2013-09-20 15:19:24 +00:00