Python utility to generate filesystem content for Obsidian.

Overview

Security Vault Generator

Quickly parse, format, and output common frameworks/content for Obsidian.md.

There is a strong focus on MITRE ATT&CK because it provides a solid and generally accepted framework that can be used to bind notes to.

I ripped this out in 1-2 days so it's only at minimum viable product.

This should have been an Obsidian plugin but I didn't want to JS.

Docs

Quickstart

This assumes all packages have been installed via PIP. See Installation for steps on this process.

Just execute the proper build subcommand and generator.py will:

  1. Clone necessary repositories.
  2. Parse all artifacts.
  3. Embed frontmatter with tagging.
  4. Format them to .md files.
  5. And dump the files to disk in a directory of your choice.

Assuming your vault is named TheVault, these commands should work to build out the MITRE ATT&CK framework and LOLBAS:

Tip: Select a directory in the target Obsidian vault as an output directory using the -od flag for each subcommand.

python3 generator.py mitre-attack build -od ~/TheVault/MITRE\ Attack/
python3 generator.py lolbas build -od ~/TheVault/LOLBAS/
python3 generator.py mitre-attack link --attack-directory ~/TheVault/MITRE\ Attack/

execution

Now all you have to do is open the vault in Obsidian:

obsidian

Engaging "graph view" and applying a filter with group colors on tags should yield output similar to the following, where green nodes are LOLBAS notes and red are MITRE ATT&CK:

obsidian_global_graph

Tip: Here's the filter I used. You'll have to go about grouping by isolating the tags.

tag:#lolbas OR tag:#mitre/attack/technique
You might also like...
Utility tools for the
Utility tools for the "Divide and Remaster" dataset, introduced as part of the Cocktail Fork problem paper

Divide and Remaster Utility Tools Utility tools for the "Divide and Remaster" dataset, introduced as part of the Cocktail Fork problem paper The DnR d

alfred-py: A deep learning utility library for **human**
alfred-py: A deep learning utility library for **human**

Alfred Alfred is command line tool for deep-learning usage. if you want split an video into image frames or combine frames into a single video, then a

Cl datasets - PyTorch image dataloaders and utility functions to load datasets for supervised continual learning

Continual learning datasets Introduction This repository contains PyTorch image

A Dying Light 2 (DL2) PAKFile Utility for Modders and Mod Makers.

Dying Light 2 PAKFile Utility A Dying Light 2 (DL2) PAKFile Utility for Modders and Mod Makers. This tool aims to make PAKFile (.pak files) modding a

Used to record WKU's utility bills on a regular basis.
Used to record WKU's utility bills on a regular basis.

WKU水电费小助手 一个用于定期记录WKU水电费的脚本 Looking for English Readme? 背景 由于WKU校园内的水电账单系统时常存在扣费延迟的现象,而补扣的费用缺乏令人信服的证明。不少学生为费用摸不着头脑,但也没有申诉的依据。为了更好地掌握水电费使用情况,留下一手证据,我开源

Python code to generate art with Generative Adversarial Network

GAN_Canvas_Maker Generating Art using Generative Adversarial Network (GAN) Python code to generate art with Generative Adversarial Network: https://to

A setup script to generate ITK Python Wheels

ITK Python Package This project provides a setup.py script to build ITK Python binary packages and infrastructure to build ITK external module Python

A simple python module to generate anchor (aka default/prior) boxes for object detection tasks.

PyBx WIP A simple python module to generate anchor (aka default/prior) boxes for object detection tasks. Calculated anchor boxes are returned as ndarr

Generate pixel-style avatars with python.
Generate pixel-style avatars with python.

face2pixel Generate pixel-style avatars with python. Run: Clone the project: git clone https://github.com/theodorecooper/face2pixel install requiremen

