You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Good news everyone! There's a new (and long overdue) new version of hackingBuddyGPT out!
To summarize the big changes:
- @Neverbolt did extensive work on the configuration and logging system:
- Overwork of the configuration system
- Added a visual and live web based log viewer, which can be started with `wintermute Viewer`
- Updated the configuration system. The new configuration system now allows loading parameters from a .json file as well as choosing which logging backend should be used
- @lloydchang with @pardaz-banu, @halifrieri, @toluwalopeoolagbegi and @tushcmd added support for dev containers
- @jamfish added support for key-based SSH access (to the target system)
- @Qsan1 added a new use-case, focusing on enabling linux priv-esc with small-language models, to quote:
- Added an extended linux-privesc usecase. It is based on 'privesc', but extends it with multiple components that can be freely switch on or off:
- Analyze: After each iteration the LLM is asked to analyze the output of that round.
- Retrieval Augmented Generation (RAG): After each iteration the LLM is prompted and asked to generate a search query for a vector store. The search query is then used to retrieve relevant documents from the vector store and the information is included in the prompt for the Analyze component (Only works if Analyze is enabled).
- Chain of thought (CoT): Instead of simply asking the LLM for the next command, we use CoT to generate the next action.
- History Compression: Instead of including all commands and their respective output in the prompt, it removes all outputs except the most recent one.
- Structure via Prompt: Include an initial set of command recommendations in `query_next_command`
I thank all our contributors (and hopefully haven't forgotten too many). Enjoy!
wintermute.py: error: the following arguments are required: {LinuxPrivesc,WindowsPrivesc,ExPrivEscLinux,ExPrivEscLinuxTemplated,ExPrivEscLinuxHintFile,ExPrivEscLinuxLSE,MinimalWebTesting,WebTestingWithExplanation,SimpleWebAPITesting,SimpleWebAPIDocumentation}
--log.log_server_address='localhost:4444' address:port of the log server to be used (default from builtin)
205
+
--log.tag='' Tag for your current run (default from builtin)
206
+
--log='local_logger' choice of logging backend (default from builtin)
207
+
--log_db.connection_string='wintermute.sqlite3' sqlite3 database connection string for logs (default from builtin)
208
+
--max_turns='30' (default from .env file, alternatives: 10 from builtin)
209
+
--llm.api_key=<secret> OpenAI API Key (default from .env file)
210
+
--llm.model OpenAI model name
211
+
--llm.context_size='100000' Maximum context size for the model, only used internally for things like trimming to the context size (default from .env file)
212
+
--llm.api_url='https://api.openai.com' URL of the OpenAI API (default from builtin)
213
+
--llm.api_path='/v1/chat/completions' Path to the OpenAI API (default from builtin)
214
+
--llm.api_timeout=240 Timeout for the API request (default from builtin)
215
+
--llm.api_backoff=60 Backoff timein seconds when running into rate-limits (default from builtin)
216
+
--llm.api_retries=3 Number of retries when running into rate-limits (default from builtin)
217
+
--system='linux' (default from builtin)
218
+
--enable_explanation=False (default from builtin)
219
+
--enable_update_state=False (default from builtin)
220
+
--disable_history=False (default from builtin)
221
+
--hint='' (default from builtin)
222
+
--conn.host
223
+
--conn.hostname
224
+
--conn.username
225
+
--conn.password
226
+
--conn.keyfilename
227
+
--conn.port='2222' (default from .env file, alternatives: 22 from builtin)
184
228
```
185
229
186
-
## Provide a Target Machine over SSH
230
+
### Provide a Target Machine over SSH
187
231
188
232
The next important part is having a machine that we can run our agent against. In our case, the target machine will be situated at `192.168.122.151`.
189
233
@@ -193,6 +237,23 @@ We are using vulnerable Linux systems running in Virtual Machines for this. Neve
193
237
>
194
238
> We are using virtual machines from our [Linux Privilege-Escalation Benchmark](https://github.com/ipa-lab/benchmark-privesc-linux) project. Feel free to use them for your own research!
195
239
240
+
## Using the web based viewer and replayer
241
+
242
+
If you want to have a better representation of the agent's output, you can use the web-based viewer. You can start it using `wintermute Viewer`, which will run the server on `http://127.0.0.1:4444` for the default `wintermute.sqlite3` database. You can change these options using the `--log_server_address` and `--log_db.connection_string` parameters.
243
+
244
+
Navigating to the log server address will show you an overview of all runs and clicking on a run will show you the details of that run. The viewer updates live using a websocket connection, and if you enable `Follow new runs` it will automatically switch to the new run when one is started.
245
+
246
+
Keep in mind that there is no additional protection for this webserver, other than how it can be reached (per default binding to `127.0.0.1` means it can only be reached from your local machine). If you make it accessible to the internet, everybody will be able to see all of your runs and also be able to inject arbitrary data into the database.
247
+
248
+
Therefore **DO NOT** make it accessible to the internet if you're not super sure about what you're doing!
249
+
250
+
There is also the experimental replay functionality, which can replay a run live from a capture file, including timing information. This is great for showcases and presentations, because it looks like everything is happening live and for real, but you know exactly what the results will be.
251
+
252
+
To use this, the run needs to be captured by a Viewer server by setting `--save_playback_dir` to a directory where the viewer can write the capture files.
253
+
254
+
With the Viewer server still running, you can then start `wintermute Replayer --replay_file <path_to_capture_file>` to replay the captured run (this will create a new run in the database).
255
+
You can configure it to `--pause_on_message` and `--pause_on_tool_calls`, which will interrupt the replay at the respective points until enter is pressed in the shell where you run the Replayer in. You can also configure the `--playback_speed` to control the speed of the replay.
The viewer is a simple web-based tool to view the results of hackingBuddyGPT runs. It is currently in beta and can be started with:
291
+
292
+
```bash
293
+
$ hackingBuddyGPT Viewer
294
+
```
295
+
296
+
This will start a webserver on `http://localhost:4444` that can be accessed with a web browser.
297
+
298
+
To log to this central viewer, you currently need to change the `GlobalLogger` definition in [./src/hackingBuddyGPT/utils/logging.py](src/hackingBuddyGPT/utils/logging.py) to `GlobalRemoteLogger`.
299
+
300
+
This feature is not fully tested yet and therefore is not recommended to be exposed to the internet!
301
+
225
302
## Publications about hackingBuddyGPT
226
303
227
304
Given our background in academia, we have authored papers that lay the groundwork and report on our efforts:
0 commit comments