From f3e032c4e5ecad07935f10a512a82720e9cbeafe Mon Sep 17 00:00:00 2001 From: Surav Shrestha Date: Tue, 31 Oct 2023 17:17:26 +0545 Subject: [PATCH 1/8] fix typos in nxc/modules/daclread.py --- nxc/modules/daclread.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/nxc/modules/daclread.py b/nxc/modules/daclread.py index 5960bbd79..253221263 100644 --- a/nxc/modules/daclread.py +++ b/nxc/modules/daclread.py @@ -197,7 +197,7 @@ class NXCModule: """ name = "daclread" - description = "Read and backup the Discretionary Access Control List of objects. Based on the work of @_nwodtuhs and @BlWasp_. Be carefull, this module cannot read the DACLS recursively, more explains in the options." + description = "Read and backup the Discretionary Access Control List of objects. Based on the work of @_nwodtuhs and @BlWasp_. Be careful, this module cannot read the DACLS recursively, more explains in the options." supported_protocols = ["ldap"] opsec_safe = True multiple_hosts = False @@ -208,11 +208,11 @@ def __init__(self, context=None, module_options=None): def options(self, context, module_options): """ - Be carefull, this module cannot read the DACLS recursively. + Be careful, this module cannot read the DACLS recursively. For example, if an object has particular rights because it belongs to a group, the module will not be able to see it directly, you have to check the group rights manually. - TARGET The objects that we want to read or backup the DACLs, sepcified by its SamAccountName - TARGET_DN The object that we want to read or backup the DACL, specified by its DN (usefull to target the domain itself) + TARGET The objects that we want to read or backup the DACLs, specified by its SamAccountName + TARGET_DN The object that we want to read or backup the DACL, specified by its DN (useful to target the domain itself) PRINCIPAL The trustee that we want to filter on ACTION The action to realise on the DACL (read, backup) ACE_TYPE The type of ACE to read (Allowed or Denied) @@ -271,8 +271,8 @@ def options(self, context, module_options): self.filename = None def on_login(self, context, connection): - """On a successful LDAP login we perform a search for the targets' SID, their Security Decriptors and the principal's SID if there is one specified""" - context.log.highlight("Be carefull, this module cannot read the DACLS recursively.") + """On a successful LDAP login we perform a search for the targets' SID, their Security Descriptors and the principal's SID if there is one specified""" + context.log.highlight("Be careful, this module cannot read the DACLS recursively.") self.baseDN = connection.ldapConnection._baseDN self.ldap_session = connection.ldapConnection @@ -292,7 +292,7 @@ def on_login(self, context, connection): context.log.fail(f"Principal SID not found in LDAP ({_lookedup_principal})") sys.exit(1) - # Searching for the targets SID and their Security Decriptors + # Searching for the targets SID and their Security Descriptors # If there is only one target if (self.target_sAMAccountName or self.target_DN) and self.target_file is None: # Searching for target account with its security descriptor @@ -383,7 +383,7 @@ def search_target_principal_security_descriptor(self, context, connection): context.log.fail(f"Principal not found in LDAP ({_lookedup_principal}), probably an LDAP session issue.") sys.exit(0) - # Attempts to retieve the SID and Distinguisehd Name from the sAMAccountName + # Attempts to retrieve the SID and Distinguisehd Name from the sAMAccountName # Not used for the moment # - samname : a sAMAccountName def get_user_info(self, context, samname): From b8476fce4ffb652f8a8ee99803589b4da0bddd44 Mon Sep 17 00:00:00 2001 From: Surav Shrestha Date: Tue, 31 Oct 2023 17:17:26 +0545 Subject: [PATCH 2/8] fix typos in nxc/modules/example_module.py --- nxc/modules/example_module.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nxc/modules/example_module.py b/nxc/modules/example_module.py index 265bb4c34..274a86e69 100644 --- a/nxc/modules/example_module.py +++ b/nxc/modules/example_module.py @@ -39,9 +39,9 @@ def on_login(self, context, connection): # These are for more critical error handling context.log.error("I'm doing something") # This will not be printed in the module context and should only be used for critical errors (e.g. a required python file is missing) try: - raise Exception("Exception that might occure") + raise Exception("Exception that might have occurred") except Exception as e: - context.log.exception(f"Exception occured: {e}") # This will display an exception traceback screen after an exception was raised and should only be used for critical errors + context.log.exception(f"Exception occurred: {e}") # This will display an exception traceback screen after an exception was raised and should only be used for critical errors def on_admin_login(self, context, connection): """Concurrent. From 9fa09da8a966c28a0ca14b9188a1ce71b5fe2187 Mon Sep 17 00:00:00 2001 From: Surav Shrestha Date: Tue, 31 Oct 2023 17:17:26 +0545 Subject: [PATCH 3/8] fix typos in nxc/modules/keepass_trigger.py --- nxc/modules/keepass_trigger.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nxc/modules/keepass_trigger.py b/nxc/modules/keepass_trigger.py index dc763dc57..8b17b2053 100644 --- a/nxc/modules/keepass_trigger.py +++ b/nxc/modules/keepass_trigger.py @@ -74,7 +74,7 @@ def options(self, context, module_options): USER Targeted user running KeePass, used to restart the appropriate process (used by RESTART action) - EXPORT_NAME Name fo the database export file, default: export.xml + EXPORT_NAME Name of the database export file, default: export.xml EXPORT_PATH Path where to export the KeePass database in cleartext default: C:\\Users\\Public, %APPDATA% works well too for user permissions From 2bcb04fcd3c14bc0b88d88f4be0eecbab431fef1 Mon Sep 17 00:00:00 2001 From: Surav Shrestha Date: Tue, 31 Oct 2023 17:17:26 +0545 Subject: [PATCH 4/8] fix typos in nxc/modules/ldap-checker.py --- nxc/modules/ldap-checker.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nxc/modules/ldap-checker.py b/nxc/modules/ldap-checker.py index 33bdc4fcd..075132a43 100644 --- a/nxc/modules/ldap-checker.py +++ b/nxc/modules/ldap-checker.py @@ -54,10 +54,10 @@ async def run_ldaps_noEPA(target, credential): # Conduct a bind to LDAPS with channel binding supported # but intentionally miscalculated. In the case that and - # LDAPS bind has without channel binding supported has occured, + # LDAPS bind has without channel binding supported has occurred, # you can determine whether the policy is set to "never" or # if it's set to "when supported" based on the potential - # error recieved from the bind attempt. + # error received from the bind attempt. async def run_ldaps_withEPA(target, credential): ldapsClientConn = MSLDAPClientConnection(target, credential) _, err = await ldapsClientConn.connect() From 568cf72860784abcff95ebf092da53c6e9589809 Mon Sep 17 00:00:00 2001 From: Surav Shrestha Date: Tue, 31 Oct 2023 17:17:26 +0545 Subject: [PATCH 5/8] fix typos in nxc/modules/scan-network.py --- nxc/modules/scan-network.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nxc/modules/scan-network.py b/nxc/modules/scan-network.py index 3832193e2..1bb51816a 100644 --- a/nxc/modules/scan-network.py +++ b/nxc/modules/scan-network.py @@ -52,7 +52,7 @@ def new_record(rtype, serial): nr["Type"] = rtype nr["Serial"] = serial nr["TtlSeconds"] = 180 - # From authoritive zone + # From authoritative zone nr["Rank"] = 240 return nr From e993b205d04d2a23072f7464d7db8f26290c50bd Mon Sep 17 00:00:00 2001 From: Surav Shrestha Date: Tue, 31 Oct 2023 17:17:26 +0545 Subject: [PATCH 6/8] fix typos in nxc/modules/schtask_as.py --- nxc/modules/schtask_as.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nxc/modules/schtask_as.py b/nxc/modules/schtask_as.py index f6a4fb857..ff3646eb8 100644 --- a/nxc/modules/schtask_as.py +++ b/nxc/modules/schtask_as.py @@ -56,7 +56,7 @@ def on_admin_login(self, context, connection): connection.hash, self.logger, connection.args.get_output_tries, - "C$", # This one shouldn't be hardcoded but I don't know where to retrive the info + "C$", # This one shouldn't be hardcoded but I don't know where to retrieve the info ) self.logger.display(f"Executing {self.cmd} as {self.user}") @@ -66,7 +66,7 @@ def on_admin_login(self, context, connection): if not isinstance(output, str): output = output.decode(connection.args.codec) except UnicodeDecodeError: - # Required to decode specific french caracters otherwise it'll print b"" + # Required to decode specific French characters otherwise it'll print b"" output = output.decode("cp437") if output: self.logger.highlight(output) From 6386231e4fa8250619263dffb69d173bb6e96dc1 Mon Sep 17 00:00:00 2001 From: Surav Shrestha Date: Tue, 31 Oct 2023 17:17:26 +0545 Subject: [PATCH 7/8] fix typos in nxc/modules/teams_localdb.py --- nxc/modules/teams_localdb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nxc/modules/teams_localdb.py b/nxc/modules/teams_localdb.py index 5e35760a8..da32fd20d 100644 --- a/nxc/modules/teams_localdb.py +++ b/nxc/modules/teams_localdb.py @@ -44,7 +44,7 @@ def parse_file(context, name): if row is None: context.log.fail("No " + name + " present in Microsoft Teams Cookies database") else: - context.log.success("Succesfully extracted " + name + ": ") + context.log.success("Successfully extracted " + name + ": ") context.log.success(row[0]) conn.close() except Exception as e: From 671afcc039d8b9ec8aebc7e30eb0965c17a98ad0 Mon Sep 17 00:00:00 2001 From: Surav Shrestha Date: Tue, 31 Oct 2023 17:17:26 +0545 Subject: [PATCH 8/8] fix typos in nxc/modules/user_desc.py --- nxc/modules/user_desc.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nxc/modules/user_desc.py b/nxc/modules/user_desc.py index e6177270a..0836a903d 100644 --- a/nxc/modules/user_desc.py +++ b/nxc/modules/user_desc.py @@ -28,10 +28,10 @@ def __init__(self, context=None, multiple_options=None): def options(self, context, module_options): """ LDAP_FILTER Custom LDAP search filter (fully replaces the default search) - DESC_FILTER An additional seach filter for descriptions (supports wildcard *) - DESC_INVERT An additional seach filter for descriptions (shows non matching) - USER_FILTER An additional seach filter for usernames (supports wildcard *) - USER_INVERT An additional seach filter for usernames (shows non matching) + DESC_FILTER An additional search filter for descriptions (supports wildcard *) + DESC_INVERT An additional search filter for descriptions (shows non matching) + USER_FILTER An additional search filter for usernames (supports wildcard *) + USER_INVERT An additional search filter for usernames (shows non matching) KEYWORDS Use a custom set of keywords (comma separated) ADD_KEYWORDS Add additional keywords to the default set (comma separated) """