erosolar-cli 1.7.55 → 1.7.57

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (273) hide show
  1. package/dist/shell/unifiedInputProcessor.d.ts +15 -12
  2. package/dist/shell/unifiedInputProcessor.d.ts.map +1 -1
  3. package/dist/shell/unifiedInputProcessor.js +45 -72
  4. package/dist/shell/unifiedInputProcessor.js.map +1 -1
  5. package/package.json +4 -4
  6. package/dist/active-stack-security.d.ts +0 -110
  7. package/dist/active-stack-security.js +0 -313
  8. package/dist/active-stack-security.js.map +0 -1
  9. package/dist/advanced-targeting.d.ts +0 -113
  10. package/dist/advanced-targeting.js +0 -252
  11. package/dist/advanced-targeting.js.map +0 -1
  12. package/dist/bin/adapters/node/index.js +0 -33
  13. package/dist/bin/adapters/types.js +0 -1
  14. package/dist/bin/alpha-zero/agentWrapper.js +0 -165
  15. package/dist/bin/alpha-zero/codeEvaluator.js +0 -272
  16. package/dist/bin/alpha-zero/competitiveRunner.js +0 -219
  17. package/dist/bin/alpha-zero/index.js +0 -98
  18. package/dist/bin/alpha-zero/introspection.js +0 -298
  19. package/dist/bin/alpha-zero/metricsTracker.js +0 -207
  20. package/dist/bin/alpha-zero/security/core.js +0 -269
  21. package/dist/bin/alpha-zero/security/google.js +0 -308
  22. package/dist/bin/alpha-zero/security/googleLoader.js +0 -40
  23. package/dist/bin/alpha-zero/security/index.js +0 -31
  24. package/dist/bin/alpha-zero/security/simulation.js +0 -274
  25. package/dist/bin/alpha-zero/selfModification.js +0 -231
  26. package/dist/bin/alpha-zero/types.js +0 -30
  27. package/dist/bin/bin/erosolar-optimized.js +0 -205
  28. package/dist/bin/capabilities/agentSpawningCapability.js +0 -116
  29. package/dist/bin/capabilities/bashCapability.js +0 -22
  30. package/dist/bin/capabilities/cloudCapability.js +0 -36
  31. package/dist/bin/capabilities/codeAnalysisCapability.js +0 -22
  32. package/dist/bin/capabilities/codeQualityCapability.js +0 -23
  33. package/dist/bin/capabilities/dependencySecurityCapability.js +0 -22
  34. package/dist/bin/capabilities/devCapability.js +0 -22
  35. package/dist/bin/capabilities/editCapability.js +0 -28
  36. package/dist/bin/capabilities/emailCapability.js +0 -20
  37. package/dist/bin/capabilities/enhancedGitCapability.js +0 -221
  38. package/dist/bin/capabilities/filesystemCapability.js +0 -22
  39. package/dist/bin/capabilities/globCapability.js +0 -28
  40. package/dist/bin/capabilities/interactionCapability.js +0 -20
  41. package/dist/bin/capabilities/learnCapability.js +0 -22
  42. package/dist/bin/capabilities/mcpCapability.js +0 -20
  43. package/dist/bin/capabilities/notebookCapability.js +0 -28
  44. package/dist/bin/capabilities/planningCapability.js +0 -27
  45. package/dist/bin/capabilities/refactoringCapability.js +0 -23
  46. package/dist/bin/capabilities/repoChecksCapability.js +0 -22
  47. package/dist/bin/capabilities/searchCapability.js +0 -22
  48. package/dist/bin/capabilities/skillCapability.js +0 -76
  49. package/dist/bin/capabilities/taskManagementCapability.js +0 -20
  50. package/dist/bin/capabilities/testingCapability.js +0 -23
  51. package/dist/bin/capabilities/toolManifest.js +0 -159
  52. package/dist/bin/capabilities/toolRegistry.js +0 -114
  53. package/dist/bin/capabilities/webCapability.js +0 -20
  54. package/dist/bin/config.js +0 -139
  55. package/dist/bin/contracts/v1/agent.js +0 -7
  56. package/dist/bin/contracts/v1/agentProfileManifest.js +0 -8
  57. package/dist/bin/contracts/v1/agentRules.js +0 -9
  58. package/dist/bin/contracts/v1/toolAccess.js +0 -8
  59. package/dist/bin/erosolar-optimized.d.ts +0 -12
  60. package/dist/bin/erosolar-optimized.d.ts.map +0 -1
  61. package/dist/bin/erosolar-optimized.js +0 -239
  62. package/dist/bin/erosolar-optimized.js.map +0 -1
  63. package/dist/bin/headless/headlessApp.js +0 -172
  64. package/dist/bin/mcp/config.js +0 -202
  65. package/dist/bin/mcp/stdioClient.js +0 -172
  66. package/dist/bin/mcp/toolBridge.js +0 -104
  67. package/dist/bin/mcp/types.js +0 -1
  68. package/dist/bin/plugins/index.js +0 -113
  69. package/dist/bin/plugins/providers/anthropic/index.js +0 -25
  70. package/dist/bin/plugins/providers/deepseek/index.js +0 -24
  71. package/dist/bin/plugins/providers/google/index.js +0 -26
  72. package/dist/bin/plugins/providers/index.js +0 -19
  73. package/dist/bin/plugins/providers/ollama/index.js +0 -59
  74. package/dist/bin/plugins/providers/openai/index.js +0 -26
  75. package/dist/bin/plugins/providers/xai/index.js +0 -24
  76. package/dist/bin/plugins/tools/agentSpawning/agentSpawningPlugin.js +0 -8
  77. package/dist/bin/plugins/tools/bash/localBashPlugin.js +0 -13
  78. package/dist/bin/plugins/tools/checks/localRepoChecksPlugin.js +0 -13
  79. package/dist/bin/plugins/tools/cloud/cloudPlugin.js +0 -13
  80. package/dist/bin/plugins/tools/codeAnalysis/codeAnalysisPlugin.js +0 -13
  81. package/dist/bin/plugins/tools/codeQuality/codeQualityPlugin.js +0 -13
  82. package/dist/bin/plugins/tools/dependency/dependencyPlugin.js +0 -11
  83. package/dist/bin/plugins/tools/development/devPlugin.js +0 -13
  84. package/dist/bin/plugins/tools/edit/editPlugin.js +0 -14
  85. package/dist/bin/plugins/tools/email/emailPlugin.js +0 -11
  86. package/dist/bin/plugins/tools/enhancedGit/enhancedGitPlugin.js +0 -8
  87. package/dist/bin/plugins/tools/filesystem/localFilesystemPlugin.js +0 -13
  88. package/dist/bin/plugins/tools/glob/globPlugin.js +0 -14
  89. package/dist/bin/plugins/tools/index.js +0 -2
  90. package/dist/bin/plugins/tools/interaction/interactionPlugin.js +0 -11
  91. package/dist/bin/plugins/tools/learn/learnPlugin.js +0 -13
  92. package/dist/bin/plugins/tools/mcp/mcpPlugin.js +0 -8
  93. package/dist/bin/plugins/tools/nodeDefaults.js +0 -56
  94. package/dist/bin/plugins/tools/notebook/notebookPlugin.js +0 -14
  95. package/dist/bin/plugins/tools/planning/planningPlugin.js +0 -14
  96. package/dist/bin/plugins/tools/refactoring/refactoringPlugin.js +0 -11
  97. package/dist/bin/plugins/tools/registry.js +0 -57
  98. package/dist/bin/plugins/tools/search/localSearchPlugin.js +0 -13
  99. package/dist/bin/plugins/tools/skills/skillPlugin.js +0 -8
  100. package/dist/bin/plugins/tools/taskManagement/taskManagementPlugin.js +0 -11
  101. package/dist/bin/plugins/tools/testing/testingPlugin.js +0 -11
  102. package/dist/bin/plugins/tools/web/webPlugin.js +0 -11
  103. package/dist/bin/providers/anthropicProvider.js +0 -329
  104. package/dist/bin/providers/googleProvider.js +0 -203
  105. package/dist/bin/providers/openaiChatCompletionsProvider.js +0 -208
  106. package/dist/bin/providers/openaiResponsesProvider.js +0 -249
  107. package/dist/bin/providers/providerFactory.js +0 -24
  108. package/dist/bin/runtime/agentController.js +0 -321
  109. package/dist/bin/runtime/agentHost.js +0 -153
  110. package/dist/bin/runtime/agentSession.js +0 -195
  111. package/dist/bin/runtime/node.js +0 -10
  112. package/dist/bin/runtime/universal.js +0 -28
  113. package/dist/bin/skills/skillRepository.js +0 -236
  114. package/dist/bin/skills/types.js +0 -1
  115. package/dist/bin/subagents/taskRunner.js +0 -269
  116. package/dist/bin/tools/backgroundBashTools.js +0 -211
  117. package/dist/bin/tools/bashTools.js +0 -159
  118. package/dist/bin/tools/cloudTools.js +0 -864
  119. package/dist/bin/tools/codeAnalysisTools.js +0 -641
  120. package/dist/bin/tools/codeQualityTools.js +0 -294
  121. package/dist/bin/tools/dependencyTools.js +0 -282
  122. package/dist/bin/tools/devTools.js +0 -238
  123. package/dist/bin/tools/diffUtils.js +0 -137
  124. package/dist/bin/tools/editTools.js +0 -134
  125. package/dist/bin/tools/emailTools.js +0 -448
  126. package/dist/bin/tools/fileTools.js +0 -282
  127. package/dist/bin/tools/globTools.js +0 -173
  128. package/dist/bin/tools/grepTools.js +0 -332
  129. package/dist/bin/tools/interactionTools.js +0 -170
  130. package/dist/bin/tools/learnTools.js +0 -1818
  131. package/dist/bin/tools/notebookEditTools.js +0 -196
  132. package/dist/bin/tools/planningTools.js +0 -46
  133. package/dist/bin/tools/refactoringTools.js +0 -293
  134. package/dist/bin/tools/repoChecksTools.js +0 -160
  135. package/dist/bin/tools/searchTools.js +0 -206
  136. package/dist/bin/tools/skillTools.js +0 -177
  137. package/dist/bin/tools/taskManagementTools.js +0 -156
  138. package/dist/bin/tools/testingTools.js +0 -232
  139. package/dist/bin/tools/webTools.js +0 -480
  140. package/dist/bin/workspace.js +0 -106
  141. package/dist/bin/workspace.validator.js +0 -213
  142. package/dist/capabilities/offensiveSecurityCapability.d.ts +0 -26
  143. package/dist/capabilities/offensiveSecurityCapability.d.ts.map +0 -1
  144. package/dist/capabilities/offensiveSecurityCapability.js +0 -58
  145. package/dist/capabilities/offensiveSecurityCapability.js.map +0 -1
  146. package/dist/capabilities/realSecurityCapability.d.ts +0 -26
  147. package/dist/capabilities/realSecurityCapability.d.ts.map +0 -1
  148. package/dist/capabilities/realSecurityCapability.js +0 -53
  149. package/dist/capabilities/realSecurityCapability.js.map +0 -1
  150. package/dist/capabilities/securityCapability.d.ts +0 -32
  151. package/dist/capabilities/securityCapability.d.ts.map +0 -1
  152. package/dist/capabilities/securityCapability.js +0 -57
  153. package/dist/capabilities/securityCapability.js.map +0 -1
  154. package/dist/capabilities/ultimateSecurityCapability.d.ts +0 -42
  155. package/dist/capabilities/ultimateSecurityCapability.d.ts.map +0 -1
  156. package/dist/capabilities/ultimateSecurityCapability.js +0 -96
  157. package/dist/capabilities/ultimateSecurityCapability.js.map +0 -1
  158. package/dist/core/designThoughtCheck.d.ts +0 -196
  159. package/dist/core/designThoughtCheck.d.ts.map +0 -1
  160. package/dist/core/designThoughtCheck.js +0 -287
  161. package/dist/core/designThoughtCheck.js.map +0 -1
  162. package/dist/core/designThoughtCheckEngine.d.ts +0 -58
  163. package/dist/core/designThoughtCheckEngine.d.ts.map +0 -1
  164. package/dist/core/designThoughtCheckEngine.js +0 -358
  165. package/dist/core/designThoughtCheckEngine.js.map +0 -1
  166. package/dist/core/designThoughtCheckIntegration.d.ts +0 -103
  167. package/dist/core/designThoughtCheckIntegration.d.ts.map +0 -1
  168. package/dist/core/designThoughtCheckIntegration.js +0 -207
  169. package/dist/core/designThoughtCheckIntegration.js.map +0 -1
  170. package/dist/core/intelligenceTools.d.ts +0 -19
  171. package/dist/core/intelligenceTools.d.ts.map +0 -1
  172. package/dist/core/intelligenceTools.js +0 -453
  173. package/dist/core/intelligenceTools.js.map +0 -1
  174. package/dist/core/operationalTools.d.ts +0 -19
  175. package/dist/core/operationalTools.d.ts.map +0 -1
  176. package/dist/core/operationalTools.js +0 -467
  177. package/dist/core/operationalTools.js.map +0 -1
  178. package/dist/offensive/core/offensive-engine.d.ts +0 -171
  179. package/dist/offensive/core/offensive-engine.d.ts.map +0 -1
  180. package/dist/offensive/core/offensive-engine.js +0 -345
  181. package/dist/offensive/core/offensive-engine.js.map +0 -1
  182. package/dist/offensive/core/offensive-integration.d.ts +0 -129
  183. package/dist/offensive/core/offensive-integration.d.ts.map +0 -1
  184. package/dist/offensive/core/offensive-integration.js +0 -364
  185. package/dist/offensive/core/offensive-integration.js.map +0 -1
  186. package/dist/offensive/core/offensive-tools.d.ts +0 -55
  187. package/dist/offensive/core/offensive-tools.d.ts.map +0 -1
  188. package/dist/offensive/core/offensive-tools.js +0 -438
  189. package/dist/offensive/core/offensive-tools.js.map +0 -1
  190. package/dist/offensive/offensive-cli.d.ts +0 -48
  191. package/dist/offensive/offensive-cli.d.ts.map +0 -1
  192. package/dist/offensive/offensive-cli.js +0 -233
  193. package/dist/offensive/offensive-cli.js.map +0 -1
  194. package/dist/security/apt-simulation-cli.d.ts +0 -57
  195. package/dist/security/apt-simulation-cli.d.ts.map +0 -1
  196. package/dist/security/apt-simulation-cli.js +0 -278
  197. package/dist/security/apt-simulation-cli.js.map +0 -1
  198. package/dist/security/apt-simulation-engine-complete.d.ts +0 -97
  199. package/dist/security/apt-simulation-engine-complete.d.ts.map +0 -1
  200. package/dist/security/apt-simulation-engine-complete.js +0 -441
  201. package/dist/security/apt-simulation-engine-complete.js.map +0 -1
  202. package/dist/security/apt-simulation-engine.d.ts +0 -97
  203. package/dist/security/apt-simulation-engine.d.ts.map +0 -1
  204. package/dist/security/apt-simulation-engine.js +0 -441
  205. package/dist/security/apt-simulation-engine.js.map +0 -1
  206. package/dist/security/authorization.d.ts +0 -45
  207. package/dist/security/authorization.d.ts.map +0 -1
  208. package/dist/security/authorization.js +0 -128
  209. package/dist/security/authorization.js.map +0 -1
  210. package/dist/security/comprehensive-security-research.d.ts +0 -84
  211. package/dist/security/comprehensive-security-research.d.ts.map +0 -1
  212. package/dist/security/comprehensive-security-research.js +0 -211
  213. package/dist/security/comprehensive-security-research.js.map +0 -1
  214. package/dist/security/offensive/exploitationEngine.d.ts +0 -54
  215. package/dist/security/offensive/exploitationEngine.d.ts.map +0 -1
  216. package/dist/security/offensive/exploitationEngine.js +0 -263
  217. package/dist/security/offensive/exploitationEngine.js.map +0 -1
  218. package/dist/security/real/networkExploitation.d.ts +0 -92
  219. package/dist/security/real/networkExploitation.d.ts.map +0 -1
  220. package/dist/security/real/networkExploitation.js +0 -316
  221. package/dist/security/real/networkExploitation.js.map +0 -1
  222. package/dist/security/real/persistenceImplementation.d.ts +0 -62
  223. package/dist/security/real/persistenceImplementation.d.ts.map +0 -1
  224. package/dist/security/real/persistenceImplementation.js +0 -323
  225. package/dist/security/real/persistenceImplementation.js.map +0 -1
  226. package/dist/security/real/vulnerabilityScanner.d.ts +0 -73
  227. package/dist/security/real/vulnerabilityScanner.d.ts.map +0 -1
  228. package/dist/security/real/vulnerabilityScanner.js +0 -341
  229. package/dist/security/real/vulnerabilityScanner.js.map +0 -1
  230. package/dist/shell/capturePastePatch.d.ts +0 -9
  231. package/dist/shell/capturePastePatch.d.ts.map +0 -1
  232. package/dist/shell/capturePastePatch.js +0 -98
  233. package/dist/shell/capturePastePatch.js.map +0 -1
  234. package/dist/shell/enhancedInteractiveShell.d.ts +0 -90
  235. package/dist/shell/enhancedInteractiveShell.d.ts.map +0 -1
  236. package/dist/shell/enhancedInteractiveShell.js +0 -248
  237. package/dist/shell/enhancedInteractiveShell.js.map +0 -1
  238. package/dist/shell/inputProcessor.d.ts +0 -56
  239. package/dist/shell/inputProcessor.d.ts.map +0 -1
  240. package/dist/shell/inputProcessor.js +0 -172
  241. package/dist/shell/inputProcessor.js.map +0 -1
  242. package/dist/shell/interactiveShell-patch.d.ts +0 -27
  243. package/dist/shell/interactiveShell-patch.d.ts.map +0 -1
  244. package/dist/shell/interactiveShell-patch.js +0 -38
  245. package/dist/shell/interactiveShell-patch.js.map +0 -1
  246. package/dist/shell/interactiveShell-robust.d.ts +0 -26
  247. package/dist/shell/interactiveShell-robust.d.ts.map +0 -1
  248. package/dist/shell/interactiveShell-robust.js +0 -34
  249. package/dist/shell/interactiveShell-robust.js.map +0 -1
  250. package/dist/shell/multiLinePasteManager.d.ts +0 -106
  251. package/dist/shell/multiLinePasteManager.d.ts.map +0 -1
  252. package/dist/shell/multiLinePasteManager.js +0 -308
  253. package/dist/shell/multiLinePasteManager.js.map +0 -1
  254. package/dist/shell/processInputBlockPatch.d.ts +0 -8
  255. package/dist/shell/processInputBlockPatch.d.ts.map +0 -1
  256. package/dist/shell/processInputBlockPatch.js +0 -133
  257. package/dist/shell/processInputBlockPatch.js.map +0 -1
  258. package/dist/tools/enhancedSecurityTools.d.ts +0 -19
  259. package/dist/tools/enhancedSecurityTools.d.ts.map +0 -1
  260. package/dist/tools/enhancedSecurityTools.js +0 -215
  261. package/dist/tools/enhancedSecurityTools.js.map +0 -1
  262. package/dist/tools/offensiveSecurityTools.d.ts +0 -16
  263. package/dist/tools/offensiveSecurityTools.d.ts.map +0 -1
  264. package/dist/tools/offensiveSecurityTools.js +0 -285
  265. package/dist/tools/offensiveSecurityTools.js.map +0 -1
  266. package/dist/tools/realSecurityTools.d.ts +0 -18
  267. package/dist/tools/realSecurityTools.d.ts.map +0 -1
  268. package/dist/tools/realSecurityTools.js +0 -468
  269. package/dist/tools/realSecurityTools.js.map +0 -1
  270. package/dist/tools/securityTools.d.ts +0 -20
  271. package/dist/tools/securityTools.d.ts.map +0 -1
  272. package/dist/tools/securityTools.js +0 -449
  273. package/dist/tools/securityTools.js.map +0 -1
