rat-king-parser 3.1.4__tar.gz → 3.1.7__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. {rat_king_parser-3.1.4/src/rat_king_parser.egg-info → rat_king_parser-3.1.7}/PKG-INFO +1 -1
  2. {rat_king_parser-3.1.4 → rat_king_parser-3.1.7}/src/rat_king_parser/_version.py +1 -1
  3. {rat_king_parser-3.1.4 → rat_king_parser-3.1.7}/src/rat_king_parser/config_parser/utils/decryptors/config_decryptor_aes_cbc.py +6 -4
  4. {rat_king_parser-3.1.4 → rat_king_parser-3.1.7/src/rat_king_parser.egg-info}/PKG-INFO +1 -1
  5. {rat_king_parser-3.1.4 → rat_king_parser-3.1.7}/LICENSE +0 -0
  6. {rat_king_parser-3.1.4 → rat_king_parser-3.1.7}/README.md +0 -0
  7. {rat_king_parser-3.1.4 → rat_king_parser-3.1.7}/pyproject.toml +0 -0
  8. {rat_king_parser-3.1.4 → rat_king_parser-3.1.7}/setup.cfg +0 -0
  9. {rat_king_parser-3.1.4 → rat_king_parser-3.1.7}/src/rat_king_parser/__init__.py +0 -0
  10. {rat_king_parser-3.1.4 → rat_king_parser-3.1.7}/src/rat_king_parser/config_parser/__init__.py +0 -0
  11. {rat_king_parser-3.1.4 → rat_king_parser-3.1.7}/src/rat_king_parser/config_parser/config_parser_exception.py +0 -0
  12. {rat_king_parser-3.1.4 → rat_king_parser-3.1.7}/src/rat_king_parser/config_parser/rat_config_parser.py +0 -0
  13. {rat_king_parser-3.1.4 → rat_king_parser-3.1.7}/src/rat_king_parser/config_parser/utils/__init__.py +0 -0
  14. {rat_king_parser-3.1.4 → rat_king_parser-3.1.7}/src/rat_king_parser/config_parser/utils/config_item.py +0 -0
  15. {rat_king_parser-3.1.4 → rat_king_parser-3.1.7}/src/rat_king_parser/config_parser/utils/data_utils.py +0 -0
  16. {rat_king_parser-3.1.4 → rat_king_parser-3.1.7}/src/rat_king_parser/config_parser/utils/decryptors/__init__.py +0 -0
  17. {rat_king_parser-3.1.4 → rat_king_parser-3.1.7}/src/rat_king_parser/config_parser/utils/decryptors/config_decryptor.py +0 -0
  18. {rat_king_parser-3.1.4 → rat_king_parser-3.1.7}/src/rat_king_parser/config_parser/utils/decryptors/config_decryptor_aes_ecb.py +0 -0
  19. {rat_king_parser-3.1.4 → rat_king_parser-3.1.7}/src/rat_king_parser/config_parser/utils/decryptors/config_decryptor_decrypt_xor.py +0 -0
  20. {rat_king_parser-3.1.4 → rat_king_parser-3.1.7}/src/rat_king_parser/config_parser/utils/decryptors/config_decryptor_plaintext.py +0 -0
  21. {rat_king_parser-3.1.4 → rat_king_parser-3.1.7}/src/rat_king_parser/config_parser/utils/decryptors/config_decryptor_random_hardcoded.py +0 -0
  22. {rat_king_parser-3.1.4 → rat_king_parser-3.1.7}/src/rat_king_parser/config_parser/utils/dotnet_constants.py +0 -0
  23. {rat_king_parser-3.1.4 → rat_king_parser-3.1.7}/src/rat_king_parser/config_parser/utils/dotnetpe_payload.py +0 -0
  24. {rat_king_parser-3.1.4 → rat_king_parser-3.1.7}/src/rat_king_parser/extern/__init__.py +0 -0
  25. {rat_king_parser-3.1.4 → rat_king_parser-3.1.7}/src/rat_king_parser/extern/maco/__init__.py +0 -0
  26. {rat_king_parser-3.1.4 → rat_king_parser-3.1.7}/src/rat_king_parser/extern/maco/rkp_maco.py +0 -0
  27. {rat_king_parser-3.1.4 → rat_king_parser-3.1.7}/src/rat_king_parser/rkp.py +0 -0
  28. {rat_king_parser-3.1.4 → rat_king_parser-3.1.7}/src/rat_king_parser/yara_utils/__init__.py +0 -0
  29. {rat_king_parser-3.1.4 → rat_king_parser-3.1.7}/src/rat_king_parser/yara_utils/recompile.py +0 -0
  30. {rat_king_parser-3.1.4 → rat_king_parser-3.1.7}/src/rat_king_parser/yara_utils/rules.yar +0 -0
  31. {rat_king_parser-3.1.4 → rat_king_parser-3.1.7}/src/rat_king_parser/yara_utils/rules.yarc +0 -0
  32. {rat_king_parser-3.1.4 → rat_king_parser-3.1.7}/src/rat_king_parser.egg-info/SOURCES.txt +0 -0
  33. {rat_king_parser-3.1.4 → rat_king_parser-3.1.7}/src/rat_king_parser.egg-info/dependency_links.txt +0 -0
  34. {rat_king_parser-3.1.4 → rat_king_parser-3.1.7}/src/rat_king_parser.egg-info/entry_points.txt +0 -0
  35. {rat_king_parser-3.1.4 → rat_king_parser-3.1.7}/src/rat_king_parser.egg-info/requires.txt +0 -0
  36. {rat_king_parser-3.1.4 → rat_king_parser-3.1.7}/src/rat_king_parser.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: rat-king-parser
