Skip to content

Conversation

@lloydchang
Copy link
Contributor

@lloydchang lloydchang commented Sep 1, 2024

Key changes:

  1. Script location: src/hackingBuddyGPT/cli/wintermute.py
  2. Command argument update: 'minimal_linux_privesc' to 'LinuxPrivesc'
  3. API key usage: sk...ChangeMeToYourOpenAiApiKey
  4. Package installation: Use quotes - pip install '.[testing]'
  5. docs: target VM, not localhost, for safety

Errors fixed:

  • File not found
  • Invalid argument choice
  • Zsh globbing issue with pip install

Co-authored-by: Haley Lifrieri [email protected]
Co-authored-by: Haley Lifrieri [email protected]
Co-authored-by: Muturi David [email protected]
Co-authored-by: Pardaz Banu Mohammad [email protected]
Co-authored-by: Pardaz Banu Mohammad [email protected]
Co-authored-by: Toluwalope Olateru-Olagbeg [email protected]

Key changes:
1. Script location: src/hackingBuddyGPT/cli/wintermute.py
2. Command argument update: 'minimal_linux_privesc' to 'LinuxPrivesc'
3. API key usage: sk...ChangeMeToYourOpenAiApiKey
4. Package installation: Use quotes - pip install '.[testing]'

Errors fixed:
* File not found
* Invalid argument choice
* Zsh globbing issue with pip install

Co-authored-by: Haley Lifrieri <[email protected]>
Co-authored-by: Haley Lifrieri <[email protected]>
Co-authored-by: Muturi David <[email protected]>
Co-authored-by: Pardaz Banu Mohammad <[email protected]>
Co-authored-by: Pardaz Banu Mohammad <[email protected]>
Co-authored-by: Toluwalope Olateru-Olagbeg <[email protected]>
@lloydchang
Copy link
Contributor Author

lloydchang commented Sep 1, 2024

@andreashappe
Copy link
Member

please don't target localhost directly. This would mean that a user (that does not know what to do) would hack their own system. We cannot give out instructions like that to end-users.

It is better to use a virtual machine as a target.

* Use 192.168.122.151
* Add sections to match https://github.com/ipa-lab/docs.hackingbuddy/blob/master/src/app/docs/introduction/installation/page.md
  * Provide a Target Machine over SSH
  * Run the Hacking Agent

Co-authored-by: Haley Lifrieri <[email protected]>
Co-authored-by: Haley Lifrieri <[email protected]>
Co-authored-by: Muturi David <[email protected]>
Co-authored-by: Pardaz Banu Mohammad <[email protected]>
Co-authored-by: Pardaz Banu Mohammad <[email protected]>
Co-authored-by: Toluwalope Olateru-Olagbeg <[email protected]>
@andreashappe
Copy link
Member

thanks for changing this. Have you tried to setup a virtual machine for testing? If so, could you detail the steps that you took? I think this would help other developers a lot

Co-authored-by: Haley Lifrieri <[email protected]>
Co-authored-by: Haley Lifrieri <[email protected]>
Co-authored-by: Muturi David <[email protected]>
Co-authored-by: Pardaz Banu Mohammad <[email protected]>
Co-authored-by: Pardaz Banu Mohammad <[email protected]>
Co-authored-by: Toluwalope Olateru-Olagbeg <[email protected]>
@lloydchang
Copy link
Contributor Author

@andreashappe wrote:

thanks for changing this. Have you tried to setup a virtual machine for testing? If so, could you detail the steps that you took? I think this would help other developers a lot

We used GitHub CodeSpaces and containers instead of Vagrant virtual machines. Please review ipa-lab/benchmark-privesc-linux#2 Thank you!

Copy link
Member

@andreashappe andreashappe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, maybe we should add more about where to get the virtual machines

@andreashappe andreashappe merged commit fd088b3 into ipa-lab:main Sep 4, 2024
@lloydchang
Copy link
Contributor Author

@andreashappe wrote:

looks good, maybe we should add more about where to get the virtual machines

Is your ask to add more to this repository, another repository, or both?

For example, ipa-lab/docs.hackingbuddy#5 hasn't been merged yet.

Would we add more in that repository?

@andreashappe
Copy link
Member

@andreashappe wrote:
Is your ask to add more to this repository, another repository, or both?

Mostly, I am thinking about new people that try to use hackingBuddyGPT (such as you were, when you installed it for the first time). Maybe add a link about where to download a virtual machine, etc. (as we often get similar questions on the discord server) -- but that is just a nice to have, don't feel compelled to do it!

For example, ipa-lab/docs.hackingbuddy#5 hasn't been merged yet.

I am still reviewing that commit (as it is larger, containing a shell script, etc.).

@lloydchang
Copy link
Contributor Author

Thanks for clarifying.

As an idea, https://github.com/ipa-lab/benchmark-privesc-linux
can be added as a Git subtree of this repository.

Then, we can add a .devcontainer/devcontainer.json file similar to
ipa-lab/benchmark-privesc-linux#2

Hypothetically, that would enable teams to start GitHub Codespaces in this repository or forks to have containers to test with.

Ubuntu users without GitHub Codespaces can try running
codespaces_create_and_start_containers.sh at
https://github.com/ipa-lab/benchmark-privesc-linux/pull/2/files#diff-4b6f39d52671f0a99ca0f468802c1d9e87cc09ef5b81882f4dc70cb772dd29e1
and make local changes depending on how different their Ubuntu is from GitHub CodeSpaces' Ubuntu.

@andreashappe wrote:

For example, ipa-lab/docs.hackingbuddy#5 hasn't been merged yet.

I am still reviewing that commit (as it is larger, containing a shell script, etc.).

https://github.com/ipa-lab/docs.hackingbuddy/pull/5/files
changes page.md only.

Are you referring to
https://github.com/ipa-lab/benchmark-privesc-linux/pull/2/files
?

@andreashappe
Copy link
Member

I'd prefer not to add benchmark-privesc-linux as github subtree as then I would also add other repositories (like the web benchmarks) as additional subtree. So keeping them separated seems to be more consistent.

I (personally) would not run either vulnerable containers nor LLM-guided attack tooling outside of my local computers and test-setup but I can understand why people want to do it that way. Would it be possible to add codespace support to hackingbuddygpt in a way, that only spawns a single container (maybe with the suid/sudo use-case) and starts hackingBuddyGPT against that container? That might be the 'easiest' show-case/use-case for a new user.

ipa-lab/docs.hackingbuddy#5

should be merged since yesterday (; got the links mixed up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants