Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small bug with the quickstart script and hardcoded values #188

Open
LM-CT opened this issue Nov 29, 2024 · 3 comments
Open

Small bug with the quickstart script and hardcoded values #188

LM-CT opened this issue Nov 29, 2024 · 3 comments
Assignees
Labels
bug Something isn't working improvement Existing functionality that needs improvements

Comments

@LM-CT
Copy link

LM-CT commented Nov 29, 2024

Describe the bug
Despite the effort to improve the installation experience with the script, there are a few (forgotten?) instances of a hard coded username (cuckoo) on the Cuckoo Web part of the script.

The hard coded information reside in lines 399, 400 and 404. To fix it you just need to substitute cuckoo for $username.

To Reproduce
Steps to reproduce the behavior:

  1. Fetch and run the script.
  2. Use a custom username (in my case, bird) for the dedicated cuckoo account.
  3. ...
  4. Wait an eternity for the Win10 image to download. (I'll probably open an Issue/PR on VMCloak to fix it)
  5. ...
  6. Errors on the Cuckoo Web setup due to hard coded paths.
  7. Script continues anyway.
  8. Web interface doesn't go up.
  9. Sadness :(

Expected behavior
The script running it's full course without errors. There should be some checks for failures on some major operations that depend on other programs.

My Cuckoo version and operating system are:

Cuckoo 3.x.x (how do I find this information? I just ran the quickstart script), Ubuntu 22.04


PS: I wasn't able to find the quickstart script on the repo (or the org). There are some minor bash improvements I would like to contribute, but without it in the repo I can't open a Pull Request.

I'll probably put it in a gist and link in the comments.


PPS: Thank you for all the work!! Having an updated version of Cuckoo Sandbox will greatly help my SOC operations!

@LM-CT
Copy link
Author

LM-CT commented Nov 29, 2024

Also, there is a small typo on line 398 ("Configurin" should be "Configuring").

Additionally, on line 259, it would be clearer if "Please enter a name [...]" was "Please enter a username [...]". I had some trouble because I'm used to being asked for a "Full Name" and then an username when creating an account interactively.

@LM-CT
Copy link
Author

LM-CT commented Nov 29, 2024

Just posted the gist, the modified version is available here.

I changed a little the Confirmations and user setup section to use while structures to "trap" the user into answering "correctly" to the [y/n] prompts, merged both ifs for creating the user into a single elif and added some basic error checking for user creation/password changing errors.

I also took the liberty to move the Ubuntu version checking to run before the sudo/root checking and converted all tab characters in the file to be 4 spaces (most of the lines are indented this way).


PS: About the tabs/spaces mix, I initially found it funny, because this is a Python project and Python VERY MUCH dislikes this type of mixing, haha.

However, looking at the other files on the repo, I found out that you guys do not have a clear policy on whether to use tabs or spaces. You should really figure this out, before it comes back to bite you in the ass in the future 😉.

@cert-ee-raidar cert-ee-raidar added the bug Something isn't working label Dec 2, 2024
@cert-ee-raidar
Copy link
Contributor

cert-ee-raidar commented Dec 2, 2024

@LM-CT
Thank you very much for the bug report and fix suggestions.

  • Fix hardcoded values on lines 398, 399 and 404
  • Fix typo on line 398
  • Clarify wording on line 259

We will have Ansible playbook soon so for now, I will not modify the logic of the script. If we keep it in current form, we will consider your suggestions. Thank you for taking the time to improve it!

Yes, it is a bit of a mess right now in terms of clear style. We are writing it down and we will update the contributing guide once we are done. Thank you for pointing it out.

@cert-ee-raidar cert-ee-raidar added the improvement Existing functionality that needs improvements label Dec 2, 2024
@cert-ee-raidar cert-ee-raidar self-assigned this Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working improvement Existing functionality that needs improvements
Projects
None yet
Development

No branches or pull requests

2 participants