Commit Graph

123 Commits

Author SHA1 Message Date
0xdeaddood 68fd6b799f Added some checks related to RRP when use-vss option is enabled in secretsdump.py 2022-04-07 16:56:53 -03:00
Maltemo 572fbd4c2d Changing corrupted source link 2022-01-24 17:59:33 +01: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
asolino afe746d2e2 Adding keytab support to secretsdump and remote exec scripts
- Added a loadKeysFromKeytab() class method into keytab.py for easier usage from the scripts.
2020-02-25 15:37:00 -03:00
asolino 8d4c91481b Print Library's installation path by default when -debug is specified 2020-02-05 19:52:39 -03:00
0xdeaddood 3b41d48e07 Add the timestamp option to several scripts
- GetADUsers.py, GETNPUsers.py, getST.py, getTGT.py, goldenPac.py, secretsdump.py, ticketer.py
2019-12-18 11:34:56 -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
cclauss 80506c1620 Fix more Python 3 issues 2018-11-24 00:06:49 +01:00
cclauss c6e7e378eb Use feature detection instead of version detection
Python porting best practice: https://docs.python.org/3/howto/pyporting.html#use-feature-detection-instead-of-version-detection
2018-11-23 19:38:28 +01:00
asolino 19334ddf54 Merge branch 'master' into python36 2018-11-19 12:30:38 -03:00
Viktor Szakats 3f29d8dcdb fix/secure URLs
* also remove/fix some whitespace such as tabs
  and spaces at EOL
