Skip to content

Commit defdd02

Browse files
committed
init commit
1 parent 55579ec commit defdd02

File tree

1,093 files changed

+15985
-15985
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,093 files changed

+15985
-15985
lines changed

.gitignore

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ __pycache__
33
.pytest_cache
44

55
venv
6-
wazuh_testing.egg-info
6+
fortishield_testing.egg-info
77
dist
88

99
# Python bytecode files
@@ -51,13 +51,13 @@ Temporary Items
5151
# Ignore all local history of files
5252
.history
5353

54-
# Wazuh tools installation files
55-
deps/wazuh_testing/build/
56-
deps/wazuh_testing/dist/
57-
deps/wazuh_testing/wazuh_testing.egg-info/
54+
# Fortishield tools installation files
55+
deps/fortishield_testing/build/
56+
deps/fortishield_testing/dist/
57+
deps/fortishield_testing/fortishield_testing.egg-info/
5858

5959
# SearchUI package-lock
60-
deps/wazuh_testing/wazuh_testing/qa_docs/Search-UI/package-lock.json
60+
deps/fortishield_testing/fortishield_testing/qa_docs/Search-UI/package-lock.json
6161

6262
# GCP tests configuration file
6363
tests/integration/test_gcloud/data/configuration.yaml

CHANGELOG.md

Lines changed: 447 additions & 447 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
# Wazuh
1+
# Fortishield
22

