-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #158 from redBorder/development
Release 2.4.0
- Loading branch information
Showing
3 changed files
with
69 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
2.3.1 | ||
2.4.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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} | ||
|
@@ -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 | ||
|
@@ -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 | ||
|
@@ -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 | ||
|
@@ -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 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |