Skip to content

Commit e289ad6

Browse files
committed
update readme.md a bit
1 parent 09c8e3d commit e289ad6

File tree

1 file changed

+20
-15
lines changed

1 file changed

+20
-15
lines changed

‎README.md‎

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,14 @@ HackingBuddyGPT helps security researchers use LLMs to discover new attack vecto
88

99
We aim to become **THE go-to framework for security researchers** and pen-testers interested in using LLMs or LLM-based autonomous agents for security testing. To aid their experiments, we also offer re-usable [linux priv-esc benchmarks](https://github.com/ipa-lab/benchmark-privesc-linux) and publish all our findings as open-access reports.
1010

11-
How can LLMs aid or even emulate hackers? Threat actors are [already using LLMs](https://arxiv.org/abs/2307.00691), to better protect against this new threat we must learn more about LLMs' capabilities and help blue teams preparing for them.
11+
## hackingBuddyGPT in the News
1212

13-
**[Join us](https://discord.gg/vr4PhSM8yN) / Help us, more people need to be involved in the future of LLM-assisted pen-testing:**
13+
- 2024-07-26: The [GitHub Accelerator Showcase](https://github.blog/open-source/maintainers/github-accelerator-showcase-celebrating-our-second-cohort-and-whats-next/) features hackingBuddyGPT
14+
- 2024-07-24: [Juergen](https://github.com/citostyle) speaks at `Open Source + mezcal night @ GitHub HQ`
15+
- 2024-05-23: hackingBuddyGPT is part of [GitHub Accelerator 2024](https://github.blog/news-insights/company-news/2024-github-accelerator-meet-the-11-projects-shaping-open-source-ai/)
16+
- 2023-12-05: [Andreas](https://github.com/andreashappe) presented hackingBuddyGPT at FSE'23 in San Francisco ([paper](https://arxiv.org/abs/2308.00121), [video](https://2023.esec-fse.org/details/fse-2023-ideas--visions-and-reflections/9/Towards-Automated-Software-Security-Testing-Augmenting-Penetration-Testing-through-L))
1417

15-
To ground our research in reality, we performed a comprehensive analysis into [understanding hackers' work](https://arxiv.org/abs/2308.07057). There seems to be a mismatch between some academic research and the daily work of penetration testers, please help us to create more visibility for this issue by citing this paper (if suitable and fitting).
18+
## Original Paper
1619

1720
hackingBuddyGPT is described in [Getting pwn'd by AI: Penetration Testing with Large Language Models ](https://arxiv.org/abs/2308.00121), help us by citing it through:
1821

@@ -29,7 +32,6 @@ hackingBuddyGPT is described in [Getting pwn'd by AI: Penetration Testing with L
2932
}
3033
~~~
3134

32-
3335
## Getting help
3436

3537
If you need help or want to chat about using AI for security or education, please join our [discord server where we talk about all things AI + Offensive Security](https://discord.gg/vr4PhSM8yN)!
@@ -74,12 +76,10 @@ The following would create a new (minimal) linux privilege-escalation agent. Thr
7476
template_dir = pathlib.Path(__file__).parent
7577
template_next_cmd = Template(filename=str(template_dir / "next_cmd.txt"))
7678

77-
@use_case("minimal_linux_privesc", "Showcase Minimal Linux Priv-Escalation")
78-
@dataclass
79+
7980
class MinimalLinuxPrivesc(Agent):
8081

8182
conn: SSHConnection = None
82-
8383
_sliding_history: SlidingCliHistory = None
8484

8585
def init(self):
@@ -89,28 +89,33 @@ class MinimalLinuxPrivesc(Agent):
8989
self.add_capability(SSHTestCredential(conn=self.conn))
9090
self._template_size = self.llm.count_tokens(template_next_cmd.source)
9191

92-
def perform_round(self, turn):
93-
got_root : bool = False
92+
def perform_round(self, turn: int) -> bool:
93+
got_root: bool = False
9494

95-
with self.console.status("[bold green]Asking LLM for a new command..."):
95+
with self._log.console.status("[bold green]Asking LLM for a new command..."):
9696
# get as much history as fits into the target context size
9797
history = self._sliding_history.get_history(self.llm.context_size - llm_util.SAFETY_MARGIN - self._template_size)
9898

9999
# get the next command from the LLM
100100
answer = self.llm.get_response(template_next_cmd, capabilities=self.get_capability_block(), history=history, conn=self.conn)
101101
cmd = llm_util.cmd_output_fixer(answer.result)
102102

103-
with self.console.status("[bold green]Executing that command..."):
104-
self.console.print(Panel(answer.result, title="[bold cyan]Got command from LLM:"))
105-
result, got_root = self.get_capability(cmd.split(" ", 1)[0])(cmd)
103+
with self._log.console.status("[bold green]Executing that command..."):
104+
self._log.console.print(Panel(answer.result, title="[bold cyan]Got command from LLM:"))
105+
result, got_root = self.get_capability(cmd.split(" ", 1)[0])(cmd)
106106

107107
# log and output the command and its result
108-
self.log_db.add_log_query(self._run_id, turn, cmd, result, answer)
108+
self._log.log_db.add_log_query(self._log.run_id, turn, cmd, result, answer)
109109
self._sliding_history.add_command(cmd, result)
110-
self.console.print(Panel(result, title=f"[bold cyan]{cmd}"))
110+
self._log.console.print(Panel(result, title=f"[bold cyan]{cmd}"))
111111

112112
# if we got root, we can stop the loop
113113
return got_root
114+
115+
116+
@use_case("Showcase Minimal Linux Priv-Escalation")
117+
class MinimalLinuxPrivescUseCase(AutonomousAgentUseCase[MinimalLinuxPrivesc]):
118+
pass
114119
~~~
115120

116121
The corresponding `next_cmd.txt` template would be:

0 commit comments

Comments
 (0)