Time to respond info working
This commit is contained in:
parent
63a836b995
commit
db033367fb
|
@ -1 +1 @@
|
||||||
[{"data": "archtosu@172.23.7.203: x && ./blueteambot1.sh", "timestamp": "1681455007"}, {"data": "<b style='color: yellow'>Snort: Intrusion Detected! Blue team should now be aware</b>", "timestamp": "1681455010"}]
|
[{"data": "<b style='color: yellow'>IDS: Malicious Activity was detected</b>", "timestamp": "1681456601"}, {"data": "<b style='color: red'>Malicious IP: 10.10.1.89</b>", "timestamp": "1681456601"}, {"data": "ssh", "timestamp": "1681460202"}]
|
|
@ -1 +1 @@
|
||||||
[{"data": "141.89.221.182: start of attack", "timestamp": "1681455007"}, {"data": "141.89.221.182: command 0: ATTACK", "timestamp": "1681455007"}, {"data": "141.89.221.182: command 1: ATTACK", "timestamp": "1681455008"}, {"data": "141.89.221.182: command 2: ATTACK", "timestamp": "1681455008"}, {"data": "141.89.221.182: command 3: ATTACK", "timestamp": "1681455008"}, {"data": "141.89.221.182: command 4: ATTACK", "timestamp": "1681455008"}, {"data": "141.89.221.182: command 5: ATTACK", "timestamp": "1681455008"}, {"data": "141.89.221.182: command 6: ATTACK", "timestamp": "1681455008"}, {"data": "141.89.221.182: command 7: ATTACK", "timestamp": "1681455008"}, {"data": "141.89.221.182: command 8: ATTACK", "timestamp": "1681455008"}, {"data": "141.89.221.182: command 9: ATTACK", "timestamp": "1681455008"}, {"data": "141.89.221.182: command 10: ATTACK", "timestamp": "1681455009"}, {"data": "141.89.221.182: Start of post-exploitation", "timestamp": "1681455009"}]
|
[{"data": "141.89.221.182: start of attack", "timestamp": "1681456600"}, {"data": "141.89.221.182: command 0: ATTACK", "timestamp": "1681456600"}, {"data": "141.89.221.182: command 1: ATTACK", "timestamp": "1681456601"}, {"data": "141.89.221.182: Start of post-exploitation", "timestamp": "1681456601"}]
|
|
@ -1 +1 @@
|
||||||
1681455007
|
1681456600
|
|
@ -1 +1 @@
|
||||||
1681455000
|
1681456598
|
|
@ -1555,15 +1555,29 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function add_info(blue) {
|
function add_info(blue) {
|
||||||
|
let idx = 2;
|
||||||
blue.sort(timestamp_sort);
|
blue.sort(timestamp_sort);
|
||||||
let blue_count = blue.length;
|
let blue_count = blue.length;
|
||||||
if (blue_count > 1 && document.getElementById('attackstart').getAttribute('data-start') !== '-1') {
|
if (blue_count > idx && document.getElementById('attackstart').getAttribute('data-start') !== '-1') {
|
||||||
let t = to_min_s(document.getElementById('attackstart').getAttribute('data-start'), blue[1].timestamp);
|
let t = to_min_s(document.getElementById('attackstart').getAttribute('data-start'), blue[idx].timestamp);
|
||||||
blue.splice(1, 0, {data: `Time to respond: ${t}`, timestamp: parseInt(blue[1].timestamp)})
|
if (parseInt(t.split('m')[0]) > 5) {
|
||||||
|
blue.splice(idx, 0, {data: `<b style='color: red'>Time to respond: ${t}</b>`, timestamp: parseInt(blue[idx].timestamp)})
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
blue.splice(idx, 0, {data: `Time to respond: ${t}`, timestamp: parseInt(blue[idx].timestamp)})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function updateCounters(data) {
|
||||||
|
data.red.forEach(el => {
|
||||||
|
if (document.getElementById('simstart').getAttribute('data-start') !== '-1' && el.data.toLowerCase().includes("start of attack"))
|
||||||
|
document.getElementById('attackstart').setAttribute('data-start', el.timestamp);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
function populateTimeline(data) {
|
function populateTimeline(data) {
|
||||||
|
updateCounters(data);
|
||||||
add_info(data.blue);
|
add_info(data.blue);
|
||||||
data = flatten_dict(data);
|
data = flatten_dict(data);
|
||||||
data.sort(timestamp_sort);
|
data.sort(timestamp_sort);
|
||||||
|
|
Loading…
Reference in New Issue