Code Monkey home page Code Monkey logo

ermack's People

Contributors

aw350m33d avatar duchessacid avatar e6e6e avatar kmssrv avatar leitosama avatar plgvkr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

ermack's Issues

[FEATURE] Add list processing in CPE sections

Is there an existing feature request or discussion for this?

  • I have searched the existing feature requests and discussions

Problem

It would be logical to add the ability to specify a list of CPEs for one software.
At the current moment, if I specify a list of CPE for one software in infrastructure profile, then an error occurs when processing a string value.

For example like this:

  • role: Workstations
    category: Host
    id: S0003
    cpe-fs:
    • 'cpe:2.3:o:microsoft:windows_10::::::::'
    • 'cpe:2.3:o:microsoft:windows_8.1::::::::'`

Error:
File "/usr/local/lib/python3.11/dist-packages/cpe/cpe.py", line 231, in __init__ self._str = cpe_str.lower() ^^^^^^^^^^^^^ AttributeError: 'list' object has no attribute 'lower'

Solution

Always use a list with CPE and process each element of this list.

Improvements

No response

Anything else?

No response

[FEATURE] Add advanced API Atlassian Authentication

Is there an existing feature request or discussion for this?

  • I have searched the existing feature requests and discussions

Problem

Есть проблема при взаимодействия модуля confluence и облачного конфлюенса от Atlassian, например, при попытке загрузки контента, например на мой конфлюенс **https://mudgolem.atlassian.net/wiki/spaces/ ** возникает следующая ошибка:

Enterprise Response Model & Common Knowledge | Code version: 0.0.1; Data version: 0.0.1
[✓] ATT&CK mapping has been updated
Traceback (most recent call last):.
  File "/home/user/ERMACK-feature-nested_response_playbooks/./main.py", line 147, in <module>
    main()
  File "/home/user/ERMACK-feature-nested_response_playbooks/./main.py", line 97, in main
    renderer.render(args=args)
  File "/home/user/ERMACK-feature-nested_response_playbooks/ermack/render_knowledge_base.py", line 73, in render
    self.data_provider.load_structure()
  File "/home/user/ERMACK-feature-nested_response_playbooks/ermack/data_providers/confluence_provider.py", line 175, in load_structure
    page = self.confluence.get_page_by_title(space=self.space, title=page_name)
  File "/usr/local/lib/python3.9/dist-packages/atlassian/confluence.py", line 307, in get_page_by_title
    response = self.get(url, params=params)
  File "/usr/local/lib/python3.9/dist-packages/atlassian/rest_client.py", line 285, in get
    response = self.request(
  File "/usr/local/lib/python3.9/dist-packages/atlassian/rest_client.py", line 257, in request
    self.raise_for_status(response)
  File "/usr/local/lib/python3.9/dist-packages/atlassian/confluence.py", line 2988, in raise_for_status
    raise HTTPError(error_msg, response=response)
requests.exceptions.HTTPError: Request rejected because issuer is either not authorized or not authorized to impersonate

Связана она с механизмами аутентификации confluence и в случае облачных хранилищ возможны проблемы с аутентификацией. Обходным решением (то же самое я делал c ATC) может быть что-то наподобие:
https://community.atlassian.com/t5/Confluence-Cloud-discussions/Confluence-cloud-Rest-API-returns-401-Unauthorize-while-fetching/td-p/1213977.

Solution

Заполнение контента на облачный confluence без ошибок.

Improvements

No response

Anything else?

No response

[FEATURE] Русская локализация для всех действий реагирования

Is there an existing feature request or discussion for this?

  • I have searched the existing feature requests and discussions

Problem

Сейчас не все действия реагирования имеют русскую локализацию

Solution

Нужно перевести все сущности и их описание на русский язык

Improvements

No response

Anything else?

No response

[BUG] Using annotation "str | None" causes error

Is there an existing issue or discussion for this?

  • I have searched the existing issues and discussions

Current Behavior

При вызове main.py (даже с флагом -h)

(env) root@kb-host:/home/user/ERMACK-feature-nested_response_playbooks# "/home/user/ERMACK-feature-nested_response_playbooks/main.py" -h

возникает следующая ошибка:

Traceback (most recent call last):
  File "/home/user/ERMACK-feature-nested_response_playbooks/main.py", line 43, in <module>
    from ermack.entities.entities_map import EntitiesMap
  File "/home/user/ERMACK-feature-nested_response_playbooks/ermack/entities/entities_map.py", line 13, in <module>
    from .response_action import ResponseAction
  File "/home/user/ERMACK-feature-nested_response_playbooks/ermack/entities/response_action.py", line 16, in <module>
    class ResponseAction(Entity):
  File "/home/user/ERMACK-feature-nested_response_playbooks/ermack/entities/response_action.py", line 73, in ResponseAction
    def have_special_link_name_for(entity_name: str) -> str | None:
TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'

Соответсвенно в указанном месте находим:

    @staticmethod
    #def have_special_link_name_for(entity_name: str) -> str | None:
    def have_special_link_name_for(entity_name: str) -> str:

Исправив аннотацию на другой вариант (вторая строчка) ошибка пропадает.

Expected Behavior

Ошибка не возникает.

Steps To Reproduce

  1. Подготовить окружение
  2. Вызвать функцию main.py

Environment

PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian

Anything else?

No response

[FEATURE] Стандартизация русской локализации для всех действий реагирования

Is there an existing feature request or discussion for this?

  • I have searched the existing feature requests and discussions

Problem

Отсутствует стандартизация и общий вид структуры для действий реагирования в русской локализации.

Solution

Можно создать стандартную форму заполнения действий реагирования для русской локализации, где уже переведены сущности: title, description, id, tags, creation_date и т.д. (а также добавить свои пункты, расширяющее уже используемым в RE&CT, добавляющие более подробные инструкции и т.д.). Это позволит участникам проекта переводить и дополнять файлы в едином формате, уберет возможность различного перевода значимых сущностей.
При этом ссылаться можно на стандартный для всех языков ID, который будет отправлять пользователя в сам файл с нужным ему переводом в зависимости от того, какой язык выбран в профиле пользователя.

Improvements

No response

Anything else?

No response

[BUG] Некорректная обработка списка ПО в RAI

Is there an existing issue or discussion for this?

  • I have searched the existing issues and discussions

Current Behavior

Если в RAI указать несколько разных софтов, то в RP не отобразится RAI.

Expected Behavior

Обрабатывать "targets_of_action", как список элементов.

Steps To Reproduce

  1. Например, в RAI_2313_0001_soldr_pe_analysis_with_a_sandbox можно указать Windows и Linux узлы в разделе "targets_of_action":
    targets_of_action:

    • ID: S0003
      cpe-fs: 'cpe:2.3: o:microsoft:windows:-:::::::*'
    • ID: S0006
      cpe-fs: 'cpe:2.3: o:linux:::::::::*'
  2. В профиле инфраструктуры указать аналогичные CPE для соответствующих софтов.

  3. В результате в RP не будет отображаться RAI.

Environment

-

Anything else?

No response

[BUG] Missed table of content

Is there an existing issue or discussion for this?

  • I have searched the existing issues and discussions

Current Behavior

В сущности reponse playbook (RP**) обнаружен баг, скорее всего связанный с перепутанным набором полей.
Контент из раздела description отображается в поле brief description и соответственно наоборот. Скриншот с примером ниже.
10_github_RP_md_desc

Expected Behavior

Корректное заполнение полей.

Steps To Reproduce

No response

Environment

- Debian GNU/Linux 11 (bullseye)

Anything else?

No response

[FEATURE] Change "localsearch" plugin to "offline" built-in plugin.

Is there an existing feature request or discussion for this?

  • I have searched the existing feature requests and discussions

Problem

У mkdocs-localsearch по умолчанию уже версия 0.9, а согласно документации - https://github.com/wilhelmer/mkdocs-localsearch, данный плагин является устаревшим.
При его использовании возникает warning:

WARNING  -  localsearch: Missing search plugin. You must add both search and localsearch to the list of plugins in mkdocs.yml.

Solution

Заменить плагин localsearch в файле mkdocs.yml на offline, либо добавить требование к либе mkdocs-localsearch на определенную версию.

Improvements

No response

Anything else?

No response

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.