active_stix 0.1.21
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.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.md +28 -0
- data/Rakefile +32 -0
- data/app/assets/config/active_stix_manifest.js +2 -0
- data/app/assets/javascripts/active_stix/application.js +15 -0
- data/app/assets/javascripts/active_stix/artifacts.js +2 -0
- data/app/assets/javascripts/active_stix/attack_patterns.js +2 -0
- data/app/assets/javascripts/active_stix/bcc_refs.js +2 -0
- data/app/assets/javascripts/active_stix/bundled_objects.js +2 -0
- data/app/assets/javascripts/active_stix/bundles.js +2 -0
- data/app/assets/javascripts/active_stix/campaigns.js +2 -0
- data/app/assets/javascripts/active_stix/course_of_actions.js +2 -0
- data/app/assets/javascripts/active_stix/cyber_observables.js +2 -0
- data/app/assets/javascripts/active_stix/email_messages.js +2 -0
- data/app/assets/javascripts/active_stix/external_references.js +2 -0
- data/app/assets/javascripts/active_stix/files.js +2 -0
- data/app/assets/javascripts/active_stix/identities.js +2 -0
- data/app/assets/javascripts/active_stix/indicator_labels.js +2 -0
- data/app/assets/javascripts/active_stix/indicators.js +2 -0
- data/app/assets/javascripts/active_stix/intrusion_sets.js +2 -0
- data/app/assets/javascripts/active_stix/kill_chain_phases.js +2 -0
- data/app/assets/javascripts/active_stix/kill_chains.js +2 -0
- data/app/assets/javascripts/active_stix/malwares.js +2 -0
- data/app/assets/javascripts/active_stix/marking_definitions.js +2 -0
- data/app/assets/javascripts/active_stix/observed_data.js +2 -0
- data/app/assets/javascripts/active_stix/open_vocabularies.js +2 -0
- data/app/assets/javascripts/active_stix/phases.js +2 -0
- data/app/assets/javascripts/active_stix/recipients.js +2 -0
- data/app/assets/javascripts/active_stix/relationships.js +2 -0
- data/app/assets/javascripts/active_stix/reports.js +2 -0
- data/app/assets/javascripts/active_stix/threat_actors.js +2 -0
- data/app/assets/javascripts/active_stix/tools.js +2 -0
- data/app/assets/javascripts/active_stix/urls.js +2 -0
- data/app/assets/javascripts/active_stix/users.js +2 -0
- data/app/assets/stylesheets/active_stix/application.css +15 -0
- data/app/assets/stylesheets/active_stix/artifacts.css +4 -0
- data/app/assets/stylesheets/active_stix/attack_patterns.css +4 -0
- data/app/assets/stylesheets/active_stix/bcc_refs.css +4 -0
- data/app/assets/stylesheets/active_stix/bundled_objects.css +4 -0
- data/app/assets/stylesheets/active_stix/bundles.css +4 -0
- data/app/assets/stylesheets/active_stix/campaigns.css +4 -0
- data/app/assets/stylesheets/active_stix/course_of_actions.css +4 -0
- data/app/assets/stylesheets/active_stix/cyber_observables.css +4 -0
- data/app/assets/stylesheets/active_stix/email_messages.css +4 -0
- data/app/assets/stylesheets/active_stix/external_references.css +4 -0
- data/app/assets/stylesheets/active_stix/files.css +4 -0
- data/app/assets/stylesheets/active_stix/identities.css +4 -0
- data/app/assets/stylesheets/active_stix/indicator_labels.css +4 -0
- data/app/assets/stylesheets/active_stix/indicators.css +4 -0
- data/app/assets/stylesheets/active_stix/intrusion_sets.css +4 -0
- data/app/assets/stylesheets/active_stix/kill_chain_phases.css +4 -0
- data/app/assets/stylesheets/active_stix/kill_chains.css +4 -0
- data/app/assets/stylesheets/active_stix/malwares.css +4 -0
- data/app/assets/stylesheets/active_stix/marking_definitions.css +4 -0
- data/app/assets/stylesheets/active_stix/observed_data.css +4 -0
- data/app/assets/stylesheets/active_stix/open_vocabularies.css +4 -0
- data/app/assets/stylesheets/active_stix/phases.css +4 -0
- data/app/assets/stylesheets/active_stix/recipients.css +4 -0
- data/app/assets/stylesheets/active_stix/relationships.css +4 -0
- data/app/assets/stylesheets/active_stix/reports.css +4 -0
- data/app/assets/stylesheets/active_stix/threat_actors.css +4 -0
- data/app/assets/stylesheets/active_stix/tools.css +4 -0
- data/app/assets/stylesheets/active_stix/urls.css +4 -0
- data/app/assets/stylesheets/active_stix/users.css +4 -0
- data/app/assets/stylesheets/scaffold.css +80 -0
- data/app/controllers/active_stix/application_controller.rb +5 -0
- data/app/controllers/active_stix/artifacts_controller.rb +62 -0
- data/app/controllers/active_stix/attack_patterns_controller.rb +27 -0
- data/app/controllers/active_stix/bcc_refs_controller.rb +62 -0
- data/app/controllers/active_stix/bundled_objects_controller.rb +62 -0
- data/app/controllers/active_stix/bundles_controller.rb +11 -0
- data/app/controllers/active_stix/campaigns_controller.rb +74 -0
- data/app/controllers/active_stix/course_of_actions_controller.rb +62 -0
- data/app/controllers/active_stix/cyber_observables_controller.rb +62 -0
- data/app/controllers/active_stix/email_addresses_controller.rb +74 -0
- data/app/controllers/active_stix/email_messages_controller.rb +26 -0
- data/app/controllers/active_stix/external_references_controller.rb +62 -0
- data/app/controllers/active_stix/files_controller.rb +74 -0
- data/app/controllers/active_stix/identities_controller.rb +128 -0
- data/app/controllers/active_stix/indicator_labels_controller.rb +62 -0
- data/app/controllers/active_stix/indicators_controller.rb +62 -0
- data/app/controllers/active_stix/intrusion_sets_controller.rb +62 -0
- data/app/controllers/active_stix/kill_chain_phases_controller.rb +62 -0
- data/app/controllers/active_stix/kill_chains_controller.rb +62 -0
- data/app/controllers/active_stix/malwares_controller.rb +62 -0
- data/app/controllers/active_stix/marking_definitions_controller.rb +62 -0
- data/app/controllers/active_stix/observed_data_controller.rb +62 -0
- data/app/controllers/active_stix/open_vocabularies_controller.rb +62 -0
- data/app/controllers/active_stix/phases_controller.rb +62 -0
- data/app/controllers/active_stix/recipients_controller.rb +62 -0
- data/app/controllers/active_stix/relationships_controller.rb +62 -0
- data/app/controllers/active_stix/reports_controller.rb +62 -0
- data/app/controllers/active_stix/threat_actors_controller.rb +75 -0
- data/app/controllers/active_stix/tools_controller.rb +62 -0
- data/app/controllers/active_stix/urls_controller.rb +62 -0
- data/app/controllers/active_stix/user_accounts_controller.rb +74 -0
- data/app/controllers/active_stix/users_controller.rb +62 -0
- data/app/helpers/active_stix/application_helper.rb +4 -0
- data/app/helpers/active_stix/artifacts_helper.rb +4 -0
- data/app/helpers/active_stix/attack_patterns_helper.rb +4 -0
- data/app/helpers/active_stix/bcc_refs_helper.rb +4 -0
- data/app/helpers/active_stix/bundled_objects_helper.rb +4 -0
- data/app/helpers/active_stix/bundles_helper.rb +4 -0
- data/app/helpers/active_stix/campaigns_helper.rb +4 -0
- data/app/helpers/active_stix/course_of_actions_helper.rb +4 -0
- data/app/helpers/active_stix/cyber_observables_helper.rb +4 -0
- data/app/helpers/active_stix/email_messages_helper.rb +4 -0
- data/app/helpers/active_stix/external_references_helper.rb +4 -0
- data/app/helpers/active_stix/files_helper.rb +4 -0
- data/app/helpers/active_stix/identities_helper.rb +4 -0
- data/app/helpers/active_stix/indicator_labels_helper.rb +4 -0
- data/app/helpers/active_stix/indicators_helper.rb +4 -0
- data/app/helpers/active_stix/intrusion_sets_helper.rb +4 -0
- data/app/helpers/active_stix/kill_chain_phases_helper.rb +4 -0
- data/app/helpers/active_stix/kill_chains_helper.rb +4 -0
- data/app/helpers/active_stix/malwares_helper.rb +4 -0
- data/app/helpers/active_stix/marking_definitions_helper.rb +4 -0
- data/app/helpers/active_stix/observed_data_helper.rb +4 -0
- data/app/helpers/active_stix/open_vocabularies_helper.rb +4 -0
- data/app/helpers/active_stix/phases_helper.rb +4 -0
- data/app/helpers/active_stix/recipients_helper.rb +4 -0
- data/app/helpers/active_stix/relationships_helper.rb +4 -0
- data/app/helpers/active_stix/reports_helper.rb +4 -0
- data/app/helpers/active_stix/threat_actors_helper.rb +4 -0
- data/app/helpers/active_stix/tools_helper.rb +4 -0
- data/app/helpers/active_stix/urls_helper.rb +4 -0
- data/app/helpers/active_stix/users_helper.rb +4 -0
- data/app/jobs/active_stix/application_job.rb +4 -0
- data/app/mailers/active_stix/application_mailer.rb +6 -0
- data/app/models/active_stix/application_record.rb +5 -0
- data/app/models/active_stix/artifact.rb +23 -0
- data/app/models/active_stix/attack_pattern.rb +150 -0
- data/app/models/active_stix/bcc_ref.rb +6 -0
- data/app/models/active_stix/bundle.rb +108 -0
- data/app/models/active_stix/bundled_object.rb +4 -0
- data/app/models/active_stix/campaign.rb +65 -0
- data/app/models/active_stix/cc_ref.rb +6 -0
- data/app/models/active_stix/course_of_action.rb +54 -0
- data/app/models/active_stix/cyber_observable.rb +4 -0
- data/app/models/active_stix/email_address.rb +27 -0
- data/app/models/active_stix/email_message.rb +339 -0
- data/app/models/active_stix/external_reference.rb +48 -0
- data/app/models/active_stix/file.rb +2 -0
- data/app/models/active_stix/identity.rb +141 -0
- data/app/models/active_stix/indicator.rb +58 -0
- data/app/models/active_stix/indicator_label.rb +4 -0
- data/app/models/active_stix/intrusion_set.rb +69 -0
- data/app/models/active_stix/kill_chain.rb +7 -0
- data/app/models/active_stix/kill_chain_phase.rb +6 -0
- data/app/models/active_stix/label.rb +17 -0
- data/app/models/active_stix/label_malware.rb +4 -0
- data/app/models/active_stix/label_report.rb +4 -0
- data/app/models/active_stix/label_tool.rb +4 -0
- data/app/models/active_stix/malware.rb +98 -0
- data/app/models/active_stix/marking_definition.rb +21 -0
- data/app/models/active_stix/markup.rb +6 -0
- data/app/models/active_stix/object_marking.rb +11 -0
- data/app/models/active_stix/observed_datum.rb +67 -0
- data/app/models/active_stix/open_vocabulary.rb +8 -0
- data/app/models/active_stix/phase.rb +41 -0
- data/app/models/active_stix/recipient.rb +4 -0
- data/app/models/active_stix/reference_item.rb +4 -0
- data/app/models/active_stix/relationship.rb +95 -0
- data/app/models/active_stix/report.rb +93 -0
- data/app/models/active_stix/report_object.rb +9 -0
- data/app/models/active_stix/threat_actor.rb +139 -0
- data/app/models/active_stix/to_ref.rb +6 -0
- data/app/models/active_stix/tool.rb +112 -0
- data/app/models/active_stix/url.rb +15 -0
- data/app/models/active_stix/user.rb +4 -0
- data/app/models/active_stix/user_account.rb +3 -0
- data/app/views/active_stix/artifacts/_form.html.erb +57 -0
- data/app/views/active_stix/artifacts/edit.html.erb +6 -0
- data/app/views/active_stix/artifacts/index.html.erb +41 -0
- data/app/views/active_stix/artifacts/new.html.erb +5 -0
- data/app/views/active_stix/artifacts/show.html.erb +44 -0
- data/app/views/active_stix/attack_patterns/_form.html.erb +37 -0
- data/app/views/active_stix/attack_patterns/edit.html.erb +2 -0
- data/app/views/active_stix/attack_patterns/index.html.erb +2 -0
- data/app/views/active_stix/attack_patterns/new.html.erb +2 -0
- data/app/views/active_stix/attack_patterns/show.html.erb +140 -0
- data/app/views/active_stix/bcc_refs/_form.html.erb +27 -0
- data/app/views/active_stix/bcc_refs/edit.html.erb +6 -0
- data/app/views/active_stix/bcc_refs/index.html.erb +29 -0
- data/app/views/active_stix/bcc_refs/new.html.erb +5 -0
- data/app/views/active_stix/bcc_refs/show.html.erb +14 -0
- data/app/views/active_stix/bundles/index.html.erb +1 -0
- data/app/views/active_stix/bundles/show.html.erb +7 -0
- data/app/views/active_stix/campaigns/_form.html.erb +42 -0
- data/app/views/active_stix/campaigns/_stix_campaign.json.jbuilder +2 -0
- data/app/views/active_stix/campaigns/edit.html.erb +6 -0
- data/app/views/active_stix/campaigns/index.html.erb +35 -0
- data/app/views/active_stix/campaigns/index.json.jbuilder +1 -0
- data/app/views/active_stix/campaigns/new.html.erb +5 -0
- data/app/views/active_stix/campaigns/show.html.erb +29 -0
- data/app/views/active_stix/campaigns/show.json.jbuilder +1 -0
- data/app/views/active_stix/email_messages/_form.html.erb +62 -0
- data/app/views/active_stix/email_messages/_stix_email_message.json.jbuilder +2 -0
- data/app/views/active_stix/email_messages/edit.html.erb +6 -0
- data/app/views/active_stix/email_messages/index.html.erb +43 -0
- data/app/views/active_stix/email_messages/index.json.jbuilder +1 -0
- data/app/views/active_stix/email_messages/new.html.erb +5 -0
- data/app/views/active_stix/email_messages/show.html.erb +165 -0
- data/app/views/active_stix/email_messages/show.json.jbuilder +1 -0
- data/app/views/active_stix/files/_form.html.erb +92 -0
- data/app/views/active_stix/files/_stix_file.json.jbuilder +2 -0
- data/app/views/active_stix/files/edit.html.erb +6 -0
- data/app/views/active_stix/files/index.html.erb +55 -0
- data/app/views/active_stix/files/index.json.jbuilder +1 -0
- data/app/views/active_stix/files/new.html.erb +5 -0
- data/app/views/active_stix/files/show.html.erb +79 -0
- data/app/views/active_stix/files/show.json.jbuilder +1 -0
- data/app/views/active_stix/identities/_form.html.erb +27 -0
- data/app/views/active_stix/identities/_individual.html.erb +100 -0
- data/app/views/active_stix/identities/_organization.html.erb +72 -0
- data/app/views/active_stix/identities/_received_email_messages.html.erb +27 -0
- data/app/views/active_stix/identities/_sent_email_messages.html.erb +27 -0
- data/app/views/active_stix/identities/_threat_icons.html.erb +3 -0
- data/app/views/active_stix/identities/edit.html.erb +2 -0
- data/app/views/active_stix/identities/index.html.erb +37 -0
- data/app/views/active_stix/identities/new.html.erb +5 -0
- data/app/views/active_stix/identities/show.html.erb +15 -0
- data/app/views/active_stix/layouts/active_stix/application.html.erb +16 -0
- data/app/views/active_stix/recipients/_form.html.erb +27 -0
- data/app/views/active_stix/recipients/edit.html.erb +6 -0
- data/app/views/active_stix/recipients/index.html.erb +29 -0
- data/app/views/active_stix/recipients/new.html.erb +5 -0
- data/app/views/active_stix/recipients/show.html.erb +14 -0
- data/app/views/active_stix/threat_actors/_form.html.erb +32 -0
- data/app/views/active_stix/threat_actors/_stix_threat_actor.json.jbuilder +2 -0
- data/app/views/active_stix/threat_actors/edit.html.erb +6 -0
- data/app/views/active_stix/threat_actors/flags.html.erb +184 -0
- data/app/views/active_stix/threat_actors/index.html.erb +26 -0
- data/app/views/active_stix/threat_actors/index.json.jbuilder +1 -0
- data/app/views/active_stix/threat_actors/new.html.erb +5 -0
- data/app/views/active_stix/threat_actors/show.html.erb +4 -0
- data/app/views/active_stix/threat_actors/show.json.jbuilder +1 -0
- data/app/views/layouts/active_stix/application.html.erb +16 -0
- data/config/routes.rb +39 -0
- data/db/migrate/20191204200025_create_active_stix_bundled_objects.rb +11 -0
- data/db/migrate/20191204213707_create_active_stix_bundles.rb +10 -0
- data/db/migrate/20191204213802_create_active_stix_campaigns.rb +15 -0
- data/db/migrate/20191204213926_create_active_stix_course_of_actions.rb +12 -0
- data/db/migrate/20191204214020_create_active_stix_cyber_observables.rb +11 -0
- data/db/migrate/20191204214955_create_active_stix_email_messages.rb +20 -0
- data/db/migrate/20191204215029_create_active_stix_external_references.rb +12 -0
- data/db/migrate/20191204215302_create_active_stix_files.rb +23 -0
- data/db/migrate/20191204215419_create_active_stix_identities.rb +13 -0
- data/db/migrate/20191204215542_create_active_stix_indicator_labels.rb +10 -0
- data/db/migrate/20191204215637_create_active_stix_indicators.rb +16 -0
- data/db/migrate/20191204215849_create_active_stix_intrusion_sets.rb +15 -0
- data/db/migrate/20191204215929_create_active_stix_kill_chain_phases.rb +10 -0
- data/db/migrate/20191204215951_create_active_stix_kill_chains.rb +9 -0
- data/db/migrate/20191204220149_create_active_stix_malwares.rb +12 -0
- data/db/migrate/20191204220539_create_active_stix_marking_definitions.rb +12 -0
- data/db/migrate/20191204220853_create_active_stix_observed_data.rb +12 -0
- data/db/migrate/20191204220917_create_active_stix_open_vocabularies.rb +9 -0
- data/db/migrate/20191204220952_create_active_stix_phases.rb +11 -0
- data/db/migrate/20191204221129_create_active_stix_recipients.rb +10 -0
- data/db/migrate/20191204221227_create_active_stix_relationships.rb +16 -0
- data/db/migrate/20191204221323_create_active_stix_report_objects.rb +11 -0
- data/db/migrate/20191204221359_create_active_stix_reports.rb +14 -0
- data/db/migrate/20191204221425_create_active_stix_threat_actors.rb +11 -0
- data/db/migrate/20191204221454_create_active_stix_tools.rb +12 -0
- data/db/migrate/20191204221639_create_active_stix_urls.rb +9 -0
- data/db/migrate/20191204221849_create_active_stix_users.rb +22 -0
- data/db/migrate/20191205182234_create_active_stix_bcc_refs.rb +10 -0
- data/db/migrate/20191205182255_create_active_stix_cc_refs.rb +10 -0
- data/db/migrate/20191205182316_create_active_stix_to_refs.rb +10 -0
- data/db/migrate/20191212203611_add_spec_version_to_bundles.rb +5 -0
- data/db/migrate/20191212215136_create_active_stix_attack_patterns.rb +12 -0
- data/db/migrate/20191212220222_create_active_stix_reference_items.rb +11 -0
- data/db/migrate/20191213135204_create_active_stix_labels.rb +10 -0
- data/db/migrate/20191213140951_create_active_stix_markups.rb +11 -0
- data/db/migrate/20191221210537_fix_observed_data.rb +6 -0
- data/db/migrate/20191221223602_create_active_stix_artifacts.rb +16 -0
- data/db/migrate/20191223075550_change_artifact_ref_to_string.rb +5 -0
- data/db/migrate/20191223154000_add_stix_id_to_email_messages.rb +5 -0
- data/db/migrate/20200114162245_add_labels_to_active_stix_identities.rb +5 -0
- data/db/migrate/20200404223006_add_aliases_to_tools.rb +5 -0
- data/db/migrate/20200404223047_add_aliases_to_attack_patterns.rb +5 -0
- data/db/migrate/20200404223158_add_aliases_to_malwares.rb +5 -0
- data/db/migrate/20200404223210_add_aliases_to_threat_actors.rb +5 -0
- data/lib/active_stix.rb +8 -0
- data/lib/active_stix/engine.rb +13 -0
- data/lib/active_stix/version.rb +3 -0
- data/lib/tasks/active_stix_tasks.rake +4 -0
- metadata +358 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
json.partial! "email_messages/email_message", email_message: @email_message
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
<%= form_with(model: file, local: true) do |form| %>
|
|
2
|
+
<% if file.errors.any? %>
|
|
3
|
+
<div id="error_explanation">
|
|
4
|
+
<h2><%= pluralize(file.errors.count, "error") %> prohibited this file from being saved:</h2>
|
|
5
|
+
|
|
6
|
+
<ul>
|
|
7
|
+
<% file.errors.full_messages.each do |message| %>
|
|
8
|
+
<li><%= message %></li>
|
|
9
|
+
<% end %>
|
|
10
|
+
</ul>
|
|
11
|
+
</div>
|
|
12
|
+
<% end %>
|
|
13
|
+
|
|
14
|
+
<div class="field">
|
|
15
|
+
<%= form.label :extensions %>
|
|
16
|
+
<%= form.text_field :extensions %>
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
<div class="field">
|
|
20
|
+
<%= form.label :hashes %>
|
|
21
|
+
<%= form.text_field :hashes %>
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
<div class="field">
|
|
25
|
+
<%= form.label :size %>
|
|
26
|
+
<%= form.text_field :size %>
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
<div class="field">
|
|
30
|
+
<%= form.label :name %>
|
|
31
|
+
<%= form.text_field :name %>
|
|
32
|
+
</div>
|
|
33
|
+
|
|
34
|
+
<div class="field">
|
|
35
|
+
<%= form.label :name_enc %>
|
|
36
|
+
<%= form.text_field :name_enc %>
|
|
37
|
+
</div>
|
|
38
|
+
|
|
39
|
+
<div class="field">
|
|
40
|
+
<%= form.label :magic_number_hex %>
|
|
41
|
+
<%= form.text_field :magic_number_hex %>
|
|
42
|
+
</div>
|
|
43
|
+
|
|
44
|
+
<div class="field">
|
|
45
|
+
<%= form.label :mime_type %>
|
|
46
|
+
<%= form.text_field :mime_type %>
|
|
47
|
+
</div>
|
|
48
|
+
|
|
49
|
+
<div class="field">
|
|
50
|
+
<%= form.label :created_file %>
|
|
51
|
+
<%= form.text_field :created_file %>
|
|
52
|
+
</div>
|
|
53
|
+
|
|
54
|
+
<div class="field">
|
|
55
|
+
<%= form.label :modified_file %>
|
|
56
|
+
<%= form.text_field :modified_file %>
|
|
57
|
+
</div>
|
|
58
|
+
|
|
59
|
+
<div class="field">
|
|
60
|
+
<%= form.label :accessed_file %>
|
|
61
|
+
<%= form.text_field :accessed_file %>
|
|
62
|
+
</div>
|
|
63
|
+
|
|
64
|
+
<div class="field">
|
|
65
|
+
<%= form.label :parent_directory_ref %>
|
|
66
|
+
<%= form.text_field :parent_directory_ref %>
|
|
67
|
+
</div>
|
|
68
|
+
|
|
69
|
+
<div class="field">
|
|
70
|
+
<%= form.label :is_encrypted %>
|
|
71
|
+
<%= form.text_field :is_encrypted %>
|
|
72
|
+
</div>
|
|
73
|
+
|
|
74
|
+
<div class="field">
|
|
75
|
+
<%= form.label :encryption_algorithm %>
|
|
76
|
+
<%= form.text_field :encryption_algorithm %>
|
|
77
|
+
</div>
|
|
78
|
+
|
|
79
|
+
<div class="field">
|
|
80
|
+
<%= form.label :decryption_key %>
|
|
81
|
+
<%= form.text_field :decryption_key %>
|
|
82
|
+
</div>
|
|
83
|
+
|
|
84
|
+
<div class="field">
|
|
85
|
+
<%= form.label :content_ref %>
|
|
86
|
+
<%= form.number_field :content_ref %>
|
|
87
|
+
</div>
|
|
88
|
+
|
|
89
|
+
<div class="actions">
|
|
90
|
+
<%= form.submit %>
|
|
91
|
+
</div>
|
|
92
|
+
<% end %>
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
json.extract! file, :id, :extensions, :hashes, :size, :name, :name_enc, :magic_number_hex, :mime_type, :created_file, :modified_file, :accessed_file, :parent_directory_ref, :is_encrypted, :encryption_algorithm, :decryption_key, :content_ref, :created_at, :updated_at
|
|
2
|
+
json.url file_url(file, format: :json)
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<p id="notice"><%= notice %></p>
|
|
2
|
+
|
|
3
|
+
<h1>Stix Files</h1>
|
|
4
|
+
|
|
5
|
+
<table>
|
|
6
|
+
<thead>
|
|
7
|
+
<tr>
|
|
8
|
+
<th>Extensions</th>
|
|
9
|
+
<th>Hashes</th>
|
|
10
|
+
<th>Size</th>
|
|
11
|
+
<th>Name</th>
|
|
12
|
+
<th>Name enc</th>
|
|
13
|
+
<th>Magic number hex</th>
|
|
14
|
+
<th>Mime type</th>
|
|
15
|
+
<th>Created file</th>
|
|
16
|
+
<th>Modified file</th>
|
|
17
|
+
<th>Accessed file</th>
|
|
18
|
+
<th>Parent directory ref</th>
|
|
19
|
+
<th>Is encrypted</th>
|
|
20
|
+
<th>Encryption algorithm</th>
|
|
21
|
+
<th>Decryption key</th>
|
|
22
|
+
<th>Content ref</th>
|
|
23
|
+
<th colspan="3"></th>
|
|
24
|
+
</tr>
|
|
25
|
+
</thead>
|
|
26
|
+
|
|
27
|
+
<tbody>
|
|
28
|
+
<% @files.each do |file| %>
|
|
29
|
+
<tr>
|
|
30
|
+
<td><%= file.extensions %></td>
|
|
31
|
+
<td><%= file.hashes %></td>
|
|
32
|
+
<td><%= file.size %></td>
|
|
33
|
+
<td><%= file.name %></td>
|
|
34
|
+
<td><%= file.name_enc %></td>
|
|
35
|
+
<td><%= file.magic_number_hex %></td>
|
|
36
|
+
<td><%= file.mime_type %></td>
|
|
37
|
+
<td><%= file.created_file %></td>
|
|
38
|
+
<td><%= file.modified_file %></td>
|
|
39
|
+
<td><%= file.accessed_file %></td>
|
|
40
|
+
<td><%= file.parent_directory_ref %></td>
|
|
41
|
+
<td><%= file.is_encrypted %></td>
|
|
42
|
+
<td><%= file.encryption_algorithm %></td>
|
|
43
|
+
<td><%= file.decryption_key %></td>
|
|
44
|
+
<td><%= file.content_ref %></td>
|
|
45
|
+
<td><%= link_to 'Show', file %></td>
|
|
46
|
+
<td><%= link_to 'Edit', edit_file_path(file) %></td>
|
|
47
|
+
<td><%= link_to 'Destroy', file, method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
|
48
|
+
</tr>
|
|
49
|
+
<% end %>
|
|
50
|
+
</tbody>
|
|
51
|
+
</table>
|
|
52
|
+
|
|
53
|
+
<br>
|
|
54
|
+
|
|
55
|
+
<%= link_to 'New Stix File', new_file_path %>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
json.array! @files, partial: "files/file", as: :file
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
<p id="notice"><%= notice %></p>
|
|
2
|
+
|
|
3
|
+
<p>
|
|
4
|
+
<strong>Extensions:</strong>
|
|
5
|
+
<%= @file.extensions %>
|
|
6
|
+
</p>
|
|
7
|
+
|
|
8
|
+
<p>
|
|
9
|
+
<strong>Hashes:</strong>
|
|
10
|
+
<%= @file.hashes %>
|
|
11
|
+
</p>
|
|
12
|
+
|
|
13
|
+
<p>
|
|
14
|
+
<strong>Size:</strong>
|
|
15
|
+
<%= @file.size %>
|
|
16
|
+
</p>
|
|
17
|
+
|
|
18
|
+
<p>
|
|
19
|
+
<strong>Name:</strong>
|
|
20
|
+
<%= @file.name %>
|
|
21
|
+
</p>
|
|
22
|
+
|
|
23
|
+
<p>
|
|
24
|
+
<strong>Name enc:</strong>
|
|
25
|
+
<%= @file.name_enc %>
|
|
26
|
+
</p>
|
|
27
|
+
|
|
28
|
+
<p>
|
|
29
|
+
<strong>Magic number hex:</strong>
|
|
30
|
+
<%= @file.magic_number_hex %>
|
|
31
|
+
</p>
|
|
32
|
+
|
|
33
|
+
<p>
|
|
34
|
+
<strong>Mime type:</strong>
|
|
35
|
+
<%= @file.mime_type %>
|
|
36
|
+
</p>
|
|
37
|
+
|
|
38
|
+
<p>
|
|
39
|
+
<strong>Created file:</strong>
|
|
40
|
+
<%= @file.created_file %>
|
|
41
|
+
</p>
|
|
42
|
+
|
|
43
|
+
<p>
|
|
44
|
+
<strong>Modified file:</strong>
|
|
45
|
+
<%= @file.modified_file %>
|
|
46
|
+
</p>
|
|
47
|
+
|
|
48
|
+
<p>
|
|
49
|
+
<strong>Accessed file:</strong>
|
|
50
|
+
<%= @file.accessed_file %>
|
|
51
|
+
</p>
|
|
52
|
+
|
|
53
|
+
<p>
|
|
54
|
+
<strong>Parent directory ref:</strong>
|
|
55
|
+
<%= @file.parent_directory_ref %>
|
|
56
|
+
</p>
|
|
57
|
+
|
|
58
|
+
<p>
|
|
59
|
+
<strong>Is encrypted:</strong>
|
|
60
|
+
<%= @file.is_encrypted %>
|
|
61
|
+
</p>
|
|
62
|
+
|
|
63
|
+
<p>
|
|
64
|
+
<strong>Encryption algorithm:</strong>
|
|
65
|
+
<%= @file.encryption_algorithm %>
|
|
66
|
+
</p>
|
|
67
|
+
|
|
68
|
+
<p>
|
|
69
|
+
<strong>Decryption key:</strong>
|
|
70
|
+
<%= @file.decryption_key %>
|
|
71
|
+
</p>
|
|
72
|
+
|
|
73
|
+
<p>
|
|
74
|
+
<strong>Content ref:</strong>
|
|
75
|
+
<%= @file.content_ref %>
|
|
76
|
+
</p>
|
|
77
|
+
|
|
78
|
+
<%= link_to 'Edit', edit_file_path(@file) %> |
|
|
79
|
+
<%= link_to 'Back', files_path %>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
json.partial! "files/file", file: @file
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<%= form_with(model: identity, local: true, :html=> {:multipart=>true}) do |form| %>
|
|
2
|
+
<% if identity.errors.any? %>
|
|
3
|
+
<div id="error_explanation">
|
|
4
|
+
<h2><%= pluralize(identity.errors.count, "error") %> prohibited this organization from being saved:</h2>
|
|
5
|
+
|
|
6
|
+
<ul>
|
|
7
|
+
<% identity.errors.full_messages.each do |message| %>
|
|
8
|
+
<li><%= message %></li>
|
|
9
|
+
<% end %>
|
|
10
|
+
</ul>
|
|
11
|
+
</div>
|
|
12
|
+
<% end %>
|
|
13
|
+
|
|
14
|
+
<div class="field">
|
|
15
|
+
<%= form.label :uploaded_file, 'Upload LDAP.' %><br/>
|
|
16
|
+
<%= form.file_field :uploaded_file %>
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
<div class="field">
|
|
20
|
+
<%= form.label :name %>
|
|
21
|
+
<%= form.text_field :name %>
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
<div class="actions">
|
|
25
|
+
<%= form.submit %>
|
|
26
|
+
</div>
|
|
27
|
+
<% end %>
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
<div class="row">
|
|
2
|
+
<div class="col-md-4 order-md-2 mb-4">
|
|
3
|
+
<h4 class="d-flex justify-content-between align-items-center mb-3">
|
|
4
|
+
<span class="text-muted">Messages</span>
|
|
5
|
+
<span class="badge badge-secondary badge-pill"><%= @identity.source_relationships.where(relationship_type: "employs").count %></span>
|
|
6
|
+
</h4>
|
|
7
|
+
<ul class="list-group mb-3">
|
|
8
|
+
<li class="list-group-item d-flex justify-content-between lh-condensed">
|
|
9
|
+
<div>
|
|
10
|
+
<h6 class="my-0">Email Addresses</h6>
|
|
11
|
+
<small class="text-muted">
|
|
12
|
+
<ul>
|
|
13
|
+
<% @identity.email_addresses.each do |address| %>
|
|
14
|
+
<li><%= address.value %></li>
|
|
15
|
+
<% end %>
|
|
16
|
+
</ul>
|
|
17
|
+
</small>
|
|
18
|
+
</div>
|
|
19
|
+
</li>
|
|
20
|
+
<li class="list-group-item d-flex justify-content-between lh-condensed">
|
|
21
|
+
<div>
|
|
22
|
+
<h6 class="my-0">Sent </h6>
|
|
23
|
+
<small class="text-muted">
|
|
24
|
+
<div><%= link_to "View", identity_sent_path(@identity) %></div>
|
|
25
|
+
</small>
|
|
26
|
+
</div>
|
|
27
|
+
<span class="text-muted"><%= link_to "download", identity_sent_corpus_path(@identity) %></span>
|
|
28
|
+
</li>
|
|
29
|
+
<li class="list-group-item d-flex justify-content-between lh-condensed">
|
|
30
|
+
<div>
|
|
31
|
+
<h6 class="my-0">Received</h6>
|
|
32
|
+
<small class="text-muted">
|
|
33
|
+
<div><%= link_to "view", identity_received_path(@identity) %></div>
|
|
34
|
+
</small>
|
|
35
|
+
</div>
|
|
36
|
+
<span class="text-muted"><%= link_to "download", identity_received_corpus_path(@identity) %></span>
|
|
37
|
+
</li>
|
|
38
|
+
<li class="list-group-item d-flex justify-content-between lh-condensed">
|
|
39
|
+
<div>
|
|
40
|
+
<h6 class="my-0">Employers</h6>
|
|
41
|
+
<ul>
|
|
42
|
+
<div>
|
|
43
|
+
<% @identity.employers.each do |employer| %>
|
|
44
|
+
<li>
|
|
45
|
+
<%= link_to employer.name, employer %>
|
|
46
|
+
<%= render partial: 'threat_icons', locals: {identity: employer} %>
|
|
47
|
+
</li>
|
|
48
|
+
<% end %>
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
<%= form_tag(identity_employment_path(@identity)) do %>
|
|
52
|
+
<%= select_tag(:organization_id, options_for_select(ActiveStix::Identity.organizations.order("trim(lower(name)) ASC").all.map {|org| [org.name, org.id,]})) %>
|
|
53
|
+
<%= submit_tag "employ", :name => nil %>
|
|
54
|
+
<% end %>
|
|
55
|
+
|
|
56
|
+
</div>
|
|
57
|
+
</ul>
|
|
58
|
+
</div>
|
|
59
|
+
</li>
|
|
60
|
+
<li class="list-group-item d-flex justify-content-between lh-condensed">
|
|
61
|
+
<div>
|
|
62
|
+
<label class="switch switch-primary">
|
|
63
|
+
<%= form_with(model: @identity, local: true, class: 'trusted_identity_form') do |form| %>
|
|
64
|
+
<div class="custom-control custom-switch">
|
|
65
|
+
<%= form.check_box :known_person, class: "custom-control-input", id: "customSwitch1" %>
|
|
66
|
+
<label class="custom-control-label" for="customSwitch1">Known Person</label>
|
|
67
|
+
</div>
|
|
68
|
+
<% end %>
|
|
69
|
+
<span></span>
|
|
70
|
+
</label>
|
|
71
|
+
</div>
|
|
72
|
+
</li>
|
|
73
|
+
</ul>
|
|
74
|
+
<li class="list-group-item d-flex justify-content-between lh-condensed">
|
|
75
|
+
<div>
|
|
76
|
+
<h6 class="my-0">Contact Information</h6>
|
|
77
|
+
<label class="switch switch-primary">
|
|
78
|
+
<%= form_with(model: @identity, local: true, class: 'trusted_identity_form') do |form| %>
|
|
79
|
+
<div class="field">
|
|
80
|
+
<%= form.label :contact_information %>
|
|
81
|
+
<%= form.text_field :contact_information %>
|
|
82
|
+
</div>
|
|
83
|
+
<% end %>
|
|
84
|
+
<span></span>
|
|
85
|
+
</label>
|
|
86
|
+
</div>
|
|
87
|
+
</li>
|
|
88
|
+
</ul>
|
|
89
|
+
|
|
90
|
+
</div>
|
|
91
|
+
<div class="col-md-8 order-md-1">
|
|
92
|
+
<h4 class="mb-3"><%= @mailbox %> Messages</h4>
|
|
93
|
+
<% if @sent_email_messages %>
|
|
94
|
+
<%= render "sent_email_messages" %>
|
|
95
|
+
<% end %>
|
|
96
|
+
<% if @received_email_messages %>
|
|
97
|
+
<%= render "received_email_messages" %>
|
|
98
|
+
<% end %>
|
|
99
|
+
</div>
|
|
100
|
+
</div>
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
<div class="row">
|
|
2
|
+
<div class="col-md-4 order-md-2 mb-4">
|
|
3
|
+
<h4 class="d-flex justify-content-between align-items-center mb-3">
|
|
4
|
+
<span class="text-muted">Associated Groups</span>
|
|
5
|
+
<span class="badge badge-secondary badge-pill"><%= @threat_groups.count %></span>
|
|
6
|
+
</h4>
|
|
7
|
+
<ul class="list-group mb-3">
|
|
8
|
+
<% @threat_groups.each do |group| %>
|
|
9
|
+
<li class="list-group-item d-flex justify-content-between lh-condensed">
|
|
10
|
+
<div>
|
|
11
|
+
<h6 class="my-0"><%= link_to group.name, group %></h6>
|
|
12
|
+
<small class="text-muted">
|
|
13
|
+
<div><%= group.description %></div>
|
|
14
|
+
</small>
|
|
15
|
+
</div>
|
|
16
|
+
</li>
|
|
17
|
+
<% end %>
|
|
18
|
+
<li class="list-group-item d-flex justify-content-between lh-condensed">
|
|
19
|
+
<div>
|
|
20
|
+
<h6 class="my-0">Threat Actors</h6>
|
|
21
|
+
<div>
|
|
22
|
+
<%= form_tag(identity_attribution_path(@identity)) do %>
|
|
23
|
+
<%= select_tag(:threat_actor_id,
|
|
24
|
+
options_for_select(ActiveStix::ThreatActor.order("trim(lower(name)) ASC").all.map {|group| [group.name, group.id,]}),
|
|
25
|
+
{:include_blank => 'Select Threat Actor Group...'}) %>
|
|
26
|
+
<%= submit_tag "Attribute", :name => nil %>
|
|
27
|
+
<% end %>
|
|
28
|
+
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
</li>
|
|
32
|
+
</ul>
|
|
33
|
+
|
|
34
|
+
<h4 class="d-flex justify-content-between align-items-center mb-3">
|
|
35
|
+
<span class="text-muted">Targeted By</span>
|
|
36
|
+
<span class="badge badge-secondary badge-pill"><%= @attack_patterns.count %></span>
|
|
37
|
+
</h4>
|
|
38
|
+
<ul class="list-group mb-3">
|
|
39
|
+
<% @attack_patterns.each do |attack_pattern| %>
|
|
40
|
+
<li class="list-group-item d-flex justify-content-between lh-condensed">
|
|
41
|
+
<div>
|
|
42
|
+
<h6 class="my-0"><%= link_to attack_pattern.name, attack_pattern %></h6>
|
|
43
|
+
<small class="text-muted">
|
|
44
|
+
<div><%= attack_pattern.description %></div>
|
|
45
|
+
</small>
|
|
46
|
+
</div>
|
|
47
|
+
</li>
|
|
48
|
+
<% end %>
|
|
49
|
+
</ul>
|
|
50
|
+
|
|
51
|
+
</div>
|
|
52
|
+
<div class="col-md-8 order-md-1">
|
|
53
|
+
<h4 class="mb-3">Employees</h4>
|
|
54
|
+
|
|
55
|
+
<table class="table-striped">
|
|
56
|
+
<thead>
|
|
57
|
+
<th>Name</th>
|
|
58
|
+
</thead>
|
|
59
|
+
|
|
60
|
+
<tbody>
|
|
61
|
+
<% @employment_records.each do |employment| %>
|
|
62
|
+
<tr>
|
|
63
|
+
<td><%= link_to employment.target.name, employment.target if employment.target %></td>
|
|
64
|
+
</tr>
|
|
65
|
+
<% end %>
|
|
66
|
+
</tbody>
|
|
67
|
+
</table>
|
|
68
|
+
<%= paginate @employment_records %>
|
|
69
|
+
<br>
|
|
70
|
+
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|