Commit Graph

45 Commits

Author SHA1 Message Date
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
Alvin Smith 36e48bdcfd Update: example/lookupsid.py with Kerberos auth option (#1656)
* Update: example/lookupsid.py with Kerberos auth option

* Update: example/lookupsid.py with Kerberos auth option by adding '-k'

---------

Co-authored-by: Alvin Smith <alv1n.5mith.is@protonmail.com>
2024-07-31 13:07:41 -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
Martin Gallo adb230256d Refactored the target parsing functions (#1053)
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.
2021-04-22 09:11:33 -03:00
Arseniy Sharoglazov 9f6c913725 Removing non-working code from lookupsid.py 2020-04-02 08:10:59 +03:00
0xdeaddood 97d2336d81 Add the timestamp option to several scripts
- lookupsid.py, netview.py, ntlmrelayx.py, raiseChild.py, samrdump.py, smbrelayx.py
2019-12-18 09:13:27 -03:00
skorov 29e4bbb073 Fixed bug where hLsarOpenPolicy2 was being reference (incorrectly) from lsat 2019-04-05 11:23:37 +11: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 e210c3f609 lookupsid.py Python3 support 2018-10-03 10:35:48 -03:00
asolino 9d8638cdf1 Print traceback info if running in DEBUG mode 2018-05-04 18:25:44 -03:00
asolino 0b28d94832 Using raise the right way + removing print from traceback.print_exc() 2018-05-03 21:21:36 -03:00
luz.paz 0e96b60b92 Misc. typos
Found via `codespell -q 3 -I ../impacket-word-whitelist.txt` through downstream `curl`
2018-03-16 09:42:21 -04:00
asolino f6db45b2bb Printing domain SID when running
* Useful for other tools (e.g. ticketer.py)
2018-01-20 18:21:07 -03:00
Ronnie Flathers 71dae11519 changed option name to reflect more than just users 2017-07-18 17:11:33 -05:00
Ronnie Flathers b04f2cb6d7 added no-pass and domain-users options 2017-07-18 17:57:29 -05: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 c049506e43 Minor cosmetic changes 2016-09-13 23:54:50 -03:00
dg 6b579a488a 139 support added 2016-07-26 15:41:31 -07:00
asolino 1bdba48374 Adding -dc-ip option to examples
* Allows to specifying the IP address for the DC/kdcHost
* Collateral for https://github.com/CoreSecurity/impacket/issues/160
2016-05-31 21:22:54 -03:00
asolino 8c04d96979 Updating copyright notice. Welcome 2016 2016-01-06 14:08:30 -03:00
asolino 5851bd0cb9 Applying @0xsauby fix for password with '@' to the rest of the example scripts 2015-11-26 14:55:19 -03:00
asolino e48e2d6c14 Explicitly changing the stdout encoding format if the script's output is redirected 2015-09-18 17:53:51 -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 a28d3d0192 Catching DCERPCException instead of Exception
More realistic since we're then calling get_packet()
2015-06-07 23:00:13 -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 29d18e8cfd Updated copyright 2015-01-20 22:53:16 +00:00
bethus@gmail.com bbce63a34a Clarifying target could be an IP address or targetName 2015-01-14 16:32:03 +00:00
bethus@gmail.com 3a397dcdfe Fixed bug triggered when maxRid was a multiple of SIMULTANEOUS (thanks mubix!) 2014-05-12 19:59:38 +00:00
bethus@gmail.com 850b6c7e3b Migrated to the helpers I just committed 2014-01-14 22:15:30 +00:00
bethus@gmail.com aef50c4edd Adapted to the new RPC runtime 2014-01-10 21:51:47 +00:00
bethus@gmail.com 51208f4ed3 Added get_dce_rpc() method to the DCERPCTransport. Now clients don't need to cast a transport to a DCERPC_v5 or V4. That is handled by this method.
I'm changing the examples to reflect this move.
2013-10-29 16:04:19 +00:00
bethus@gmail.com c0f175cce9 Adjusting parameters based on previous LsarOpenPolicy2 change 2013-10-24 22:01:24 +00:00
bethus@gmail.com b4f486c5d2 Better error handling. 2013-10-24 15:52:44 +00:00
bethus f7d705ad1d Finally.. If no password is specified, it is asked to the user.. so you don't populate your history with passwords ;) 2013-09-23 22:34:53 +00:00
bethus@gmail.com 02f502b266 1) Parameters are parsed with argparse
2) Added domain and hashes support
2012-07-11 19:12:55 +00:00
bethus@gmail.com 19482fe37e Changing permissions when opening target LsaR 2012-05-07 18:37:57 +00:00
bethus@gmail.com b49cf12f72 Now it does bruteforce. MaxRid parameter sent thru command line. 2012-05-07 04:06:37 +00:00
bethus@gmail.com 4549684a78 First implementation of lookupsid brute forcing.. still not bruteforcing a thing ;).. 2012-05-07 00:36:42 +00:00