Implemented generating agent payloads from the ImGui client.

This commit is contained in:
Jakob Friedl
2025-09-27 15:18:45 +02:00
parent ceba377939
commit 47799ee5f5
11 changed files with 86 additions and 56 deletions

View File

@@ -205,7 +205,7 @@ proc draw*(component: ConsoleComponent, ws: WebSocket) =
igText("Press CTRL+F to focus console filter.")
igText("Use \",\" as a delimiter to filter for multiple values.")
igText("Use \"-\" to exclude values.")
igText("Example: \"-warning,a,b\" returns all lines that do not include \"warning\" but include \"a\" or \"b\".")
igText("Example: \"-warning,a,b\" returns all lines that do not include \"warning\" but include either \"a\" or \"b\".")
igEndTooltip()
if igIsWindowFocused(ImGui_FocusedFlags_ChildWindows.int32) and io.KeyCtrl and igIsKeyPressed_Bool(ImGuiKey_F, false):

View File

@@ -43,7 +43,9 @@ proc draw*(component: ListenersTableComponent, showComponent: ptr bool, ws: WebS
if listener != nil:
ws.sendStartListener(listener)
component.generatePayloadModal.draw(component.listeners)
let buildInformation = component.generatePayloadModal.draw(component.listeners)
if buildInformation != nil:
ws.sendAgentBuild(buildInformation)
#[
Listener table

View File

@@ -43,7 +43,7 @@ proc resetModalValues(component: AgentModalComponent) =
component.spoofStack = false
component.moduleSelection.reset()
proc draw*(component: AgentModalComponent, listeners: seq[UIListener]) =
proc draw*(component: AgentModalComponent, listeners: seq[UIListener]): AgentBuildInformation =
let textSpacing = igGetStyle().ItemSpacing.x
@@ -114,18 +114,19 @@ proc draw*(component: AgentModalComponent, listeners: seq[UIListener]) =
if igButton("Build", vec2(availableSize.x * 0.5 - textSpacing * 0.5, 0.0f)):
# Get values
echo listeners[component.listener].listenerId
echo $component.sleepDelay
echo component.sleepMaskTechniques[component.sleepMask]
echo $component.spoofStack
# Iterate over modules
var module: uint32 = 0
var modules: uint32 = 0
for m in component.moduleSelection.items[1]:
module = module or uint32(m.moduleType)
echo module
modules = modules or uint32(m.moduleType)
result = AgentBuildInformation(
listenerId: listeners[component.listener].listenerId,
sleepDelay: component.sleepDelay,
sleepTechnique: cast[SleepObfuscationTechnique](component.sleepMask),
spoofStack: component.spoofStack,
modules: modules
)
component.resetModalValues()
igCloseCurrentPopup()