-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathosquery_tables_OS_win_graph.html
209 lines (166 loc) · 26.3 KB
/
osquery_tables_OS_win_graph.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
<html>
<head>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/vis/4.16.1/vis.css" type="text/css" />
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/vis/4.16.1/vis-network.min.js"> </script>
<!-- <link rel="stylesheet" href="../node_modules/vis/dist/vis.min.css" type="text/css" />
<script type="text/javascript" src="../node_modules/vis/dist/vis.js"> </script>-->
<style type="text/css">
#mynetwork {
width: 1200;
height: 800;
background-color: #222222;
border: 1px solid lightgray;
position: relative;
float: left;
}
#loadingBar {
position:absolute;
top:0px;
left:0px;
width: 1200;
height: 800;
background-color:rgba(200,200,200,0.8);
-webkit-transition: all 0.5s ease;
-moz-transition: all 0.5s ease;
-ms-transition: all 0.5s ease;
-o-transition: all 0.5s ease;
transition: all 0.5s ease;
opacity:1;
}
#bar {
position:absolute;
top:0px;
left:0px;
width:20px;
height:20px;
margin:auto auto auto auto;
border-radius:11px;
border:2px solid rgba(30,30,30,0.05);
background: rgb(0, 173, 246); /* Old browsers */
box-shadow: 2px 0px 4px rgba(0,0,0,0.4);
}
#border {
position:absolute;
top:10px;
left:10px;
width:500px;
height:23px;
margin:auto auto auto auto;
box-shadow: 0px 0px 4px rgba(0,0,0,0.2);
border-radius:10px;
}
#text {
position:absolute;
top:8px;
left:530px;
width:30px;
height:50px;
margin:auto auto auto auto;
font-size:22px;
color: #000000;
}
div.outerBorder {
position:relative;
top:400px;
width:600px;
height:44px;
margin:auto auto auto auto;
border:8px solid rgba(0,0,0,0.1);
background: rgb(252,252,252); /* Old browsers */
background: -moz-linear-gradient(top, rgba(252,252,252,1) 0%, rgba(237,237,237,1) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(252,252,252,1)), color-stop(100%,rgba(237,237,237,1))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, rgba(252,252,252,1) 0%,rgba(237,237,237,1) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, rgba(252,252,252,1) 0%,rgba(237,237,237,1) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, rgba(252,252,252,1) 0%,rgba(237,237,237,1) 100%); /* IE10+ */
background: linear-gradient(to bottom, rgba(252,252,252,1) 0%,rgba(237,237,237,1) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fcfcfc', endColorstr='#ededed',GradientType=0 ); /* IE6-9 */
border-radius:72px;
box-shadow: 0px 0px 10px rgba(0,0,0,0.2);
}
</style>
</head>
<body>
<div id = "mynetwork"></div>
<div id="loadingBar">
<div class="outerBorder">
<div id="text">0%</div>
<div id="border">
<div id="bar"></div>
</div>
</div>
</div>
<script type="text/javascript">
// initialize global variables.
var edges;
var nodes;
var network;
var container;
var options, data;
// This method is responsible for drawing the graph, returns the drawn network
function drawGraph() {
var container = document.getElementById('mynetwork');
// parsing and collecting nodes and edges from the python
nodes = new vis.DataSet([{"color": "orange", "font": {"color": "white"}, "id": "bitlocker_info", "label": "bitlocker_info", "shape": "dot", "title": "bitlocker_info", "value": 300}, {"color": "red", "font": {"color": "white"}, "id": "metric", "label": "metric", "shape": "dot", "title": "metric", "value": 2000}, {"color": "red", "font": {"color": "white"}, "id": "pid", "label": "pid", "shape": "dot", "title": "pid", "value": 9000}, {"color": "red", "font": {"color": "white"}, "id": "minutes", "label": "minutes", "shape": "dot", "title": "minutes", "value": 2000}, {"color": "orange", "font": {"color": "white"}, "id": "osquery_packs", "label": "osquery_packs", "shape": "dot", "title": "osquery_packs", "value": 300}, {"color": "red", "font": {"color": "white"}, "id": "key_usage", "label": "key_usage", "shape": "dot", "title": "key_usage", "value": 2000}, {"color": "red", "font": {"color": "white"}, "id": "platform", "label": "platform", "shape": "dot", "title": "platform", "value": 2000}, {"color": "orange", "font": {"color": "white"}, "id": "etc_hosts", "label": "etc_hosts", "shape": "dot", "title": "etc_hosts", "value": 300}, {"color": "red", "font": {"color": "white"}, "id": "install_date", "label": "install_date", "shape": "dot", "title": "install_date", "value": 4000}, {"color": "red", "font": {"color": "white"}, "id": "uid", "label": "uid", "shape": "dot", "title": "uid", "value": 9000}, {"color": "red", "font": {"color": "white"}, "id": "session_id", "label": "session_id", "shape": "dot", "title": "session_id", "value": 2000}, {"color": "red", "font": {"color": "white"}, "id": "identifier", "label": "identifier", "shape": "dot", "title": "identifier", "value": 3000}, {"color": "red", "font": {"color": "white"}, "id": "datetime", "label": "datetime", "shape": "dot", "title": "datetime", "value": 4000}, {"color": "red", "font": {"color": "white"}, "id": "sha256", "label": "sha256", "shape": "dot", "title": "sha256", "value": 2000}, {"color": "red", "font": {"color": "white"}, "id": "cpu_type", "label": "cpu_type", "shape": "dot", "title": "cpu_type", "value": 2000}, {"color": "lightgreen", "font": {"color": "white"}, "id": "firefox_addons", "label": "firefox_addons", "shape": "dot", "title": "firefox_addons", "value": 2100}, {"color": "orange", "font": {"color": "white"}, "id": "disk_info", "label": "disk_info", "shape": "dot", "title": "disk_info", "value": 300}, {"color": "orange", "font": {"color": "white"}, "id": "pipes", "label": "pipes", "shape": "dot", "title": "pipes", "value": 300}, {"color": "red", "font": {"color": "white"}, "id": "user", "label": "user", "shape": "dot", "title": "user", "value": 2000}, {"color": "red", "font": {"color": "white"}, "id": "sha1", "label": "sha1", "shape": "dot", "title": "sha1", "value": 2000}, {"color": "red", "font": {"color": "white"}, "id": "key", "label": "key", "shape": "dot", "title": "key", "value": 2000}, {"color": "orange", "font": {"color": "white"}, "id": "user_groups", "label": "user_groups", "shape": "dot", "title": "user_groups", "value": 300}, {"color": "red", "font": {"color": "white"}, "id": "net_namespace", "label": "net_namespace", "shape": "dot", "title": "net_namespace", "value": 2000}, {"color": "orange", "font": {"color": "white"}, "id": "wmi_filter_consumer_binding", "label": "wmi_filter_consumer_binding", "shape": "dot", "title": "wmi_filter_consumer_binding", "value": 300}, {"color": "lightgreen", "font": {"color": "white"}, "id": "routes", "label": "routes", "shape": "dot", "title": "routes", "value": 2100}, {"color": "red", "font": {"color": "white"}, "id": "gid_signed", "label": "gid_signed", "shape": "dot", "title": "gid_signed", "value": 2000}, {"color": "lightgreen", "font": {"color": "white"}, "id": "azure_instance_metadata", "label": "azure_instance_metadata", "shape": "dot", "title": "azure_instance_metadata", "value": 1400}, {"color": "orange", "font": {"color": "white"}, "id": "platform_info", "label": "platform_info", "shape": "dot", "title": "platform_info", "value": 300}, {"color": "lightgreen", "font": {"color": "white"}, "id": "arp_cache", "label": "arp_cache", "shape": "dot", "title": "arp_cache", "value": 2100}, {"color": "red", "font": {"color": "white"}, "id": "inode", "label": "inode", "shape": "dot", "title": "inode", "value": 2000}, {"color": "red", "font": {"color": "white"}, "id": "port", "label": "port", "shape": "dot", "title": "port", "value": 2000}, {"color": "lightgreen", "font": {"color": "white"}, "id": "osquery_info", "label": "osquery_info", "shape": "dot", "title": "osquery_info", "value": 2100}, {"color": "red", "font": {"color": "white"}, "id": "uuid", "label": "uuid", "shape": "dot", "title": "uuid", "value": 4000}, {"color": "red", "font": {"color": "white"}, "id": "drive_letter", "label": "drive_letter", "shape": "dot", "title": "drive_letter", "value": 2000}, {"color": "lightgreen", "font": {"color": "white"}, "id": "registry", "label": "registry", "shape": "dot", "title": "registry", "value": 1400}, {"color": "lightgreen", "font": {"color": "white"}, "id": "azure_instance_tags", "label": "azure_instance_tags", "shape": "dot", "title": "azure_instance_tags", "value": 1400}, {"color": "lightgreen", "font": {"color": "white"}, "id": "etc_services", "label": "etc_services", "shape": "dot", "title": "etc_services", "value": 1400}, {"color": "red", "font": {"color": "white"}, "id": "seconds", "label": "seconds", "shape": "dot", "title": "seconds", "value": 2000}, {"color": "lightgreen", "font": {"color": "white"}, "id": "process_memory_map", "label": "process_memory_map", "shape": "dot", "title": "process_memory_map", "value": 1400}, {"color": "red", "font": {"color": "white"}, "id": "hostname", "label": "hostname", "shape": "dot", "title": "hostname", "value": 2000}, {"color": "lightgreen", "font": {"color": "white"}, "id": "os_version", "label": "os_version", "shape": "dot", "title": "os_version", "value": 1400}, {"color": "orange", "font": {"color": "white"}, "id": "authenticode", "label": "authenticode", "shape": "dot", "title": "authenticode", "value": 300}, {"color": "orange", "font": {"color": "white"}, "id": "osquery_extensions", "label": "osquery_extensions", "shape": "dot", "title": "osquery_extensions", "value": 300}, {"color": "lightgreen", "font": {"color": "white"}, "id": "time", "label": "time", "shape": "dot", "title": "time", "value": 2100}, {"color": "orange", "font": {"color": "white"}, "id": "user_ssh_keys", "label": "user_ssh_keys", "shape": "dot", "title": "user_ssh_keys", "value": 300}, {"color": "red", "font": {"color": "white"}, "id": "system_time", "label": "system_time", "shape": "dot", "title": "system_time", "value": 2000}, {"color": "lightgreen", "font": {"color": "white"}, "id": "hash", "label": "hash", "shape": "dot", "title": "hash", "value": 1400}, {"color": "red", "font": {"color": "white"}, "id": "mac", "label": "mac", "shape": "dot", "title": "mac", "value": 2000}, {"color": "orange", "font": {"color": "white"}, "id": "ssh_configs", "label": "ssh_configs", "shape": "dot", "title": "ssh_configs", "value": 300}, {"color": "orange", "font": {"color": "white"}, "id": "winbaseobj", "label": "winbaseobj", "shape": "dot", "title": "winbaseobj", "value": 300}, {"color": "red", "font": {"color": "white"}, "id": "common_name", "label": "common_name", "shape": "dot", "title": "common_name", "value": 2000}, {"color": "red", "font": {"color": "white"}, "id": "start_time", "label": "start_time", "shape": "dot", "title": "start_time", "value": 2000}, {"color": "orange", "font": {"color": "white"}, "id": "powershell_events", "label": "powershell_events", "shape": "dot", "title": "powershell_events", "value": 300}, {"color": "red", "font": {"color": "white"}, "id": "sid", "label": "sid", "shape": "dot", "title": "sid", "value": 3000}, {"color": "lightgreen", "font": {"color": "white"}, "id": "logged_in_users", "label": "logged_in_users", "shape": "dot", "title": "logged_in_users", "value": 2100}, {"color": "orange", "font": {"color": "white"}, "id": "wmi_cli_event_consumers", "label": "wmi_cli_event_consumers", "shape": "dot", "title": "wmi_cli_event_consumers", "value": 300}, {"color": "red", "font": {"color": "white"}, "id": "vm_id", "label": "vm_id", "shape": "dot", "title": "vm_id", "value": 2000}, {"color": "lightgreen", "font": {"color": "white"}, "id": "logon_sessions", "label": "logon_sessions", "shape": "dot", "title": "logon_sessions", "value": 1400}, {"color": "lightgreen", "font": {"color": "white"}, "id": "curl_certificate", "label": "curl_certificate", "shape": "dot", "title": "curl_certificate", "value": 2800}, {"color": "red", "font": {"color": "white"}, "id": "gid", "label": "gid", "shape": "dot", "title": "gid", "value": 4000}, {"color": "lightgreen", "font": {"color": "white"}, "id": "listening_ports", "label": "listening_ports", "shape": "dot", "title": "listening_ports", "value": 5600}, {"color": "orange", "font": {"color": "white"}, "id": "drivers", "label": "drivers", "shape": "dot", "title": "drivers", "value": 300}, {"color": "red", "font": {"color": "white"}, "id": "username", "label": "username", "shape": "dot", "title": "username", "value": 4000}, {"color": "orange", "font": {"color": "white"}, "id": "programs", "label": "programs", "shape": "dot", "title": "programs", "value": 300}, {"color": "lightgreen", "font": {"color": "white"}, "id": "interface_addresses", "label": "interface_addresses", "shape": "dot", "title": "interface_addresses", "value": 2100}, {"color": "lightgreen", "font": {"color": "white"}, "id": "groups", "label": "groups", "shape": "dot", "title": "groups", "value": 1400}, {"color": "red", "font": {"color": "white"}, "id": "serial_number", "label": "serial_number", "shape": "dot", "title": "serial_number", "value": 2000}, {"color": "orange", "font": {"color": "white"}, "id": "windows_events", "label": "windows_events", "shape": "dot", "title": "windows_events", "value": 300}, {"color": "red", "font": {"color": "white"}, "id": "location", "label": "location", "shape": "dot", "title": "location", "value": 2000}, {"color": "lightgreen", "font": {"color": "white"}, "id": "uptime", "label": "uptime", "shape": "dot", "title": "uptime", "value": 1400}, {"color": "lightgreen", "font": {"color": "white"}, "id": "interface_details", "label": "interface_details", "shape": "dot", "title": "interface_details", "value": 4200}, {"color": "red", "font": {"color": "white"}, "id": "protocol", "label": "protocol", "shape": "dot", "title": "protocol", "value": 3000}, {"color": "red", "font": {"color": "white"}, "id": "mtu", "label": "mtu", "shape": "dot", "title": "mtu", "value": 2000}, {"color": "lightgreen", "font": {"color": "white"}, "id": "chrome_extension_content_scripts", "label": "chrome_extension_content_scripts", "shape": "dot", "title": "chrome_extension_content_scripts", "value": 1400}, {"color": "red", "font": {"color": "white"}, "id": "serial", "label": "serial", "shape": "dot", "title": "serial", "value": 2000}, {"color": "orange", "font": {"color": "white"}, "id": "ntfs_journal_events", "label": "ntfs_journal_events", "shape": "dot", "title": "ntfs_journal_events", "value": 300}, {"color": "orange", "font": {"color": "white"}, "id": "userassist", "label": "userassist", "shape": "dot", "title": "userassist", "value": 300}, {"color": "red", "font": {"color": "white"}, "id": "interface", "label": "interface", "shape": "dot", "title": "interface", "value": 4000}, {"color": "orange", "font": {"color": "white"}, "id": "shared_resources", "label": "shared_resources", "shape": "dot", "title": "shared_resources", "value": 300}, {"color": "red", "font": {"color": "white"}, "id": "fd", "label": "fd", "shape": "dot", "title": "fd", "value": 2000}, {"color": "red", "font": {"color": "white"}, "id": "relative_path", "label": "relative_path", "shape": "dot", "title": "relative_path", "value": 4000}, {"color": "red", "font": {"color": "white"}, "id": "address", "label": "address", "shape": "dot", "title": "address", "value": 5000}, {"color": "red", "font": {"color": "white"}, "id": "cpu_subtype", "label": "cpu_subtype", "shape": "dot", "title": "cpu_subtype", "value": 2000}, {"color": "orange", "font": {"color": "white"}, "id": "wmi_event_filters", "label": "wmi_event_filters", "shape": "dot", "title": "wmi_event_filters", "value": 300}, {"color": "lightgreen", "font": {"color": "white"}, "id": "osquery_schedule", "label": "osquery_schedule", "shape": "dot", "title": "osquery_schedule", "value": 1400}, {"color": "orange", "font": {"color": "white"}, "id": "wmi_script_event_consumers", "label": "wmi_script_event_consumers", "shape": "dot", "title": "wmi_script_event_consumers", "value": 300}, {"color": "red", "font": {"color": "white"}, "id": "service", "label": "service", "shape": "dot", "title": "service", "value": 2000}, {"color": "red", "font": {"color": "white"}, "id": "friendly_name", "label": "friendly_name", "shape": "dot", "title": "friendly_name", "value": 2000}, {"color": "lightgreen", "font": {"color": "white"}, "id": "file", "label": "file", "shape": "dot", "title": "file", "value": 2800}, {"color": "lightgreen", "font": {"color": "white"}, "id": "users", "label": "users", "shape": "dot", "title": "users", "value": 3500}, {"color": "lightgreen", "font": {"color": "white"}, "id": "process_open_sockets", "label": "process_open_sockets", "shape": "dot", "title": "process_open_sockets", "value": 4200}, {"color": "red", "font": {"color": "white"}, "id": "socket", "label": "socket", "shape": "dot", "title": "socket", "value": 2000}, {"color": "red", "font": {"color": "white"}, "id": "mtime", "label": "mtime", "shape": "dot", "title": "mtime", "value": 2000}, {"color": "lightgreen", "font": {"color": "white"}, "id": "windows_crashes", "label": "windows_crashes", "shape": "dot", "title": "windows_crashes", "value": 2100}, {"color": "lightgreen", "font": {"color": "white"}, "id": "system_info", "label": "system_info", "shape": "dot", "title": "system_info", "value": 2800}, {"color": "orange", "font": {"color": "white"}, "id": "carves", "label": "carves", "shape": "dot", "title": "carves", "value": 300}, {"color": "orange", "font": {"color": "white"}, "id": "patches", "label": "patches", "shape": "dot", "title": "patches", "value": 300}, {"color": "red", "font": {"color": "white"}, "id": "user_time", "label": "user_time", "shape": "dot", "title": "user_time", "value": 2000}, {"color": "lightgreen", "font": {"color": "white"}, "id": "certificates", "label": "certificates", "shape": "dot", "title": "certificates", "value": 4200}, {"color": "red", "font": {"color": "white"}, "id": "family", "label": "family", "shape": "dot", "title": "family", "value": 2000}, {"color": "lightgreen", "font": {"color": "white"}, "id": "chrome_extensions", "label": "chrome_extensions", "shape": "dot", "title": "chrome_extensions", "value": 1400}, {"color": "orange", "font": {"color": "white"}, "id": "startup_items", "label": "startup_items", "shape": "dot", "title": "startup_items", "value": 300}, {"color": "orange", "font": {"color": "white"}, "id": "services", "label": "services", "shape": "dot", "title": "services", "value": 300}, {"color": "lightgreen", "font": {"color": "white"}, "id": "processes", "label": "processes", "shape": "dot", "title": "processes", "value": 5600}]);
edges = new vis.DataSet([{"from": "bitlocker_info", "to": "drive_letter"}, {"from": "metric", "to": "interface_details"}, {"from": "metric", "to": "routes"}, {"from": "minutes", "to": "uptime"}, {"from": "minutes", "to": "time"}, {"from": "pid", "to": "listening_ports"}, {"from": "pid", "to": "logged_in_users"}, {"from": "pid", "to": "processes"}, {"from": "pid", "to": "process_memory_map"}, {"from": "pid", "to": "process_open_sockets"}, {"from": "pid", "to": "osquery_info"}, {"from": "pid", "to": "pipes"}, {"from": "pid", "to": "services"}, {"from": "pid", "to": "windows_crashes"}, {"from": "osquery_packs", "to": "platform"}, {"from": "key_usage", "to": "curl_certificate"}, {"from": "key_usage", "to": "certificates"}, {"from": "platform", "to": "os_version"}, {"from": "etc_hosts", "to": "address"}, {"from": "install_date", "to": "os_version"}, {"from": "install_date", "to": "patches"}, {"from": "install_date", "to": "programs"}, {"from": "install_date", "to": "shared_resources"}, {"from": "uid", "to": "chrome_extensions"}, {"from": "uid", "to": "chrome_extension_content_scripts"}, {"from": "uid", "to": "firefox_addons"}, {"from": "uid", "to": "processes"}, {"from": "uid", "to": "ssh_configs"}, {"from": "uid", "to": "users"}, {"from": "uid", "to": "user_groups"}, {"from": "uid", "to": "user_ssh_keys"}, {"from": "uid", "to": "file"}, {"from": "session_id", "to": "logon_sessions"}, {"from": "session_id", "to": "winbaseobj"}, {"from": "identifier", "to": "chrome_extensions"}, {"from": "identifier", "to": "chrome_extension_content_scripts"}, {"from": "identifier", "to": "firefox_addons"}, {"from": "datetime", "to": "time"}, {"from": "datetime", "to": "powershell_events"}, {"from": "datetime", "to": "windows_crashes"}, {"from": "datetime", "to": "windows_events"}, {"from": "sha256", "to": "carves"}, {"from": "sha256", "to": "hash"}, {"from": "cpu_type", "to": "processes"}, {"from": "cpu_type", "to": "system_info"}, {"from": "firefox_addons", "to": "location"}, {"from": "disk_info", "to": "serial"}, {"from": "user", "to": "logged_in_users"}, {"from": "user", "to": "logon_sessions"}, {"from": "sha1", "to": "hash"}, {"from": "sha1", "to": "certificates"}, {"from": "key", "to": "azure_instance_tags"}, {"from": "key", "to": "registry"}, {"from": "net_namespace", "to": "listening_ports"}, {"from": "net_namespace", "to": "process_open_sockets"}, {"from": "wmi_filter_consumer_binding", "to": "relative_path"}, {"from": "routes", "to": "interface"}, {"from": "routes", "to": "mtu"}, {"from": "gid_signed", "to": "groups"}, {"from": "gid_signed", "to": "users"}, {"from": "azure_instance_metadata", "to": "location"}, {"from": "azure_instance_metadata", "to": "vm_id"}, {"from": "platform_info", "to": "address"}, {"from": "arp_cache", "to": "address"}, {"from": "arp_cache", "to": "mac"}, {"from": "arp_cache", "to": "interface"}, {"from": "inode", "to": "process_memory_map"}, {"from": "inode", "to": "file"}, {"from": "port", "to": "etc_services"}, {"from": "port", "to": "listening_ports"}, {"from": "osquery_info", "to": "uuid"}, {"from": "osquery_info", "to": "start_time"}, {"from": "uuid", "to": "system_info"}, {"from": "uuid", "to": "users"}, {"from": "uuid", "to": "osquery_extensions"}, {"from": "drive_letter", "to": "ntfs_journal_events"}, {"from": "registry", "to": "mtime"}, {"from": "azure_instance_tags", "to": "vm_id"}, {"from": "etc_services", "to": "protocol"}, {"from": "seconds", "to": "uptime"}, {"from": "seconds", "to": "time"}, {"from": "hostname", "to": "curl_certificate"}, {"from": "hostname", "to": "system_info"}, {"from": "authenticode", "to": "serial_number"}, {"from": "system_time", "to": "processes"}, {"from": "system_time", "to": "osquery_schedule"}, {"from": "mac", "to": "interface_details"}, {"from": "common_name", "to": "curl_certificate"}, {"from": "common_name", "to": "certificates"}, {"from": "start_time", "to": "processes"}, {"from": "sid", "to": "logged_in_users"}, {"from": "sid", "to": "certificates"}, {"from": "sid", "to": "userassist"}, {"from": "wmi_cli_event_consumers", "to": "relative_path"}, {"from": "curl_certificate", "to": "serial_number"}, {"from": "gid", "to": "groups"}, {"from": "gid", "to": "processes"}, {"from": "gid", "to": "users"}, {"from": "gid", "to": "file"}, {"from": "listening_ports", "to": "protocol"}, {"from": "listening_ports", "to": "family"}, {"from": "listening_ports", "to": "address"}, {"from": "listening_ports", "to": "fd"}, {"from": "listening_ports", "to": "socket"}, {"from": "drivers", "to": "service"}, {"from": "username", "to": "users"}, {"from": "username", "to": "certificates"}, {"from": "username", "to": "startup_items"}, {"from": "username", "to": "windows_crashes"}, {"from": "interface_addresses", "to": "interface"}, {"from": "interface_addresses", "to": "address"}, {"from": "interface_addresses", "to": "friendly_name"}, {"from": "interface_details", "to": "interface"}, {"from": "interface_details", "to": "mtu"}, {"from": "interface_details", "to": "friendly_name"}, {"from": "interface_details", "to": "service"}, {"from": "protocol", "to": "process_open_sockets"}, {"from": "serial", "to": "certificates"}, {"from": "fd", "to": "process_open_sockets"}, {"from": "relative_path", "to": "wmi_event_filters"}, {"from": "relative_path", "to": "wmi_script_event_consumers"}, {"from": "cpu_subtype", "to": "processes"}, {"from": "cpu_subtype", "to": "system_info"}, {"from": "osquery_schedule", "to": "user_time"}, {"from": "file", "to": "mtime"}, {"from": "process_open_sockets", "to": "socket"}, {"from": "process_open_sockets", "to": "family"}, {"from": "user_time", "to": "processes"}]);
// adding nodes and edges to the graph
data = {nodes: nodes, edges: edges};
var options = {
"configure": {
"enabled": false
},
"edges": {
"color": {
"inherit": true
},
"smooth": {
"enabled": false,
"type": "continuous"
}
},
"interaction": {
"dragNodes": true,
"hideEdgesOnDrag": false,
"hideNodesOnDrag": false
},
"physics": {
"barnesHut": {
"avoidOverlap": 0,
"centralGravity": 0.3,
"damping": 0.09,
"gravitationalConstant": -80000,
"springConstant": 0.001,
"springLength": 250
},
"enabled": true,
"stabilization": {
"enabled": true,
"fit": true,
"iterations": 1000,
"onlyDynamicEdges": false,
"updateInterval": 50
}
}
};
network = new vis.Network(container, data, options);
network.on("stabilizationProgress", function(params) {
document.getElementById('loadingBar').removeAttribute("style");
var maxWidth = 496;
var minWidth = 20;
var widthFactor = params.iterations/params.total;
var width = Math.max(minWidth,maxWidth * widthFactor);
document.getElementById('bar').style.width = width + 'px';
document.getElementById('text').innerHTML = Math.round(widthFactor*100) + '%';
});
network.once("stabilizationIterationsDone", function() {
document.getElementById('text').innerHTML = '100%';
document.getElementById('bar').style.width = '496px';
document.getElementById('loadingBar').style.opacity = 0;
// really clean the dom element
setTimeout(function () {document.getElementById('loadingBar').style.display = 'none';}, 500);
});
return network;
}
drawGraph();
</script>
</body>
</html>