3
- Version: 3.1.4
3
+ Version: 3.1.7
4
4
  Summary: A robust, multiprocessing-capable, multi-family RAT config parser/config extractor for AsyncRAT, DcRAT, VenomRAT, QuasarRAT, XWorm, Xeno RAT, and cloned/derivative RAT families.
5
5
  Author-email: jeFF0Falltrades <8444166+jeFF0Falltrades@users.noreply.github.com>
6
6
  Maintainer-email: jeFF0Falltrades <8444166+jeFF0Falltrades@users.noreply.github.com>
@@ -23,4 +23,4 @@
23
23
  # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
24
  # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
25
  # SOFTWARE.
26
- __version__ = "3.1.4"
26
+ __version__ = "3.1.7"
@@ -253,7 +253,11 @@ class ConfigDecryptorAESCBC(ConfigDecryptor):
253
253
  try:
254
254
  self.salt = self._get_aes_salt(candidate.groups()[0])
255
255
  metadata = candidate
256
- except ConfigParserException:
256
+ self._key_rva = self._get_aes_key_rva(metadata.start())
257
+ except ConfigParserException as cfe:
258
+ logger.info(
259
+ f"Initialization using salt candidate {hex(bytes_to_int(candidate.groups()[0]))} failed: {cfe}"
260
+ )
257
261
  continue
258
262
  if metadata is None:
259
263
  raise ConfigParserException("Could not identify AES metadata")
@@ -265,8 +269,6 @@ class ConfigDecryptorAESCBC(ConfigDecryptor):
265
269
  self._iterations = bytes_to_int(metadata.groups()[1])
266
270
  logger.debug(f"Found AES iteration number of {self._iterations}")
267
271
 
268
- self._key_rva = self._get_aes_key_rva(metadata.start())
269
-
270
272
  # Extracts the AES salt from the payload, accounting for both hardcoded
271
273
  # salt byte arrays, and salts derived from hardcoded strings
272
274
  def _get_aes_salt(self, salt_rva: int) -> bytes:
@@ -279,7 +281,7 @@ class ConfigDecryptorAESCBC(ConfigDecryptor):
279
281
  # stsfld uint8[] Client.Algorithm.Aes256::Salt
280
282
  # ret
281
283
  aes_salt_initialization = self._payload.data.find(
282
- self._PATTERN_AES_SALT_INIT % re.escape(salt_rva)
284
+ self._PATTERN_AES_SALT_INIT % salt_rva
283
285
  )
284
286
  if aes_salt_initialization == -1:
285
287
  raise ConfigParserException("Could not identify AES salt initialization")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: rat-king-parser
3
- Version: 3.1.4
3
+ Version: 3.1.7
4
4
  Summary: A robust, multiprocessing-capable, multi-family RAT config parser/config extractor for AsyncRAT, DcRAT, VenomRAT, QuasarRAT, XWorm, Xeno RAT, and cloned/derivative RAT families.
5
5
  Author-email: jeFF0Falltrades <8444166+jeFF0Falltrades@users.noreply.github.com>
6
6
  Maintainer-email: jeFF0Falltrades <8444166+jeFF0Falltrades@users.noreply.github.com>
File without changes