text stringlengths 0 1.47k |
|---|
static void print_bof_collection_first(void) { |
int i; |
int printed = 0; |
BeaconPrintf(CALLBACK_OUTPUT, "[i] Collect first: credential/session metadata and auth-adjacent configs\n"); |
for (i = 0; i < g_bof_triage_target_count; i++) { |
const bof_triage_target_t *target = &g_bof_triage_targets[i]; |
if (!target->auto_select) { |
continue; |
} |
if (target->size_bytes < 1024) { |
BeaconPrintf(CALLBACK_OUTPUT, "[i] [%d] %s %s %s %lld B\n", target->priority_tier, target->tool, target->family, target->type, target->size_bytes); |
} else if (target->size_bytes < 1024LL * 1024LL) { |
BeaconPrintf(CALLBACK_OUTPUT, "[i] [%d] %s %s %s %lld.%lld KB\n", target->priority_tier, target->tool, target->family, target->type, target->size_bytes / 1024, ((target->size_bytes % 1024) * 10) / 1024); |
} else { |
BeaconPrintf(CALLBACK_OUTPUT, "[i] [%d] %s %s %s %lld.%lld MB\n", target->priority_tier, target->tool, target->family, target->type, target->size_bytes / (1024LL * 1024LL), ((target->size_bytes % (1024LL * 1024LL)) * 10) / (1024LL * 1024LL)); |
} |
BeaconPrintf(CALLBACK_OUTPUT, "[i] %S\n", target->path); |
printed++; |
} |
if (!printed) { |
BeaconPrintf(CALLBACK_OUTPUT, "[i] none\n"); |
} |
for (i = 0, printed = 0; i < g_bof_triage_target_count; i++) { |
const bof_triage_target_t *target = &g_bof_triage_targets[i]; |
if (target->priority_tier != 1 || target->auto_select) continue; |
if (!printed) BeaconPrintf(CALLBACK_OUTPUT, "[i] Auth containers requiring review\n"); |
BeaconPrintf(CALLBACK_OUTPUT, "[i] [1] %s %s - auth_container_review\n[i] %S\n", target->tool, target->family, target->path); |
printed++; |
} |
BeaconPrintf(CALLBACK_OUTPUT, "[i]\n"); |
} |
static void print_bof_tier2_group(const char *tool) { |
int i; |
int count = 0; |
int files = 0; |
int dirs = 0; |
int has_config = 0; |
int has_rules = 0; |
int has_sandbox = 0; |
int has_plugins = 0; |
int has_other = 0; |
for (i = 0; i < g_bof_triage_target_count; i++) { |
const bof_triage_target_t *target = &g_bof_triage_targets[i]; |
if (!target_tool_is(target, tool) || !target_is_tier2_review(target)) { |
continue; |
} |
count++; |
files += target_is_file(target); |
dirs += target_is_directory(target); |
has_config |= target_family_is(target, "config") || target_family_is(target, "mcp") || target_family_is(target, "mcp_config") || |
target_family_is(target, "project_config") || target_family_is(target, "project_mcp_config") || target_family_is(target, "permissions"); |
has_rules |= target_family_is(target, "rules"); |
has_sandbox |= target_family_is(target, "sandbox") || wide_contains_ascii_n_ci(target->path, ".sandbox-secrets", 16); |
has_plugins |= target_family_is(target, "plugins") || target_family_is(target, "extensions") || target_family_is(target, "skills"); |
has_other |= !(target_family_is(target, "config") || target_family_is(target, "mcp") || target_family_is(target, "mcp_config") || |
target_family_is(target, "project_config") || target_family_is(target, "project_mcp_config") || target_family_is(target, "permissions") || target_family_is(target, "rules") || |
target_family_is(target, "sandbox") || target_family_is(target, "plugins") || |
target_family_is(target, "extensions") || target_family_is(target, "skills") || |
wide_contains_ascii_n_ci(target->path, ".sandbox-secrets", 16)); |
} |
if (count <= 0) { |
return; |
} |
BeaconPrintf(CALLBACK_OUTPUT, "[i] [2] %s %s%s%s%s%s %s x%d\n", |
tool, |
has_config ? "config" : "", |
has_rules ? "/rules" : "", |
has_plugins ? "/plugins" : "", |
has_sandbox ? "/sandbox" : "", |
has_other ? "/review" : "", |
dirs == count ? "dirs" : (files == count ? "files" : "artifacts"), |
count |
); |
for (i = 0; i < g_bof_triage_target_count; i++) { |
const bof_triage_target_t *target = &g_bof_triage_targets[i]; |
if (target_tool_is(target, tool) && target_is_tier2_review(target)) { |
BeaconPrintf(CALLBACK_OUTPUT, "[i] %S\n", target->path); |
} |
} |
} |
static void print_bof_review_next(void) { |
int i; |
BeaconPrintf(CALLBACK_OUTPUT, "[i] Review next: config, rules, plugins, sandbox state\n"); |
for (i = 0; i < g_bof_triage_target_count; i++) { |
int seen = 0; |
int j; |
if (!target_is_tier2_review(&g_bof_triage_targets[i])) { |
continue; |
} |
for (j = 0; j < i; j++) { |
if (target_is_tier2_review(&g_bof_triage_targets[j]) && |
target_tool_is(&g_bof_triage_targets[j], g_bof_triage_targets[i].tool)) { |
seen = 1; |
break; |
} |
} |
if (!seen) { |
print_bof_tier2_group(g_bof_triage_targets[i].tool); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.