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

Ransomware config UI description #1286

Merged
merged 2 commits into from
Jul 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions monkey/monkey_island/cc/services/config_schema/ransomware.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
RANSOMWARE = {
"title": "Ransomware",
"type": "object",
"description": "This page allows you to configure the Infection Monkey to execute a ransomware "
"simulation. The Infection Monkey is capable of simulating a ransomware attack on your network "
"using a set of configurable behaviors. A number of precautions have been taken to ensure that "
Comment on lines +4 to +6
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if this is not excessive info since the user is in the ransomware tab under the ransomware title, so it should be obvious that he's configuring ransomware simulation here. The fact that it's safe to run in production environment can be said about almost every field in configuration and monkey in general. The only thing I see as a must is a link to the documentation hub.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I've done some thinking about it. I haven't really been able to come up with a better short description of what these configuration options are. I think it's worth the note about it being "safe", so people don't panic when they see "ransomware."

As we continue to work on this capability, we can revisit this.

"this ransomware simulation is safe for production environments.\n\nFor more information about "
"configuring the ransomware simulation, see "
'<a href="https://guardicore.com/infectionmonkey/docs/usage/use-cases/ransomware-simulation" '
'target="_blank"> the documentation</a>.',
"properties": {
"encryption": {
"title": "Encryption",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import React from 'react';

function HtmlFieldDescription(props) {
var content_obj = {__html: props.description};
return <p id={props.id} className='field-description' dangerouslySetInnerHTML={content_obj} />;
}

export default HtmlFieldDescription;
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import isUnsafeOptionSelected from '../utils/SafeOptionValidator.js';
import ConfigExportModal from '../configuration-components/ExportConfigModal';
import ConfigImportModal from '../configuration-components/ImportConfigModal';
import applyUiSchemaManipulators from '../configuration-components/UISchemaManipulators.tsx';
import HtmlFieldDescription from '../configuration-components/HtmlFieldDescription.js';

const ATTACK_URL = '/api/attack';
const CONFIG_URL = '/api/configuration/island';
Expand Down Expand Up @@ -411,6 +412,7 @@ class ConfigurePageComponent extends AuthComponent {
setPbaFilenameLinux: this.setPbaFilenameLinux,
selectedSection: this.state.selectedSection
})
formProperties['fields'] = {DescriptionField: HtmlFieldDescription};
formProperties['formData'] = this.state.currentFormData;
formProperties['onChange'] = this.onChange;
formProperties['customFormats'] = formValidationFormats;
Expand Down