@@ -1,97 +0,0 @@
1
- /**
2
- * APT Simulation Engine
3
- *
4
- * Comprehensive framework for simulating Advanced Persistent Threat campaigns
5
- * from initial access through persistence and data exfiltration.
6
- *
7
- * Based on MITRE ATT&CK framework and real-world APT tactics.
8
- */
9
- export interface APTAttackPhase {
10
- id: string;
11
- name: string;
12
- mitreId: string;
13
- description: string;
14
- techniques: APTTechnique[];
15
- objectives: string[];
16
- successCriteria: string[];
17
- }
18
- export interface APTTechnique {
19
- id: string;
20
- name: string;
21
- mitreId: string;
22
- phase: string;
23
- description: string;
24
- implementation: string[];
25
- detectionMethods: string[];
26
- countermeasures: string[];
27
- riskLevel: 'low' | 'medium' | 'high' | 'critical';
28
- }
29
- export interface APTSimulationConfig {
30
- targetPlatform: 'windows' | 'linux' | 'mixed';
31
- simulationScope: 'full' | 'initial-access' | 'persistence' | 'lateral-movement' | 'exfiltration';
32
- complexity: 'basic' | 'intermediate' | 'advanced';
33
- stealthLevel: 'low' | 'medium' | 'high';
34
- duration: 'short' | 'medium' | 'extended';
35
- }
36
- export interface APTSimulationResult {
37
- simulationId: string;
38
- timestamp: Date;
39
- config: APTSimulationConfig;
40
- phasesExecuted: string[];
41
- techniquesUsed: APTTechnique[];
42
- successRate: number;
43
- detectionEvents: DetectionEvent[];
44
- recommendations: string[];
45
- evidence: SimulationEvidence[];
46
- }
47
- export interface DetectionEvent {
48
- techniqueId: string;
49
- timestamp: Date;
50
- detectionMethod: string;
51
- confidence: 'low' | 'medium' | 'high';
52
- evidence: string;
53
- }
54
- export interface SimulationEvidence {
55
- phase: string;
56
- technique: string;
57
- evidenceType: 'file' | 'network' | 'process' | 'registry' | 'log';
58
- content: string;
59
- location: string;
60
- }
61
- /**
62
- * APT Simulation Engine Class
63
- */
64
- export declare class APTSimulationEngine {
65
- private attackPhases;
66
- private techniques;
67
- constructor();
68
- /**
69
- * Initialize APT attack phases based on MITRE ATT&CK
70
- */
71
- private initializeAttackPhases;
72
- /**
73
- * Initialize APT techniques based on MITRE ATT&CK
74
- */
75
- private initializeTechniques;
76
- /**
77
- * Get techniques by attack phase
78
- */
79
- getTechniquesByPhase(phaseId: string): APTTechnique[];
80
- /**
81
- * Get all attack phases
82
- */
83
- getAttackPhases(): APTAttackPhase[];
84
- /**
85
- * Generate APT simulation scenario
86
- */
87
- generateScenario(config: APTSimulationConfig): APTTechnique[];
88
- /**
89
- * Determine if technique should be included in simulation
90
- */
91
- private shouldIncludeTechnique;
92
- /**
93
- * Simulate APT attack campaign
94
- */
95
- simulateAttack(config: APTSimulationConfig): Promise<APTSimulationResult>;
96
- }
97
- //# sourceMappingURL=apt-simulation-engine-complete.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"apt-simulation-engine-complete.d.ts","sourceRoot":"","sources":["../../src/security/apt-simulation-engine-complete.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,YAAY,EAAE,CAAC;IAC3B,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,eAAe,EAAE,MAAM,EAAE,CAAC;CAC3B;AAED,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,SAAS,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,UAAU,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;OAEG;IACH,OAAO,CAAC,sBAAsB;IAiN9B;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAsJ5B;;OAEG;IACH,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,YAAY,EAAE;IAIrD;;OAEG;IACH,eAAe,IAAI,cAAc,EAAE;IAOnC;;OAEG;IACH,gBAAgB,CAAC,MAAM,EAAE,mBAAmB,GAAG,YAAY,EAAE;IAa7D;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAsB9B;;OAEG;IACG,cAAc,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC,mBAAmB,CAAC;CAQlE"}
@@ -1,441 +0,0 @@
1
- /**
2
- * APT Simulation Engine
3
- *
4
- * Comprehensive framework for simulating Advanced Persistent Threat campaigns
5
- * from initial access through persistence and data exfiltration.
6
- *
7
- * Based on MITRE ATT&CK framework and real-world APT tactics.
8
- */
9
- /**
10
- * APT Simulation Engine Class
11
- */
12
- export class APTSimulationEngine {
13
- attackPhases;
14
- techniques;
15
- constructor() {
16
- this.attackPhases = this.initializeAttackPhases();
17
- this.techniques = this.initializeTechniques();
18
- }
19
- /**
20
- * Initialize APT attack phases based on MITRE ATT&CK
21
- */
22
- initializeAttackPhases() {
23
- return [
24
- {
25
- id: 'reconnaissance',
26
- name: 'Reconnaissance',
27
- mitreId: 'TA0043',
28
- description: 'Gathering information about the target environment',
29
- techniques: [],
30
- objectives: [
31
- 'Identify target systems and services',
32
- 'Gather network topology information',
33
- 'Collect user and system information'
34
- ],
35
- successCriteria: [
36
- 'Target information successfully gathered',
37
- 'Network mapping completed',
38
- 'Vulnerability assessment performed'
39
- ]
40
- },
41
- {
42
- id: 'initial-access',
43
- name: 'Initial Access',
44
- mitreId: 'TA0001',
45
- description: 'Gaining initial foothold in the target environment',
46
- techniques: [],
47
- objectives: [
48
- 'Establish initial access to target systems',
49
- 'Bypass perimeter defenses',
50
- 'Execute initial payload'
51
- ],
52
- successCriteria: [
53
- 'Initial access established',
54
- 'Payload successfully executed',
55
- 'Command and control established'
56
- ]
57
- },
58
- {
59
- id: 'execution',
60
- name: 'Execution',
61
- mitreId: 'TA0002',
62
- description: 'Running malicious code on target systems',
63
- techniques: [],
64
- objectives: [
65
- 'Execute malicious code',
66
- 'Establish persistence mechanisms',
67
- 'Escalate privileges'
68
- ],
69
- successCriteria: [
70
- 'Code execution achieved',
71
- 'Persistence established',
72
- 'Privilege escalation successful'
73
- ]
74
- },
75
- {
76
- id: 'persistence',
77
- name: 'Persistence',
78
- mitreId: 'TA0003',
79
- description: 'Maintaining access across system restarts and disruptions',
80
- techniques: [],
81
- objectives: [
82
- 'Establish multiple persistence mechanisms',
83
- 'Survive system reboots and updates',
84
- 'Maintain long-term access'
85
- ],
86
- successCriteria: [
87
- 'Multiple persistence methods established',
88
- 'Access maintained after system events',
89
- 'Stealth maintained'
90
- ]
91
- },
92
- {
93
- id: 'privilege-escalation',
94
- name: 'Privilege Escalation',
95
- mitreId: 'TA0004',
96
- description: 'Gaining higher-level permissions on target systems',
97
- techniques: [],
98
- objectives: [
99
- 'Escalate to administrative privileges',
100
- 'Bypass user account controls',
101
- 'Access protected resources'
102
- ],
103
- successCriteria: [
104
- 'Administrative access achieved',
105
- 'Protected resources accessed',
106
- 'Privilege escalation undetected'
107
- ]
108
- },
109
- {
110
- id: 'defense-evasion',
111
- name: 'Defense Evasion',
112
- mitreId: 'TA0005',
113
- description: 'Avoiding detection by security controls',
114
- techniques: [],
115
- objectives: [
116
- 'Bypass antivirus and EDR solutions',
117
- 'Evade network monitoring',
118
- 'Hide malicious activity'
119
- ],
120
- successCriteria: [
121
- 'Security controls bypassed',
122
- 'Activities remain undetected',
123
- 'Forensic evidence minimized'
124
- ]
125
- },
126
- {
127
- id: 'credential-access',
128
- name: 'Credential Access',
129
- mitreId: 'TA0006',
130
- description: 'Stealing credentials like account names and passwords',
131
- techniques: [],
132
- objectives: [
133
- 'Extract user credentials',
134
- 'Access password stores',
135
- 'Capture authentication tokens'
136
- ],
137
- successCriteria: [
138
- 'Credentials successfully extracted',
139
- 'Authentication mechanisms compromised',
140
- 'Access to additional systems gained'
141
- ]
142
- },
143
- {
144
- id: 'discovery',
145
- name: 'Discovery',
146
- mitreId: 'TA0007',
147
- description: 'Learning about the target environment',
148
- techniques: [],
149
- objectives: [
150
- 'Map network topology',
151
- 'Identify valuable assets',
152
- 'Discover security controls'
153
- ],
154
- successCriteria: [
155
- 'Environment fully mapped',
156
- 'Critical assets identified',
157
- 'Security controls documented'
158
- ]
159
- },
160
- {
161
- id: 'lateral-movement',
162
- name: 'Lateral Movement',
163
- mitreId: 'TA0008',
164
- description: 'Moving through the target environment',
165
- techniques: [],
166
- objectives: [
167
- 'Move between systems',
168
- 'Access additional network segments',
169
- 'Establish foothold on critical systems'
170
- ],
171
- successCriteria: [
172
- 'Multiple systems compromised',
173
- 'Network segments traversed',
174
- 'Critical systems accessed'
175
- ]
176
- },
177
- {
178
- id: 'collection',
179
- name: 'Collection',
180
- mitreId: 'TA0009',
181
- description: 'Gathering target data of interest',
182
- techniques: [],
183
- objectives: [
184
- 'Identify valuable data',
185
- 'Stage data for exfiltration',
186
- 'Compress and encrypt collected data'
187
- ],
188
- successCriteria: [
189
- 'Target data identified and collected',
190
- 'Data prepared for exfiltration',
191
- 'Collection activities undetected'
192
- ]
193
- },
194
- {
195
- id: 'exfiltration',
196
- name: 'Exfiltration',
197
- mitreId: 'TA0010',
198
- description: 'Stealing and removing data from the target environment',
199
- techniques: [],
200
- objectives: [
201
- 'Transfer data to external systems',
202
- 'Evade data loss prevention',
203
- 'Cover exfiltration tracks'
204
- ],
205
- successCriteria: [
206
- 'Data successfully exfiltrated',
207
- 'Exfiltration undetected',
208
- 'Evidence of theft minimized'
209
- ]
210
- },
211
- {
212
- id: 'command-and-control',
213
- name: 'Command and Control',
214
- mitreId: 'TA0011',
215
- description: 'Communicating with compromised systems',
216
- techniques: [],
217
- objectives: [
218
- 'Establish communication channels',
219
- 'Maintain remote access',
220
- 'Evade network monitoring'
221
- ],
222
- successCriteria: [
223
- 'Reliable C2 channels established',
224
- 'Communication encrypted and hidden',
225
- 'C2 infrastructure resilient'
226
- ]
227
- }
228
- ];
229
- }
230
- /**
231
- * Initialize APT techniques based on MITRE ATT&CK
232
- */
233
- initializeTechniques() {
234
- return [
235
- // Initial Access Techniques
236
- {
237
- id: 'spearphishing-attachment',
238
- name: 'Spearphishing Attachment',
239
- mitreId: 'T1566.001',
240
- phase: 'initial-access',
241
- description: 'Send spearphishing emails with malicious attachments',
242
- implementation: [
243
- 'Craft convincing email with malicious attachment',
244
- 'Use social engineering to encourage opening',
245
- 'Execute payload when attachment is opened'
246
- ],
247
- detectionMethods: [
248
- 'Email security gateways',
249
- 'Endpoint detection and response',
250
- 'User behavior analytics'
251
- ],
252
- countermeasures: [
253
- 'User security awareness training',
254
- 'Email filtering and sandboxing',
255
- 'Application whitelisting'
256
- ],
257
- riskLevel: 'high'
258
- },
259
- {
260
- id: 'exploit-public-facing-app',
261
- name: 'Exploit Public-Facing Application',
262
- mitreId: 'T1190',
263
- phase: 'initial-access',
264
- description: 'Exploit vulnerabilities in internet-facing systems',
265
- implementation: [
266
- 'Scan for vulnerable services',
267
- 'Exploit known vulnerabilities',
268
- 'Establish initial foothold'
269
- ],
270
- detectionMethods: [
271
- 'Web application firewalls',
272
- 'Intrusion detection systems',
273
- 'Vulnerability scanning'
274
- ],
275
- countermeasures: [
276
- 'Regular patching and updates',
277
- 'Web application security testing',
278
- 'Network segmentation'
279
- ],
280
- riskLevel: 'critical'
281
- },
282
- // Persistence Techniques
283
- {
284
- id: 'scheduled-task',
285
- name: 'Scheduled Task',
286
- mitreId: 'T1053.005',
287
- phase: 'persistence',
288
- description: 'Create scheduled tasks for persistence',
289
- implementation: [
290
- 'Create scheduled task via schtasks or Task Scheduler',
291
- 'Configure task to run with SYSTEM privileges',
292
- 'Set trigger conditions for execution'
293
- ],
294
- detectionMethods: [
295
- 'Monitor Task Scheduler events',
296
- 'Review scheduled task configurations',
297
- 'Check for unusual task actions'
298
- ],
299
- countermeasures: [
300
- 'Monitor scheduled task creation',
301
- 'Implement application control',
302
- 'Regular system auditing'
303
- ],
304
- riskLevel: 'high'
305
- },
306
- {
307
- id: 'registry-run-keys',
308
- name: 'Registry Run Keys',
309
- mitreId: 'T1547.001',
310
- phase: 'persistence',
311
- description: 'Add entries to registry run keys for persistence',
312
- implementation: [
313
- 'Modify HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Run',
314
- 'Modify HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\Run',
315
- 'Use registry keys to launch malicious executables'
316
- ],
317
- detectionMethods: [
318
- 'Monitor registry modifications',
319
- 'Review run key entries',
320
- 'Check for suspicious executable paths'
321
- ],
322
- countermeasures: [
323
- 'Registry monitoring and auditing',
324
- 'Application control policies',
325
- 'Regular system reviews'
326
- ],
327
- riskLevel: 'high'
328
- },
329
- // Lateral Movement Techniques
330
- {
331
- id: 'windows-admin-shares',
332
- name: 'Windows Admin Shares',
333
- mitreId: 'T1021.002',
334
- phase: 'lateral-movement',
335
- description: 'Use Windows administrative shares for lateral movement',
336
- implementation: [
337
- 'Access administrative shares (C$, ADMIN$)',
338
- 'Copy tools and payloads to remote systems',
339
- 'Execute commands remotely'
340
- ],
341
- detectionMethods: [
342
- 'Monitor SMB connections',
343
- 'Review share access logs',
344
- 'Detect unusual file transfers'
345
- ],
346
- countermeasures: [
347
- 'Restrict administrative share access',
348
- 'Network segmentation',
349
- 'Monitor SMB traffic'
350
- ],
351
- riskLevel: 'medium'
352
- },
353
- // Exfiltration Techniques
354
- {
355
- id: 'exfiltration-over-c2-channel',
356
- name: 'Exfiltration Over C2 Channel',
357
- mitreId: 'T1041',
358
- phase: 'exfiltration',
359
- description: 'Exfiltrate data through existing command and control channels',
360
- implementation: [
361
- 'Encrypt and compress target data',
362
- 'Transfer data through C2 channels',
363
- 'Use stealthy transfer methods'
364
- ],
365
- detectionMethods: [
366
- 'Network traffic analysis',
367
- 'Data loss prevention systems',
368
- 'Anomaly detection'
369
- ],
370
- countermeasures: [
371
- 'Network monitoring and filtering',
372
- 'Data classification and protection',
373
- 'Outbound traffic inspection'
374
- ],
375
- riskLevel: 'high'
376
- }
377
- ];
378
- }
379
- /**
380
- * Get techniques by attack phase
381
- */
382
- getTechniquesByPhase(phaseId) {
383
- return this.techniques.filter(tech => tech.phase === phaseId);
384
- }
385
- /**
386
- * Get all attack phases
387
- */
388
- getAttackPhases() {
389
- return this.attackPhases.map(phase => ({
390
- ...phase,
391
- techniques: this.getTechniquesByPhase(phase.id)
392
- }));
393
- }
394
- /**
395
- * Generate APT simulation scenario
396
- */
397
- generateScenario(config) {
398
- const selectedTechniques = [];
399
- // Filter techniques based on configuration
400
- this.techniques.forEach(technique => {
401
- if (this.shouldIncludeTechnique(technique, config)) {
402
- selectedTechniques.push(technique);
403
- }
404
- });
405
- return selectedTechniques;
406
- }
407
- /**
408
- * Determine if technique should be included in simulation
409
- */
410
- shouldIncludeTechnique(technique, config) {
411
- // Filter by scope
412
- if (config.simulationScope !== 'full' && technique.phase !== config.simulationScope) {
413
- return false;
414
- }
415
- // Filter by platform
416
- if (config.targetPlatform === 'windows' && technique.id.includes('linux')) {
417
- return false;
418
- }
419
- if (config.targetPlatform === 'linux' && technique.id.includes('windows')) {
420
- return false;
421
- }
422
- // Filter by complexity
423
- if (config.complexity === 'basic' && technique.riskLevel === 'critical') {
424
- return false;
425
- }
426
- return true;
427
- }
428
- /**
429
- * Simulate APT attack campaign
430
- */
431
- async simulateAttack(config) {
432
- const simulationId = this.generateSimulationId();
433
- const selectedTechniques = this.generateScenario(config);
434
- const detectionEvents = [];
435
- const evidence = [];
436
- console.log(`Starting APT Simulation: ${simulationId}`);
437
- console.log(`Target Platform: ${config.targetPlatform}`);
438
- console.log;
439
- }
440
- }
441
- //# sourceMappingURL=apt-simulation-engine-complete.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"apt-simulation-engine-complete.js","sourceRoot":"","sources":["../../src/security/apt-simulation-engine-complete.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AA4DH;;GAEG;AACH,MAAM,OAAO,mBAAmB;IACtB,YAAY,CAAmB;IAC/B,UAAU,CAAiB;IAEnC;QACE,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,sBAAsB,EAAE,CAAC;QAClD,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,oBAAoB,EAAE,CAAC;IAChD,CAAC;IAED;;OAEG;IACK,sBAAsB;QAC5B,OAAO;YACL;gBACE,EAAE,EAAE,gBAAgB;gBACpB,IAAI,EAAE,gBAAgB;gBACtB,OAAO,EAAE,QAAQ;gBACjB,WAAW,EAAE,oDAAoD;gBACjE,UAAU,EAAE,EAAE;gBACd,UAAU,EAAE;oBACV,sCAAsC;oBACtC,qCAAqC;oBACrC,qCAAqC;iBACtC;gBACD,eAAe,EAAE;oBACf,0CAA0C;oBAC1C,2BAA2B;oBAC3B,oCAAoC;iBACrC;aACF;YACD;gBACE,EAAE,EAAE,gBAAgB;gBACpB,IAAI,EAAE,gBAAgB;gBACtB,OAAO,EAAE,QAAQ;gBACjB,WAAW,EAAE,oDAAoD;gBACjE,UAAU,EAAE,EAAE;gBACd,UAAU,EAAE;oBACV,4CAA4C;oBAC5C,2BAA2B;oBAC3B,yBAAyB;iBAC1B;gBACD,eAAe,EAAE;oBACf,4BAA4B;oBAC5B,+BAA+B;oBAC/B,iCAAiC;iBAClC;aACF;YACD;gBACE,EAAE,EAAE,WAAW;gBACf,IAAI,EAAE,WAAW;gBACjB,OAAO,EAAE,QAAQ;gBACjB,WAAW,EAAE,0CAA0C;gBACvD,UAAU,EAAE,EAAE;gBACd,UAAU,EAAE;oBACV,wBAAwB;oBACxB,kCAAkC;oBAClC,qBAAqB;iBACtB;gBACD,eAAe,EAAE;oBACf,yBAAyB;oBACzB,yBAAyB;oBACzB,iCAAiC;iBAClC;aACF;YACD;gBACE,EAAE,EAAE,aAAa;gBACjB,IAAI,EAAE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,cAAc,KAAK,OAAO,IAAI,SAAS,CAAC,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC;YAC1E,OAAO,KAAK,CAAC;QACf,CAAC;QAED,uBAAuB;QACvB,IAAI,MAAM,CAAC,UAAU,KAAK,OAAO,IAAI,SAAS,CAAC,SAAS,KAAK,UAAU,EAAE,CAAC;YACxE,OAAO,KAAK,CAAC;QACf,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,cAAc,CAAC,MAA2B;QAC9C,MAAM,YAAY,GAAG,IAAI,CAAC,oBAAoB,EAAE,CAAC;QACjD,MAAM,kBAAkB,GAAG,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC;QACzD,MAAM,eAAe,GAAqB,EAAE,CAAC;QAC7C,MAAM,QAAQ,GAAyB,EAAE,CAAC;QAE1C,OAAO,CAAC,GAAG,CAAC,4BAA4B,YAAY,EAAE,CAAC,CAAC;QACxD,OAAO,CAAC,GAAG,CAAC,oBAAoB,MAAM,CAAC,cAAc,EAAE,CAAC,CAAC;QACzD,OAAO,CAAC,GAAG,CAAA;IAAA,CAAC,AAAD;CAAA"}
@@ -1,97 +0,0 @@
1
- /**
2
- * APT Simulation Engine
3
- *
4
- * Comprehensive framework for simulating Advanced Persistent Threat campaigns
5
- * from initial access through persistence and data exfiltration.
6
- *
7
- * Based on MITRE ATT&CK framework and real-world APT tactics.
8
- */
9
- export interface APTAttackPhase {
10
- id: string;
11
- name: string;
12
- mitreId: string;
13
- description: string;
14
- techniques: APTTechnique[];
15
- objectives: string[];
16
- successCriteria: string[];
17
- }
18
- export interface APTTechnique {
19
- id: string;
20
- name: string;
21
- mitreId: string;
22
- phase: string;
23
- description: string;
24
- implementation: string[];
25
- detectionMethods: string[];
26
- countermeasures: string[];
27
- riskLevel: 'low' | 'medium' | 'high' | 'critical';
28
- }
29
- export interface APTSimulationConfig {
30
- targetPlatform: 'windows' | 'linux' | 'mixed';
31
- simulationScope: 'full' | 'initial-access' | 'persistence' | 'lateral-movement' | 'exfiltration';
32
- complexity: 'basic' | 'intermediate' | 'advanced';
33
- stealthLevel: 'low' | 'medium' | 'high';
34
- duration: 'short' | 'medium' | 'extended';
35
- }
36
- export interface APTSimulationResult {
37
- simulationId: string;
38
- timestamp: Date;
39
- config: APTSimulationConfig;
40
- phasesExecuted: string[];
41
- techniquesUsed: APTTechnique[];
42
- successRate: number;
43
- detectionEvents: DetectionEvent[];
44
- recommendations: string[];
45
- evidence: SimulationEvidence[];
46
- }
47
- export interface DetectionEvent {
48
- techniqueId: string;
49
- timestamp: Date;
50
- detectionMethod: string;
51
- confidence: 'low' | 'medium' | 'high';
52
- evidence: string;
53
- }
54
- export interface SimulationEvidence {
55
- phase: string;
56
- technique: string;
57
- evidenceType: 'file' | 'network' | 'process' | 'registry' | 'log';
58
- content: string;
59
- location: string;
60
- }
61
- /**
62
- * APT Simulation Engine Class
63
- */
64
- export declare class APTSimulationEngine {
65
- private attackPhases;
66
- private techniques;
67
- constructor();
68
- /**
69
- * Initialize APT attack phases based on MITRE ATT&CK
70
- */
71
- private initializeAttackPhases;
72
- /**
73
- * Initialize APT techniques based on MITRE ATT&CK
74
- */
75
- private initializeTechniques;
76
- /**
77
- * Get techniques by attack phase
78
- */
79
- getTechniquesByPhase(phaseId: string): APTTechnique[];
80
- /**
81
- * Get all attack phases
82
- */
83
- getAttackPhases(): APTAttackPhase[];
84
- /**
85
- * Generate APT simulation scenario
86
- */
87
- generateScenario(config: APTSimulationConfig): APTTechnique[];
88
- /**
89
- * Determine if technique should be included in simulation
90
- */
91
- private shouldIncludeTechnique;
92
- /**
93
- * Simulate APT attack campaign
94
- */
95
- simulateAttack(config: APTSimulationConfig): Promise<APTSimulationResult>;
96
- }
97
- //# sourceMappingURL=apt-simulation-engine.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"apt-simulation-engine.d.ts","sourceRoot":"","sources":["../../src/security/apt-simulation-engine.ts"],"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