ScanHtml¶
Collects metadata and extracts embedded scripts from HTML files.
Source code in strelka/src/python/strelka/scanners/scan_html.py
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 |
|
Features¶
The features of this scanner are detailed below. These features represent the capabilities and the type of analysis the scanner can perform. This may include support for Indicators of Compromise (IOC), the ability to emit files for further analysis, and the presence of extended documentation for complex analysis techniques.
Feature | Support |
---|---|
IOC Support |
|
Emit Files |
|
Extended Docs |
|
Malware Scanner |
|
Image Thumbnails |
Tastes¶
Strelka's file distribution system assigns scanners to files based on 'flavors' and 'tastes'. Flavors describe the type of file, typically determined by MIME types from libmagic, matches from YARA rules, or characteristics of parent files. Tastes are the criteria used within Strelka to determine which scanners are applied to which files, with positive and negative tastes defining files to be included or excluded respectively.
Source Filetype | Include / Exclude |
---|---|
hta_file |
|
html_file |
|
text/html |
Scanner Fields¶
This section provides a list of fields that are extracted from the files processed by this scanner. These fields include the data elements that the scanner extracts from each file, representing the analytical results produced by the scanner. If the test file is missing or cannot be parsed, this section will not contain any data.
Field Name | Field Type |
---|---|
elapsed |
str |
flags |
list |
forms |
list |
frames |
list |
hyperlinks |
list |
hyperlinks_count |
int |
inputs |
list |
scripts |
list |
scripts.language |
NoneType |
scripts.src |
NoneType |
scripts.src |
str |
scripts.type |
NoneType |
scripts.type |
str |
spans |
list |
spans.class |
NoneType |
spans.style |
str |
title |
str |
total |
dict |
total.extracted |
int |
total.forms |
int |
total.frames |
int |
total.inputs |
int |
total.scripts |
int |
total.spans |
int |
Sample Event¶
Below is a sample event generated by this scanner, demonstrating the kind of output that can be expected when it processes a file. This sample is derived from a mock scan event configured in the scanner's test file. If no test file is available, this section will not display a sample event.
test_scan_event = {
"elapsed": 0.001,
"flags": [],
"total": {
"scripts": 2,
"forms": 0,
"inputs": 0,
"frames": 0,
"extracted": 1,
"spans": 35,
},
"title": "Lorem Ipsum",
"hyperlinks": [],
"forms": [],
"frames": [],
"inputs": [],
"scripts": [
{
"src": "https://example.com/example.js",
"language": None,
"type": "text/javascript",
},
{"src": None, "language": None, "type": None},
],
"spans": [
{"class": None, "style": "font-size:11pt"},
{"class": None, "style": "background-color:white"},
{
"class": None,
"style": "font-family:Calibri,sans-serif",
},
{"class": None, "style": "font-size:52.5pt"},
{"class": None, "style": "color:black"},
{"class": None, "style": "font-size:12pt"},
{
"class": None,
"style": 'font-family:"Times New Roman",serif',
},
{"class": None, "style": "font-size:10.5pt"},
{
"class": None,
"style": 'font-family:"Arial",sans-serif',
},
],
}