minvws / nl-kat-coordination

OpenKAT scans networks, finds vulnerabilities and creates accessible reports. It integrates the most widely used network tools and scanning software into a modular framework, accesses external databases such as shodan, and combines the information from all these sources into clear reports. It also includes lots of cat hair.
https://openkat.nl
European Union Public License 1.2
126 stars 58 forks source link

Creating new boefjes #3367

Closed madelondohmen closed 1 month ago

madelondohmen commented 2 months ago

About this feature

Detailed description

This is the implementation of #3318

Feature benefit/User story

As a KAT user, I want to be able to create and add my own boefjes, so I can make customize plugins that fit my needs.

Specifications

The implementation should include…

Design

Screenshots

Include screenshots of the proposed design changes here.

Figma link

Approved | Boefjes | Create a Boefje For Review, not final!

Implementation

This part should only be filled in by the developers.

Possible solution

Outline your proposed solution for implementing the feature. You can include any specific ideas, designs, or functionalities here.

Alternatives considered

Describe any alternative approaches or solutions you've considered, and why you believe the proposed solution is superior.

stephanie0x00 commented 2 months ago

Checklist for QA:

What works:

Onboarding seems to work, the UI does have a few unexpected changes. See the screenshots below.

What doesn't work:

When adding a boefje the task runs, but it seems to always fail. I did the onboarding with mispo.es. I used the following settings: add-boefje-katalogus.tar.gz

Other points:

Bug or feature?:

Screenshots onboarding UI

Onboarding flow UI looks different from main. Is this intentional? I do not see this change listed. image

image

madelondohmen commented 2 months ago

What doesn't work:

When adding a boefje the task runs, but it seems to always fail. I did the onboarding with mispo.es. I used the following settings: add-boefje-katalogus.tar.gz

This will be fixed by @Donnype

Other points:

* I think it will be useful to have helper functionalities for all data fields on the 'Add boefje' form. It can be very daunting to add your own boefje and having the helper functionality can be very comforting.

I've updated the helper texts and added it for the "Description"-input. I did not add it to "Name", since this is too obvious and not to the "Container image"-input and the "Arguments"-input, since those two already have a small description/example above the input.

* The documentation button at the top "you can check out the documentation" doesnt point to actual documentation.

Should be fixed now. The current documentation is only about creating a Boefje in the backend. We still have to update this documentation and add the created UI, but this will be done in a new ticket #3437

* JSON schema Helper functionality should point to an example schema.json file in the repository. This will help the user to quickly have an example ready.

Fixed

* Input object type: I think a little more explanation would be nice specifying what it means that "Select the object type that your boefje consumes". Either with a few extra lines and/or a link to documentation where this is described. Just like is done for the 'Output mime-types'.

Fixed

* Output mimetypes should be with a space for mime types.

Fixed

Bug or feature?:

* There is no check if a boefje with a similar name already exists. Is this intended behaviour? Otherwise it can be very confusing.

This is okay for now. We might fix this in the future.

* There is currently no way to edit your boefje? Thus if you made a mistake, you cannot edit or delete it after you created it?

This is correct. For now it's not possible. This is another ticket.

Onboarding flow UI looks different from main. Is this intentional?

Yes, this is intentional. The lay-out of the form has changed a bit.

stephanie0x00 commented 1 month ago

Checklist for QA:

What works:

Can create a boefje, enable and disable it and it runs and is picked up by the normalizer (tried with a nmap variant). Other boefjes still run and all create findings. Seems to work as expected now.

What doesn't work:

n/a

Bug or feature?:

The newly created boefje still shows the uuid in the tasks overview on the normalizer page. This will be picked up in a different PR as it is small, such that we can merge this one.