Commit Graph

17 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
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
asolino 8d4c91481b Print Library's installation path by default when -debug is specified 2020-02-05 19:52:39 -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 b69cb4932c sambaPipe.py initial Python3 port 2018-10-11 13:24:03 -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 287cb2fe2c Support for samba 3.5.x
* In those versions, the first byte is stripped, hence we're sending a '/' extra at the beginning of the buffer
* Doesn't seem to affect 4.x versions
* Also, have in mind that in 3.5.x you need to create a .so exporting init_samba_module(), whereas in 4.x it is samba_init_module()
2017-06-07 16:27:40 -03:00
asolino ea6df99e49 Opening the file as binary to make Windows happy
* Thanks @gentilkiwi for the tests
* More verbose message when receiving the answer from the server
2017-05-30 22:18:23 -03:00
asolino 32e71ef236 Adding sambaPipe example
This script will exploit CVE-2017-7494, uploading and executing the shared library specified by the user through
the -so parameter.

The script will use SMB1 or SMB2/3 depending on the target's availability. Also, the target share pathname is
retrieved by using NetrShareEnum() API with info level 2.

Example:

./sambaPipe.py -so poc/libpoc.linux64.so bill@10.90.1.1

It will upload the libpoc.linux64.so file located in the poc directory against the target 10.90.1.1. The username
to use for authentication will be 'bill' and the password will be asked.

./sambaPipe.py -so poc/libpoc.linux64.so 10.90.1.1

Same as before, but anonymous authentication will be used.
2017-05-29 15:48:41 -03:00