(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0d70a2"],{"74b1":function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("b-card-group",{attrs:{deck:""}},[a("mltd-card"),a("od-card")],1),a("b-card-group",{staticClass:"mt-3",attrs:{deck:""}},[a("ceptd-card")],1)],1)},n=[],s=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("b-card",{attrs:{"bg-variant":"primary","text-variant":"white"},scopedSlots:e._u([{key:"header",fn:function(){return[a("b-row",[a("b-col",{staticClass:"text-left"},[a("h4",[e._v("MLTD")])]),a("b-col",{staticClass:"text-right"},[a("b-dropdown",{attrs:{size:"sm",variant:"primary","no-caret":"",right:""},scopedSlots:e._u([{key:"button-content",fn:function(){return[a("fa",{attrs:{icon:"cogs"}})]},proxy:!0}])},[a("b-dropdown-item",{on:{click:e.start}},[e._v(" Start new instance ")])],1)],1)],1)]},proxy:!0}])},[e.items.length>0?a("b-table",{attrs:{fields:e.fields,items:e.items,"thead-class":"text-white","tbody-class":"text-white"},scopedSlots:e._u([{key:"cell(created_at)",fn:function(t){return[a("running-for",{staticClass:"red",attrs:{date:new Date(t.item.created_at)},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.minutes)+" Minutes and "+e._s(t.seconds)+" Seconds ")]}}],null,!0)})]}},{key:"cell(actions)",fn:function(t){return[a("b-button",{attrs:{variant:"danger",size:"sm",title:"Stop"},on:{click:function(a){return a.stopPropagation(),e.stop(t.item.process_id)}}},[a("fa",{attrs:{icon:"stop"}})],1)]}}],null,!1,4095574679)}):e._e(),a("b-row",{attrs:{"align-h":"end"}},[a("b-form-group",{attrs:{"label-cols":"3","label-cols-lg":"3","label-size":"sm",label:"Top Events","label-for":"input-sm"}},[a("b-input-group",{attrs:{size:"sm"}},[a("b-form-input",{attrs:{type:"number"},model:{value:e.top,callback:function(t){e.top=t},expression:"top"}}),a("b-input-group-append",[a("b-button",{attrs:{variant:"info"},on:{click:e.train}},[e._v(" Get ")])],1)],1)],1)],1),e.topResults.length>0?a("b-row",[a("b-form-tags",{staticClass:"mb-2",attrs:{disabled:"",placeholder:""},model:{value:e.topResults,callback:function(t){e.topResults=t},expression:"topResults"}}),a("h6",[e._v("Timeframe: "+e._s(e.topTimeframe))])],1):e._e()],1)},o=[],i=(a("96cf"),a("1da1")),c=a("bc3a"),l=a.n(c),u=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("span",[e._t("default",[e._v(e._s(e.days)+" days "+e._s(e.hours)+" hours "+e._s(e.minutes)+" minutes "+e._s(e.seconds)+" seconds")],{days:e.days,hours:e.hours,minutes:e.minutes,seconds:e.seconds})],2)},d=[],p={name:"RunningFor",props:{date:{required:!0}},data:function(){return{interval:null,days:0,hours:0,minutes:0,seconds:0,intervals:{second:1e3,minute:6e4,hour:36e5,day:864e5}}},mounted:function(){var e=this;this.interval=setInterval((function(){e.updateDiffs()}),1e3),this.updateDiffs()},destroyed:function(){clearInterval(this.interval)},methods:{updateDiffs:function(){var e=Math.abs(Date.now()-this.date.getTime());this.days=Math.floor(e/this.intervals.day),e-=this.days*this.intervals.day,this.hours=Math.floor(e/this.intervals.hour),e-=this.hours*this.intervals.hour,this.minutes=Math.floor(e/this.intervals.minute),e-=this.minutes*this.intervals.minute,this.seconds=Math.floor(e/this.intervals.second)}}},f=p,h=a("2877"),m=Object(h["a"])(f,u,d,!1,null,"32d5ab49",null),v=m.exports,b={name:"MltdCard",components:{RunningFor:v},data:function(){return{top:10,topResults:[],topTimeframe:"",fields:[{key:"process_id",label:"Process"},{key:"created_at",label:"Running for"},{key:"actions",label:"Actions"}],items:[]}},created:function(){this.status()},methods:{start:function(){var e=this;return Object(i["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,l.a.get("/v1/mltd/start");case 3:e.status(),e.$toasted.success("MTLD instance started!"),t.next=10;break;case 7:t.prev=7,t.t0=t["catch"](0),e.$toasted.error("There was an error!");case 10:case"end":return t.stop()}}),t,null,[[0,7]])})))()},status:function(){var e=this;return Object(i["a"])(regeneratorRuntime.mark((function t(){var a,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,l.a.get("/v1/mltd/status");case 3:a=t.sent,r=a.data,e.items=r,t.next=11;break;case 8:t.prev=8,t.t0=t["catch"](0),e.$toasted.error("There was an error while fetching running MLTD instances!");case 11:case"end":return t.stop()}}),t,null,[[0,8]])})))()},stop:function(e){var t=this;return Object(i["a"])(regeneratorRuntime.mark((function a(){return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,l.a.get("/v1/mltd/stop/"+e);case 3:t.status(),t.$toasted.success("MTLD instance stopped!"),a.next=10;break;case 7:a.prev=7,a.t0=a["catch"](0),t.$toasted.error("There was an error!");case 10:case"end":return a.stop()}}),a,null,[[0,7]])})))()},train:function(){var e=this;return Object(i["a"])(regeneratorRuntime.mark((function t(){var a,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,l.a.get("/v1/mltd/1/"+e.top);case 3:a=t.sent,r=a.data,e.topResults=r.important_events,e.topTimeframe=r.timeframe,t.next=12;break;case 9:t.prev=9,t.t0=t["catch"](0),e.$toasted.error("There was an error!");case 12:case"end":return t.stop()}}),t,null,[[0,9]])})))()}}},g=b,y=Object(h["a"])(g,s,o,!1,null,"16d34248",null),w=y.exports,x=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("b-card",{attrs:{"bg-variant":"success","text-variant":"white"},scopedSlots:e._u([{key:"header",fn:function(){return[a("b-row",[a("b-col",{staticClass:"text-left"},[a("h5",[e._v("OD")])]),a("b-col",{staticClass:"text-right"},[a("b-dropdown",{attrs:{size:"sm",variant:"success","no-caret":"",right:""},scopedSlots:e._u([{key:"button-content",fn:function(){return[a("fa",{attrs:{icon:"cogs"}})]},proxy:!0}])},[a("b-dropdown-item",{on:{click:e.start}},[e._v(" Start new instance ")])],1)],1)],1)]},proxy:!0}])},[e.items.length>0?a("b-table",{attrs:{fields:e.fields,items:e.items,"thead-class":"text-white","tbody-class":"text-white"},scopedSlots:e._u([{key:"cell(created_at)",fn:function(t){return[a("running-for",{staticClass:"red",attrs:{date:new Date(t.item.created_at)},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.minutes)+" Minutes and "+e._s(t.seconds)+" Seconds ")]}}],null,!0)})]}},{key:"cell(actions)",fn:function(t){return[a("b-button",{attrs:{variant:"secondary",size:"sm",title:"Analyze"},on:{click:function(a){return a.stopPropagation(),e.showPcapModal(t.item.process_id)}}},[a("fa",{attrs:{icon:"search"}})],1),a("b-button",{staticClass:"ml-2",attrs:{variant:"danger",size:"sm",title:"Stop"},on:{click:function(a){return a.stopPropagation(),e.stop(t.item.process_id)}}},[a("fa",{attrs:{icon:"stop"}})],1)]}}],null,!1,44482582)}):e._e(),a("b-modal",{ref:"pcap-modal",attrs:{title:"Upload PCAP","ok-title":"Upload","ok-variant":"primary","cancel-variant":"muted",size:"lg"},on:{ok:e.upload}},[a("b-form",{attrs:{autocomplete:"off"}},[a("b-form-file",{attrs:{state:Boolean(e.file),accept:".pcap",placeholder:"Choose a file or drop it here...","drop-placeholder":"Drop file here..."},model:{value:e.file,callback:function(t){e.file=t},expression:"file"}})],1)],1)],1)},k=[],_={name:"OdCard",components:{RunningFor:v},data:function(){return{file:null,fields:[{key:"process_id",label:"Process"},{key:"created_at",label:"Running for"},{key:"actions",label:"Actions"}],analyzePid:"",items:[]}},created:function(){this.status()},methods:{start:function(){var e=this;return Object(i["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,l.a.get("/v1/od/start");case 3:e.status(),e.$toasted.success("OD instance started!"),t.next=10;break;case 7:t.prev=7,t.t0=t["catch"](0),e.$toasted.error("There was an error!");case 10:case"end":return t.stop()}}),t,null,[[0,7]])})))()},status:function(){var e=this;return Object(i["a"])(regeneratorRuntime.mark((function t(){var a,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,l.a.get("/v1/od/status");case 3:a=t.sent,r=a.data,e.items=r,t.next=11;break;case 8:t.prev=8,t.t0=t["catch"](0),e.$toasted.error("There was an error while fetching running OD instances!");case 11:case"end":return t.stop()}}),t,null,[[0,8]])})))()},showPcapModal:function(e){this.analyzePid=e,this.$refs["pcap-modal"].show()},stop:function(e){var t=this;return Object(i["a"])(regeneratorRuntime.mark((function a(){return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,l.a.get("/v1/od/stop/"+e);case 3:t.status(),t.$toasted.success("OD instance stopped!"),a.next=10;break;case 7:a.prev=7,a.t0=a["catch"](0),t.$toasted.error("There was an error!");case 10:case"end":return a.stop()}}),a,null,[[0,7]])})))()},upload:function(){var e=this;return Object(i["a"])(regeneratorRuntime.mark((function t(){var a;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return a=new FormData,a.append("file",e.file),t.next=4,l.a.post("/v1/od/analyze/"+e.analyzePid,a,{headers:{"Content-Type":"multipart/form-data"}}).then((function(){e.file=null,e.analyzePid="",e.$toasted.success("PCAP uploaded successfully!")})).catch((function(){e.$toasted.error("There was an error while uploading the PCAP file!")}));case 4:case"end":return t.stop()}}),t)})))()}}},j=_,C=Object(h["a"])(j,x,k,!1,null,"7cd71a66",null),S=C.exports,R=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("b-card",{attrs:{"bg-variant":"light"},scopedSlots:e._u([{key:"header",fn:function(){return[a("b-row",[a("b-col",{staticClass:"text-left"},[a("h5",[e._v("CEPTD")])]),a("b-col",{staticClass:"text-right"},[a("b-card-text",[e._v("Status: Running")])],1)],1)]},proxy:!0}])},[a("capec-list")],1)},O=[],P=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("data-table",{ref:"datatable",attrs:{"search-route":"capec"},on:{"context-changed":e.onContextChanged}},[a("b-table",{ref:"table",attrs:{stacked:"md",fields:e.fields,items:e.dataLoadProvider,busy:e.isBusy,"empty-text":"No records found"},on:{"update:busy":function(t){e.isBusy=t}},scopedSlots:e._u([{key:"cell(_source.timestamp)",fn:function(t){return[e._v(" "+e._s(e.formatDate(t.item._source.timestamp))+" ")]}},{key:"cell(actions)",fn:function(e){return[a("b-button",{staticClass:"mr-2",attrs:{variant:"info",title:"Paths"},on:{click:function(t){return t.stopPropagation(),e.toggleDetails(t)}}},[a("fa",{attrs:{icon:e.detailsShowing?"arrow-up":"arrow-down"}})],1)]}},{key:"row-details",fn:function(t){return[t.item._source.tree?a("div",[a("json-view",{attrs:{"root-key":t.item._source.cve,data:t.item._source.tree}})],1):e._e()]}}])})],1)],1)},D=[];a("d3b7"),a("25f0");var $=function(){return $=Object.assign||function(e){for(var t,a=1,r=arguments.length;ae.perPage?a("b-pagination",{staticClass:"justify-content-center",attrs:{"total-rows":e.totalRows,"per-page":e.perPage},on:{input:e.onContextChanged},model:{value:e.currentPage,callback:function(t){e.currentPage=t},expression:"currentPage"}}):e._e()],1)],1)],2)},re=[],ne=(a("b64b"),{name:"Datatable",props:{lengthChange:{type:Boolean,default:!0},paging:{type:Boolean,default:!0},infos:{type:Boolean,default:!0},searchRoute:{type:String,default:null}},data:function(){return{currentPage:1,perPage:10,totalRows:0,pageOptions:[5,10,15,25,50],searchQuery:null,selected:[],action:null}},mounted:function(){this.actions&&(this.action=Object.keys(this.actions)[0])},methods:{onContextChanged:function(){this.$emit("context-changed")},loadData:function(e,t){var a=this;return Object(i["a"])(regeneratorRuntime.mark((function r(){var n,s;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,l.a.get(a.searchRoute,{params:{page:a.currentPage,perPage:a.perPage,column:e,direction:t?"desc":"asc"}});case 3:return n=r.sent,s=n.data,a.totalRows=s.total,r.abrupt("return",s.data);case 9:return r.prev=9,r.t0=r["catch"](0),console.error(r.t0),r.abrupt("return",[]);case 13:case"end":return r.stop()}}),r,null,[[0,9]])})))()}}}),se=ne,oe=Object(h["a"])(se,ae,re,!1,null,null,null),ie=oe.exports,ce={name:"CapecList",components:{DataTable:ie,"json-view":te},data:function(){return{isBusy:!1,fields:[{key:"_source.timestamp",label:"Timestamp"},{key:"_source.signature_id",label:"Signature ID"},{key:"_source.signature",label:"Signature"},{key:"_source.category",label:"Category"},{key:"_source.cve",label:"CVE"},{key:"actions",label:"Actions"}]}},methods:{dataLoadProvider:function(e){return this.$refs.datatable.loadData(e.sortBy,e.sortDesc)},onContextChanged:function(){return this.$refs.table.refresh()},formatDate:function(e){var t=new Date(e).toString();return t.substring(0,t.length-40)}}},le=ce,ue=Object(h["a"])(le,P,D,!1,null,"61b282af",null),de=ue.exports,pe={name:"CeptdCard",components:{CapecList:de},data:function(){return{file:null,fields:[{key:"process_id",label:"Process"},{key:"created_at",label:"Running for"},{key:"actions",label:"Actions"}],analyzePid:"",items:[]}},created:function(){this.status()},methods:{start:function(){var e=this;return Object(i["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,l.a.get("/v1/od/start");case 3:e.status(),e.$toasted.success("OD instance started!"),t.next=10;break;case 7:t.prev=7,t.t0=t["catch"](0),e.$toasted.error("There was an error!");case 10:case"end":return t.stop()}}),t,null,[[0,7]])})))()},status:function(){var e=this;return Object(i["a"])(regeneratorRuntime.mark((function t(){var a,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,l.a.get("/v1/od/status");case 3:a=t.sent,r=a.data,e.items=r,t.next=11;break;case 8:t.prev=8,t.t0=t["catch"](0),e.$toasted.error("There was an error while fetching running OD instances!");case 11:case"end":return t.stop()}}),t,null,[[0,8]])})))()},showPcapModal:function(e){var t=this;return Object(i["a"])(regeneratorRuntime.mark((function a(){return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:t.analyzePid=e,t.$refs["pcap-modal"].show();case 2:case"end":return a.stop()}}),a)})))()},stop:function(e){var t=this;return Object(i["a"])(regeneratorRuntime.mark((function a(){return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,l.a.get("/v1/od/stop/"+e);case 3:t.status(),t.$toasted.success("OD instance stopped!"),a.next=10;break;case 7:a.prev=7,a.t0=a["catch"](0),t.$toasted.error("There was an error!");case 10:case"end":return a.stop()}}),a,null,[[0,7]])})))()}}},fe=pe,he=Object(h["a"])(fe,R,O,!1,null,"b161a638",null),me=he.exports,ve={name:"Dashboard",components:{OdCard:S,MltdCard:w,CeptdCard:me}},be=ve,ge=Object(h["a"])(be,r,n,!1,null,"47d79d9c",null);t["default"]=ge.exports}}]); //# sourceMappingURL=chunk-2d0d70a2.7ea12236.js.map