From 583630aa0897f178c90a96db9ce4a84893dda8b2 Mon Sep 17 00:00:00 2001 From: Stefan Etringer Date: Thu, 2 Oct 2025 11:05:09 +0000 Subject: [PATCH] added more description --- README.md | 29 ++++++++++++++++++++++++++++- src/server/webapp/handlers.go | 2 -- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 26f1a81..8594b53 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,30 @@ # gontrol -A command an control implementation in go. Let's see how far I can go with this. \ No newline at end of file +A command & control server inside your browser, which uses websockets to +communicate to agents, while acting as a proxy server to their network. Even +through VPNs. + +The webUI contains a list of all agents, a log stream of events on the agents +and the C2 server itself. +There is a graph which diplays an overview of the connected and disconnected +agents, as well. + +## Usage + +Commands may be send in a bulk to multiple agents or just a single agent at a time. +The results of the agents will be displayed alongside their name on the UI. +Sending and receiving commands is done in a somewhat cli like style. +Check the preferred agents on the list and type your command into the box at +the bottom of the page. Press `Execute` to send the command. Any following +commands will be sent to the selected agents. + +Connect to an agent directly via clicking `Connect`. While an agent is located +in another network than the C2 server connect via `Connect via Proxy`. +If the agents supports interactive mode you will see a fully interactive +command line interface inside your browser. + +## Communication between server and agents + +The websocket is used to keep the connection alive between server and agents. +Communication of requesting commands to and delivering outputs from the agents +as response is done via HTTP. diff --git a/src/server/webapp/handlers.go b/src/server/webapp/handlers.go index 935407b..4dc062c 100644 --- a/src/server/webapp/handlers.go +++ b/src/server/webapp/handlers.go @@ -25,7 +25,6 @@ import ( type App struct { Tmpl *template.Template DB *sql.DB - // Logger *logger.Logger Logger logger.LoggerInterface } @@ -113,7 +112,6 @@ func (a *App) listAgents(w http.ResponseWriter, r *http.Request) { } a.renderTemplate(w, "agent_list.html", agents) - // renderTemplate(w, "agent_list.html", agents) } func (a *App) logsHandler(w http.ResponseWriter, r *http.Request) {