diff --git a/.gitignore b/.gitignore index 7e24099e6..265b0436d 100644 --- a/.gitignore +++ b/.gitignore @@ -18,4 +18,4 @@ dist/ cmd/client/client cmd/client/dropdown cmd/dropdown/dropdown -cmd/web/web +cmd/web/web \ No newline at end of file diff --git a/backend/services/evidence.go b/backend/services/evidence.go index a2674c807..b041daf9f 100644 --- a/backend/services/evidence.go +++ b/backend/services/evidence.go @@ -111,6 +111,8 @@ func CreateEvidence(ctx context.Context, db *database.Connection, contentStore c fallthrough case "codeblock": fallthrough + case "c2-event": + fallthrough case "event": content = contentstore.NewBlob(i.Content) @@ -443,6 +445,8 @@ func UpdateEvidence(ctx context.Context, db *database.Connection, contentStore c fallthrough case "codeblock": fallthrough + case "c2-event": + fallthrough case "terminal-recording": content := contentstore.NewBlob(i.Content) processedKeys, err := content.ProcessPreviewAndUpload(contentStore) diff --git a/frontend/public/index.html b/frontend/public/index.html index 8e97d7423..a304ece5d 100644 --- a/frontend/public/index.html +++ b/frontend/public/index.html @@ -7,4 +7,4 @@ - + \ No newline at end of file diff --git a/frontend/src/components/bullet_chooser/evidence_type_chooser.tsx b/frontend/src/components/bullet_chooser/evidence_type_chooser.tsx index 08eb0da75..2e2be14e9 100644 --- a/frontend/src/components/bullet_chooser/evidence_type_chooser.tsx +++ b/frontend/src/components/bullet_chooser/evidence_type_chooser.tsx @@ -10,6 +10,7 @@ export type EvidenceTypeOption = BulletProps & { export const supportedEvidenceCount: Array = [ { name: 'Screenshot', id: 'image' }, { name: 'Code Block', id: 'codeblock' }, + { name: 'C2Event', id: 'c2-event' }, { name: 'Terminal Recording', id: 'terminal-recording' }, { name: 'HTTP Request/Response', id: 'http-request-cycle' }, { name: 'Events', id: 'event' }, diff --git a/frontend/src/components/c2-event/index.tsx b/frontend/src/components/c2-event/index.tsx new file mode 100644 index 000000000..0a38b13a5 --- /dev/null +++ b/frontend/src/components/c2-event/index.tsx @@ -0,0 +1,229 @@ +import * as React from 'react' +import { default as Input, TextArea, SharedProps} from 'src/components/input' +import { C2Event } from 'src/global_types' +import ComboBox from 'src/components/combobox' +import { useAsyncComponent } from 'src/helpers' +import LoadingSpinner from 'src/components/loading_spinner' +import WithLabel from 'src/components/with_label' +import classnames from 'classnames/bind' +const cx = classnames.bind(require('./stylesheet')) + +export const C2EventViewer = (props: { + disabled?: boolean, + value: C2Event, +}) => { + return ( +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+