pdfalyzer 1.16.6__tar.gz → 1.16.8__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.

Potentially problematic release.


This version of pdfalyzer might be problematic. Click here for more details.

Files changed (48) hide show
  1. {pdfalyzer-1.16.6 → pdfalyzer-1.16.8}/CHANGELOG.md +10 -0
  2. {pdfalyzer-1.16.6 → pdfalyzer-1.16.8}/PKG-INFO +7 -11
  3. {pdfalyzer-1.16.6 → pdfalyzer-1.16.8}/README.md +1 -0
  4. {pdfalyzer-1.16.6 → pdfalyzer-1.16.8}/pdfalyzer/detection/yaralyzer_helper.py +19 -15
  5. pdfalyzer-1.16.8/pdfalyzer/yara_rules/PDF.yara +1859 -0
  6. {pdfalyzer-1.16.6 → pdfalyzer-1.16.8}/pdfalyzer/yara_rules/PDF_binary_stream.yara +6 -8
  7. pdfalyzer-1.16.8/pdfalyzer/yara_rules/didier_stevens.yara +248 -0
  8. pdfalyzer-1.16.8/pdfalyzer/yara_rules/pdf_malware.yara +3072 -0
  9. {pdfalyzer-1.16.6 → pdfalyzer-1.16.8}/pyproject.toml +9 -10
  10. pdfalyzer-1.16.6/pdfalyzer/yara_rules/PDF.yara +0 -1085
  11. {pdfalyzer-1.16.6 → pdfalyzer-1.16.8}/LICENSE +0 -0
  12. {pdfalyzer-1.16.6 → pdfalyzer-1.16.8}/pdfalyzer/__init__.py +0 -0
  13. {pdfalyzer-1.16.6 → pdfalyzer-1.16.8}/pdfalyzer/__main__.py +0 -0
  14. {pdfalyzer-1.16.6 → pdfalyzer-1.16.8}/pdfalyzer/binary/binary_scanner.py +0 -0
  15. {pdfalyzer-1.16.6 → pdfalyzer-1.16.8}/pdfalyzer/config.py +0 -0
  16. {pdfalyzer-1.16.6 → pdfalyzer-1.16.8}/pdfalyzer/decorators/document_model_printer.py +0 -0
  17. {pdfalyzer-1.16.6 → pdfalyzer-1.16.8}/pdfalyzer/decorators/indeterminate_node.py +0 -0
  18. {pdfalyzer-1.16.6 → pdfalyzer-1.16.8}/pdfalyzer/decorators/pdf_object_properties.py +0 -0
  19. {pdfalyzer-1.16.6 → pdfalyzer-1.16.8}/pdfalyzer/decorators/pdf_tree_node.py +0 -0
  20. {pdfalyzer-1.16.6 → pdfalyzer-1.16.8}/pdfalyzer/decorators/pdf_tree_verifier.py +0 -0
  21. {pdfalyzer-1.16.6 → pdfalyzer-1.16.8}/pdfalyzer/detection/constants/binary_regexes.py +0 -0
  22. {pdfalyzer-1.16.6 → pdfalyzer-1.16.8}/pdfalyzer/detection/constants/javascript_reserved_keywords.py +0 -0
  23. {pdfalyzer-1.16.6 → pdfalyzer-1.16.8}/pdfalyzer/detection/javascript_hunter.py +0 -0
  24. {pdfalyzer-1.16.6 → pdfalyzer-1.16.8}/pdfalyzer/font_info.py +0 -0
  25. {pdfalyzer-1.16.6 → pdfalyzer-1.16.8}/pdfalyzer/helpers/dict_helper.py +0 -0
  26. {pdfalyzer-1.16.6 → pdfalyzer-1.16.8}/pdfalyzer/helpers/filesystem_helper.py +0 -0
  27. {pdfalyzer-1.16.6 → pdfalyzer-1.16.8}/pdfalyzer/helpers/number_helper.py +0 -0
  28. {pdfalyzer-1.16.6 → pdfalyzer-1.16.8}/pdfalyzer/helpers/pdf_object_helper.py +0 -0
  29. {pdfalyzer-1.16.6 → pdfalyzer-1.16.8}/pdfalyzer/helpers/rich_text_helper.py +0 -0
  30. {pdfalyzer-1.16.6 → pdfalyzer-1.16.8}/pdfalyzer/helpers/string_helper.py +0 -0
  31. {pdfalyzer-1.16.6 → pdfalyzer-1.16.8}/pdfalyzer/output/character_mapping.py +0 -0
  32. {pdfalyzer-1.16.6 → pdfalyzer-1.16.8}/pdfalyzer/output/layout.py +0 -0
  33. {pdfalyzer-1.16.6 → pdfalyzer-1.16.8}/pdfalyzer/output/pdfalyzer_presenter.py +0 -0
  34. {pdfalyzer-1.16.6 → pdfalyzer-1.16.8}/pdfalyzer/output/styles/node_colors.py +0 -0
  35. {pdfalyzer-1.16.6 → pdfalyzer-1.16.8}/pdfalyzer/output/styles/rich_theme.py +0 -0
  36. {pdfalyzer-1.16.6 → pdfalyzer-1.16.8}/pdfalyzer/output/tables/decoding_stats_table.py +0 -0
  37. {pdfalyzer-1.16.6 → pdfalyzer-1.16.8}/pdfalyzer/output/tables/font_summary_table.py +0 -0
  38. {pdfalyzer-1.16.6 → pdfalyzer-1.16.8}/pdfalyzer/output/tables/pdf_node_rich_table.py +0 -0
  39. {pdfalyzer-1.16.6 → pdfalyzer-1.16.8}/pdfalyzer/output/tables/stream_objects_table.py +0 -0
  40. {pdfalyzer-1.16.6 → pdfalyzer-1.16.8}/pdfalyzer/pdf_object_relationship.py +0 -0
  41. {pdfalyzer-1.16.6 → pdfalyzer-1.16.8}/pdfalyzer/pdfalyzer.py +0 -0
  42. {pdfalyzer-1.16.6 → pdfalyzer-1.16.8}/pdfalyzer/util/adobe_strings.py +0 -0
  43. {pdfalyzer-1.16.6 → pdfalyzer-1.16.8}/pdfalyzer/util/argument_parser.py +0 -0
  44. {pdfalyzer-1.16.6 → pdfalyzer-1.16.8}/pdfalyzer/util/debugging.py +0 -0
  45. {pdfalyzer-1.16.6 → pdfalyzer-1.16.8}/pdfalyzer/util/exceptions.py +0 -0
  46. {pdfalyzer-1.16.6 → pdfalyzer-1.16.8}/pdfalyzer/util/pdf_parser_manager.py +0 -0
  47. {pdfalyzer-1.16.6 → pdfalyzer-1.16.8}/pdfalyzer/yara_rules/__init.py__ +0 -0
  48. {pdfalyzer-1.16.6 → pdfalyzer-1.16.8}/pdfalyzer/yara_rules/lprat.static_file_analysis.yara +0 -0
