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
When it comes to executables, the most important tool is `wintermute.py`. This python program identifies all implemented use-cases/agents and their respective configuration options, and allows end-users to configure and start an use-case/agent.
10
+
11
+
The following `wintermute` output lists all currently available use-cases (`linux_privesc_hintfile`, `linux_privesc_guided`, `linux_privesc`, `windows_privesc`, `minimal_linux_privesc`, `simple_web_test`):
wintermute.py: error: the following arguments are required: {linux_privesc_hintfile,linux_privesc_guided,linux_privesc,windows_privesc,minimal_linux_privesc,simple_web_test}
17
+
```
18
+
19
+
When called with a concrete use-case and the `--help` option, all available configuration options for the given use-case are shown:
Maximum context size for the model, only used internally for things like trimming to the context size
49
+
--llm.api_url LLM.API_URL
50
+
URL of the OpenAI API
51
+
--llm.api_timeout LLM.API_TIMEOUT
52
+
Timeout for the API request
53
+
--llm.api_backoff LLM.API_BACKOFF
54
+
Backoff timein seconds when running into rate-limits
55
+
--llm.api_retries LLM.API_RETRIES
56
+
Number of retries when running into rate-limits
57
+
--tag TAG
58
+
--max_turns MAX_TURNS
59
+
```
60
+
61
+
Finally you can execute a use-case by calling it through `wintermute.py`. Configuration for the use-case will be initially be populated from an `.env` file. If any command line arguments are given, these over-write configuration options read form configuration files.
62
+
63
+
We provide scripts for later analysis of use-cases/agent runs, e.g., `stats.py` and `viewer.py`, but we will extend and move them into a dedicated analysis-scripts directory soon.
hackingBuddyGPT uses a simple project structure to make onboarding of new developers easier.
9
+
After you checked out the project's source [from github](https://github.com/ipa-lab/hackingBuddyGPT) you might wonder where all the juicy bits are.
10
10
11
-
## Source Code and Components
11
+
Let's do a quick overview before we delve deeper into our components.
12
12
13
-
The project's source code is roughly structured into three directories:
13
+
Broadly speaking, we have separated our code base into three concerns:
14
14
15
-
-`usecases`: use-case (often also named agents) describe one pen-testing strategy. For example, you might want to write an use-case for hacking a linux system, or write an use-case to hack a web-site. Typically you call an use-case through our command line tool (`wintermute.py`) and pass the target information, e.g., the to be tested website, also through command line parameters.
15
+
1. The Hacking 'Use-Cases' which are python classes describing how our hacking automatons should work.
16
+
2. Capabilities (or in simpler terms, 'actions') that describe how our hacking automatons can interact with the outside world.
17
+
3. Helpers in 'utils' that are reused between the different hacking use-cases, e.g., output or database helpers.
16
18
17
-
-`capabilities`: use-case/agents needs to interact with the real world (otherwise hacking would be a bit boring) and they do this through capabilities. We intend for capabilities to be shared between multiple use-cases so that new use-cases can be developed rapidly. Examples for capabilities are executing a system command over SSH, test for credentials, or executing a HTTP request.
19
+
## Source Code and Components
18
20
19
-
-`utils`: this project area includes helper infrastructure for operating the use-cases/agents. For example, this section includes a general OpenAI connector that abstracts away most of the tedious bits of creating a connection to an LLM API.
21
+
Our project structure roughly mirrors the just mentioned three concerns:
20
22
21
-
## Executable files
23
+
-[`usecases/`](/docs/core-concepts/use-cases): within this directory are all out implemented 'use-cases' (or hacking automatons). We use subdirectories for additional structure, e.g., all local privilege escalation automatons are located in `usecases/privesc/`.
22
24
23
-
When it comes to executables, the most important tool is `wintermute.py`. This python program identifies all implemented use-cases/agents and their respective configuration options, and allows end-users to configure and start an use-case/agent.
25
+
To prevent code-duplication we provide additional base-classes such as `Agent` which implement use-cases that contain capabilities (see next section) as well as a maximum round limit (so that the automaton will not run forever and thus use up lots of credits).
24
26
25
-
The following output shows how `wintermute.py` lists all available use-cases (`linux_privesc_hintfile`, `linux_privesc_guided`, `linux_privesc`, `windows_privesc`, `minimal_linux_privesc`, `simple_web_test`) when called without parameters:
27
+
Once you implement a custom use-case, you can configure and start it through [wintermute.py](/docs/core-concepts/executables).
wintermute.py: error: the following arguments are required: {linux_privesc_hintfile,linux_privesc_guided,linux_privesc,windows_privesc,minimal_linux_privesc,simple_web_test}
31
-
```
29
+
-[`capabilities/`](/docs/core-concepts/capabilities): our automatons need to interact with the real world (otherwise hacking would be a bit boring) and they do this through capabilities.
32
30
33
-
When called with a concrete use-case and passed the `--help` option, all available configuration options for the given use-case are shown:
31
+
Examples for capabilities are executing a system command over SSH, test for credentials, or executing a HTTP request.
Maximum context size for the model, only used internally for things like trimming to the context size
63
-
--llm.api_url LLM.API_URL
64
-
URL of the OpenAI API
65
-
--llm.api_timeout LLM.API_TIMEOUT
66
-
Timeout for the API request
67
-
--llm.api_backoff LLM.API_BACKOFF
68
-
Backoff timein seconds when running into rate-limits
69
-
--llm.api_retries LLM.API_RETRIES
70
-
Number of retries when running into rate-limits
71
-
--tag TAG
72
-
--max_turns MAX_TURNS
73
-
```
35
+
-`utils/`: this area includes helper infrastructure that are re-used for all automatons and use-cases. For example, this section includes a general OpenAI connector that abstracts away most of the tedious bits of creating a connection to an LLM API.
74
36
75
-
We provide scripts for later analysis of use-cases/agent runs, e.g., `stats.py` and `viewer.py`, but we will extend and move them into a dedicated analysis-scripts directory soon.
37
+
To highlight the difference between 'utils' and 'capabilities': capabilities are actions that can be called from LLMs, while utils include common functionality that is often used from within the different use-cases' source code.
Copy file name to clipboardExpand all lines: src/app/docs/core-concepts/python-infrastructure/page.md
+5-26Lines changed: 5 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,34 +3,13 @@ title: Python Infrastructure and used Technology
3
3
nextjs:
4
4
metadata:
5
5
title: Python Infrastructure and used Technology
6
-
description: Quidem magni aut exercitationem maxime rerum eos.
6
+
description: 'HackingBuddyGPT: What technology are we depending upon?'
7
7
---
8
8
9
9
We try to base our software on modern python libraries and techniques and want to highlight some of those here.
10
10
11
-
## Quis vel iste dicta
11
+
Things you will encounter within our source code:
12
12
13
-
Sit commodi iste iure molestias qui amet voluptatem sed quaerat. Nostrum aut pariatur. Sint ipsa praesentium dolor error cumque velit tenetur.
14
-
15
-
### Et pariatur ab quas
16
-
17
-
Sit commodi iste iure molestias qui amet voluptatem sed quaerat. Nostrum aut pariatur. Sint ipsa praesentium dolor error cumque velit tenetur quaerat exercitationem. Consequatur et cum atque mollitia qui quia necessitatibus.
18
-
19
-
```js
20
-
/**@type{import('@tailwindlabs/lorem').ipsum}*/
21
-
exportdefault {
22
-
lorem:'ipsum',
23
-
dolor: ['sit', 'amet', 'consectetur'],
24
-
adipiscing: {
25
-
elit:true,
26
-
},
27
-
}
28
-
```
29
-
30
-
Possimus saepe veritatis sint nobis et quam eos. Architecto consequatur odit perferendis fuga eveniet possimus rerum cumque. Ea deleniti voluptatum deserunt voluptatibus ut non iste. Provident nam asperiores vel laboriosam omnis ducimus enim nesciunt quaerat. Minus tempora cupiditate est quod.
31
-
32
-
### Natus aspernatur iste
33
-
34
-
Sit commodi iste iure molestias qui amet voluptatem sed quaerat. Nostrum aut pariatur. Sint ipsa praesentium dolor error cumque velit tenetur quaerat exercitationem. Consequatur et cum atque mollitia qui quia necessitatibus.
35
-
36
-
Voluptas beatae omnis omnis voluptas. Cum architecto ab sit ad eaque quas quia distinctio. Molestiae aperiam qui quis deleniti soluta quia qui. Dolores nostrum blanditiis libero optio id. Mollitia ad et asperiores quas saepe alias.
13
+
-[Python Type Hints](https://docs.python.org/3/library/typing.html)
Copy file name to clipboardExpand all lines: src/app/docs/core-concepts/use-cases/page.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,9 @@
1
1
---
2
-
title: Use-Cases
2
+
title: Use-Cases and Agents
3
3
nextjs:
4
4
metadata:
5
-
title: Use-Cases
6
-
description: Quidem magni aut exercitationem maxime rerum eos.
5
+
title: Use-Cases and Agents
6
+
description: 'HackingBuddyGPT: Use-Case and Agent Infrastructure'
7
7
---
8
8
9
9
Wintermute consists of different use-cases (classes extending `UseCase`, being annotated with `@use_case` and being imported somewhere from the main `wintermute.py` file), which can be run individually.
0 commit comments