Comments
  • KeyError: 'Commands'

    KeyError: 'Commands'

    Thanks for creating and publishing the script.

    When running the second command to create the LOLBAS md files I get the following error:

    └─# python3 generator.py lolbas build -od MyVault/LOLBAS/                                       1 ⨯
    2022-12-21 16:08:08,505 - main - INFO - Executing utility module: <lib.utils.lolbas.Build object at 0x7f074c9807c0>
    2022-12-21 16:08:08,505 - lolbas.build - INFO - Using cached LOLBAS repository.
    Traceback (most recent call last):
      File "/opt/sec-vault-gen/generator.py", line 115, in <module>
        util(**dargs)
      File "/opt/sec-vault-gen/lib/utils/lolbas.py", line 149, in __call__
        return Build.build(*args, **kwargs)
      File "/opt/sec-vault-gen/lib/utils/lolbas.py", line 83, in build
        categories = list(set([c['Category'] for c in fm['Commands']]))
    KeyError: 'Commands'
    

    After checking the variable "fm" it seems that the "FM.read" is not parsing the YML file. But the path to the YML file is correct.

                # ====================
                # GET FRONTMATTER DATA
                # ====================
    
                for infile in d.glob('*.yml'):
                    with infile.open() as i:
                        fm = FM.read(i)
    
                    # =============================
                    # ORGANIZE COMMANDS BY CATEGORY
                    # =============================
    
                    categories = list(set([c['Category'] for c in fm['Commands']]))
                    commands_by_category = {}
                    for cat in categories:
                        commands_by_category[cat] = [
                            c for c in fm['Commands'] if c['Category'] == cat
                        ]
    

    Before I debug further, maybe you have an idea or have you had the same issue once?

    Python Version: 3.10.9

    Thanks

    opened by m8r1us 0
Owner
Justin Angel
Justin Angel
Boosting Monocular Depth Estimation Models to High-Resolution via Content-Adaptive Multi-Resolution Merging

Boosting Monocular Depth Estimation Models to High-Resolution via Content-Adaptive Multi-Resolution Merging This repository contains an implementation

Computational Photography Lab @ SFU 1.1k Jan 2, 2023
Official Implementation of CoSMo: Content-Style Modulation for Image Retrieval with Text Feedback

CoSMo.pytorch Official Implementation of CoSMo: Content-Style Modulation for Image Retrieval with Text Feedback, Seungmin Lee*, Dongwan Kim*, Bohyung

Seung Min Lee 54 Dec 8, 2022
This script runs neural style transfer against the provided content image.

Neural Style Transfer Content Style Output Description: This script runs neural style transfer against the provided content image. The content image m

Martynas Subonis 0 Nov 25, 2021
Dungeons and Dragons randomized content generator

Component based Dungeons and Dragons generator Supports Entity/Monster Generation NPC Generation Weapon Generation Encounter Generation Environment Ge

Zac 3 Dec 4, 2021
Pytorch implementation of the paper "Enhancing Content Preservation in Text Style Transfer Using Reverse Attention and Conditional Layer Normalization"

Pytorch implementation of the paper "Enhancing Content Preservation in Text Style Transfer Using Reverse Attention and Conditional Layer Normalization"

Dongkyu Lee 4 Sep 18, 2022
Save-restricted-v-3 - Save restricted content Bot For telegram

Save restricted content Bot Contact: Telegram A stable telegram bot to get restr

DEVANSH 11 Dec 21, 2022
🍷 Gracefully claim weekly free games and monthly content from Epic Store.

EPIC 免费人 ?? 优雅地领取 Epic 免费游戏 Introduction ?? Epic AwesomeGamer 帮助玩家优雅地领取 Epic 免费游戏。 使用 「Epic免费人」可以实现如下需求: get:搬空游戏商店,获取所有常驻免费游戏与免费附加内容; claim:领取周免游戏及其免

null 571 Dec 28, 2022
List of content farm sites like g.penzai.com.

内容农场网站清单 Google 中文搜索结果包含了相当一部分的内容农场式条目,比如「小 X 知识网」「小 X 百科网」。此种链接常会 302 重定向其主站,页面内容为自动生成,大量堆叠关键字,揉杂一些爬取到的内容,完全不具可读性和参考价值。 尤为过分的是,该类网站可能有成千上万个分身域名被 Goog

WDMPA 541 Jan 3, 2023
Small utility to demangle Nim symbols in callgrind files

nim_callgrind A small utility to demangle Nim symbols from callgrind files. Usage Run your (Nim) program with something like this: valgrind --tool=cal

kraptor 3 Feb 15, 2022
Calculates carbon footprint based on fuel mix and discharge profile at the utility selected. Can create graphs and tabular output for fuel mix based on input file of series of power drawn over a period of time.

carbon-footprint-calculator Conda distribution ~/anaconda3/bin/conda install anaconda-client conda-build ~/anaconda3/bin/conda config --set anaconda_u

Seattle university Renewable energy research 7 Sep 26, 2022