2018-11-18 19:47:09 +00:00
asolino 4a1a90718e Merge branch 'master' into python36 2018-10-24 13:43:28 -03:00
Cauan 074708afc7 Update secretsdump.py
Set remoteName instead of address in case the password contains '@'
2018-10-24 13:29:28 -03:00
asolino 89954d7577 DCOM WMI port for Python3
- test_wmi.py passing (PY2 / PY3)
- secretsdump.py, wmiexec.py, wmipersist.py and wmiquery.py ports as well.
2018-10-05 17:34:31 -03:00
asolino 0b28d94832 Using raise the right way + removing print from traceback.print_exc() 2018-05-03 21:21:36 -03:00
asolino 52a324f28a Adding the exception data to the debug log produced 2018-04-06 18:27:34 -03:00
TheNaterz 824b57f698 added bootkey option 2018-04-03 11:18:47 -06: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 47a3b9fd19 Adding debug info for LSA and preventing exception when OldVal not present 2018-01-09 20:35:06 -03:00
Ramzeth d2736eff91 Update secretsdump.py 2017-12-06 18:04:18 +03:00
Ramzeth 6df3275fd1 OldVal parameter dump added to LSA secrets dump 2017-12-06 17:59:12 +03:00
asolino 314b4ebfd3 Clarifications when receiving ERROR_DS_NAME_ERROR_NOT_UNIQUE
* Might help users how to get over this issue.
* If somebody knows how to avoid this from happening ping me.
2017-09-15 16:06:17 -03:00
asolino b755ca4d7c Adding -target-ip switch.
- This allows to specify both the dc-ip and the target-ip. In theory we wouldn't need DNS resolve.
- Might help addressing https://github.com/CoreSecurity/impacket/issues/285
2017-06-29 11:40:25 -03:00
asolino b3826dee41 Print stacktrace messages if DEBUG logging is enabled
- This will make things easier for troubleshooting, for example https://github.com/CoreSecurity/impacket/issues/285
2017-06-29 09:45:38 -03:00
asolino 9733943d58 Adding -exec-method
* Allows to chose different exec methods when -use-vss mode is chosen:
1. smbexec (default): Creates a service executing the desired commands
2. wmiexec: Executes commands through Win32Process.Create() API
3. mmcexec: Executes commands through DCOM MMC object (Kerberos not supported here)
2017-06-03 19:29:26 -03:00
asolino 03c5bc63bc Giving some hints when target is enforcing SPN validation 2017-01-25 09:35:09 -03:00
asolino f0b5b8f617 Be more flexible about the target SPN to use
* When connecting to target systems
* Also, don't give up if the SMBConnection didn't work, we might be still lucky at the DRSUAPI layer
2017-01-24 16:10:29 -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 036e5bd778 Adding a -user-status display option
* Changing the (current-disabled) to (status=Enabled/Disabled)
* Moving that data to the end of the line, in alignment to the pwd-last-set display option
* Only supportted in VSS mode. DRSUAPI coming soon
2016-10-24 21:19:24 -03:00
asolino c049506e43 Minor cosmetic changes 2016-09-13 23:54:50 -03:00
martin_uy 3d4944afc7 Secrets Dump example split into 2 components. Secrets extraction component moved to Impacket library as an example. Command line interface component remains out of Impacket library. 2016-09-07 20:45:48 -03:00
asolino ce72d09cbc Minor class refactor
* Created LocalOperations class to encapsulate some offline registry specific operations.
* Now DumpSecrets is cleaner, and just handles the instances created based on the scripts parameters set by the user
2016-09-06 17:49:00 -03:00
asolino 90a9104513 Whenever there's an exception triggered when searching the PEK we skip the row
* Hopefully addresses a privately reported issue
2016-08-11 21:29:40 -07:00
asolino e5c4bdaa04 We remove the session resume file if ERROR_DS_DRA_BAD_DN error was triggered 2016-07-04 18:43:10 -03:00
asolino 5acf2b4579 Adding debug logging output for the exception 2016-07-01 16:29:20 -03:00
asolino 55d1f3ff27 Extra checks if login didn't succeed 2016-06-21 10:06:41 -03:00
asolino ffe7e92afd We shouldn't process cipherText if it wasn't processed before
* Hopefully addresses https://github.com/CoreSecurity/impacket/issues/167 although it needs to be verified
2016-06-21 09:57:29 -03:00
asolino f618a5f1e1 Setting DRSBind.dwExtCaps accordingly so Win2016 TP5 with PAM is happy about us
* Plus any other possible thing
* Fixes https://github.com/CoreSecurity/impacket/issues/165
* Thanks @gentilkiwi and @MichaelGrafnetter for your input
2016-06-08 20:16:51 -03:00
asolino dd557b9a79 Adding DRS_EXT_GETCHGREPLY_V9 as a possible DRSGetNCChanges answer
* Now we access the structures for both _V6 and V9
* We added we support this feature in DRSBind().dwflags
* Addresses issue found by @MichaelGrafnetter (https://github.com/CoreSecurity/impacket/issues/165)
* Still needs to be tested but don't have yet a TP 5 propery configured.
2016-06-05 19:09:22 -03: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 6ab19e5fbe No need to close the SMB Connection 2016-05-26 22:20:45 -03:00
asolino a8576c0172 Reformatting some code 2016-05-20 21:16:15 -03:00
asolino fcf0c2ad8f Fix when dumping CLEARTEXT password for machine accounts
* We won't utf-16 decode them, we will just print it in hex
2016-05-13 19:24:46 -03:00
asolino 5b92375f9f pwdLastSet is also included in the output file
* According to @mubix this won't interfere with JtR :)
2016-05-05 11:35:54 -03:00
asolino b6b2b1db7c More debug messages added 2016-05-05 11:23:52 -03:00
asolino bcff6bc38c Adding more debug information for helping troubleshooting 2016-05-05 10:54:15 -03:00
asolino a489c032f2 Extra line removed. Cosmetic 2016-05-01 21:21:14 -03:00
asolino 7c34db9948 Fix ERROR_DS_DIFFERENT_REPL_EPOCHS when running against a domain with dwReplEpoch != 0
* By default we set dwReplEpoch to 0 when calling DRSBind(). If this call's answer specifies a different dwReplEpoch, then we call DRSBind again with the right one. Otherwise calls will fail later.
* Thanks @gentilkiwi for reporting it in impacket, @MichaelGrafnetter for reporting it to mimikatz and @rmbolger for reporting it DSInternals :)
2016-05-01 21:14:45 -03:00