Class: HybridAnalysis::Clients::Submit
- Defined in:
- lib/hybridanalysis/clients/submit.rb
Constant Summary
Constants inherited from Client
Client::BASE_URL, Client::DEFAULT_UA, Client::HOST, Client::VERSION
Instance Attribute Summary
Attributes inherited from Client
Instance Method Summary collapse
-
#dropped_file(id:, file_hash:, no_share_third_party: nil) ⇒ Hash
submit dropped file for analysis.
-
#file(file:, environment_id:, no_share_third_party: nil, allow_community_access: nil, no_hash_lookup: nil, action_script: nil, hybrid_analysis: nil, experimental_anti_evasion: nil, script_logging: nil, input_sample_tampering: nil, tor_enabled_analysis: nil, offline_analysis: nil, email: nil, comment: nil, custom_date_time: nil, custom_cmd_line: nil, custom_run_time: nil, submit_name: nil, document_password: nil, environment_variable: nil) ⇒ Hash
submit a file for analysis.
-
#hash_for_url(url) ⇒ Hash
determine a SHA256 that an online file or URL submission will have when being processed by the system.
-
#url(url:, environment_id:, no_share_third_party: nil, allow_community_access: nil, no_hash_lookup: nil, action_script: nil, hybrid_analysis: nil, experimental_anti_evasion: nil, script_logging: nil, input_sample_tampering: nil, tor_enabled_analysis: nil, offline_analysis: nil, email: nil, comment: nil, custom_date_time: nil, custom_cmd_line: nil, custom_run_time: nil, submit_name: nil, priority: nil, document_password: nil, environment_variable: nil) ⇒ Hash
submit a website’s url or url with file for analysis.
-
#url_for_analysis(url:, environment_id:, no_share_third_party: nil, no_hash_lookup: nil, action_script: nil, hybrid_analysis: nil, experimental_anti_evasion: nil, script_logging: nil, input_sample_tampering: nil, tor_enabled_analysis: nil, offline_analysis: nil, email: nil, comment: nil, custom_date_time: nil, custom_cmd_line: nil, custom_run_time: nil, environment_variable: nil) ⇒ Hash
submit a url for analysis.
-
#url_to_file(url:, environment_id:, no_share_third_party: nil, allow_community_access: nil, no_hash_lookup: nil, action_script: nil, hybrid_analysis: nil, experimental_anti_evasion: nil, script_logging: nil, input_sample_tampering: nil, tor_enabled_analysis: nil, offline_analysis: nil, email: nil, comment: nil, custom_date_time: nil, custom_cmd_line: nil, custom_run_time: nil, submit_name: nil, document_password: nil, environment_variable: nil) ⇒ Hash
submit a file by url for analysis.
Methods inherited from Client
Constructor Details
This class inherits a constructor from HybridAnalysis::Clients::Client
Instance Method Details
#dropped_file(id:, file_hash:, no_share_third_party: nil) ⇒ Hash
submit dropped file for analysis
232 233 234 235 |
# File 'lib/hybridanalysis/clients/submit.rb', line 232 def dropped_file(id:, file_hash:, no_share_third_party: nil) params = { id: id, file_hash: file_hash, no_share_third_party: no_share_third_party }.compact _post("/submit/dropped-file", params) { |json| json } end |
#file(file:, environment_id:, no_share_third_party: nil, allow_community_access: nil, no_hash_lookup: nil, action_script: nil, hybrid_analysis: nil, experimental_anti_evasion: nil, script_logging: nil, input_sample_tampering: nil, tor_enabled_analysis: nil, offline_analysis: nil, email: nil, comment: nil, custom_date_time: nil, custom_cmd_line: nil, custom_run_time: nil, submit_name: nil, document_password: nil, environment_variable: nil) ⇒ Hash
submit a file for analysis
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/hybridanalysis/clients/submit.rb', line 32 def file(file:, environment_id:, no_share_third_party: nil, allow_community_access: nil, no_hash_lookup: nil, action_script: nil, hybrid_analysis: nil, experimental_anti_evasion: nil, script_logging: nil, input_sample_tampering: nil, tor_enabled_analysis: nil, offline_analysis: nil, email: nil, comment: nil, custom_date_time: nil, custom_cmd_line: nil, custom_run_time: nil, submit_name: nil, document_password: nil, environment_variable: nil) name = File.basename(file) data = File.read(file) params = { environment_id: environment_id, no_share_third_party: no_share_third_party, allow_community_access: allow_community_access, no_hash_lookup: no_hash_lookup, action_script: action_script, hybrid_analysis: hybrid_analysis, experimental_anti_evasion: experimental_anti_evasion, script_logging: script_logging, input_sample_tampering: input_sample_tampering, tor_enabled_analysis: tor_enabled_analysis, offline_analysis: offline_analysis, email: email, omment: comment, custom_date_time: custom_date_time, custom_cmd_line: custom_cmd_line, custom_run_time: custom_run_time, submit_name: submit_name, document_password: document_password, environment_variable: environment_variable }.compact _post_with_file("/submit/file", file: data, filename: name, params: params) { |json| json } end |
#hash_for_url(url) ⇒ Hash
determine a SHA256 that an online file or URL submission will have when being processed by the system. Note: this is useful when looking up URL analysis
218 219 220 221 |
# File 'lib/hybridanalysis/clients/submit.rb', line 218 def hash_for_url(url) params = { url: url }.compact _post("/submit/hash-for-url", params) { |json| json } end |
#url(url:, environment_id:, no_share_third_party: nil, allow_community_access: nil, no_hash_lookup: nil, action_script: nil, hybrid_analysis: nil, experimental_anti_evasion: nil, script_logging: nil, input_sample_tampering: nil, tor_enabled_analysis: nil, offline_analysis: nil, email: nil, comment: nil, custom_date_time: nil, custom_cmd_line: nil, custom_run_time: nil, submit_name: nil, priority: nil, document_password: nil, environment_variable: nil) ⇒ Hash
submit a website’s url or url with file for analysis
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 |
# File 'lib/hybridanalysis/clients/submit.rb', line 86 def url(url:, environment_id:, no_share_third_party: nil, allow_community_access: nil, no_hash_lookup: nil, action_script: nil, hybrid_analysis: nil, experimental_anti_evasion: nil, script_logging: nil, input_sample_tampering: nil, tor_enabled_analysis: nil, offline_analysis: nil, email: nil, comment: nil, custom_date_time: nil, custom_cmd_line: nil, custom_run_time: nil, submit_name: nil, priority: nil, document_password: nil, environment_variable: nil) params = { url: url, environment_id: environment_id, no_share_third_party: no_share_third_party, allow_community_access: allow_community_access, no_hash_lookup: no_hash_lookup, action_script: action_script, hybrid_analysis: hybrid_analysis, experimental_anti_evasion: experimental_anti_evasion, script_logging: script_logging, input_sample_tampering: input_sample_tampering, tor_enabled_analysis: tor_enabled_analysis, offline_analysis: offline_analysis, email: email, comment: comment, custom_date_time: custom_date_time, custom_cmd_line: custom_cmd_line, custom_run_time: custom_run_time, submit_name: submit_name, priority: priority, document_password: document_password, environment_variable: environment_variable }.compact _post("/submit/url", params) { |json| json } end |
#url_for_analysis(url:, environment_id:, no_share_third_party: nil, no_hash_lookup: nil, action_script: nil, hybrid_analysis: nil, experimental_anti_evasion: nil, script_logging: nil, input_sample_tampering: nil, tor_enabled_analysis: nil, offline_analysis: nil, email: nil, comment: nil, custom_date_time: nil, custom_cmd_line: nil, custom_run_time: nil, environment_variable: nil) ⇒ Hash
submit a url for analysis
188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 |
# File 'lib/hybridanalysis/clients/submit.rb', line 188 def url_for_analysis(url:, environment_id:, no_share_third_party: nil, no_hash_lookup: nil, action_script: nil, hybrid_analysis: nil, experimental_anti_evasion: nil, script_logging: nil, input_sample_tampering: nil, tor_enabled_analysis: nil, offline_analysis: nil, email: nil, comment: nil, custom_date_time: nil, custom_cmd_line: nil, custom_run_time: nil, environment_variable: nil) params = { url: url, environment_id: environment_id, no_share_third_party: no_share_third_party, no_hash_lookup: no_hash_lookup, action_script: action_script, hybrid_analysis: hybrid_analysis, experimental_anti_evasion: experimental_anti_evasion, script_logging: script_logging, input_sample_tampering: input_sample_tampering, tor_enabled_analysis: tor_enabled_analysis, offline_analysis: offline_analysis, email: email, comment: comment, custom_date_time: custom_date_time, custom_cmd_line: custom_cmd_line, custom_run_time: custom_run_time, environment_variable: environment_variable }.compact _post("/submit/url-for-analysis", params) { |json| json } end |
#url_to_file(url:, environment_id:, no_share_third_party: nil, allow_community_access: nil, no_hash_lookup: nil, action_script: nil, hybrid_analysis: nil, experimental_anti_evasion: nil, script_logging: nil, input_sample_tampering: nil, tor_enabled_analysis: nil, offline_analysis: nil, email: nil, comment: nil, custom_date_time: nil, custom_cmd_line: nil, custom_run_time: nil, submit_name: nil, document_password: nil, environment_variable: nil) ⇒ Hash
submit a file by url for analysis
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 |
# File 'lib/hybridanalysis/clients/submit.rb', line 139 def url_to_file(url:, environment_id:, no_share_third_party: nil, allow_community_access: nil, no_hash_lookup: nil, action_script: nil, hybrid_analysis: nil, experimental_anti_evasion: nil, script_logging: nil, input_sample_tampering: nil, tor_enabled_analysis: nil, offline_analysis: nil, email: nil, comment: nil, custom_date_time: nil, custom_cmd_line: nil, custom_run_time: nil, submit_name: nil, document_password: nil, environment_variable: nil) params = { url: url, environment_id: environment_id, no_share_third_party: no_share_third_party, allow_community_access: allow_community_access, no_hash_lookup: no_hash_lookup, action_script: action_script, hybrid_analysis: hybrid_analysis, experimental_anti_evasion: experimental_anti_evasion, script_logging: script_logging, input_sample_tampering: input_sample_tampering, tor_enabled_analysis: tor_enabled_analysis, offline_analysis: offline_analysis, email: email, comment: comment, custom_date_time: custom_date_time, custom_cmd_line: custom_cmd_line, custom_run_time: custom_run_time, submit_name: submit_name, document_password: document_password, environment_variable: environment_variable }.compact _post("/submit/url-to-file", params) { |json| json } end |