main
ts 262 lines 5.34 KB
Raw
1 import type { SafeAny } from "./common"
2
3 export interface ThreatIntelResponse {
4 comment: string | null
5 ioc_source: string
6 report_url: string | null
7 score: string | null
8 timestamp: string | null
9 type: string | null
10 value: string | null
11 virustotal_url: string | null
12 }
13
14 export interface StructuredAgentResponse {
15 response: string
16 thinking_process: string | null
17 }
18
19 export interface MCPQueryResponse {
20 message: string
21 success: boolean
22 result?: SafeAny
23 structured_result?: StructuredAgentResponse
24 execution_time?: number
25 }
26
27 export interface EpssScore {
28 cve: string
29 /** a float (0.000680000) */
30 epss: string
31 /** a float (0.299330000) */
32 percentile: string
33 /** a date (2024-06-27) */
34 date: string | Date
35 }
36
37 export interface EvaluationData {
38 rank: number
39 host_prev: string
40 eps: string
41 paths: EvaluationDataPath[]
42 parents: EvaluationDataParent[]
43 hashes: EvaluationDataHash[]
44 network: EvaluationDataNetwork[]
45 description: string
46 intel: string
47 /** ignore */
48 truncated: EvaluationDataTruncated
49 /** ignore */
50 tags: EvaluationDataTag[]
51 }
52
53 export interface EvaluationDataHash {
54 hash: string
55 percentage: number
56 }
57
58 export interface EvaluationDataNetwork {
59 port: string
60 /** percentage */
61 usage: number
62 }
63
64 export interface EvaluationDataParent {
65 name: string
66 percentage: number
67 }
68
69 export interface EvaluationDataPath {
70 directory: string
71 percentage: number
72 }
73
74 export interface EvaluationDataTag {
75 category: string
76 type: string
77 description: string
78 field4: string
79 field5: string
80 color: string
81 }
82
83 export interface EvaluationDataTruncated {
84 paths: number
85 parents: number
86 grandparents: number
87 children: number
88 network: number
89 hashes: number
90 }
91
92 export interface AiAnalysisResponse {
93 analysis: string
94 base64_decoded: string
95 confidence_score: number
96 threat_indicators: string
97 risk_evaluation: "low" | "medium" | "high"
98 }
99
100 export interface AiWazuhExclusionRuleResponse {
101 wazuh_exclusion_rule: string
102 wazuh_exclusion_rule_justification: string
103 }
104
105 export interface AiVelociraptorArtifactRecommendationResponse {
106 artifact_recommendations: {
107 name: string
108 description: string
109 explanation: string
110 }[]
111 general_thoughts: string
112 }
113
114 export interface VirusTotalResponse {
115 data: VirusTotal
116 }
117
118 export interface VirusTotal {
119 data: VirusTotalData
120 }
121
122 export interface VirusTotalData {
123 id: string
124 type: string
125 links: { [key: string]: string }
126 attributes: VirusTotalAttributes
127 }
128
129 export interface VirusTotalAttributes {
130 total_votes: { [key in VirusTotalLastAnalysisResultCategory]: number }
131 last_analysis_results: { [key: string]: VirusTotalLastAnalysisResult }
132 regional_internet_registry: string | null
133 continent: string | null
134 last_modification_date: number
135 crowdsourced_context: string | null
136 tags: string[]
137 asn: number
138 whois: string
139 whois_date: number
140 reputation: number
141 last_analysis_date: number
142 jarm: string
143 country: string | null
144 as_owner: string
145 last_analysis_stats: VirusTotalLastAnalysisStats
146 last_https_certificate_date: number
147 network: string
148 last_https_certificate: VirusTotalLastHTTPSCertificate
149 }
150
151 export interface VirusTotalLastAnalysisResult {
152 method: string
153 engine_name: string
154 category: VirusTotalLastAnalysisResultCategory
155 result: VirusTotalLastAnalysisResultResult
156 }
157
158 export enum VirusTotalLastAnalysisResultCategory {
159 Harmless = "harmless",
160 Malicious = "malicious",
161 Suspicious = "suspicious",
162 Undetected = "undetected",
163 Timeout = "timeout"
164 }
165
166 export enum VirusTotalLastAnalysisResultResult {
167 Clean = "clean",
168 Malicious = "malicious",
169 Suspicious = "suspicious",
170 Unrated = "unrated"
171 }
172
173 export interface VirusTotalLastAnalysisStats {
174 malicious: number
175 suspicious: number
176 undetected: number
177 harmless: number
178 timeout: number
179 }
180
181 export interface VirusTotalLastHTTPSCertificate {
182 cert_signature: {
183 signature_algorithm: string
184 signature: string
185 }
186 extensions: VirusTotalLastHTTPSCertificateExtensions
187 validity: {
188 not_after: Date
189 not_before: Date
190 }
191 size: number
192 version: string
193 public_key: {
194 algorithm: string
195 ec: {
196 oid: string
197 pub: string
198 }
199 }
200 thumbprint_sha256: string
201 thumbprint: string
202 serial_number: string
203 issuer: { [key: string]: string }
204 subject: { [key: string]: string }
205 }
206
207 export interface VirusTotalLastHTTPSCertificateExtensions {
208 authority_key_identifier: { [key: string]: string }
209 subject_key_identifier: string
210 subject_alternative_name: string[]
211 certificate_policies: string[]
212 key_usage: string[]
213 extended_key_usage: string[]
214 crl_distribution_points: string[]
215 ca_information_access: { [key: string]: string }
216 CA: boolean
217 "1.3.6.1.4.1.11129.2.4.2": string
218 }
219
220 export interface VirusTotalAnalysis {
221 type: string
222 id: string
223 attributes: VirusTotalAnalysisAttributes
224 links: Record<string, string>
225 }
226
227 export interface VirusTotalAnalysisAttributes {
228 date: number
229 status: "queued" | "completed"
230 stats: VirusTotalAnalysisStats
231 results: { [key: string]: VirusTotalAnalysisResult }
232 }
233
234 export interface VirusTotalAnalysisResult {
235 method: string
236 engine_name: string
237 engine_version: null | string
238 engine_update: string
239 category: string
240 result: null | string
241 }
242
243 export interface VirusTotalAnalysisStats {
244 harmless: number
245 malicious: number
246 suspicious: number
247 undetected: number
248 timeout: number
249 confirmed_timeout: number
250 failure: number
251 type_unsupported: number
252 "confirmed-timeout": number
253 "type-unsupported": number
254 }
255
256 export interface VirusTotalFileCheckResponse {
257 type: string
258 id: string
259 links: {
260 self: string
261 }
262 }