Skip to content

Commit

Permalink
Merge pull request #158 from redBorder/development
Browse files Browse the repository at this point in the history
Release 2.4.0
  • Loading branch information
malvads authored Aug 1, 2024
2 parents 2c44532 + 69aae76 commit ce85de9
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 2 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.3.1
2.4.0
9 changes: 8 additions & 1 deletion packaging/rpm/redborder-manager.spec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Requires: synthetic-producer darklist-updated tcpdump
Requires: chef-workstation
Requires: alternatives java-1.8.0-openjdk java-1.8.0-openjdk-devel
Requires: network-scripts network-scripts-teamd
Requires: redborder-cgroups rb-logstatter
Requires: redborder-cgroups rb-logstatter redborder-pythonlibs

%description
%{summary}
Expand All @@ -32,6 +32,7 @@ mkdir -p %{buildroot}/etc/redborder
mkdir -p %{buildroot}/usr/lib/redborder/bin
mkdir -p %{buildroot}/usr/lib/redborder/scripts
mkdir -p %{buildroot}/usr/lib/redborder/lib
mkdir -p %{buildroot}/usr/lib/redborder/tools
mkdir -p %{buildroot}/usr/lib/redborder/lib/check
mkdir -p %{buildroot}/etc/profile.d
mkdir -p %{buildroot}/var/chef/cookbooks
Expand All @@ -42,9 +43,11 @@ install -D -m 0644 resources/redborder-manager.sh %{buildroot}/etc/profile.d
install -D -m 0644 resources/dialogrc %{buildroot}/etc/redborder
cp resources/bin/* %{buildroot}/usr/lib/redborder/bin
cp resources/scripts/* %{buildroot}/usr/lib/redborder/scripts
cp resources/tools/* %{buildroot}/usr/lib/redborder/tools
cp -r resources/check/* %{buildroot}/usr/lib/redborder/lib/check
chmod 0755 %{buildroot}/usr/lib/redborder/bin/*
chmod 0755 %{buildroot}/usr/lib/redborder/scripts/*
chmod 0755 %{buildroot}/usr/lib/redborder/tools/*
install -D -m 0644 resources/lib/rb_wiz_lib.rb %{buildroot}/usr/lib/redborder/lib
install -D -m 0644 resources/lib/rb_config_utils.rb %{buildroot}/usr/lib/redborder/lib
install -D -m 0644 resources/lib/rb_manager_functions.sh %{buildroot}/usr/lib/redborder/lib
Expand Down Expand Up @@ -77,6 +80,7 @@ update-alternatives --set java $(find /usr/lib/jvm/*java-1.8.0-openjdk* -name "j
%defattr(0755,root,root)
/usr/lib/redborder/bin
/usr/lib/redborder/scripts
/usr/lib/redborder/tools
/usr/lib/redborder/lib/check
%defattr(0755,root,root)
/etc/profile.d/redborder-manager.sh
Expand All @@ -95,6 +99,9 @@ update-alternatives --set java $(find /usr/lib/jvm/*java-1.8.0-openjdk* -name "j
%doc

%changelog
* Mon Jul 29 2024 Miguel Alvarez <[email protected]> -
- Add redboder tools path

* Fri Jan 19 2024 Miguel Negrón <[email protected]> - 1.0.7-1
- Add journald script to configure logs storage

Expand Down
60 changes: 60 additions & 0 deletions resources/tools/mitre.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#######################################################################
# Copyright (c) 2024 ENEO Tecnologia S.L.
# This file is part of redBorder.
# redBorder is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# redBorder is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
# You should have received a copy of the GNU Affero General Public License
# along with redBorder. If not, see <http://www.gnu.org/licenses/>.
#######################################################################

import json
from pyattck import Attck

attack = Attck()

data = []

for tactic in attack.enterprise.tactics:
tactic_data = {
"Tactic": tactic.name,
"ID": tactic.external_references[0].external_id,
"Techniques": [],
"Description": tactic.description
}

for technique in tactic.techniques:
technique_id = technique.technique_id
if "." not in technique_id:
technique_data = {
"Technique": technique.name,
"ID": technique_id,
"Subtechniques": [],
"Description": technique.description
}

if hasattr(technique, 'techniques'):
for subtechnique in technique.techniques:
subtechnique_id = subtechnique.technique_id
subtechnique_data = {
"Subtechnique": subtechnique.name,
"ID": subtechnique_id,
"ParentID": subtechnique.technique_id,
"Description": subtechnique.description
}
technique_data["Subtechniques"].append(subtechnique_data)
else:
technique_data["Subtechniques"].append("No subtechniques found")

tactic_data["Techniques"].append(technique_data)

data.append(tactic_data)

json_data = json.dumps(data, indent=4)

print(json_data)

0 comments on commit ce85de9

Please sign in to comment.