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
Copy file name to clipboardExpand all lines: README.md
+76-21Lines changed: 76 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,6 +22,21 @@ the use of LLMs for web penetration-testing and web api testing.
22
22
23
23
We release all tooling, testbeds and findings as open-source as this is the only way that comprehensive information will find their way to defenders. APTs have access to more sophisticated resources, so we are only leveling the playing field for blue teams. For information about the implementation, please see our [implementation notes](docs/implementation_notes.md). All source code can be found on [github](https://github.com/ipa-lab/hackingbuddyGPT).
24
24
25
+
hackingBuddyGPT is described in [Getting pwn'd by AI: Penetration Testing with Large Language Models ](https://arxiv.org/abs/2308.00121):
26
+
27
+
~~~bibtex
28
+
@inproceedings{Happe_2023, series={ESEC/FSE ’23},
29
+
title={Getting pwn’d by AI: Penetration Testing with Large Language Models},
30
+
url={http://dx.doi.org/10.1145/3611643.3613083},
31
+
DOI={10.1145/3611643.3613083},
32
+
booktitle={Proceedings of the 31st ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering},
33
+
publisher={ACM},
34
+
author={Happe, Andreas and Cito, Jürgen},
35
+
year={2023},
36
+
month=nov, collection={ESEC/FSE ’23}
37
+
}
38
+
~~~
39
+
25
40
## Privilege Escalation Attacks
26
41
27
42
How are we doing this? The initial tool `wintermute` targets linux priv-esc attacks. It uses SSH to connect to a (presumably) vulnerable virtual machine and then asks OpenAI GPT to suggest linux commands that could be used for finding security vulnerabilities or privilege escalation. The provided command is then executed within the virtual machine, the output fed back to the LLM and, finally, a new command is requested from it..
@@ -50,31 +65,15 @@ Some things to note:
50
65
- "What does the LLM know about the system?" gives an LLM generated list of system facts. To generate it, it is given the latest executed command (and it's output) as well as the current list of system facts. This is the operation which time/token usage is shown in the overview table as StateUpdTime/StateUpdTokens. As the state update takes forever, this is disabled by default and has to be enabled through a command line switch.
51
66
- Then the next round starts. The next given command (`sudo tar`) will lead to a pwn'd system BTW.
52
67
53
-
54
-
## Academic Research/Expsoure
55
-
56
-
hackingBuddyGPT is described in [Getting pwn'd by AI: Penetration Testing with Large Language Models ](https://arxiv.org/abs/2308.00121):
57
-
58
-
~~~bibtex
59
-
@inproceedings{Happe_2023, series={ESEC/FSE ’23},
60
-
title={Getting pwn’d by AI: Penetration Testing with Large Language Models},
61
-
url={http://dx.doi.org/10.1145/3611643.3613083},
62
-
DOI={10.1145/3611643.3613083},
63
-
booktitle={Proceedings of the 31st ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering},
64
-
publisher={ACM},
65
-
author={Happe, Andreas and Cito, Jürgen},
66
-
year={2023},
67
-
month=nov, collection={ESEC/FSE ’23}
68
-
}
69
-
~~~
68
+
### Academic Publications on Priv-Esc Attacks
70
69
71
70
Preliminary results for the linux privilege escalation use-case can be found in [Evaluating LLMs for Privilege-Escalation Scenarios](https://arxiv.org/abs/2310.11409):
72
71
73
72
~~~bibtex
74
-
@misc{happe2023evaluating,
75
-
title={Evaluating LLMs for Privilege-Escalation Scenarios},
73
+
@misc{happe2024llms,
74
+
title={LLMs as Hackers: Autonomous Linux PrivilegeEscalation Attacks},
76
75
author={Andreas Happe and Aaron Kaplan and Jürgen Cito},
77
-
year={2023},
76
+
year={2024},
78
77
eprint={2310.11409},
79
78
archivePrefix={arXiv},
80
79
primaryClass={cs.CR}
@@ -96,6 +95,62 @@ This work is partially based upon our empiric research into [how hackers work](h
96
95
}
97
96
~~~
98
97
98
+
## Create your own use-case (agent)
99
+
100
+
The following would create a new (minimal) linux privilege-escalation agent. Through using our infrastructure, this already uses configurable LLM-connections (e.g., for testing OpenAI or locally run LLMs), logs trace data to a local sqlite database for each run, implements a round limit (after which the agent will stop if root has not been achieved until then) and is able to connect to a linux target over SSH for fully-autonomous command execution (as well as password guessing).
We try to keep our python dependencies as light as possible. This should allow for easier experimentation. To run the main priv-escalation program (which is called `wintermute`) together with an OpenAI-based model you need:
@@ -143,7 +198,7 @@ This project is an experimental application and is provided "as-is" without any
143
198
144
199
The developers and contributors of this project do not accept any responsibility or liability for any losses, damages, or other consequences that may occur as a result of using this software. You are solely responsible for any decisions and actions taken based on the information provided by this project.
145
200
146
-
**Please note that the use of andy OpenAI language model can be expensive due to its token usage.** By utilizing this project, you acknowledge that you are responsible for monitoring and managing your own token usage and the associated costs. It is highly recommended to check your OpenAI API usage regularly and set up any necessary limits or alerts to prevent unexpected charges.
201
+
**Please note that the use of any OpenAI language model can be expensive due to its token usage.** By utilizing this project, you acknowledge that you are responsible for monitoring and managing your own token usage and the associated costs. It is highly recommended to check your OpenAI API usage regularly and set up any necessary limits or alerts to prevent unexpected charges.
147
202
148
203
As an autonomous experiment, hackingBuddyGPT may generate content or take actions that are not in line with real-world best-practices or legal requirements. It is your responsibility to ensure that any actions or decisions made based on the output of this software comply with all applicable laws, regulations, and ethical standards. The developers and contributors of this project shall not be held responsible for any consequences arising from the use of this software.
0 commit comments