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

Add CyberChef #259

Merged
merged 18 commits into from
Oct 26, 2023
Merged

Add CyberChef #259

merged 18 commits into from
Oct 26, 2023

Conversation

lap1nou
Copy link
Contributor

@lap1nou lap1nou commented Oct 11, 2023

Description

This PR will add a new bookmark for the tool CyberChef. The tool can be used from the web, but a local version is available and is probably a better choice.

For the moment the PR just download and install the latest version of the tool, however if the change is accepted I can modifiy the Firefox SQLite DB to add the bookmark aswell.

Related issues

N / A

Point of attention

N / A

@lap1nou lap1nou changed the title Update package_base.sh, added CyberChef New tool added CyberChef Oct 11, 2023
@lap1nou lap1nou changed the title New tool added CyberChef New tool added CyberChef - DRAFT Oct 11, 2023
@ShutdownRepo ShutdownRepo changed the title New tool added CyberChef - DRAFT New tool added CyberChef Oct 11, 2023
@ShutdownRepo ShutdownRepo marked this pull request as draft October 11, 2023 20:43
@gbe
Copy link
Contributor

gbe commented Oct 12, 2023

I think it would be nice to have a bookmark indeed, otherwise this addition would remain unnoticed for a large base of users.

@lap1nou
Copy link
Contributor Author

lap1nou commented Oct 12, 2023

Do you know how can I test my images repository ? Or should I let the CI / CD pipeline do the job ?

@ShutdownRepo ShutdownRepo changed the title New tool added CyberChef Add CyberChef Oct 13, 2023
@ShutdownRepo ShutdownRepo added the new tool(s) This adds one or multiple tools to Exegol label Oct 13, 2023
@ShutdownRepo
Copy link
Member

Thank you @lap1nou for the PR, and thanks @gbe for initiating the review

Do you know how can I test my images repository ? Or should I let the CI / CD pipeline do the job ? from @lap1nou

Yes this is possible, you can build a local image with the wrapper. See the install doc. It should be something like exegol install myimage full --build-log "/tmp/build.log"

I think it would be nice to have a bookmark indeed, otherwise this addition would remain unnoticed for a large base of users. from @gbe

Agreed, but in my opinion, the bookmark should point to the online version, and not the local one. The local services will soon be listed in a specific section in the documentation.

@lap1nou
Copy link
Contributor Author

lap1nou commented Oct 13, 2023

@ShutdownRepo Ok I'm gonna try to test the image, thank you.

Hum don't you think we should only have the local version ?, it has the advantage of being more secure in case someone want to paste some hash in it for example.

It's just an HTML file and some JS, it's not a complete web service. Now that I think of this, it should probably be placed in the Exegol-resources no ?

@ShutdownRepo
Copy link
Member

Tools to be used in the container --> images
Tools to be used elsewhere, on a target e.g. --> resources

In this case, the local version, on the images, seems relevant

Copy link
Member

@QU35T-code QU35T-code left a comment

Choose a reason for hiding this comment

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

Hello @lap1nou,

These dependencies are missing.

