pentesting 0.1.11 → 0.1.12
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/index.js +16 -16
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2017,16 +2017,16 @@ function toMessageParam(msg) {
|
|
|
2017
2017
|
};
|
|
2018
2018
|
}
|
|
2019
2019
|
var DEFAULT_PHASES = [
|
|
2020
|
-
{ id:
|
|
2021
|
-
{ id:
|
|
2022
|
-
{ id:
|
|
2023
|
-
{ id:
|
|
2024
|
-
{ id:
|
|
2025
|
-
{ id:
|
|
2026
|
-
{ id:
|
|
2027
|
-
{ id:
|
|
2028
|
-
{ id:
|
|
2029
|
-
{ id:
|
|
2020
|
+
{ id: PHASE_ID.RECON, name: "Reconnaissance", shortName: "Recon", status: PHASE_STATUS.PENDING, attempts: 0 },
|
|
2021
|
+
{ id: PHASE_ID.SCAN, name: "Scanning", shortName: "Scan", status: PHASE_STATUS.PENDING, attempts: 0 },
|
|
2022
|
+
{ id: PHASE_ID.ENUM, name: "Enumeration", shortName: "Enum", status: PHASE_STATUS.PENDING, attempts: 0 },
|
|
2023
|
+
{ id: PHASE_ID.VULN, name: "Vulnerability Analysis", shortName: "Vuln", status: PHASE_STATUS.PENDING, attempts: 0 },
|
|
2024
|
+
{ id: PHASE_ID.EXPLOIT, name: "Exploitation", shortName: "Exploit", status: PHASE_STATUS.PENDING, attempts: 0 },
|
|
2025
|
+
{ id: PHASE_ID.PRIVESC, name: "Privilege Escalation", shortName: "PrivEsc", status: PHASE_STATUS.PENDING, attempts: 0 },
|
|
2026
|
+
{ id: PHASE_ID.PIVOT, name: "Pivoting", shortName: "Pivot", status: PHASE_STATUS.PENDING, attempts: 0 },
|
|
2027
|
+
{ id: PHASE_ID.PERSIST, name: "Persistence", shortName: "Persist", status: PHASE_STATUS.PENDING, attempts: 0 },
|
|
2028
|
+
{ id: PHASE_ID.EXFIL, name: "Data Exfiltration", shortName: "Exfil", status: PHASE_STATUS.PENDING, attempts: 0 },
|
|
2029
|
+
{ id: PHASE_ID.REPORT, name: "Reporting", shortName: "Report", status: PHASE_STATUS.PENDING, attempts: 0 }
|
|
2030
2030
|
];
|
|
2031
2031
|
var AutonomousHackingAgent = class extends EventEmitter3 {
|
|
2032
2032
|
client;
|
|
@@ -2190,7 +2190,7 @@ ${await this.commandRegistry.getHelp()}`;
|
|
|
2190
2190
|
if (phase) {
|
|
2191
2191
|
const oldStatus = phase.status;
|
|
2192
2192
|
phase.status = status;
|
|
2193
|
-
if (status ===
|
|
2193
|
+
if (status === PHASE_STATUS.IN_PROGRESS && !phase.startTime) {
|
|
2194
2194
|
phase.startTime = /* @__PURE__ */ new Date();
|
|
2195
2195
|
} else if ((status === PHASE_STATUS.COMPLETED || status === PHASE_STATUS.FAILED) && !phase.endTime) {
|
|
2196
2196
|
phase.endTime = /* @__PURE__ */ new Date();
|
|
@@ -2205,7 +2205,7 @@ ${await this.commandRegistry.getHelp()}`;
|
|
|
2205
2205
|
const nextPhase = this.state.phases[currentIndex + 1];
|
|
2206
2206
|
this.setPhaseStatus(this.state.currentPhase, PHASE_STATUS.COMPLETED);
|
|
2207
2207
|
this.state.currentPhase = nextPhase.id;
|
|
2208
|
-
this.setPhaseStatus(nextPhase.id,
|
|
2208
|
+
this.setPhaseStatus(nextPhase.id, PHASE_STATUS.IN_PROGRESS);
|
|
2209
2209
|
this.think(THOUGHT_TYPE.PLAN, `Advancing to next phase: ${nextPhase.shortName}`);
|
|
2210
2210
|
this.resetStuckCounter();
|
|
2211
2211
|
return true;
|
|
@@ -2323,7 +2323,7 @@ What went wrong and what different approach should be tried?
|
|
|
2323
2323
|
return;
|
|
2324
2324
|
}
|
|
2325
2325
|
this.state.status = AGENT_STATUS.RUNNING;
|
|
2326
|
-
this.setPhaseStatus(
|
|
2326
|
+
this.setPhaseStatus(PHASE_ID.RECON, PHASE_STATUS.IN_PROGRESS);
|
|
2327
2327
|
const mainObjective = objective || `
|
|
2328
2328
|
Target ${this.state.target.primary} - performing full penetration test.
|
|
2329
2329
|
Goal: Deep penetration to obtain root/system privileges, extract internal data, map entire network.
|
|
@@ -2347,7 +2347,7 @@ Goal: Deep penetration to obtain root/system privileges, extract internal data,
|
|
|
2347
2347
|
const reflection = await this.performSelfReflection();
|
|
2348
2348
|
const shouldSkip = await this.decideNextAction(reflection);
|
|
2349
2349
|
if (shouldSkip) {
|
|
2350
|
-
this.setPhaseStatus(this.state.currentPhase,
|
|
2350
|
+
this.setPhaseStatus(this.state.currentPhase, PHASE_STATUS.SKIPPED);
|
|
2351
2351
|
if (!this.advanceToNextPhase()) {
|
|
2352
2352
|
this.think(THOUGHT_TYPE.OBSERVATION, "All phases completed or skipped");
|
|
2353
2353
|
break;
|
|
@@ -2581,7 +2581,7 @@ Use report_finding tool for important discoveries.
|
|
|
2581
2581
|
}
|
|
2582
2582
|
// ===== Final Report Generation =====
|
|
2583
2583
|
async generateFinalReport() {
|
|
2584
|
-
this.setPhaseStatus(
|
|
2584
|
+
this.setPhaseStatus(PHASE_ID.REPORT, PHASE_STATUS.IN_PROGRESS);
|
|
2585
2585
|
const report = `
|
|
2586
2586
|
# Penetration Test Report
|
|
2587
2587
|
## Executive Summary
|
|
@@ -2983,7 +2983,7 @@ var App = ({ autoApprove = false, target }) => {
|
|
|
2983
2983
|
" \u2502",
|
|
2984
2984
|
state.findings.length,
|
|
2985
2985
|
" findings \u2502",
|
|
2986
|
-
state.currentPhase !==
|
|
2986
|
+
state.currentPhase !== AGENT_STATUS.IDLE && ` ${state.currentPhase} \u2502`
|
|
2987
2987
|
] }),
|
|
2988
2988
|
/* @__PURE__ */ jsxs(Text, { dimColor: true, children: [
|
|
2989
2989
|
"/help \u2502 Ctrl+C ",
|