@@ -1,5 +1,15 @@
1
1
  # NEXT RELEASE
2
2
 
3
+ ### 1.16.8
4
+ * Even more PDF related YARA rules
5
+ * Upgrade `anytree` to 2.13.0
6
+ * Upgrade `yaralyzer` to 1.0.4
7
+
8
+ ### 1.16.7
9
+ * Lots of new PDF related YARA rules
10
+ * Upgrade `yaralyzer` to 1.0.3
11
+ * Upgrade `pypdf` to 5.9.0
12
+
3
13
  ### 1.16.6
4
14
  * Add the creator hash to GIFTEDCROOK rule
5
15
 
@@ -1,28 +1,23 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pdfalyzer
3
- Version: 1.16.6
3
+ Version: 1.16.8
4
4
  Summary: A PDF analysis toolkit. Scan a PDF with relevant YARA rules, visualize its inner tree-like data structure in living color (lots of colors), force decodes of suspicious font binaries, and more.
5
5
  Home-page: https://github.com/michelcrypt4d4mus/pdfalyzer
6
6
  License: GPL-3.0-or-later
7
- Keywords: ascii art,binary,color,font,encoding,maldoc,malicious pdf,malware,malware analysis,pdf,pdfs,pdf analysis,threat assessment,visualization,yara
7
+ Keywords: ascii art,binary,color,cybersecurity,DFIR,encoding,font,infosec,maldoc,malicious pdf,malware,malware analysis,pdf,pdfs,pdf analysis,threat assessment,visualization,yara
8
8
  Author: Michel de Cryptadamus
