2019-04-01 19:56:01 +00:00
|
|
|
.PHONY: all analytics navigator elastic setup clean visualizations
|
2018-12-12 05:19:57 +00:00
|
|
|
|
2019-03-27 01:22:01 +00:00
|
|
|
all: setup_repo markdown confluence analytics navigator elastic
|
2019-02-12 00:32:37 +00:00
|
|
|
analytics: create_analytics_and_pivoting_csv
|
2019-03-27 01:22:01 +00:00
|
|
|
navigator: create_attack_navigator_profile create_attack_navigator_profile_per_customer
|
|
|
|
elastic: create_es_export
|
|
|
|
setup: setup_repo setup_confluence setup_markdown
|
2019-04-01 19:56:01 +00:00
|
|
|
visualizations: make_visualizations
|
2018-12-12 05:19:57 +00:00
|
|
|
|
2019-03-27 01:22:01 +00:00
|
|
|
setup_repo:
|
2019-02-12 00:32:37 +00:00
|
|
|
@echo "[*] Updating 3rd party repository"
|
2018-12-12 05:19:57 +00:00
|
|
|
git submodule init
|
|
|
|
git submodule update
|
2019-02-13 01:46:37 +00:00
|
|
|
git submodule foreach git pull origin master
|
2018-12-12 05:19:57 +00:00
|
|
|
|
|
|
|
setup_confluence:
|
2019-02-19 17:02:53 +00:00
|
|
|
@echo "[*] Setting up confluence"
|
|
|
|
@cd scripts && python3 main.py -C --init
|
2018-12-12 05:19:57 +00:00
|
|
|
|
|
|
|
setup_markdown:
|
2019-02-12 00:32:37 +00:00
|
|
|
@echo "[*] Setting up markdown"
|
2019-02-19 17:02:53 +00:00
|
|
|
@cd scripts && python3 main.py -M --init
|
2018-12-12 05:19:57 +00:00
|
|
|
|
2019-02-09 22:32:55 +00:00
|
|
|
push_to_confluence:
|
2019-02-19 17:02:53 +00:00
|
|
|
@echo "[*] Pushing data to confluence"
|
2019-02-13 17:28:15 +00:00
|
|
|
@cd scripts && python3 main.py -C -A
|
2018-12-12 05:19:57 +00:00
|
|
|
|
|
|
|
push_to_markdown:
|
2019-02-12 00:32:37 +00:00
|
|
|
@echo "[*] Pushing data to markdown"
|
2019-02-13 17:28:15 +00:00
|
|
|
@cd scripts && python3 main.py -M -A
|
2018-12-12 05:19:57 +00:00
|
|
|
|
2019-02-12 00:32:37 +00:00
|
|
|
create_analytics_and_pivoting_csv:
|
|
|
|
@echo "[*] Creating analytics.csv and pivoting.csv"
|
2019-02-13 17:28:15 +00:00
|
|
|
@cd scripts && python3 yamls2csv.py
|
2018-12-12 05:19:57 +00:00
|
|
|
|
2019-02-12 01:25:41 +00:00
|
|
|
create_attack_navigator_profile:
|
|
|
|
@echo "[*] Creating ATT&CK Navigator profile"
|
2019-02-13 17:28:15 +00:00
|
|
|
@cd scripts && python3 attack_navigator_export.py
|
2019-02-12 01:25:41 +00:00
|
|
|
|
2019-03-27 01:22:01 +00:00
|
|
|
create_attack_navigator_profile_per_customer:
|
|
|
|
@echo "[*] Creating ATT&CK Navigator profile"
|
|
|
|
@cd scripts && python3 attack_navigator_per_customer_export.py
|
|
|
|
|
2019-02-19 17:02:53 +00:00
|
|
|
markdown:
|
|
|
|
@echo "[*] Creating markdown repository and pushing data"
|
|
|
|
@cd scripts && python3 main.py --markdown --auto --init
|
|
|
|
|
|
|
|
confluence:
|
|
|
|
@echo "[*] Creating conflunce repository and pushing data"
|
|
|
|
@cd scripts && python3 main.py --confluence --auto --init
|
|
|
|
|
2019-03-27 01:22:01 +00:00
|
|
|
create_es_export:
|
|
|
|
@echo "[*] Creating elastic index"
|
|
|
|
@cd scripts && python3 es_index_export.py
|
|
|
|
|
2019-04-01 19:56:01 +00:00
|
|
|
make_visualizations:
|
|
|
|
@echo "[*] Creating visualizations.."
|
|
|
|
ifeq ($(GUI), 1)
|
|
|
|
@cd scripts && python3 main.py -V --vis-export-type
|
|
|
|
else
|
|
|
|
@cd scripts && python3 main.py -V
|
|
|
|
endif
|
|
|
|
|
2019-03-27 01:22:01 +00:00
|
|
|
# TODO: make clean works with non default paths from config
|
2018-12-12 05:19:57 +00:00
|
|
|
clean:
|
2019-02-12 00:32:37 +00:00
|
|
|
@echo "[*] Cleaning up..."
|
2019-03-25 02:12:52 +00:00
|
|
|
@rm -rf ./Atomic_Threat_Coverage
|
2019-03-27 01:22:01 +00:00
|
|
|
@rm -f ./generated_analytics/atc_attack_navigator_profile*.json
|
|
|
|
@rm -f ./generated_analytics/analytics.csv
|
|
|
|
@rm -f ./generated_analytics/pivoting.csv
|
|
|
|
@rm -f ./generated_analytics/atc_es_index.json
|
2019-04-01 20:24:08 +00:00
|
|
|
@rm -f ./generated_analytics/visualizations/*.json
|
2019-03-27 01:22:01 +00:00
|
|
|
|