From 15105955f461a5c57be66e49adcde2c31046e1cd Mon Sep 17 00:00:00 2001 From: "W. Kosior" Date: Wed, 18 Dec 2024 08:41:34 +0100 Subject: Add TLP signals. --- Makefile | 4 ++-- techniques_table_doc.tex | 4 ++++ tlp.tex | 37 +++++++++++++++++++++++++++++++++++++ 3 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 tlp.tex diff --git a/Makefile b/Makefile index bdf93e7..248de1e 100644 --- a/Makefile +++ b/Makefile @@ -38,12 +38,12 @@ profiles_with_scraped_info.yaml: scrape_groups_info.py profiles.yaml techniques_table.tex: techniques_table.py profiles_with_scraped_info.yaml $(PYTHON) $^ > $@ -techniques_table_doc.pdf: techniques_table_doc.tex techniques_table.tex +techniques_table_doc.pdf: techniques_table_doc.tex tlp.tex techniques_table.tex $(LATEXMK) -pdf $< th-proj-archive.tar.gz: Makefile profiles.yaml scrape_groups_info.py \ tables.md techniques_table.py threats_by_sector_table.py \ - $(DEFAULT_TARGETS) + tlp.tex $(DEFAULT_TARGETS) tar --transform='s|^|th-proj-archive/|' \ --mtime=1970-01-01T00:00:00-00:00 --group=0 --owner=0 \ -czf $@ $^ diff --git a/techniques_table_doc.tex b/techniques_table_doc.tex index 0fbb023..ba7cb50 100644 --- a/techniques_table_doc.tex +++ b/techniques_table_doc.tex @@ -8,12 +8,16 @@ \usepackage{longtable} \usepackage[table]{xcolor} +\input{tlp.tex} + \title{Statistics of groups using particular techniques} \author{Wojciech Kosior} \begin{document} +\useTLPFancyHeader{CLEAR} + \input{techniques_table.tex} \end{document} diff --git a/tlp.tex b/tlp.tex new file mode 100644 index 0000000..efb18aa --- /dev/null +++ b/tlp.tex @@ -0,0 +1,37 @@ +%% SPDX-License-Identifier: CC0-1.0 +%% +%% This LaTeX source is copyright (C) 2024 W. Kosior + +\usepackage{xcolor} +\usepackage{fancyhdr} +\usepackage{tikz} + +\definecolor{TLPAMBER}{HTML}{FFC000} +\definecolor{TLPAMBER+STRICT}{HTML}{FFC000} +\definecolor{TLPCLEAR}{HTML}{FFFFFF} +\definecolor{TLPGREEN}{HTML}{33FF00} +\definecolor{TLPRED}{HTML}{FF2B2B} + +\newcommand{\setTLP}[1]{% + \def \currentTLP {#1} +} + +\newcommand{\changeTLP}[1]{% + \newpage + \setTLP{#1} +} + +\newcommand{\useTLPFancyHeader}[1]{% + \setTLP{#1} + \pagestyle{fancy} + \fancyhf{} + \lhead{ + \colorbox{black}{ + \color{TLP\currentTLP} + \begin{tikzpicture} + \draw[fill=TLP\currentTLP](1,1) circle (0.2) node [] {}; + \end{tikzpicture} + \textbf{TLP:\currentTLP} + } + }% +} -- cgit v1.2.3