9
9
  Author-email: michel@cryptadamus.com
10
- Requires-Python: >=3.9,<4.0
10
+ Requires-Python: >=3.9.2,<4.0.0
11
11
  Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
12
12
  Classifier: Programming Language :: Python :: 3
13
- Classifier: Programming Language :: Python :: 3.9
14
13
  Classifier: Programming Language :: Python :: 3.10
15
14
  Classifier: Programming Language :: Python :: 3.11
16
15
  Classifier: Topic :: Artistic Software
17
16
  Classifier: Topic :: Scientific/Engineering :: Visualization
18
17
  Classifier: Topic :: Security
19
- Requires-Dist: anytree (>=2.8,<3.0)
20
- Requires-Dist: chardet (>=5.0.0,<6.0.0)
21
- Requires-Dist: pypdf (>=5.0.1,<6.0.0)
22
- Requires-Dist: python-dotenv (>=0.21.0,<0.22.0)
23
- Requires-Dist: rich (>=12.5.1,<13.0.0)
24
- Requires-Dist: rich-argparse-plus (>=0.3.1,<0.4.0)
25
- Requires-Dist: yaralyzer (>=0.9.4,<0.10.0)
18
+ Requires-Dist: anytree (>=2.13,<3.0)
19
+ Requires-Dist: pypdf (>=5.9.0,<6.0.0)
20
+ Requires-Dist: yaralyzer (>=1.0.4,<2.0.0)
26
21
  Project-URL: Changelog, https://github.com/michelcrypt4d4mus/pdfalyzer/blob/master/CHANGELOG.md
27
22
  Project-URL: Documentation, https://github.com/michelcrypt4d4mus/pdfalyzer
28
23
  Project-URL: Repository, https://github.com/michelcrypt4d4mus/pdfalyzer
