Skip to content

Commit ea7bb90

Browse files
committed
docs(changeset): Exposing BeaconMeta source LogLine
1 parent 3ea36b2 commit ea7bb90

File tree

3 files changed

+45
-5
lines changed

3 files changed

+45
-5
lines changed

.changeset/little-beans-hammer.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@redeye/models': patch
3+
---
4+
5+
Exposing BeaconMeta source LogLine

applications/server/schema.graphql

+38-5
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,22 @@ type Annotation {
88
commandIds: [String]
99
date: DateTime!
1010
favorite: Boolean!
11+
generation: GenerationType!
1112
id: String!
1213
tags: [Tag!]
1314
text: String!
1415
user: String!
1516
}
1617

1718
input AnonymizationInput {
19+
findReplace: [FindReplaceInput!] = []
1820
removeHidden: Boolean = false
1921
removeKeystrokes: Boolean = false
2022
removePasswordsHashes: Boolean = false
2123
removeScreenshots: Boolean = false
24+
replaceDomainsAndIps: Boolean = false
25+
replaceHostnames: Boolean = false
26+
replaceUsernames: Boolean = false
2227
}
2328

2429
type Beacon {
@@ -61,6 +66,9 @@ type BeaconMeta {
6166
"""Process Identifier the beacon is running on"""
6267
pid: Int
6368

69+
"""The log line from which the BeaconMeta was extracted"""
70+
source: LogEntry!
71+
6472
"""The start time of the beacon"""
6573
startTime: DateTime
6674

@@ -71,21 +79,23 @@ type BeaconMeta {
7179
type Campaign {
7280
annotationCount: Int!
7381
beaconCount: Int!
74-
bloodStrikeServerCount: Int!
7582
commandCount: Int!
7683
computerCount: Int!
7784
creator: GlobalOperator
7885
firstLogTime: DateTime
7986
id: String!
8087
lastLogTime: DateTime
8188
lastOpenedBy: GlobalOperator
89+
migrationError: Boolean!
8290
name: String!
8391
parsingStatus: ParsingStatus!
92+
serverCount: Int!
8493
}
8594

8695
type Command {
8796
attackIds: [String!]
8897
beacon: Beacon!
98+
commandFailed: Boolean!
8999
commandGroups: [CommandGroup!]!
90100
id: String!
91101
input: LogEntry!
@@ -98,6 +108,7 @@ type Command {
98108
type CommandGroup {
99109
annotations: [Annotation!]!
100110
commandIds: [String!]!
111+
generation: GenerationType!
101112
id: String!
102113
}
103114

@@ -137,14 +148,26 @@ enum FileFlag {
137148
UPLOAD
138149
}
139150

151+
input FindReplaceInput {
152+
find: String = ""
153+
replace: String = ""
154+
}
155+
156+
"""How the entity was generated"""
157+
enum GenerationType {
158+
MANUAL
159+
PROCEDURAL
160+
PROCEDURAL_MODIFIED
161+
}
162+
140163
type GlobalOperator {
141164
id: String!
142165
name: String!
143166
}
144167

145168
type Host {
146169
beaconIds: [String!]!
147-
cobaltStrikeServer: Boolean!
170+
cobaltStrikeServer: Boolean
148171
displayName: String
149172
hidden: Boolean
150173
hostName: String!
@@ -245,7 +268,7 @@ type Mutation {
245268
createCampaign(creatorName: String!, name: String!): Campaign!
246269

247270
"""Create a global user"""
248-
createGlobalOperator(username: String!): GlobalOperator
271+
createGlobalOperator(password: String!, username: String!): GlobalOperator
249272

250273
"""Create a new link between two beacons"""
251274
createLink(
@@ -268,6 +291,9 @@ type Mutation {
268291
"""Delete a Campaign by id"""
269292
deleteCampaign(campaignId: String!): Boolean!
270293

294+
"""Delete a link"""
295+
deleteLink(campaignId: String!, id: String!): Link!
296+
271297
"""Edit a link"""
272298
editLink(
273299
campaignId: String!
@@ -327,9 +353,13 @@ type ParsingProgress {
327353

328354
"""The current state of Campaign parsing"""
329355
enum ParsingStatus {
356+
LIVE_PARSING_CS
357+
NOT_READY_TO_PARSE
330358
PARSING_COMPLETED
359+
PARSING_FAILURE
331360
PARSING_IN_PROGRESS
332361
PARSING_NOT_STARTED
362+
PARSING_QUEUED
333363
}
334364

335365
type PresentationCommandGroup {
@@ -408,7 +438,7 @@ type Query {
408438
files(beaconId: String, campaignId: String!, hostId: String): [File]
409439

410440
"""Get all the operators for all campaigns"""
411-
globalOperators: [GlobalOperator]
441+
globalOperators(password: String!): [GlobalOperator]
412442

413443
"""Get all the hosts for a project"""
414444
hosts(campaignId: String!, hidden: Boolean = false): [Host]
@@ -436,6 +466,9 @@ type Query {
436466
"""Get categories for presentation mode"""
437467
presentationItems(campaignId: String!, hidden: Boolean = false): [PresentationItem]
438468

469+
"""Search Annotations from textQuery"""
470+
searchAnnotations(campaignId: String!, hidden: Boolean = false, searchQuery: String!): [Annotation!]
471+
439472
"""Search Commands from textQuery"""
440473
searchCommands(campaignId: String!, hidden: Boolean = false, searchQuery: String!): [Command!]
441474

@@ -457,7 +490,7 @@ type Query {
457490

458491
type Server {
459492
beacons: [Beacon!]!
460-
displayName: String
493+
displayName: String!
461494
hidden: Boolean
462495
id: String!
463496
logsCount: Float!

packages/models/src/projectModels/BeaconMeta.ts

+2
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ export class BeaconMeta {
4343
@Property({ nullable: true })
4444
origin?: string;
4545

46+
// This is likely to be nullable in future due to different ways we have to extract this data in other C2 tools
47+
@Field(() => LogEntry, { description: 'The log line from which the BeaconMeta was extracted' })
4648
@OneToOne({ owner: true, entity: () => LogEntry })
4749
source: LogEntry;
4850

0 commit comments

Comments
 (0)