-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathfile_detail.html
319 lines (301 loc) · 20.1 KB
/
file_detail.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
<div>
<div class="header_title text-right">
<h1>File Details</h1>
<h5 ng-show="current_file.name" class="text-muted">{{current_file.name | split}}</h5>
<p ng-show="current_file" style="font-size: 120%;">
<a href="/search.html?search_scope=submission&query=files.sha256:{{current_file.file_info.sha256}} OR results:{{current_file.file_info.sha256}}*" class="btn btn-default btn-sm" title="Related submissions"><span class="glyphicon glyphicon-tasks"><span class="hidden-sm hidden-xs"> </span></span><span class="hidden-sm hidden-xs">Related Submissions</span></a>
<a href="/api/v4/file/download/{{current_file.file_info.sha256}}/?name={{current_file.name}}&sid={{sid}}" class="btn btn-default btn-sm" title="Download file"><span class="glyphicon glyphicon-download-alt"><span class="hidden-sm hidden-xs"> </span></span><span class="hidden-sm hidden-xs">Download File</span></a>
<a href="file_viewer.html?sha256={{current_file.file_info.sha256}}" class="btn btn-default btn-sm" title="File viewer"><span class="glyphicon glyphicon-info-sign"><span class="hidden-sm hidden-xs"> </span></span><span class="hidden-sm hidden-xs">File Viewer</span></a>
<a ng-if="!user.read_only" class="btn btn-default btn-sm" title="Resubmit Dynamic" ng-click="resubmit_dynamic_async(current_file.file_info.sha256, sid, current_file.name)"><span class="glyphicon glyphicon-repeat"><span class="hidden-sm hidden-xs"> </span></span><span class="hidden-sm hidden-xs">Resubmit Dynamic</span></a>
</p>
</div>
<div ng-show="current_file">
<section class="header_title">
<div class="menuheader " data-toggle="collapse" data-target="#file_meta">
<span class="text-big">File identification</span>
</div>
<div id="file_meta" class="collapse in">
<div class="row">
<div class="col-xs-4 col-sm-3 col-md-2"><strong>MD5</strong></div>
<div class="col-xs-8 col-sm-9 col-md-10 text-fixed">
{{current_file.file_info.md5}}
</div>
</div>
<div class="row">
<div class="col-xs-4 col-sm-3 col-md-2"><strong>SHA1</strong></div>
<div class="col-xs-8 col-sm-9 col-md-10 text-fixed">
{{current_file.file_info.sha1}}
</div>
</div>
<div class="row">
<div class="col-xs-4 col-sm-3 col-md-2"><strong>SHA256</strong></div>
<div class="col-xs-8 col-sm-9 col-md-10 text-fixed">
{{current_file.file_info.sha256}}
</div>
</div>
<div class="row">
<div class="col-xs-4 col-sm-3 col-md-2"><strong>SSDEEP</strong></div>
<div class="col-xs-8 col-sm-9 col-md-10 text-fixed">
{{current_file.file_info.ssdeep}}
</div>
</div>
<div class="row">
<div class="col-xs-4 col-sm-3 col-md-2"><strong>Size</strong></div>
<div class="col-xs-8 col-sm-9 col-md-10">
{{current_file.file_info.size}} ({{current_file.file_info.size | fileSize}})
</div>
</div>
<div class="row">
<div class="col-xs-4 col-sm-3 col-md-2"><strong>Type</strong></div>
<div class="col-xs-8 col-sm-9 col-md-10">
{{current_file.file_info.type}}
</div>
</div>
<div class="row">
<div class="col-xs-4 col-sm-3 col-md-2"><strong>Mimetype</strong></div>
<div class="col-xs-8 col-sm-9 col-md-10">
{{current_file.file_info.mime}}
</div>
</div>
<div class="row">
<div class="col-xs-4 col-sm-3 col-md-2"><strong>Magic</strong></div>
<div class="col-xs-8 col-sm-9 col-md-10">
{{current_file.file_info.magic}}
</div>
</div>
<div class="row">
<div class="col-xs-4 col-sm-3 col-md-2"><strong>Entropy</strong></div>
<div class="col-xs-8 col-sm-9 col-md-10">
{{current_file.file_info.entropy}}
</div>
</div>
</div>
</section>
<section class="header_title">
<div class="menuheader " data-toggle="collapse" data-target="#sub_freq">
<span class="text-big">File Frequency</span>
</div>
<div id="sub_freq" class="collapse in">
<div class="row">
<div class="col-xs-4 col-sm-3 col-md-2"><strong>First seen</strong></div>
<div class="col-xs-8 col-sm-9 col-md-10">
{{current_file.file_info.seen.first | date:"yyyy-MM-dd HH:mm:ss"}}
</div>
</div>
<div class="row">
<div class="col-xs-4 col-sm-3 col-md-2"><strong>Last seen</strong></div>
<div class="col-xs-8 col-sm-9 col-md-10">
{{current_file.file_info.seen.last | date:"yyyy-MM-dd HH:mm:ss"}}
</div>
</div>
<div class="row">
<div class="col-xs-4 col-sm-3 col-md-2"><strong>Count</strong></div>
<div class="col-xs-8 col-sm-9 col-md-10">
{{current_file.file_info.seen.count}}
</div>
</div>
</div>
</section>
<section class="header_title" ng-if="current_file.metadata">
<div class="menuheader " data-toggle="collapse" data-target="#sub_meta">
<span class="text-big">Submissions Summary</span>
</div>
<div id="sub_meta" class="collapse in">
<div ng-repeat="(key, val) in current_file.metadata">
<div class="row">
<div class="col-xs-12 col-sm-3 col-md-2"><strong>{{key | titleCase}}</strong></div>
<div class="col-xs-12 col-sm-9 col-md-10">
<span class="label label-tag label-nolight" style="cursor: default;" ng-repeat="(meta_name, count) in val">{{count}}x {{meta_name}}</span>
</div>
</div>
</div>
</div>
</section>
<section class="header_title" ng-if="current_file.parents">
<div class="menuheader " data-toggle="collapse" data-target="#sub_parents">
<span class="text-big">Possible parent files</span><span ng-show="current_file.parents.length == 10" class="text-muted"> (Last 10)</span>
</div>
<div id="sub_parents" class="collapse in">
<div ng-repeat="parent in current_file.parents">
<a href="file_detail.html?sha256={{parent | getHashFromKey}}" class="compact_item"><span>{{parent | getHashFromKey}}</span><span class="text-muted"> :: </span><span class="text-muted text-tiny">[{{parent | getServiceFromKey}}]</span></a>
</div>
</div>
</section>
<section class="header_title" ng-if="current_file.childrens">
<div class="menuheader " data-toggle="collapse" data-target="#sub_childrens">
<span class="text-big">Children files</span>
</div>
<div id="sub_childrens" class="collapse in">
<div ng-repeat="child in current_file.childrens">
<a href="file_detail.html?sha256={{child.sha256}}" class="compact_item"><span>{{child.name}}</span><span class="text-muted"> :: </span><span class="text-muted text-tiny">[{{child.sha256}}]</span></a>
</div>
</div>
</section>
<section ng-if="obj_len(current_file.attack_matrix) != 0" class="header_title">
<div class="menuheader" data-toggle="collapse" data-target="#file_attack_matrix">
<span class="text-big">Att&ck Matrix</span>
<span class="indent"><input type="button" class="btn btn-xs btn-default text-tiny" ng-click="clear_selection();$event.stopPropagation();" value="Clear selection"/></span>
</div>
<div id="file_attack_matrix" class="collapse in">
<div class="row" ng-repeat="(category, attack_patterns) in current_file.attack_matrix | orderBy:category">
<div class="col-xs-12 col-sm-4 col-md-3"><strong>{{category}}</strong></div>
<div class="col-xs-12 col-sm-8 col-md-9">
<span id="file_{{item[0]}}_{{item[1]}}" class="label label-tag label-heur-{{item[2]}}" style="cursor: pointer;" ng-repeat="item in attack_patterns | orderBy:item[1]" ng-class="{'label-highlight': isHighlighted('attack_pattern', item[0])}" ng-click="trigger_highlight('attack_pattern', item[0]);" >{{item[1] | breakableStr }}<a href='/search.html?search_scope=result&query=result.sections.heuristic.attack.pattern:"{{uri_encode(item[1])}}"' class="search_tag clickable_color glyphicon glyphicon-search" ng-click="$event.stopPropagation();"></a></span>
</div>
</div>
</div>
</section>
<section ng-if="obj_len(current_file.heuristics) != 0 && (current_file.heuristics.info.length != 0 || current_file.heuristics.suspicious.length != 0 || current_file.heuristics.malicious.length != 0)" class="header_title">
<div class="menuheader" data-toggle="collapse" data-target="#heuristics">
<span class="text-big">Heuristics</span>
<span class="indent"><input type="button" class="btn btn-xs btn-default text-tiny" ng-click="clear_selection();$event.stopPropagation();" value="Clear selection"/></span>
</div>
<div id="heuristics" class="collapse in">
<div class="row" ng-repeat="(category, heuristics_list) in current_file.heuristics | orderBy:category">
<div class="col-xs-12 col-sm-4 col-md-3"><strong>{{category}}</strong></div>
<div class="col-xs-12 col-sm-8 col-md-9">
<span id="{{item[0]}}_{{item[1]}}" class="label label-tag label-heur-{{category}}" style="cursor: pointer;" ng-repeat="item in heuristics_list | orderBy:item[1]" ng-class="{'label-highlight': isHighlighted('heuristic', item[0])}" ng-click="trigger_highlight('heuristic', item[0]);" >{{item[1] | breakableStr }}<a href='/search.html?search_scope=result&query=result.sections.heuristic.name:"{{uri_encode(item[1])}}"' class="search_tag clickable_color glyphicon glyphicon-search" ng-click="$event.stopPropagation();"></a></span>
</div>
</div>
</div>
</section>
<section class="header_title">
<div class="menuheader " data-toggle="collapse" data-target="#file_tags">
<span class="text-big">Generated Tags</span>
<span class="indent"><input type="button" class="btn btn-xs btn-default text-tiny" ng-click="clear_selection();$event.stopPropagation();" value="Clear selection"/></span>
</div>
<div id="file_tags" class="collapse in">
<div class="row" ng-if="current_file.signatures.length != 0">
<div class="col-xs-12 col-sm-4 col-md-3"><strong>heuristic.signature</strong></div>
<div class="col-xs-12 col-sm-8 col-md-9">
<span id="file_heuristic.signature__{{value}}" class="label label-tag label-heur-{{value[1]}}" style="cursor: pointer;" ng-repeat="value in current_file.signatures | orderBy:value[0]" ng-class="{'label-highlight': isHighlighted('heuristic.signature', value[0])}" ng-click="trigger_highlight('heuristic.signature', value[0]);" >{{value[0] | breakableStr }}<a href='/search.html?search_scope=result&query=result.sections.heuristic.signature.name:"{{uri_encode(value[0])}}"' class="search_tag clickable_color glyphicon glyphicon-search" ng-click="$event.stopPropagation();"></a></span>
</div>
</div>
<div ng-if="obj_len(current_file.tags) != 0">
<div class="row" ng-repeat="(tagType, values) in current_file.tags | orderBy:tagType">
<div class="col-xs-12 col-sm-4 col-md-3"><strong>{{tagType}}</strong></div>
<div class="col-xs-12 col-sm-8 col-md-9">
<span id="file_{{tagType}}__{{value}}" class="label label-tag label-heur-{{value[1]}}" style="cursor: pointer;" ng-repeat="value in values | orderBy:value[0]" ng-class="{'label-highlight': isHighlighted(tagType, value[0])}" ng-click="trigger_highlight(tagType, value[0]);" >{{value[0] | breakableStr }}<a href='/search.html?search_scope=result&query=result.sections.tags.{{tagType}}:"{{uri_encode(value[0])}}"' class="search_tag clickable_color glyphicon glyphicon-search" ng-click="$event.stopPropagation();"></a></span>
</div>
</div>
</div>
<div ng-if="obj_len(current_file.tags) == 0 && current_file.signatures.length == 0">
<span class="text-muted">No tags generated</span>
</div>
</div>
</section>
<section class="header_title">
<div class="menuheader" data-toggle="collapse" data-target="#analysis">
<span class="text-big">Service Results</span>
</div>
<div id="analysis" class="collapse in">
<div ng-if="(current_file.results | filter:useless_results()).length == 0">
<span class="text-muted">No service results</span>
</div>
<div ng-if="(current_file.results | filter:useless_results()).length != 0">
<div ng-repeat="res in current_file.results | orderBy:sort_by_name | filter:useless_results()">
<section id="{{res.response.service_name}}" class="card">
<div class="header_title" data-toggle="collapse" data-target="#{{res.response.service_name}}_content" ng-class="{'highlight': hasHighlightedTags(tagTypeList(concatTags(res)))}">
<div ng-if="current_file.alternates[res.response.service_name].length == 1" class="text-muted pull-right">
{{res.created | date:"yyyy-MM-dd HH:mm:ss"}}
</div>
<div ng-if="current_file.alternates[res.response.service_name].length > 1" class="dropdown pull-right">
<button class="btn btn-default btn-xs dropdown-toggle" type="button" id="#{{res.response.service_name}}_select" data-toggle="dropdown">
{{res.created | date:"yyyy-MM-dd HH:mm:ss"}}
<span class="caret"></span>
</button>
<ul class="dropdown-menu" role="menu" aria-labelledby="#{{res.response.service_name}}_select">
<li class="small" ng-repeat="a in current_file.alternates[res.response.service_name]" ng-class="{disabled: a.created==res.created}"><a ng-click="select_alternate(a.response.service_name, a.created);$event.stopPropagation();">{{a.response.service_name}} :: {{a.response.service_version}} :: [{{a.result.score}}] @ {{a.created | date:"yyyy-MM-dd HH:mm:ss"}}</a></li>
</ul>
</div>
<strong><span ng-if="user.c12n_enforcing" class="{{res.classification | class_text_color }}" >({{res.classification | class_sm}}) </span>{{res.response.service_name}}</strong> [<span class="{{res.result.score | score_color}}"><strong>{{res.result.score}}</strong></span>] <span class="text-muted">:: {{res.response.service_version}}<span ng-show="res.response.service_context"> ({{res.response.service_context}})</span></span>
</div>
<div id="{{res.response.service_name}}_content" class="content collapse" ng-class="{'in': res.result.score >= settings.expand_min_score || res.response.service_name == switch_service }">
<div ng-if="res.result.sections.length == 0" >
<span class="center text-muted">No results generated by this service</span>
</div>
<div ng-if="res.result.sections.length != 0 && (res.section_hierarchy == undefined || res.section_hierarchy.length == 0)" >
<div ng-include="'/static/ng-template/result_section.html'" ng-init="sections=res.result.sections;parent=res.response.service_name+'_'+$index;"></div>
</div>
<div ng-if="res.result.sections.length != 0 && (res.section_hierarchy != undefined && res.section_hierarchy.length != 0)" >
<div ng-include="'/static/ng-template/result_section_rec.html'" ng-init="sections=res.section_hierarchy;section_list=res.result.sections;parent=res.response.service_name+'_'+$index;"></div>
</div>
<div class="row part" ng-show="res.response.supplementary">
<div class="col-xs-12 clickable" data-toggle="collapse" data-target="#{{res.response.service_name}}_supplementary"><h4>Supplementary files</h4></div>
<div class="col-xs-12 collapse in" id="{{res.response.service_name}}_supplementary">
<div ng-repeat="file in res.response.supplementary">
<a title="Download file" href="/api/v4/file/download/{{file.sha256}}/?name={{file.name}}">{{file.name}}</a><span class="text-muted text-tiny"> :: {{file.description}}</span>
<a title="Open in file viewer" href="file_viewer.html?sha256={{file.sha256}}" class="text-muted text-tiny"> [View file]</a>
</div>
</div>
</div>
<div class="row part" ng-show="res.response.extracted">
<div class="col-xs-12 clickable" data-toggle="collapse" data-target="#{{res.response.service_name}}_files"><h4>Extracted files</h4></div>
<div class="col-xs-12 collapse in" id="{{res.response.service_name}}_files">
<div ng-repeat="file in res.response.extracted" title="{{file.name}}">
<a ng-if="!current_file.file_viewer_only" href="#/{{file.sha256}}/{{file.name}}" ng-click="view_file_details(file.sha256, file.name);">{{file.name}}</a>
<a ng-if="current_file.file_viewer_only" href="file_detail.html?sha256={{file.sha256}}">{{file.name}}</a>
<span class="text-muted text-tiny"> :: {{file.description}}</span>
<a title="Open in file viewer" href="file_viewer.html?sha256={{file.sha256}}" class="text-muted text-tiny"> [View file]</a>
</div>
</div>
</div>
</div>
</section>
</div>
</div>
</div>
</section>
<section class="header_title">
<div class="menuheader" data-toggle="collapse" data-target="#nrs">
<span class="text-big">Empty Results</span>
</div>
<div id="nrs" class="collapse in">
<div ng-if="(current_file.results | filter:good_results()).length == 0">
<span class="text-muted">No empty results</span>
</div>
<div ng-if="(current_file.results | filter:good_results()).length != 0">
<div ng-repeat="res in current_file.results | orderBy:sort_by_name | filter:good_results()">
<section id="{{res.response.service_name}}" class="card">
<div class="header_title" data-toggle="collapse" data-target="#{{res.response.service_name}}_content">
<div ng-if="current_file.alternates[res.response.service_name].length == 1" class="text-muted pull-right">
{{res.created | date:"yyyy-MM-dd HH:mm:ss"}}
</div>
<div ng-if="current_file.alternates[res.response.service_name].length > 1" class="dropdown pull-right">
<button class="btn btn-default btn-xs dropdown-toggle" type="button" id="#{{res.response.service_name}}_select" data-toggle="dropdown">
{{res.created | date:"yyyy-MM-dd HH:mm:ss"}}
<span class="caret"></span>
</button>
<ul class="dropdown-menu" role="menu" aria-labelledby="#{{res.response.service_name}}_select">
<li class="small" ng-repeat="a in current_file.alternates[res.response.service_name]" ng-class="{disabled: a.created==res.created}"><a ng-click="select_alternate(a.response.service_name, a.created);$event.stopPropagation();">{{a.response.service_name}} :: {{a.response.service_version}} <span ng-show="a.response.service_context"> ({{a.response.service_context}}) </span>:: [{{a.result.score}}] @ {{a.created | date:"yyyy-MM-dd HH:mm:ss"}}</a></li>
</ul>
</div>
<strong><span ng-if="user.c12n_enforcing" class="{{res.classification | class_text_color }}" >({{res.classification | class_sm}}) </span>{{res.response.service_name}}</strong> [<span class="{{res.result.score | score_color}}"><strong>{{res.result.score}}</strong></span>] <span class="text-muted">:: {{res.response.service_version}}<span ng-show="res.response.service_context"> ({{res.response.service_context}})</span></span>
</div>
<div id="{{res.response.service_name}}_content" class="content collapse" ng-class="{'in': res.result.score >= settings.expand_min_score || res.response.service_name == switch_service }">
<div ng-if="res.result.sections.length == 0" >
<span class="center text-muted">The service had nothing to report on this file.</span>
</div>
</div>
</section>
</div>
</div>
</div>
</section>
<section class="header_title" ng-show="current_file.errors.length != 0">
<div class="menuheader" data-toggle="collapse" data-target="#errors">
<span class="text-big">Errors</span>
</div>
<div id="errors" class="collapse in">
<div ng-repeat="res in current_file.errors | orderBy:sort_by_name">
<section id="{{res.response.service_name}}" class="card_error">
<div class="header_title" data-toggle="collapse" data-target="#{{res.response.service_name}}_content"><strong>{{res.response.service_name}}</strong> [<strong>{{res.type}}</strong>] <span ng-if="res.response.service_version" class="text-muted">:: {{res.response.service_version}}</span></div>
<div id="{{res.response.service_name}}_content" class="collapse in">
<p class="content">{{res.response.message}}</p>
</div>
</section>
</div>
</div>
</section>
</div>
</div>