@@ -263,6 +258,7 @@ scripts/install_t1utils.sh
263
258
  * [Adobe Type 2 Charstring Format](https://adobe-type-tools.github.io/font-tech-notes/pdfs/5177.Type2.pdf) - Describes the newer Type 2 font operators which are also used in some multiple-master Type 1 fonts.
264
259
 
265
260
  ### Other Stuff
261
+ * [Didier Stevens's PDF tools](http://blog.didierstevens.com/programs/pdf-tools/)
266
262
  * [Didier Stevens's free book about malicious PDFs](https://blog.didierstevens.com/2010/09/26/free-malicious-pdf-analysis-e-book/) - The master of the malicious PDFs wrote a whole book about how to analyze them. It's an old book but the PDF spec was last changed in 2008 so it's still relevant.
267
263
  * [Analyzing Malicious PDFs Cheat Sheet](https://zeltser.com/media/docs/analyzing-malicious-document-files.pdf) - Like it says on the tin. If that link fails there's a copy [here in the repo](doc/analyzing-malicious-document-files.pdf).
268
264
  * [T1Utils Github Repo](https://github.com/kohler/t1utils) - Suite of tools for manipulating Type1 fonts.
@@ -233,6 +233,7 @@ scripts/install_t1utils.sh
233
233
  * [Adobe Type 2 Charstring Format](https://adobe-type-tools.github.io/font-tech-notes/pdfs/5177.Type2.pdf) - Describes the newer Type 2 font operators which are also used in some multiple-master Type 1 fonts.
234
234
 
235
235
  ### Other Stuff
236
+ * [Didier Stevens's PDF tools](http://blog.didierstevens.com/programs/pdf-tools/)
236
237
  * [Didier Stevens's free book about malicious PDFs](https://blog.didierstevens.com/2010/09/26/free-malicious-pdf-analysis-e-book/) - The master of the malicious PDFs wrote a whole book about how to analyze them. It's an old book but the PDF spec was last changed in 2008 so it's still relevant.
237
238
  * [Analyzing Malicious PDFs Cheat Sheet](https://zeltser.com/media/docs/analyzing-malicious-document-files.pdf) - Like it says on the tin. If that link fails there's a copy [here in the repo](doc/analyzing-malicious-document-files.pdf).
238
239
  * [T1Utils Github Repo](https://github.com/kohler/t1utils) - Suite of tools for manipulating Type1 fonts.
@@ -13,9 +13,11 @@ from pdfalyzer.config import PdfalyzerConfig
13
13
  YARA_RULES_DIR = files('pdfalyzer').joinpath('yara_rules')
14
14
 
15
15
  YARA_RULES_FILES = [
16
+ 'didier_stevens.yara',
16
17
  'lprat.static_file_analysis.yara',
17
18
  'PDF.yara',
18
19
  'PDF_binary_stream.yara',
20
+ 'pdf_malware.yara',
19
21
  ]
20
22
 
21
23
 
@@ -34,18 +36,20 @@ def _build_yaralyzer(scannable: Union[bytes, str], label: Optional[str] = None)
34
36
  with as_file(YARA_RULES_DIR.joinpath(YARA_RULES_FILES[0])) as yara0:
35
37
  with as_file(YARA_RULES_DIR.joinpath(YARA_RULES_FILES[1])) as yara1:
36
38
  with as_file(YARA_RULES_DIR.joinpath(YARA_RULES_FILES[2])) as yara2:
37
- # If there is a custom yara_rules argument file use that instead of the files in the yara_rules/ dir
38
- rules_paths = YaralyzerConfig.args.yara_rules_files or []
39
-
40
- if not YaralyzerConfig.args.no_default_yara_rules:
41
- rules_paths += [str(y) for y in [yara0, yara1, yara2]]
42
-
43
- try:
44
- return Yaralyzer.for_rules_files(rules_paths, scannable, label)
45
- except ValueError as e:
46
- # TODO: use YARA_FILE_DOES_NOT_EXIST_ERROR_MSG variable
47
- if "it doesn't exist" in str(e):
48
- print(str(e))
49
- exit(1)
50
- else:
51
- raise e
39
+ with as_file(YARA_RULES_DIR.joinpath(YARA_RULES_FILES[3])) as yara3:
40
+ with as_file(YARA_RULES_DIR.joinpath(YARA_RULES_FILES[4])) as yara4:
41
+ # If there is a custom yara_rules argument file use that instead of the files in the yara_rules/ dir
42
+ rules_paths = YaralyzerConfig.args.yara_rules_files or []
43
+
44
+ if not YaralyzerConfig.args.no_default_yara_rules:
45
+ rules_paths += [str(y) for y in [yara0, yara1, yara2, yara3, yara4]]
46
+
47
+ try:
48
+ return Yaralyzer.for_rules_files(rules_paths, scannable, label)
49
+ except ValueError as e:
50
+ # TODO: use YARA_FILE_DOES_NOT_EXIST_ERROR_MSG variable
51
+ if "it doesn't exist" in str(e):
52
+ print(str(e))
53
+ exit(1)
54
+ else:
55
+ raise e