/usr/bin/open: 882: iceweasel: not found
/usr/bin/open: 882: seamonkey: not found
/usr/bin/open: 882: mozilla: not found
/usr/bin/open: 882: epiphany: not found
/usr/bin/open: 882: konqueror: not found
[1060262:1060262:1018/130213.777341:ERROR:zygote_host_impl_linux.cc(100)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
/usr/bin/open: 882: chromium-browser: not found
/usr/bin/open: 882: google-chrome: not found
/usr/bin/open: 882: www-browser: not found
/usr/bin/open: 882: links2: not found
/usr/bin/open: 882: elinks: not found
/usr/bin/open: 882: links: not found
/usr/bin/open: 882: lynx: not found
/usr/bin/open: 882: w3m: not found

sources/install/package_base.sh Outdated Show resolved Hide resolved
@QU35T-code QU35T-code added the waiting for additional changes Further changes are requested label Oct 18, 2023
@lap1nou
Copy link
Contributor Author

lap1nou commented Oct 22, 2023

I wanted to add OCD mindmap (https://github.com/Orange-Cyberdefense/ocd-mindmaps) as a bookmark aswell, should I create another PR ?

@ShutdownRepo
Copy link
Member

I wanted to add OCD mindmap (https://github.com/Orange-Cyberdefense/ocd-mindmaps) as a bookmark aswell, should I create another PR ?

Yes, but on that specific addition, the best would be to create a "mindmaps" directory and have that one in it

@QU35T-code
Copy link
Member

@lap1nou can you resolve conflicts ?

@lap1nou lap1nou marked this pull request as ready for review October 24, 2023 19:47
@QU35T-code
Copy link
Member

@lap1nou
Copy link
Contributor Author

lap1nou commented Oct 24, 2023

@lap1nou - https://github.com/ThePorgs/Exegol-images/actions/runs/6631802951/job/18016640057

Yup sorry mistype. Should be good now.

@QU35T-code
Copy link
Member

https://github.com/ThePorgs/Exegol-images/actions/runs/6632025893

@QU35T-code
Copy link
Member

QU35T-code commented Oct 24, 2023

Missing check whitelist code for aliases and history

For exemple :

https://github.com/ThePorgs/Exegol-images/blob/dev/sources/install/package_ad.sh#L7

@QU35T-code
Copy link
Member

QU35T-code commented Oct 24, 2023

you can chain them with a comma :

# CODE-CHECK-WHITELIST=add-aliases,add-history

and it should be good

@QU35T-code QU35T-code added ready for merge in the waitlist for merge, requires preliminary steps and removed waiting for additional changes Further changes are requested labels Oct 25, 2023
Copy link
Member

@ShutdownRepo ShutdownRepo left a comment

Choose a reason for hiding this comment

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

Final changes before merge
Also, the add-test-command doesn't return != 0 if the file doesn't exist apparently since the pipeline passed successfully but the check failed.
image
This means:

  • the test command needs to be fixed
  • cyberchef doesn't seem to install successfully

sources/install/package_base.sh Outdated Show resolved Hide resolved
sources/install/package_base.sh Outdated Show resolved Hide resolved
sources/install/package_base.sh Outdated Show resolved Hide resolved
@ShutdownRepo ShutdownRepo added waiting for additional changes Further changes are requested and removed ready for merge in the waitlist for merge, requires preliminary steps labels Oct 25, 2023
@ShutdownRepo
Copy link
Member

Final changes before merge Also, the add-test-command doesn't return != 0 if the file doesn't exist apparently since the pipeline passed successfully but the check failed. image This means:

* the test command needs to be fixed

* cyberchef doesn't seem to install successfully

it seems the install failed here
image

@lap1nou
Copy link
Contributor Author

lap1nou commented Oct 25, 2023

Final changes before merge Also, the add-test-command doesn't return != 0 if the file doesn't exist apparently since the pipeline passed successfully but the check failed. image This means:

* the test command needs to be fixed

* cyberchef doesn't seem to install successfully

it seems the install failed here image

Hello @ShutdownRepo,

For the test function, this is strange:

exegol-test /workspace # file /opt/tools/CyberChef/CyberChef.html
/opt/tools/CyberChef/CyberChef.html: cannot open `/opt/tools/CyberChef/CyberChef.html' (No such file or directory)

exegol-test /workspace # echo $?
1
exegol-test/workspace # touch /opt/tools/CyberChef/CyberChef.html
exegol-test /workspace # file /opt/tools/CyberChef/CyberChef.html 
/opt/tools/CyberChef/CyberChef.html: empty
exegol-test /workspace # echo $?
0

Do you have an idea how to test for the presence of a file ? I saw that file was already used as a test command:

add-test-command "file /root/.mozilla/firefox/*.Exegol"

For the installation this is really strange, I tried to use git to fetch the latest tag instead, can we run the pipeline again to test ?

@ShutdownRepo
Copy link
Member

Weird indeed, let’s run the tests again

@ShutdownRepo
Copy link
Member

We're good

  • install ✅

image
image

  • tests ✅

image

  • overall pipeline ✅

@ShutdownRepo
Copy link
Member

Thank you @lap1nou for the pull request, thank you @QU35T-code and @gbe for the reviews !
I had an offline cyberchef embedded in Exegol for a while in my head, without ever being able to get down to it as wasn't the priority, I'm thrilled we now get to have it ! Merging

@ShutdownRepo ShutdownRepo self-assigned this Oct 26, 2023
@ShutdownRepo ShutdownRepo removed the waiting for additional changes Further changes are requested label Oct 26, 2023
@ShutdownRepo ShutdownRepo merged commit 50de017 into ThePorgs:dev Oct 26, 2023
41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new tool(s) This adds one or multiple tools to Exegol
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants