txt2stix 1.0.1.post3__tar.gz → 1.0.3__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.
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/PKG-INFO +4 -3
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/README.md +3 -2
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/includes/lookups/_generate_lookups.py +2 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/pyproject.toml +1 -1
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/requirements.txt +1 -1
- txt2stix-1.0.3/tests/data/manually_generated_reports/attack_navigator_demo.txt +9 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/manual-tests/cases-standard-tests.md +57 -0
- txt2stix-1.0.3/tests/src/test_attack_flow.py +744 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/src/test_bundler.py +1 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/src/test_main.py +15 -1
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/src/test_run_txt2stix.py +33 -9
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/ai_extractor/base.py +17 -13
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/ai_extractor/prompts.py +97 -29
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/ai_extractor/utils.py +9 -2
- txt2stix-1.0.3/txt2stix/attack_flow.py +222 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/bundler.py +2 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/retriever.py +9 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/txt2stix.py +32 -12
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/utils.py +1 -0
- txt2stix-1.0.1.post3/tests/src/test_attack_flow.py +0 -135
- txt2stix-1.0.1.post3/txt2stix/attack_flow.py +0 -101
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/.env.example +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/.env.markdown +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/.github/workflows/create-release.yml +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/.github/workflows/run-tests.yml +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/.gitignore +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/LICENSE +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/docs/README.md +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/docs/stix-mapping.md +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/docs/txt2stix.png +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/includes/__init__.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/includes/extractions/ai/config.yaml +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/includes/extractions/lookup/config.yaml +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/includes/extractions/pattern/config.yaml +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/includes/helpers/mimetype_filename_extension_list.csv +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/includes/helpers/stix_relationship_types.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/includes/helpers/tlds.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/includes/helpers/windows_registry_key_prefix.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/includes/lookups/_README.md +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/includes/lookups/attack_pattern.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/includes/lookups/campaign.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/includes/lookups/country_iso3166_alpha2.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/includes/lookups/course_of_action.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/includes/lookups/disarm_id_v1_5.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/includes/lookups/disarm_name_v1_5.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/includes/lookups/extensions.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/includes/lookups/identity.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/includes/lookups/infrastructure.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/includes/lookups/intrusion_set.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/includes/lookups/malware.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/includes/lookups/mitre_atlas_id_v4_5_2.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/includes/lookups/mitre_atlas_name_v4_5_2.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/includes/lookups/mitre_attack_enterprise_aliases_v16_0.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/includes/lookups/mitre_attack_enterprise_id_v16_0.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/includes/lookups/mitre_attack_enterprise_name_v16_0.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/includes/lookups/mitre_attack_ics_aliases_v16_0.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/includes/lookups/mitre_attack_ics_id_v16_0.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/includes/lookups/mitre_attack_ics_name_v16_0.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/includes/lookups/mitre_attack_mobile_aliases_v16_0.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/includes/lookups/mitre_attack_mobile_id_v16_0.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/includes/lookups/mitre_attack_mobile_name_v16_0.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/includes/lookups/mitre_capec_id_v3_9.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/includes/lookups/mitre_capec_name_v3_9.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/includes/lookups/mitre_cwe_id_v4_15.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/includes/lookups/mitre_cwe_name_v4_15.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/includes/lookups/threat_actor.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/includes/lookups/tld.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/includes/lookups/tool.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/includes/tests/test_cases.yaml +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/README.md +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/ai_country.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/ai_mitre_attack_enterprise.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/ai_mitre_attack_ics.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/ai_mitre_attack_mobile.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/ai_mitre_capec.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/ai_mitre_cwe.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/all_cases.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_autonomous_system_number.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_bank_card_all.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_bank_card_amex.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_bank_card_diners.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_bank_card_discover.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_bank_card_jcb.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_bank_card_mastercard.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_bank_card_union_pay.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_bank_card_visa.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_country_alpha2.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_cpe_uri.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_cryptocurrency_btc_transaction.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_cryptocurrency_btc_wallet.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_cryptocurrency_eth_transaction.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_cryptocurrency_eth_wallet.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_cryptocurrency_xmr_transaction.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_cryptocurrency_xmr_wallet.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_cve_id.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_directory_unix.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_directory_unix_file.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_directory_windows.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_directory_windows_with_file.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_disarm.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_disarm_name.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_domain_name_only.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_domain_name_subdomain.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_email_address.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_file_hash_md5.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_file_hash_sha_1.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_file_hash_sha_224.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_file_hash_sha_256.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_file_hash_sha_384.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_file_hash_sha_512.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_file_name.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_host_name.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_host_name_file.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_host_name_path.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_host_name_subdomain.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_host_name_url.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_iban_number.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_ipv4_address_cidr.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_ipv4_address_only.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_ipv4_address_port.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_ipv6_address_cidr.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_ipv6_address_only.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_ipv6_address_port.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_mac_address.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_mitre_atlas.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_mitre_atlas_name.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_mitre_attack_enterprise.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_mitre_attack_enterprise_aliases.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_mitre_attack_enterprise_name.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_mitre_attack_ics.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_mitre_attack_ics_aliases.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_mitre_attack_ics_name.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_mitre_attack_mobile.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_mitre_attack_mobile_aliases.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_mitre_attack_mobile_name.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_mitre_capec.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_mitre_capec_name.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_mitre_cwe.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_mitre_cwe_name.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_phone_number.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_url.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_url_file.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_url_path.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_user_agent.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/generic_windows_registry_key.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/lookup_attack_pattern.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/lookup_campaign.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/lookup_course_of_action.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/lookup_identity.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/lookup_infrastructure.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/lookup_intrusion_set.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/lookup_malware.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/lookup_threat_actor.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/extraction_types/lookup_tool.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/manually_generated_reports/attack_flow_demo.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/manually_generated_reports/basic_relationship.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/manually_generated_reports/char_length_too_long.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/manually_generated_reports/descriptive_for_ai_relationships_1.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/manually_generated_reports/disarm_demo.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/manually_generated_reports/embedded_img_ignore.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/manually_generated_reports/embedded_link_ignore.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/manually_generated_reports/ip1.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/manually_generated_reports/ip2.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/manually_generated_reports/known_whitelist_match.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/manually_generated_reports/mitre_attack_enterprise_ai_demo.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/manually_generated_reports/mitre_attack_enterprise_lookup_demo.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/manually_generated_reports/mixed_extractions.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/manually_generated_reports/not_security_content.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/manually_generated_reports/test_ai_hash_error_with_stix2_lib.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/manually_generated_reports/test_aliases.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/manually_generated_reports/test_extraction_boundary.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/manually_generated_reports/test_extraction_escapes.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/real_intel_reports/APT28-Center-of-Storm-2017.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/real_intel_reports/Bitdefender-Labs-Report-X-creat6958-en-EN.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/real_intel_reports/FireEyeAPT39.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/real_intel_reports/France_CERT_APT31_Pakdoor_TLPWHITE.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/real_intel_reports/Group-IB_Ransomware_Uncovered_whitepaper_eng.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/real_intel_reports/JOINT_CSA_HUNTING_RU_INTEL_SNAKE_MALWARE_20230509.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/real_intel_reports/TA22-0126-QAKBOT-analysis-TLP-GREEN.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/real_intel_reports/dinners_card.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/real_intel_reports/mandiant-apt1.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/data/real_intel_reports/mykings_report_final.txt +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/manual-tests/cases-ai-relationships.md +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/manual-tests/cases-extraction-type-ai.md +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/manual-tests/cases-extraction-type-lookup.md +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/manual-tests/cases-extraction-type-pattern.md +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/scripts/generate_simple_extraction_test_cases_txt_files.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/src/__init__.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/src/test_extractors.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/src/test_indicator.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/src/test_lookups.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/src/test_utils.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/tests/src/utils.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/__init__.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/ai_extractor/__init__.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/ai_extractor/anthropic.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/ai_extractor/deepseek.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/ai_extractor/gemini.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/ai_extractor/openai.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/ai_extractor/openrouter.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/common.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/extractions.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/indicator.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/lookups.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/pattern/__init__.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/pattern/extractors/__init__.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/pattern/extractors/base_extractor.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/pattern/extractors/card/README.md +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/pattern/extractors/card/__init__.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/pattern/extractors/card/amex_card_extractor.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/pattern/extractors/card/diners_card_extractor.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/pattern/extractors/card/discover_card_extractor.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/pattern/extractors/card/jcb_card_extractor.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/pattern/extractors/card/master_card_extractor.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/pattern/extractors/card/union_card_extractor.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/pattern/extractors/card/visa_card_extractor.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/pattern/extractors/crypto/__init__.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/pattern/extractors/crypto/btc_extractor.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/pattern/extractors/directory/__init__.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/pattern/extractors/directory/unix_directory_extractor.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/pattern/extractors/directory/unix_file_path_extractor.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/pattern/extractors/directory/windows_directory_path_extractor.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/pattern/extractors/directory/windows_file_path_extractor.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/pattern/extractors/domain/__init__.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/pattern/extractors/domain/domain_extractor.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/pattern/extractors/domain/hostname_extractor.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/pattern/extractors/domain/sub_domain_extractor.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/pattern/extractors/hashes/__init__.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/pattern/extractors/hashes/md5_extractor.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/pattern/extractors/hashes/sha1_extractor.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/pattern/extractors/hashes/sha224_extractor.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/pattern/extractors/hashes/sha2_256_exactor.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/pattern/extractors/hashes/sha2_512_exactor.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/pattern/extractors/hashes/sha3_256_exactor.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/pattern/extractors/hashes/sha3_512_exactor.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/pattern/extractors/helper.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/pattern/extractors/ip/__init__.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/pattern/extractors/ip/ipv4_cidr_extractor.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/pattern/extractors/ip/ipv4_extractor.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/pattern/extractors/ip/ipv4_port_extractor.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/pattern/extractors/ip/ipv6_cidr_extractor.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/pattern/extractors/ip/ipv6_extractor.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/pattern/extractors/ip/ipv6_port_extractor.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/pattern/extractors/others/__init__.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/pattern/extractors/others/asn_extractor.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/pattern/extractors/others/cpe_extractor.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/pattern/extractors/others/cve_extractor.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/pattern/extractors/others/email_extractor.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/pattern/extractors/others/filename_extractor.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/pattern/extractors/others/iban_extractor.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/pattern/extractors/others/mac_address_extractor.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/pattern/extractors/others/phonenumber_extractor.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/pattern/extractors/others/user_agent_extractor.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/pattern/extractors/others/windows_registry_key_extractor.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/pattern/extractors/url/__init__.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/pattern/extractors/url/url_extractor.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/pattern/extractors/url/url_file_extractor.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/pattern/extractors/url/url_path_extractor.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix/stix.py +0 -0
- {txt2stix-1.0.1.post3 → txt2stix-1.0.3}/txt2stix.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: txt2stix
|
3
|
-
Version: 1.0.
|
3
|
+
Version: 1.0.3
|
4
4
|
Summary: txt2stix is a Python script that is designed to identify and extract IoCs and TTPs from text files, identify the relationships between them, convert them to STIX 2.1 objects, and output as a STIX 2.1 bundle.
|
5
5
|
Project-URL: Homepage, https://github.com/muchdogesec/txt2stix
|
6
6
|
Project-URL: Issues, https://github.com/muchdogesec/txt2stix/issues
|
@@ -171,8 +171,9 @@ If any AI extractions, or AI relationship mode is set, you must set the followin
|
|
171
171
|
#### Other AI related settings
|
172
172
|
|
173
173
|
* `--ai_content_check_provider` (`model:provider`, required if passed): Passing this flag will get the AI to try and classify the text in the input to 1) determine if it is talking about threat intelligence, and 2) what type of threat intelligence it is talking about. For context, we use this to filter out non-threat intel posts in Obstracts and Stixify. You pass `provider:model` with this flag to determine the AI model you wish to use to perform the check. It will also create a summary of the content passed (and store this into a STIX Note).
|
174
|
-
* `--ai_extract_if_no_incidence` (boolean, default `true`) if content check decides the report is not related to cyber security intelligence (e.g. vendor marketing), then you can use this setting to decide wether or not script should proceed. Setting to `false` will stop processing. It is designed to save AI tokens processing unknown content at scale in an automated way.
|
175
|
-
* `--ai_create_attack_flow` (boolean): passing this flag will also prompt the AI model (the same entered for `--ai_settings_relationships`) to generate an [Attack Flow](https://center-for-threat-informed-defense.github.io/attack-flow/) for the MITRE ATT&CK extractions to define the logical order in which they are being described. You must pass `--ai_settings_relationships` for this to work.
|
174
|
+
* `--ai_extract_if_no_incidence` (boolean, default `true`, will only work if `ai_content_check_provider` set) if content check decides the report is not related to cyber security intelligence (e.g. vendor marketing), then you can use this setting to decide wether or not script should proceed. Setting to `false` will stop processing. It is designed to save AI tokens processing unknown content at scale in an automated way.
|
175
|
+
* `--ai_create_attack_flow` (boolean): passing this flag will also prompt the AI model (the same entered for `--ai_settings_relationships`, default `false`) to generate an [Attack Flow](https://center-for-threat-informed-defense.github.io/attack-flow/) for the MITRE ATT&CK extractions to define the logical order in which they are being described. You must pass `--ai_settings_relationships` for this to work.
|
176
|
+
* `--ai_create_attack_navigator_layer` (boolean, default `false`): passing this flag will generate [MITRE ATT&CK Navigator layers](https://mitre-attack.github.io/attack-navigator/) for MITRE ATT&CK extractions. For each ATT&CK domain (Enterprise, ICS, Mobile) txt2stix will generate a layer. You must pass `--ai_settings_relationships` for this to work because the AI is tasked with linking extracted Techniques to the correct Tactic. Known issues with `openai:gpt-3.5` (avoid using this model if possible when using ATT&CK Navigator).
|
176
177
|
|
177
178
|
## Adding new extractions
|
178
179
|
|
@@ -127,8 +127,9 @@ If any AI extractions, or AI relationship mode is set, you must set the followin
|
|
127
127
|
#### Other AI related settings
|
128
128
|
|
129
129
|
* `--ai_content_check_provider` (`model:provider`, required if passed): Passing this flag will get the AI to try and classify the text in the input to 1) determine if it is talking about threat intelligence, and 2) what type of threat intelligence it is talking about. For context, we use this to filter out non-threat intel posts in Obstracts and Stixify. You pass `provider:model` with this flag to determine the AI model you wish to use to perform the check. It will also create a summary of the content passed (and store this into a STIX Note).
|
130
|
-
* `--ai_extract_if_no_incidence` (boolean, default `true`) if content check decides the report is not related to cyber security intelligence (e.g. vendor marketing), then you can use this setting to decide wether or not script should proceed. Setting to `false` will stop processing. It is designed to save AI tokens processing unknown content at scale in an automated way.
|
131
|
-
* `--ai_create_attack_flow` (boolean): passing this flag will also prompt the AI model (the same entered for `--ai_settings_relationships`) to generate an [Attack Flow](https://center-for-threat-informed-defense.github.io/attack-flow/) for the MITRE ATT&CK extractions to define the logical order in which they are being described. You must pass `--ai_settings_relationships` for this to work.
|
130
|
+
* `--ai_extract_if_no_incidence` (boolean, default `true`, will only work if `ai_content_check_provider` set) if content check decides the report is not related to cyber security intelligence (e.g. vendor marketing), then you can use this setting to decide wether or not script should proceed. Setting to `false` will stop processing. It is designed to save AI tokens processing unknown content at scale in an automated way.
|
131
|
+
* `--ai_create_attack_flow` (boolean): passing this flag will also prompt the AI model (the same entered for `--ai_settings_relationships`, default `false`) to generate an [Attack Flow](https://center-for-threat-informed-defense.github.io/attack-flow/) for the MITRE ATT&CK extractions to define the logical order in which they are being described. You must pass `--ai_settings_relationships` for this to work.
|
132
|
+
* `--ai_create_attack_navigator_layer` (boolean, default `false`): passing this flag will generate [MITRE ATT&CK Navigator layers](https://mitre-attack.github.io/attack-navigator/) for MITRE ATT&CK extractions. For each ATT&CK domain (Enterprise, ICS, Mobile) txt2stix will generate a layer. You must pass `--ai_settings_relationships` for this to work because the AI is tasked with linking extracted Techniques to the correct Tactic. Known issues with `openai:gpt-3.5` (avoid using this model if possible when using ATT&CK Navigator).
|
132
133
|
|
133
134
|
## Adding new extractions
|
134
135
|
|
@@ -1,3 +1,5 @@
|
|
1
|
+
## IMPORTANT: if using CTI Butler database locally in arangodb (i.e is not app.ctibutler.com in .env) you need to follow these steps to import the data needed to populate these lookups: https://github.com/muchdogesec/stix2arango/blob/main/utilities/arango_cti_processor/README.md (use `--database ctibutler_database` in the s2a script or change it in this script)
|
2
|
+
|
1
3
|
import os
|
2
4
|
from arango import ArangoClient
|
3
5
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
4
4
|
|
5
5
|
[project]
|
6
6
|
name = "txt2stix"
|
7
|
-
version = "1.0.
|
7
|
+
version = "1.0.3"
|
8
8
|
authors = [{ name = "dogesec" }]
|
9
9
|
maintainers = [{ name = "dogesec" }]
|
10
10
|
description = "txt2stix is a Python script that is designed to identify and extract IoCs and TTPs from text files, identify the relationships between them, convert them to STIX 2.1 objects, and output as a STIX 2.1 bundle."
|
@@ -433,6 +433,25 @@ python3 txt2stix.py \
|
|
433
433
|
--report_id ed6039d6-699c-44f0-9bf0-957d4d0ff99f
|
434
434
|
```
|
435
435
|
|
436
|
+
Will pass but still process, as `ai_content_check_provider` is omitted
|
437
|
+
|
438
|
+
```shell
|
439
|
+
python3 txt2stix.py \
|
440
|
+
--relationship_mode standard \
|
441
|
+
--input_file tests/data/extraction_types/all_cases.txt \
|
442
|
+
--name 'Test AI Content check failure' \
|
443
|
+
--tlp_level clear \
|
444
|
+
--confidence 100 \
|
445
|
+
--use_extractions ai_ipv4_address_only \
|
446
|
+
--ai_settings_extractions openai:gpt-4o \
|
447
|
+
--tlp_level clear \
|
448
|
+
--confidence 100 \
|
449
|
+
--use_extractions ai_ipv4_address_only \
|
450
|
+
--ai_settings_extractions openai:gpt-4o \
|
451
|
+
--ai_extract_if_no_incidence false \
|
452
|
+
--report_id 2880d1c1-0211-45b6-8565-befe596ff81f
|
453
|
+
```
|
454
|
+
|
436
455
|
### attack flow demo
|
437
456
|
|
438
457
|
no indicators
|
@@ -465,4 +484,42 @@ python3 txt2stix.py \
|
|
465
484
|
--ai_settings_extractions openai:gpt-4o \
|
466
485
|
--ai_create_attack_flow \
|
467
486
|
--report_id 3b160a8d-12dd-4e7c-aee8-5af6e371b425
|
487
|
+
```
|
488
|
+
|
489
|
+
### attack navigator demo
|
490
|
+
|
491
|
+
```shell
|
492
|
+
python3 txt2stix.py \
|
493
|
+
--relationship_mode ai \
|
494
|
+
--ai_settings_relationships openai:gpt-4o \
|
495
|
+
--input_file tests/data/manually_generated_reports/attack_navigator_demo.txt \
|
496
|
+
--name 'Test MITRE ATT&CK Navigator' \
|
497
|
+
--tlp_level clear \
|
498
|
+
--confidence 100 \
|
499
|
+
--use_extractions 'ai_mitre_attack_*' \
|
500
|
+
--ai_settings_extractions openai:gpt-4o \
|
501
|
+
--ai_create_attack_navigator_layer \
|
502
|
+
--ai_content_check_provider openai:gpt-4o \
|
503
|
+
--report_id b599f044-f22c-4e38-a2ed-3ef43442ccd2
|
504
|
+
```
|
505
|
+
|
506
|
+
`ai_content_check_provider` checked to ensure summary is used as description
|
507
|
+
|
508
|
+
### attack navigator and attack flow
|
509
|
+
|
510
|
+
used to check prompts only sent once
|
511
|
+
|
512
|
+
```shell
|
513
|
+
python3 txt2stix.py \
|
514
|
+
--relationship_mode ai \
|
515
|
+
--ai_settings_relationships openai:gpt-4o \
|
516
|
+
--input_file tests/data/manually_generated_reports/attack_navigator_demo.txt \
|
517
|
+
--name 'Test MITRE ATT&CK Flow and Navigator' \
|
518
|
+
--tlp_level clear \
|
519
|
+
--confidence 100 \
|
520
|
+
--use_extractions 'ai_mitre_attack_enterprise' \
|
521
|
+
--ai_settings_extractions openai:gpt-4o \
|
522
|
+
--ai_create_attack_flow \
|
523
|
+
--ai_create_attack_navigator_layer \
|
524
|
+
--report_id c0d48262-1d9f-42d2-aa29-f0cba1bfa2e0
|
468
525
|
```
|