説明なし

modal_case_template.html 8.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. <div class="modal-header">
  2. {% if case_template.id %}
  3. <h4>Edit case template {{ case_template.display_name }}</h4>
  4. {% else %}
  5. <h4>Add case template</h4>
  6. {% endif %}
  7. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
  8. aria-hidden="true">&times;</span></button>
  9. </div>
  10. <div class="modal-body">
  11. <div class="container col-md-12">
  12. <form method="post" action="" id="form_new_case_template" enctype="multipart/form-data">
  13. <div class="row">
  14. <div class="col-6">
  15. <div class="accordion accordion-primary">
  16. {% if case_template.id %}
  17. <h2>{{ case_template.display_name }} template</h2>
  18. {% else %}
  19. <h2>New template</h2>
  20. {% endif %}
  21. <p>Case templates allow to prefill case objects such as tasks, tags, and notes.<br/>
  22. It can be used to add procedures defining how to react against a specific kind of incident (phishing, ransomware, APT...)</p>
  23. <div class="alert-std alert-warning" role="alert">
  24. Case templates can be added and edited in this UI, or they can be uploaded as JSON files.<br/>
  25. <p>IRIS will attempt to validate the contents of the case template before committing.</p>
  26. </div>
  27. <div class="card">
  28. <div class="card-header collapsed" id="drop_case_template_taxonomy" data-toggle="collapse" data-target="#drop_tax_case_template" aria-expanded="false" aria-controls="drop_tax_attr" role="button">
  29. <div class="span-icon">
  30. <div class="flaticon-pencil"></div>
  31. </div>
  32. <div class="span-title">
  33. Case Template taxonomy
  34. </div>
  35. <div class="span-mode"></div>
  36. </div>
  37. <div id="drop_tax_case_template" class="collapse" aria-labelledby="drop_tax_case_template" style="">
  38. <div class="card-body">
  39. <h4>Field types</h4>
  40. The supported fields types are:
  41. <ul>
  42. <li>name: The name of the case template (required).</li>
  43. <li>display_name: The displayed name of the case template.</li>
  44. <li>description: The description of the case template.</li>
  45. <li>author: The author of the case template (not related to the current user).</li>
  46. <li>classification: The classification of the case template. Should be a lowercase name matching an existing classification in IRIS.</li>
  47. <li>title_prefix: A prefix to add to case title.</li>
  48. <li>summary: content to prefill the summary.</li>
  49. <li>tags: A list of case tags.</li>
  50. <li>tasks: A list of dictionaries defining tasks. Tasks are defined by title (required), description, and list of tags.</li>
  51. <li>note_directories: A list of dictionaries defining note directories. Note directories are defined by title (required), and list of notes. Notes have title (required) and content</li>
  52. </ul>
  53. </div>
  54. </div>
  55. </div>
  56. <div class="card mt-4">
  57. <div class="card-header collapsed" id="drop__template_example" data-toggle="collapse" data-target="#drop_case_template_example" aria-expanded="false" aria-controls="drop_tax_attr" role="button">
  58. <div class="span-icon">
  59. <div class="flaticon-pencil"></div>
  60. </div>
  61. <div class="span-title">
  62. Case Template Example
  63. </div>
  64. <div class="span-mode"></div>
  65. </div>
  66. <div id="drop_case_template_example" class="collapse" aria-labelledby="drop_tax_case_template" style="">
  67. <div class="card-body">
  68. A case template is defined as below.
  69. <pre>
  70. {
  71. "name": "ransomware_infection",
  72. "display_name": "Ransomware Infection Template",
  73. "description": "This case template describes first-response tasks to handle information system compromised by a ransomware.",
  74. "author": "DFIR-IRIS",
  75. "classification": "malicious-code:ransomware",
  76. "title_prefix": "[RANS]",
  77. "summary": "# Context \n\n\n# Contact \n\n\n# Actions \n\n\n",
  78. "tags": ["ransomware","malware"],
  79. "tasks": [
  80. {
  81. "title": "Identify the perimeter",
  82. "description": "The perimeter of compromise must be identified",
  83. "tags": ["identify"]
  84. },
  85. {
  86. "title": "Collect compromised hosts",
  87. "description": "Deploy Velociraptor and start collecting evidence",
  88. "tags": ["collect", "velociraptor"]
  89. },
  90. {
  91. "title": "Containment"
  92. }
  93. ],
  94. "note_directories": [
  95. {
  96. "title": "Identify",
  97. "notes": [
  98. {
  99. "title": "Identify the compromised accounts",
  100. "content": "# Observations\n\n"
  101. }
  102. ]
  103. },
  104. {
  105. "title": "Collect",
  106. "notes": [
  107. {
  108. "title": "Velociraptor deployment"
  109. },
  110. {
  111. "title": "Assets collected",
  112. "content": "# Assets collected\n\n# Assets not collected"
  113. }
  114. ]
  115. }
  116. ]
  117. }
  118. </pre>
  119. </div>
  120. </div>
  121. </div>
  122. </div>
  123. </div>
  124. <div class="col-6">
  125. {{ form.hidden_tag() }}
  126. <div class="form-group">
  127. <div class="row">
  128. <label for="editor_detail" class="mr-4">Case template definition
  129. </label><button type="button" class="btn btn-sm ml-auto" onclick="downloadCaseTemplateDefinition();">Download definition</button>
  130. </div>
  131. <div id="editor_detail">{{ form.case_template_json.data|tojsonsafe }}</div>
  132. </div>
  133. </div>
  134. </div>
  135. </form>
  136. </div>
  137. <div class="alert alert-warning" style="display:none;" role="alert" id="alert_case_template_details">
  138. <span id="alert_case_template_edit"></span><br/>
  139. <b>Logs:</b>
  140. <ul id="case_template_err_details_list">
  141. </ul>
  142. </div>
  143. </div>
  144. <div class="modal-footer">
  145. {% if case_template.id %}
  146. <button
  147. type="button"
  148. class="btn btn-outline-danger mr-auto"
  149. id="submit_delete_case_template"
  150. >
  151. Delete
  152. </button>
  153. <button
  154. type="button"
  155. class="btn btn-outline-success ml-4 float-right"
  156. id="submit_new_case_template"
  157. >
  158. Update
  159. </button>
  160. {% else %}
  161. <button
  162. type="button"
  163. class="btn btn-outline-success ml-4 float-right"
  164. id="submit_new_case_template"
  165. >
  166. Save
  167. </button>
  168. {% endif %}
  169. </div>