3-
[![Slack](https://img.shields.io/badge/slack-join-blue.svg)](https://wazuh.com/community/join-us-on-slack/)
4-
[![Email](https://img.shields.io/badge/email-join-blue.svg)](https://groups.google.com/forum/#!forum/wazuh)
5-
[![Documentation](https://img.shields.io/badge/docs-view-green.svg)](https://documentation.wazuh.com)
6-
[![Documentation](https://img.shields.io/badge/web-view-green.svg)](https://wazuh.com)
7-
[![Twitter](https://img.shields.io/twitter/follow/wazuh?style=social)](https://twitter.com/wazuh)
3+
[![Slack](https://img.shields.io/badge/slack-join-blue.svg)](https://fortishield.github.io/community/join-us-on-slack/)
4+
[![Email](https://img.shields.io/badge/email-join-blue.svg)](https://groups.google.com/forum/#!forum/fortishield)
5+
[![Documentation](https://img.shields.io/badge/docs-view-green.svg)](https://documentation.fortishield.github.io)
6+
[![Documentation](https://img.shields.io/badge/web-view-green.svg)](https://fortishield.github.io)
7+
[![Twitter](https://img.shields.io/twitter/follow/fortishield?style=social)](https://twitter.com/fortishield)
88
[![YouTube](https://img.shields.io/youtube/views/peTSzcAueEc?style=social)](https://www.youtube.com/watch?v=peTSzcAueEc)
99

1010

11-
Wazuh is a free and open source platform used for threat prevention, detection, and response. It is capable of protecting workloads across on-premises, virtualized, containerized, and cloud-based environments.
11+
Fortishield is a free and open source platform used for threat prevention, detection, and response. It is capable of protecting workloads across on-premises, virtualized, containerized, and cloud-based environments.
1212

13-
Wazuh solution consists of an endpoint security agent, deployed to the monitored systems, and a management server, which collects and analyzes data gathered by the agents. Besides, Wazuh has been fully integrated with the Elastic Stack, providing a search engine and data visualization tool that allows users to navigate through their security alerts.
13+
Fortishield solution consists of an endpoint security agent, deployed to the monitored systems, and a management server, which collects and analyzes data gathered by the agents. Besides, Fortishield has been fully integrated with the Elastic Stack, providing a search engine and data visualization tool that allows users to navigate through their security alerts.
1414

15-
## Wazuh QA repository
15+
## Fortishield QA repository
1616

17-
In this repository you will find the tests used in the CI environment to test Wazuh's capabilities and daemons. This is the structure of the repository:
18-
- `deps/wazuh_testing`: contains a Python's framework used to automatize tasks and interact with Wazuh.
17+
In this repository you will find the tests used in the CI environment to test Fortishield's capabilities and daemons. This is the structure of the repository:
18+
- `deps/fortishield_testing`: contains a Python's framework used to automatize tasks and interact with Fortishield.
1919
- `tests`: directory containing the test suite. These are tests developed using Pytest.
2020
- `integration`: integration tests of the different daemons/components.
21-
- `system`: system tests of Wazuh.
22-
- `scans`: tests used to scan and verify Wazuh Python code and dependencies.
21+
- `system`: system tests of Fortishield.
22+
- `scans`: tests used to scan and verify Fortishield Python code and dependencies.
2323
- `docs`: contains the technical documentation about the code and documentation about the tests.

deps/wazuh_testing/wazuh_testing/__init__.py renamed to deps/fortishield_testing/fortishield_testing/__init__.py

Lines changed: 54 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Copyright (C) 2015-2021, Wazuh Inc.
2-
# Created by Wazuh, Inc. <info@wazuh.com>.
1+
# Copyright (C) 2015-2021, Fortishield Inc.
2+
# Created by Fortishield, Inc. <info@fortishield.github.io>.
33
# This program is free software; you can redistribute it and/or modify it under the terms of GPLv2
44

55
import logging
@@ -11,64 +11,64 @@
1111

1212

1313
if sys.platform == 'win32':
14-
WAZUH_PATH = os.path.join("C:", os.sep, "Program Files (x86)", "ossec-agent")
15-
LOG_FILE_PATH = os.path.join(WAZUH_PATH, 'ossec.log')
16-
SYSCOLLECTOR_DB_PATH = os.path.join(WAZUH_PATH, 'queue', 'syscollector', 'db', 'local.db')
14+
FORTISHIELD_PATH = os.path.join("C:", os.sep, "Program Files (x86)", "ossec-agent")
15+
LOG_FILE_PATH = os.path.join(FORTISHIELD_PATH, 'ossec.log')
16+
SYSCOLLECTOR_DB_PATH = os.path.join(FORTISHIELD_PATH, 'queue', 'syscollector', 'db', 'local.db')
1717
else:
1818
if sys.platform == 'darwin':
19-
WAZUH_PATH = os.path.join("/", "Library", "Ossec")
19+
FORTISHIELD_PATH = os.path.join("/", "Library", "Ossec")
2020
else:
21-
WAZUH_PATH = os.path.join("/var", "ossec")
22-
LOG_FILE_PATH = os.path.join(WAZUH_PATH, 'logs', 'ossec.log')
23-
SYSCOLLECTOR_DB_PATH = os.path.join(WAZUH_PATH, 'queue', 'syscollector', 'db', 'local.db')
24-
25-
26-
WAZUH_CONF_PATH = os.path.join(WAZUH_PATH, 'etc', 'ossec.conf')
27-
WAZUH_LOGS_PATH = os.path.join(WAZUH_PATH, 'logs')
28-
CLIENT_KEYS_PATH = os.path.join(WAZUH_PATH, 'etc' if platform.system() == 'Linux' else '', 'client.keys')
29-
QUEUE_DB_PATH = os.path.join(WAZUH_PATH, 'queue', 'db')
30-
QUEUE_SOCKETS_PATH = os.path.join(WAZUH_PATH, 'queue', 'sockets')
31-
WAZUH_DB_SOCKET_PATH = os.path.join(QUEUE_DB_PATH, 'wdb')
32-
CVE_DB_PATH = os.path.join(WAZUH_PATH, 'queue', 'vulnerabilities', 'cve.db')
33-
ALERTS_JSON_PATH = os.path.join(WAZUH_PATH, 'logs', 'alerts', 'alerts.json')
34-
ARCHIVES_LOG_PATH = os.path.join(WAZUH_PATH, 'logs', 'archives', 'archives.log')
35-
ARCHIVES_JSON_PATH = os.path.join(WAZUH_PATH, 'logs', 'archives', 'archives.json')
36-
CPE_HELPER_PATH = os.path.join(WAZUH_PATH, 'queue', 'vulnerabilities', 'dictionaries', 'cpe_helper.json')
37-
WAZUH_API_CONF = os.path.join(WAZUH_PATH, 'api', 'configuration', 'api.yaml')
38-
WAZUH_SECURITY_CONF = os.path.join(WAZUH_PATH, 'api', 'configuration', 'security', 'security.yaml')
39-
API_LOG_FILE_PATH = os.path.join(WAZUH_PATH, 'logs', 'api.log')
40-
API_JSON_LOG_FILE_PATH = os.path.join(WAZUH_PATH, 'logs', 'api.json')
41-
API_LOG_FOLDER = os.path.join(WAZUH_PATH, 'logs', 'api')
42-
WAZUH_TESTING_PATH = os.path.dirname(os.path.abspath(__file__))
43-
CIS_RULESET_PATH = os.path.join(WAZUH_PATH, 'ruleset', 'sca')
44-
WAZUH_TESTING_DATA_PATH = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'data')
45-
DEFAULT_AUTHD_PASS_PATH = os.path.join(WAZUH_PATH, 'etc', 'authd.pass')
21+
FORTISHIELD_PATH = os.path.join("/var", "ossec")
22+
LOG_FILE_PATH = os.path.join(FORTISHIELD_PATH, 'logs', 'ossec.log')
23+
SYSCOLLECTOR_DB_PATH = os.path.join(FORTISHIELD_PATH, 'queue', 'syscollector', 'db', 'local.db')
24+
25+
26+
FORTISHIELD_CONF_PATH = os.path.join(FORTISHIELD_PATH, 'etc', 'ossec.conf')
27+
FORTISHIELD_LOGS_PATH = os.path.join(FORTISHIELD_PATH, 'logs')
28+
CLIENT_KEYS_PATH = os.path.join(FORTISHIELD_PATH, 'etc' if platform.system() == 'Linux' else '', 'client.keys')
29+
QUEUE_DB_PATH = os.path.join(FORTISHIELD_PATH, 'queue', 'db')
30+
QUEUE_SOCKETS_PATH = os.path.join(FORTISHIELD_PATH, 'queue', 'sockets')
31+
FORTISHIELD_DB_SOCKET_PATH = os.path.join(QUEUE_DB_PATH, 'wdb')
32+
CVE_DB_PATH = os.path.join(FORTISHIELD_PATH, 'queue', 'vulnerabilities', 'cve.db')
33+
ALERTS_JSON_PATH = os.path.join(FORTISHIELD_PATH, 'logs', 'alerts', 'alerts.json')
34+
ARCHIVES_LOG_PATH = os.path.join(FORTISHIELD_PATH, 'logs', 'archives', 'archives.log')
35+
ARCHIVES_JSON_PATH = os.path.join(FORTISHIELD_PATH, 'logs', 'archives', 'archives.json')
36+
CPE_HELPER_PATH = os.path.join(FORTISHIELD_PATH, 'queue', 'vulnerabilities', 'dictionaries', 'cpe_helper.json')
37+
FORTISHIELD_API_CONF = os.path.join(FORTISHIELD_PATH, 'api', 'configuration', 'api.yaml')
38+
FORTISHIELD_SECURITY_CONF = os.path.join(FORTISHIELD_PATH, 'api', 'configuration', 'security', 'security.yaml')
39+
API_LOG_FILE_PATH = os.path.join(FORTISHIELD_PATH, 'logs', 'api.log')
40+
API_JSON_LOG_FILE_PATH = os.path.join(FORTISHIELD_PATH, 'logs', 'api.json')
41+
API_LOG_FOLDER = os.path.join(FORTISHIELD_PATH, 'logs', 'api')
42+
FORTISHIELD_TESTING_PATH = os.path.dirname(os.path.abspath(__file__))
43+
CIS_RULESET_PATH = os.path.join(FORTISHIELD_PATH, 'ruleset', 'sca')
44+
FORTISHIELD_TESTING_DATA_PATH = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'data')
45+
DEFAULT_AUTHD_PASS_PATH = os.path.join(FORTISHIELD_PATH, 'etc', 'authd.pass')
4646
TEMPLATE_DIR = 'configuration_template'
4747
TEST_CASES_DIR = 'test_cases'
4848

4949

5050
# Daemons
51-
LOGCOLLECTOR_DAEMON = 'wazuh-logcollector'
52-
AGENTLESS_DAEMON = 'wazuh-agentlessd'
53-
CSYSLOG_DAEMON = 'wazuh-csyslogd'
54-
REMOTE_DAEMON = 'wazuh-remoted'
55-
ANALYSISD_DAEMON = 'wazuh-analysisd'
56-
API_DAEMON = 'wazuh-apid'
57-
MAIL_DAEMON = 'wazuh-maild'
58-
SYSCHECK_DAEMON = 'wazuh-syscheckd'
59-
EXEC_DAEMON = 'wazuh-execd'
60-
MODULES_DAEMON = 'wazuh-modulesd'
61-
CLUSTER_DAEMON = 'wazuh-clusterd'
62-
INTEGRATOR_DAEMON = 'wazuh-integratord'
63-
MONITOR_DAEMON = 'wazuh-monitord'
64-
DB_DAEMON = 'wazuh-db'
65-
AGENT_DAEMON = 'wazuh-agentd'
51+
LOGCOLLECTOR_DAEMON = 'fortishield-logcollector'
52+
AGENTLESS_DAEMON = 'fortishield-agentlessd'
53+
CSYSLOG_DAEMON = 'fortishield-csyslogd'
54+
REMOTE_DAEMON = 'fortishield-remoted'
55+
ANALYSISD_DAEMON = 'fortishield-analysisd'
56+
API_DAEMON = 'fortishield-apid'
57+
MAIL_DAEMON = 'fortishield-maild'
58+
SYSCHECK_DAEMON = 'fortishield-syscheckd'
59+
EXEC_DAEMON = 'fortishield-execd'
60+
MODULES_DAEMON = 'fortishield-modulesd'
61+
CLUSTER_DAEMON = 'fortishield-clusterd'
62+
INTEGRATOR_DAEMON = 'fortishield-integratord'
63+
MONITOR_DAEMON = 'fortishield-monitord'
64+
DB_DAEMON = 'fortishield-db'
65+
AGENT_DAEMON = 'fortishield-agentd'
6666

6767
API_DAEMONS_REQUIREMENTS = [API_DAEMON, DB_DAEMON, EXEC_DAEMON, ANALYSISD_DAEMON, REMOTE_DAEMON, MODULES_DAEMON]
6868

6969
# Paths
70-
SYSLOG_SIMULATOR = os.path.join(WAZUH_TESTING_PATH, 'scripts', 'syslog_simulator.py')
71-
ANALYSISD_STATE = os.path.join(WAZUH_PATH, 'var', 'run', 'wazuh-analysisd.state')
70+
SYSLOG_SIMULATOR = os.path.join(FORTISHIELD_TESTING_PATH, 'scripts', 'syslog_simulator.py')
71+
ANALYSISD_STATE = os.path.join(FORTISHIELD_PATH, 'var', 'run', 'fortishield-analysisd.state')
7272

7373
# Timeouts
7474

@@ -84,19 +84,19 @@
8484

8585

8686
# Local internal options
87-
MODULESD_DEBUG = 'wazuh_modules.debug'
87+
MODULESD_DEBUG = 'fortishield_modules.debug'
8888
WINDOWS_DEBUG = 'windows.debug'
8989
SYSCHECK_DEBUG = 'syscheck.debug'
9090
VERBOSE_DEBUG_OUTPUT = 2
9191

92-
# Wazuh Service commands
93-
WAZUH_SERVICES_STOP = 'stop'
94-
WAZUH_SERVICES_START = 'start'
92+
# Fortishield Service commands
93+
FORTISHIELD_SERVICES_STOP = 'stop'
94+
FORTISHIELD_SERVICES_START = 'start'
9595

9696

9797
# Configurations
9898
DATA = 'data'
99-
WAZUH_LOG_MONITOR = 'wazuh_log_monitor'
99+
FORTISHIELD_LOG_MONITOR = 'fortishield_log_monitor'
100100

101101

102102
# File Types
@@ -347,7 +347,7 @@ def fim_mode(self, value):
347347

348348

349349
global_parameters = Parameters()
350-
logger = logging.getLogger('wazuh_testing')
350+
logger = logging.getLogger('fortishield_testing')
351351
logger.setLevel(logging.DEBUG)
352352

353353
handler = logging.StreamHandler(sys.stderr)

deps/wazuh_testing/wazuh_testing/agent.py renamed to deps/fortishield_testing/fortishield_testing/agent.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Copyright (C) 2015-2021, Wazuh Inc.
2-
# Created by Wazuh, Inc. <info@wazuh.com>.
1+
# Copyright (C) 2015-2021, Fortishield Inc.
2+
# Created by Fortishield, Inc. <info@fortishield.github.io>.
33
# This program is free software; you can redistribute it and/or modify it under the terms of GPLv2
44

55
import os
@@ -9,10 +9,10 @@
99
import ssl
1010
import json
1111

12-
from wazuh_testing.fim import change_internal_options
13-
from wazuh_testing.tools import LOG_FILE_PATH, WAZUH_PATH
14-
from wazuh_testing.tools import monitoring
15-
from wazuh_testing import logger
12+
from fortishield_testing.fim import change_internal_options
13+
from fortishield_testing.tools import LOG_FILE_PATH, FORTISHIELD_PATH
14+
from fortishield_testing.tools import monitoring
15+
from fortishield_testing import logger
1616

1717

1818
DEFAULT_VALUES = {
@@ -32,16 +32,16 @@
3232

3333
folder = 'etc' if platform.system() == 'Linux' else ''
3434

35-
CLIENT_KEYS_PATH = os.path.join(WAZUH_PATH, folder, 'client.keys') # for unix add 'etc'
36-
SERVER_KEY_PATH = os.path.join(WAZUH_PATH, folder, 'manager.key')
37-
SERVER_CERT_PATH = os.path.join(WAZUH_PATH, folder, 'manager.cert')
38-
SERVER_PEM_PATH = os.path.join(WAZUH_PATH, folder, 'manager.pem')
39-
AGENT_KEY_PATH = os.path.join(WAZUH_PATH, folder, 'agent.key')
40-
AGENT_CERT_PATH = os.path.join(WAZUH_PATH, folder, 'agent.cert')
41-
AGENT_PEM_PATH = os.path.join(WAZUH_PATH, folder, 'agent.pem')
42-
AUTHDPASS_PATH = os.path.join(WAZUH_PATH, folder, 'authd.pass')
35+
CLIENT_KEYS_PATH = os.path.join(FORTISHIELD_PATH, folder, 'client.keys') # for unix add 'etc'
36+
SERVER_KEY_PATH = os.path.join(FORTISHIELD_PATH, folder, 'manager.key')
37+
SERVER_CERT_PATH = os.path.join(FORTISHIELD_PATH, folder, 'manager.cert')
38+
SERVER_PEM_PATH = os.path.join(FORTISHIELD_PATH, folder, 'manager.pem')
39+
AGENT_KEY_PATH = os.path.join(FORTISHIELD_PATH, folder, 'agent.key')
40+
AGENT_CERT_PATH = os.path.join(FORTISHIELD_PATH, folder, 'agent.cert')
41+
AGENT_PEM_PATH = os.path.join(FORTISHIELD_PATH, folder, 'agent.pem')
42+
AUTHDPASS_PATH = os.path.join(FORTISHIELD_PATH, folder, 'authd.pass')
4343
AGENT_AUTH_BINARY_PATH = '/var/ossec/bin/agent-auth' if platform.system() == 'Linux' else \
44-
os.path.join(WAZUH_PATH, 'agent-auth.exe')
44+
os.path.join(FORTISHIELD_PATH, 'agent-auth.exe')
4545

4646
CONFIG_PATHS = {
4747
'SERVER_PEM_PATH': SERVER_PEM_PATH,

deps/wazuh_testing/wazuh_testing/analysis.py renamed to deps/fortishield_testing/fortishield_testing/analysis.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Copyright (C) 2015-2021, Wazuh Inc.
2-
# Created by Wazuh, Inc. <info@wazuh.com>.
1+
# Copyright (C) 2015-2021, Fortishield Inc.
2+
# Created by Fortishield, Inc. <info@fortishield.github.io>.
33
# This program is free software; you can redistribute it and/or modify it under the terms of GPLv2
44

55
import json
@@ -9,7 +9,7 @@
99
from datetime import datetime
1010

1111
from jsonschema import validate, exceptions
12-
from wazuh_testing import logger
12+
from fortishield_testing import logger
1313

1414
_data_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'data')
1515

@@ -61,7 +61,7 @@ def callback_analysisd_agent_id(line):
6161
return match.group(1)
6262

6363

64-
def callback_wazuhdb_message_added_and_modified(item):
64+
def callback_fortishielddb_message_added_and_modified(item):
6565
data, _ = item
6666
match = re.match(r'^agent (\d{3,}) \w+ (save2) (.+)$', data.decode())
6767
if match:
@@ -72,14 +72,14 @@ def callback_wazuhdb_message_added_and_modified(item):
7272
return match.group(1), match.group(2), body
7373

7474

75-
def callback_wazuh_db_message_deleted(item):
75+
def callback_fortishield_db_message_deleted(item):
7676
data, _ = item
7777
match = re.match(r'^agent (\d{3,}) \w+ (delete) (.+)$', data.decode())
7878
if match:
7979
return match.group(1), match.group(2), match.group(3)
8080

8181

82-
def get_wazuh_db_message(item, keyword: str = None):
82+
def get_fortishield_db_message(item, keyword: str = None):
8383
data, _ = item
8484
match = re.match(r'^agent (\d{3,}) \w+ (\w+) (.+)$', data.decode())
8585
if match:
@@ -93,17 +93,17 @@ def get_wazuh_db_message(item, keyword: str = None):
9393
return match.group(1), match.group(2), body
9494

9595

96-
def callback_wazuh_db_message(item):
97-
if callback_wazuhdb_message_added_and_modified(item) or callback_wazuh_db_message_deleted(item):
98-
return get_wazuh_db_message(item)
96+
def callback_fortishield_db_message(item):
97+
if callback_fortishielddb_message_added_and_modified(item) or callback_fortishield_db_message_deleted(item):
98+
return get_fortishield_db_message(item)
9999

100100

101-
def callback_wazuh_db_integrity(item):
102-
return get_wazuh_db_message(item, keyword='integrity')
101+
def callback_fortishield_db_integrity(item):
102+
return get_fortishield_db_message(item, keyword='integrity')
103103

104104

105-
def callback_wazuh_db_scan(item):
106-
return get_wazuh_db_message(item, keyword='scan')
105+
def callback_fortishield_db_scan(item):
106+
return get_fortishield_db_message(item, keyword='scan')
107107

108108

109109
def callback_fim_alert(line):

0 commit comments

Comments
 (0)