diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..518f4941 --- /dev/null +++ b/.gitignore @@ -0,0 +1,12 @@ +wazuh/certs/dashboard_http/*.pem +wazuh/certs/dashboard_http/*.key +wazuh/certs/indexer_cluster/*.pem +wazuh/certs/indexer_cluster/*.key +wazuh/certs/indexer_cluster/*.csr +wazuh/certs/indexer_cluster/*.srl +wazuh-eks/certs/dashboard_http/*.pem +wazuh-eks/certs/dashboard_http/*.key +wazuh-eks/certs/indexer_cluster/*.pem +wazuh-eks/certs/indexer_cluster/*.key +wazuh-eks/certs/indexer_cluster/*.csr +wazuh-eks/certs/indexer_cluster/*.srl diff --git a/LICENSE b/LICENSE deleted file mode 100644 index d159169d..00000000 --- a/LICENSE +++ /dev/null @@ -1,339 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program 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 General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 4d35ef4f..00000000 --- a/SECURITY.md +++ /dev/null @@ -1,45 +0,0 @@ -# Wazuh Open Source Project Security Policy - -Version: 2023-06-12 - -## Introduction -This document outlines the Security Policy for Wazuh's open source projects. It emphasizes our commitment to maintain a secure environment for our users and contributors, and reflects our belief in the power of collaboration to identify and resolve security vulnerabilities. - -## Scope -This policy applies to all open source projects developed, maintained, or hosted by Wazuh. - -## Reporting Security Vulnerabilities -If you believe you've discovered a potential security vulnerability in one of our open source projects, we strongly encourage you to report it to us responsibly. - -Please submit your findings as security advisories under the "Security" tab in the relevant GitHub repository. Alternatively, you may send the details of your findings to [security@wazuh.com](mailto:security@wazuh.com). - -## Vulnerability Disclosure Policy -Upon receiving a report of a potential vulnerability, our team will initiate an investigation. If the reported issue is confirmed as a vulnerability, we will take the following steps: - -1. Acknowledgment: We will acknowledge the receipt of your vulnerability report and begin our investigation. -2. Validation: We will validate the issue and work on reproducing it in our environment. -3. Remediation: We will work on a fix and thoroughly test it -4. Release & Disclosure: After 90 days from the discovery of the vulnerability, or as soon as a fix is ready and thoroughly tested (whichever comes first), we will release a security update for the affected project. We will also publicly disclose the vulnerability by publishing a CVE (Common Vulnerabilities and Exposures) and acknowledging the discovering party. -5. Exceptions: In order to preserve the security of the Wazuh community at large, we might extend the disclosure period to allow users to patch their deployments. - -This 90-day period allows for end-users to update their systems and minimizes the risk of widespread exploitation of the vulnerability. - -## Automatic Scanning -We leverage GitHub Actions to perform automated scans of our supply chain. These scans assist us in identifying vulnerabilities and outdated dependencies in a proactive and timely manner. - -## Credit -We believe in giving credit where credit is due. If you report a security vulnerability to us, and we determine that it is a valid vulnerability, we will publicly credit you for the discovery when we disclose the vulnerability. If you wish to remain anonymous, please indicate so in your initial report. - -We do appreciate and encourage feedback from our community, but currently we do not have a bounty program. We might start bounty programs in the future. - -## Compliance with this Policy -We consider the discovery and reporting of security vulnerabilities an important public service. We encourage responsible reporting of any vulnerabilities that may be found in our site or applications. - -Furthermore, we will not take legal action against or suspend or terminate access to the site or services of those who discover and report security vulnerabilities in accordance with this policy because of the fact. - -We ask that all users and contributors respect this policy and the security of our community's users by disclosing vulnerabilities to us in accordance with this policy. - -## Changes to this Security Policy -This policy may be revised from time to time. Each version of the policy will be identified at the top of the page by its effective date. - -If you have any questions about this Security Policy, please contact us at [security@wazuh.com](mailto:security@wazuh.com) diff --git a/envs/local-env/indexer-resources.yaml b/envs/local-env/indexer-resources.yaml deleted file mode 100644 index 74964950..00000000 --- a/envs/local-env/indexer-resources.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright (C) 2019, Wazuh Inc. -# -# This program is a free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public -# License (version 2) as published by the FSF - Free Software -# Foundation. - -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: wazuh-indexer - namespace: wazuh -spec: - replicas: 1 - template: - spec: - containers: - - name: wazuh-indexer - resources: - requests: - cpu: 500m - memory: 1Gi - limits: - cpu: 1 - memory: 2Gi diff --git a/envs/local-env/kustomization.yml b/envs/local-env/kustomization.yml deleted file mode 100644 index 0243cead..00000000 --- a/envs/local-env/kustomization.yml +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright (C) 2019, Wazuh Inc. -# -# This program is a free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public -# License (version 2) as published by the FSF - Free Software -# Foundation. - -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -resources: -- ../../wazuh -patches: -- path: storage-class.yaml -- path: indexer-resources.yaml -- path: wazuh-resources.yaml diff --git a/envs/local-env/wazuh-resources.yaml b/envs/local-env/wazuh-resources.yaml deleted file mode 100644 index 586f2ec8..00000000 --- a/envs/local-env/wazuh-resources.yaml +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (C) 2019, Wazuh Inc. -# -# This program is a free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public -# License (version 2) as published by the FSF - Free Software -# Foundation. - -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: wazuh-manager-worker - namespace: wazuh -spec: - replicas: 1 diff --git a/postfix/postfix-config-map.yaml b/postfix/postfix-config-map.yaml new file mode 100644 index 00000000..238e1c73 --- /dev/null +++ b/postfix/postfix-config-map.yaml @@ -0,0 +1,33 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: postfix-config-map + namespace: wazuh +data: + main.cf: | + relayhost = [smtp.gmail.com]:587 + smtp_sasl_auth_enable = yes + smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd + smtp_sasl_security_options = noanonymous + smtp_tls_CAfile = /etc/ssl/certs/thawte_Primary_Root_CA.pem + smtp_use_tls = yes + compatibility_level = 2 + inet_protocols = ipv4 + inet_interfaces = all + mynetworks = 127.0.0.0/8 10.0.0.0/16 + smtp_tls_session_cache_timeout = 3600s + init.sh: | + #!/bin/sh + # Configuración de DNS y hosts + echo "nameserver 8.8.8.8" >> /etc/resolv.conf + echo "142.251.16.109 smtp.gmail.com" >> /etc/hosts + cp /etc/resolv.conf /var/spool/postfix/etc/resolv.conf + + # Configuración de permisos para sasl_passwd + postmap /etc/postfix/sasl_passwd + chmod 400 /etc/postfix/sasl_passwd + chown root:root /etc/postfix/sasl_passwd /etc/postfix/sasl_passwd.db + chmod 0600 /etc/postfix/sasl_passwd /etc/postfix/sasl_passwd.db + + # Iniciar Postfix en modo foreground + exec /usr/sbin/postfix start-fg diff --git a/postfix/postfix-deployment.yaml b/postfix/postfix-deployment.yaml new file mode 100644 index 00000000..0d049bdf --- /dev/null +++ b/postfix/postfix-deployment.yaml @@ -0,0 +1,50 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: postfix + namespace: wazuh +spec: + replicas: 1 + selector: + matchLabels: + app: postfix + template: + metadata: + labels: + app: postfix + spec: + containers: + - name: postfix + image: mwader/postfix-relay + securityContext: + readOnlyRootFilesystem: false + ports: + - containerPort: 25 + volumeMounts: + - name: postfix-config + mountPath: /etc/postfix/main.cf + subPath: main.cf + - name: postfix-sasl + mountPath: /etc/postfix/sasl_passwd + subPath: sasl_passwd + readOnly: false +# - name: postfix-sasl-db +# mountPath: /etc/postfix/sasl_passwd.db +# subPath: sasl_passwd.db + - name: init-script + mountPath: /docker-entrypoint.sh + subPath: init.sh + command: ["/bin/sh", "/docker-entrypoint.sh"] + volumes: + - name: postfix-config + configMap: + name: postfix-config-map + - name: postfix-sasl + secret: + secretName: postfix-sasl + defaultMode: 420 # Permisos adecuados para lectura/escritura + - name: postfix-sasl-db + emptyDir: {} + - name: init-script + configMap: + name: postfix-config-map diff --git a/postfix/postfix-service.yaml b/postfix/postfix-service.yaml new file mode 100644 index 00000000..a951ce64 --- /dev/null +++ b/postfix/postfix-service.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: Service +metadata: + name: postfix + namespace: wazuh +spec: + selector: + app: postfix + ports: + - protocol: TCP + port: 25 + targetPort: 25 \ No newline at end of file diff --git a/postfix/sasl_passwd b/postfix/sasl_passwd new file mode 100644 index 00000000..f66d62f5 --- /dev/null +++ b/postfix/sasl_passwd @@ -0,0 +1 @@ +[smtp.gmail.com]:587 patricio@marveladvisors.com:owjn sywf kyrm twrf diff --git a/sentinelone_decoders.xml b/sentinelone_decoders.xml new file mode 100644 index 00000000..2ef8dbd4 --- /dev/null +++ b/sentinelone_decoders.xml @@ -0,0 +1,124 @@ + + sentinel - CEF:\d\|SentinelOne\| + + + + sentinelone + \|SentinelOne\|\w+\|\S+\|\d+\|(\.*) - + log_message1 + + + + sentinelone + \|SentinelOne\|\w+\|\S+\|\d+\|(\.*)\|\d+ + log_message2 + + + + sentinelone + \|SentinelOne\|\w+\|\S+\|\d+\|\.* machine (\.*)\|\d+ + endpoint + + + + sentinelone + osName=(\w*\s*\w*\s*\w*\s*) + operating_system + + + + sentinelone + fileHash=(\S+)\s + file_hash + + + + sentinelone + filePath=(\S+)\s + file_path + + + + sentinelone + activityID=(\S+) + activity_id + + + + sentinelone + suser=(\S+) + suser + + + + sentinelone + siteId=(\d+) + site_id + + + + sentinelone + siteName=(\S+) + site_name + + + + sentinelone + accountId=(\d+) + account_id + + + + sentinelone + accountName=(\w*\s\w*\s) + account_name + + + + + sentinelone + groupId=(\d+) + group_id + + + + sentinelone + groupName=(\S+\s\S+) + group_name + + + + sentinelone + agentId=(\d+) + agent_id + + + + sentinelone + userId=(\d+) + user_id + + + + sentinelone + threadId=(\d+) + thread_id + + + + sentinelone + ip_address=(\d+\.\d+\.\d+\.\d+) + ip_address + + + + sentinelone + confidence_level=(\w+) + confidence_level + + + + sentinelone + storyline=(\S+) + storyline + diff --git a/sentinelone_rules.xml b/sentinelone_rules.xml new file mode 100644 index 00000000..40e4072e --- /dev/null +++ b/sentinelone_rules.xml @@ -0,0 +1,1020 @@ + + + + + + sentinelone + Logs from SentinelOne. + + + + + 105000 + Kill performed successfully + SentinelOne: Threat $(file_path) successfully mitigated on $(suser). + + + + + 105000 + New active threat + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + New Suspicious threat detected + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + + 105000 + Quarantine performed successfully + SentinelOne: Threat file $(file_path) quarantined successfully on $(suser). + + + + + 105000 + Hash Defined as Malicious By Cloud + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + New Malicious Threat Not Mitigated + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + New Threat Preemptive Block + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + Threat Unresolved + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + Threat Killed By Policy + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + Threat Mitigation Report Kill Failed + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + Agent Disabled Because of Database Corruption + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + Threat Confidence Level Changed By Cloud + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + User Issued Kill Command + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + New Suspicious Threat Not Mitigated + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + User Created RBAC Role + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + API Token Generated + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + Malicious Macros Mitigation Changed + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + User Added + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + User Modified + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + User Logged In + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + User Logged Out + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + Cloud Intelligence Settings Modified + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + Agent Uninstalled + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + + 105000 + Event Severity Level Modified + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + User Disconnected Agent From Network + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + User Shutdown Agent + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + User Edited RBAC Role + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + User Deleted RBAC Role + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + Enable API Token Generation + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + API Token Revoked + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + User Disabled Agent + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + Agent Disabled + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + Agent Disabled Because of Database Corruption + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + Allowed Domains Settings Changed + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + Opt-in To EA program + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + Existing User Login Failure + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + Unknown User Login + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + Service User creation + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + User Locked from Unrestricted Session + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + User Temporarily Locked + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + 2FA - Delete + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + Live Updates Policy Modified + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + File Upload Settings Modified + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + Suspicious Driver Blocking Changed + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + Windows Signed Drivers Blocking Changed + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + Windows Unsigned Drivers Blocking Changed + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + Malicious Macros Mitigation Changed + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + Agent Disconnected From Network + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + SSO Login Failed + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + SSO User Added + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + User Network Quarantine Container + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + User Network Unquarantine Container + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + Threat Mitigation Report Kill Failed + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + Threat Mitigation Report Remediate Failed + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + Threat Mitigation Report Rollback Failed + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + Threat Mitigation Report Quarantine Failed + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + Agent Mitigation Report Quarantine Network Failed + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + User Marked Application As Threat + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + Threat Quarantined By Policy + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + Agent Disconnected From Network Due to Threat Mitigation By Policy + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + Threat Mitigation Report Unquarantine Failed + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + User Added Hash Exclusion + SentinelOne: $(log_message1) performed by user $(username). + + + + + 105000 + Cloud Added Hash Exclusion + SentinelOne: $(log_message1) added in the cloud for $(os_family). + + + + + 105000 + New Path Exclusion + SentinelOne: $(log_message1) added by user $(username) on $(os_family). + + + + + 105000 + New Signer Identity Exclusion + SentinelOne: $(log_message1) added by user $(username) on $(os_family). + + + + + 105000 + New File Type Exclusion + SentinelOne: $(log_message1) added by user $(username) on $(os_family). + + + + + 105000 + New Browser Type Exclusion + SentinelOne: $(log_message1) added by user $(username) on $(os_family). + + + + + 105000 + Path Exclusion Modified + SentinelOne: $(log_message1) modified by user $(username) on $(os_family). + + + + + 105000 + Signer Identity Exclusion Modified + SentinelOne: $(log_message1) modified by user $(username) on $(os_family). + + + + + 105000 + File Type Exclusion Modified + SentinelOne: $(log_message1) modified by user $(username) on $(os_family). + + + + + 105000 + Browser Type Exclusion Modified + SentinelOne: $(log_message1) modified by user $(username) on $(os_family). + + + + + 105000 + Identity Exclusion Created + SentinelOne: $(log_message1) created by user $(username) for $(os_family). + + + + + 105000 + Identity Exclusion Updated + SentinelOne: $(log_message1) updated by user $(username) for $(os_family). + + + + + + 105000 + User Started Remote Shell + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + Remote Shell Created + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + Network Discovery Settings Modified + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + Discovered Networks Settings Modified + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + Network Discovery - Devices Discovered + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + Sentinel Deploy - Master passphrase + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + Sentinel Deploy - Credential Group Created + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + Sentinel Deploy - Credential Group Edited + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + Sentinel Deploy - Credential Group Deleted + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + Sentinel Deploy - Credential Created + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + Sentinel Deploy - Credential Deleted + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + Sentinel Deploy - Credential Overridden + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + Sentinel Deploy - Trusted Hosts + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + Custom Rules - User Created A Rule + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + Custom Rules - User Changed A Rule + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + Custom Rules - User Deleted A Rule + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + Custom Rules - Rule Status Changed + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + Custom Rules - Rule Expired + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + Custom Rules - Rule Reached Alert Limit + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + Account Uninstall Password Viewed + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + Account Uninstall Password Generated + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + Account Uninstall Password Regenerated + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + Account Uninstall Password Revoked + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + New Script Created + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + Script Action Initiated + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + Script Deleted + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + User 2FA Verification Failed + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + User 2FA Email Verification Changed + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + Login Using Saved 2FA Recovery Code + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + + 105000 + Marketplace - App Disabled + SentinelOne: $(log_message1) action performed on $(endpoint). + + + + + 105000 + Network Discovery Self Provisioning Default Features Modified + SentinelOne: $(log_message1) on $(endpoint). + + + + + 105000 + User Disabled Extensive Scan + SentinelOne: $(log_message1) on $(endpoint). + + + + + 105000 + Platform Rules - Rule Deleted + SentinelOne: $(log_message1) performed by $(user_name) on $(endpoint). + + + + + 105000 + Platform Rules - Rule Status Change Failed + SentinelOne: $(log_message1) performed on $(endpoint) due to $(reason). + + + + + 105000 + Custom Rules - Rule Expired + SentinelOne: $(log_message1) on $(endpoint). + + + + + 105000 + Platform Rules - Rule Reached Alert Limit + SentinelOne: $(log_message1) on $(endpoint). + + + + + 105000 + Suspicious Threat Was Marked As Threat + SentinelOne: $(log_message1) performed by $(user_name) on $(endpoint). + + + + + 105000 + New Suspicious Threat Not Mitigated + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + Process Was Marked As Threat + SentinelOne: $(log_message1) performed on $(endpoint). + + + + + 105000 + Suspicious Threat Was Unresolved + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + Policy Setting - Show Suspicious Activities Configuration Disabled + SentinelOne: $(log_message1) changed by $(user_name) on $(endpoint). + + + + + 105000 + Password Expiration Modified + SentinelOne: $(log_message1) performed by $(user_name) on $(endpoint). + + + + + 105000 + User Marked Deep Visibility Event As Threat + SentinelOne: $(log_message1) performed on $(endpoint). + + + + + 105000 + User Marked Deep Visibility Event As Suspicious + SentinelOne: $(log_message1) performed on $(endpoint). + + + + + 105000 + STAR Manual Response Marked Event As Malicious + SentinelOne: $(log_message1) action performed on $(endpoint). + + + + + 105000 + STAR Manual Response Marked Event As Suspicious + SentinelOne: $(log_message1) action performed on $(endpoint). + + + + + 105000 + Watchtower Cloud Detection Engine Marked Event As Threat + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + Watchtower Cloud Detection Engine Marked Event As Suspicious + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + Singularity Threat Intelligence Engine Marked Event As Suspicious + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + Site Deleted + SentinelOne: $(log_message1) action performed by $(user_name). + + + + + 105000 + Site Modified + SentinelOne: $(log_message1) performed by $(user_name). + + + + + 105000 + Site Token Regenerated + SentinelOne: $(log_message1) action performed by $(user_name) for $(site_name). + + + + + 105000 + Account Deleted + SentinelOne: $(log_message1) performed by $(user_name). + + + + + 105000 + Device Rule Modified + SentinelOne: $(log_message1) performed by $(user_name). + + + + + 105000 + Device Rule Deleted + SentinelOne: $(log_message1) performed by $(user_name). + + + + + 105000 + Firewall Rule Modified + SentinelOne: $(log_message1) performed by $(user_name). + + + + + 105000 + Firewall Rule Deleted + SentinelOne: $(log_message1) performed by $(user_name). + + + + + 105000 + User Requested Firewall Logging + SentinelOne: $(log_message1) performed by $(user_name). + + + + + 105000 + Network Quarantine Rule Modified + SentinelOne: $(log_message1) performed by $(user_name). + + + + + 105000 + Network Quarantine Rule Deleted + SentinelOne: $(log_message1) performed by $(user_name). + + + + + 105000 + Mobile Incident Detected + SentinelOne: $(log_message1) detected by $(user_name). + + + + + 105000 + Disable and Purge Cloud + SentinelOne: $(log_message1) action performed by $(user_name). + + + + + 105000 + Forensics Profile Executed + SentinelOne: $(log_message1) executed by $(user_name). + + + + + 105000 + User Approved Script Execution + SentinelOne: $(log_message1) approved by $(user_name). + + + + + 105000 + Unknown Mobile Activity + SentinelOne: $(log_message1) detected. + + + + + 105000 + AD Assessment Detected New Exposure + SentinelOne: $(log_message1) on $(domain_name) affecting $(affected_object_count) objects. + + + + + 105000 + User Ran Mitigation Script + SentinelOne: $(log_message1) executed by $(user_name). + + + + + 105000 + Vigilance Response Policy Modified + SentinelOne: $(log_message1) modified by $(user_name). + + + + + 105000 + Sign SAML Request + SentinelOne: $(log_message1) $(sign_request). + + + + + 105000 + Accessing Protected Actions Configuration + SentinelOne: $(log_message1) modified by $(user_name). + + + + + + + + diff --git a/upgrade.md b/upgrade.md deleted file mode 100644 index 350e5c4b..00000000 --- a/upgrade.md +++ /dev/null @@ -1,200 +0,0 @@ -# Wazuh Upgrade - -When upgrading our version of Wazuh installed in Kubernetes we must follow the following steps. - -## Check which files are exported to the volume - -Our Kubernetes deployment uses our Wazuh images from Docker. If we look at the following code extracted from the Wazuh configuration using Docker we can see which directories and files are used in the upgrades. - -``` -PERMANENT_DATA[((i++))]="/var/ossec/api/configuration" -PERMANENT_DATA[((i++))]="/var/ossec/etc" -PERMANENT_DATA[((i++))]="/var/ossec/logs" -PERMANENT_DATA[((i++))]="/var/ossec/queue" -PERMANENT_DATA[((i++))]="/var/ossec/agentless" -PERMANENT_DATA[((i++))]="/var/ossec/var/multigroups" -PERMANENT_DATA[((i++))]="/var/ossec/integrations" -PERMANENT_DATA[((i++))]="/var/ossec/active-response/bin" -PERMANENT_DATA[((i++))]="/var/ossec/wodles" -PERMANENT_DATA[((i++))]="/etc/filebeat" -``` - -Any file that we modify referring to the files previously mentioned, will be changed also the corresponding volume. When the corresponding Wazuh pod is created again, it will get the cited files from the volume, thus keeping the changes made previously. - -To better understand it, we will give an example: - -We have our newly created Kubernetes environment following our instructions. In this example, the image of Wazuh used has been `wazuh/wazuh:3.13.1_7.8.0`. - -``` -containers: -- name: wazuh-manager - image: 'wazuh/wazuh:3.13.2_7.9.1' -``` - -Let's proceed by creating a set of rules in our `local_rules.xml` file at location `/var/ossec/etc/rules` in our wazuh manager master pod. - -``` -root@wazuh-manager-master-0:/# vim /var/ossec/etc/rules/local_rules.xml -root@wazuh-manager-master-0:/# cat /var/ossec/etc/rules/local_rules.xml - - - - - - - - - - 5716 - 1.1.1.1 - sshd: authentication failed from IP 1.1.1.1. - authentication_failed,pci_dss_10.2.4,pci_dss_10.2.5, - - - - 5716 - 2.1.1.1 - sshd: authentication failed from IP 2.1.1.1. - authentication_failed,pci_dss_10.2.4,pci_dss_10.2.5, - - - - 5716 - 3.1.1.1 - sshd: authentication failed from IP 3.1.1.1. - authentication_failed,pci_dss_10.2.4,pci_dss_10.2.5, - - - - -``` - -This action has modified the `local_rules.xml` file in the `/var/ossec/data/etc/rules` path and in the `/etc/postfix/etc/` rules path due these routes reference our volume assembly points. - -``` -volumeMounts: -- name: config - mountPath: /wazuh-config-mount/etc/ossec.conf - subPath: ossec.conf - readOnly: true -- name: wazuh-manager-master - mountPath: /var/ossec/data -- name: wazuh-manager-master - mountPath: /etc/postfix -``` - -We can see their content. - -``` -root@wazuh-manager-master-0:/# cat /var/ossec/data/etc/rules/local_rules.xml - - - - - - - - - - 5716 - 1.1.1.1 - sshd: authentication failed from IP 1.1.1.1. - authentication_failed,pci_dss_10.2.4,pci_dss_10.2.5, - - - - 5716 - 2.1.1.1 - sshd: authentication failed from IP 2.1.1.1. - authentication_failed,pci_dss_10.2.4,pci_dss_10.2.5, - - - - 5716 - 3.1.1.1 - sshd: authentication failed from IP 3.1.1.1. - authentication_failed,pci_dss_10.2.4,pci_dss_10.2.5, - - - -root@wazuh-manager-master-0:/# cat /etc/postfix/etc/rules/local_rules.xml - - - - - - - - - - 5716 - 1.1.1.1 - sshd: authentication failed from IP 1.1.1.1. - authentication_failed,pci_dss_10.2.4,pci_dss_10.2.5, - - - - 5716 - 2.1.1.1 - sshd: authentication failed from IP 2.1.1.1. - authentication_failed,pci_dss_10.2.4,pci_dss_10.2.5, - - - - 5716 - 3.1.1.1 - sshd: authentication failed from IP 3.1.1.1. - authentication_failed,pci_dss_10.2.4,pci_dss_10.2.5, - - - - -``` - -At this point, if the pod was dropped or updated, Kubernetes would be in charge of creating a replica of it that would link to the volumes created and would maintain any changes referenced in the files and directories that we export to those volumes. - -Once explained the operation regarding the volumes, we proceed to update Wazuh in two simple steps. - -## 1. Change the image of the container - -The first step is to change the image of the pod in each file that deploys each node of the Wazuh cluster. - -These files are the statefulSet files: -- wazuh-master-sts.yaml -- wazuh-worker-sts.yaml - -For example we had this version before: - -``` -containers: -- name: wazuh-manager - image: 'wazuh/wazuh:3.13.1_7.8.0' -``` - -And now we're going to upgrade to the next version: - -``` -containers: -- name: wazuh-manager - image: 'wazuh/wazuh:3.13.2_7.9.1' -``` - - -## 2. Apply the new configuration - -The second and last step is to apply the new configuration of each pod. For example for the wazuh manager master: - -``` -ubuntu@k8s-control-server:~/wazuh-kubernetes/manager_cluster$ kubectl apply -f wazuh-manager-master-sts.yaml -statefulset.apps "wazuh-manager-master" configured -``` - -This process will end the old pod while creating a new one with the new version, linked to the same volume. Once the Pods are booted, we will have our update ready and we can check the new version of Wazuh installed, the cluster and the changes that have been maintained through the use of the volumes. - -### Note: It is important to update all Wazuh node pods, because the cluster only works when all nodes have the same version. diff --git a/wazuh/indexer_stack/wazuh-dashboard/dashboard-deploy.yaml b/wazuh/indexer_stack/wazuh-dashboard/dashboard-deploy.yaml index 26cbf526..7d341021 100644 --- a/wazuh/indexer_stack/wazuh-dashboard/dashboard-deploy.yaml +++ b/wazuh/indexer_stack/wazuh-dashboard/dashboard-deploy.yaml @@ -30,6 +30,7 @@ spec: - name: dashboard-certs secret: secretName: dashboard-certs + #secretName: wazuh-dashboard-cert containers: - name: wazuh-dashboard image: 'wazuh/wazuh-dashboard:4.9.1' diff --git a/wazuh/indexer_stack/wazuh-dashboard/dashboard-svc.yaml b/wazuh/indexer_stack/wazuh-dashboard/dashboard-svc.yaml index ee599990..dbb3af19 100644 --- a/wazuh/indexer_stack/wazuh-dashboard/dashboard-svc.yaml +++ b/wazuh/indexer_stack/wazuh-dashboard/dashboard-svc.yaml @@ -16,10 +16,11 @@ metadata: app: wazuh-dashboard # dns: route53 annotations: - # domainName: 'changeme' - # service.beta.kubernetes.io/aws-load-balancer-ssl-cert: 'changeme' + domainName: 'soc.siem-marvelad.com' # Tu dominio en Route 53 + service.beta.kubernetes.io/aws-load-balancer-name: external-lb-dashboard service.beta.kubernetes.io/aws-load-balancer-ssl-ports: '443' service.beta.kubernetes.io/aws-load-balancer-backend-protocol: https + service.beta.kubernetes.io/aws-load-balancer-internal: "false" spec: type: LoadBalancer selector: diff --git a/wazuh/indexer_stack/wazuh-indexer/cluster/indexer-api-svc.yaml b/wazuh/indexer_stack/wazuh-indexer/cluster/indexer-api-svc.yaml index 7f25f61c..86efa870 100644 --- a/wazuh/indexer_stack/wazuh-indexer/cluster/indexer-api-svc.yaml +++ b/wazuh/indexer_stack/wazuh-indexer/cluster/indexer-api-svc.yaml @@ -15,7 +15,7 @@ metadata: labels: app: wazuh-indexer spec: - type: LoadBalancer + type: ClusterIP selector: app: wazuh-indexer ports: diff --git a/wazuh/indexer_stack/wazuh-indexer/cluster/indexer-sts.yaml b/wazuh/indexer_stack/wazuh-indexer/cluster/indexer-sts.yaml index 02df2566..8582fa3d 100644 --- a/wazuh/indexer_stack/wazuh-indexer/cluster/indexer-sts.yaml +++ b/wazuh/indexer_stack/wazuh-indexer/cluster/indexer-sts.yaml @@ -13,7 +13,7 @@ metadata: name: wazuh-indexer namespace: wazuh spec: - replicas: 3 + replicas: 1 selector: matchLabels: app: wazuh-indexer diff --git a/wazuh/kustomization.yml b/wazuh/kustomization.yml index 27347c39..0dbfd20c 100644 --- a/wazuh/kustomization.yml +++ b/wazuh/kustomization.yml @@ -38,6 +38,7 @@ configMapGenerator: files: - wazuh_managers/wazuh_conf/master.conf - wazuh_managers/wazuh_conf/worker.conf + - wazuh_managers/wazuh_conf/filebeat.yml #My config - name: dashboard-conf files: - indexer_stack/wazuh-dashboard/dashboard_conf/opensearch_dashboards.yml @@ -57,6 +58,11 @@ resources: - wazuh_managers/wazuh-workers-svc.yaml - wazuh_managers/wazuh-master-sts.yaml - wazuh_managers/wazuh-worker-sts.yaml + - wazuh_managers/syslog-svc.yaml ###################STARTS MY CONFIG###########################33 + - wazuh_managers/wazuh_conf/sentinelone-decoders-configmap.yaml + - wazuh_managers/wazuh_conf/sentinelone-rules-configmap.yaml + - wazuh_managers/wazuh-integrations/custom-w2thive-bash-configmap.yaml + - wazuh_managers/wazuh-integrations/custom-w2thive-script-configmap.yaml ########ENDS MY CONFIG ################ - indexer_stack/wazuh-indexer/indexer-svc.yaml - indexer_stack/wazuh-indexer/cluster/indexer-api-svc.yaml diff --git a/wazuh/wazuh_managers/syslog-svc.yaml b/wazuh/wazuh_managers/syslog-svc.yaml new file mode 100644 index 00000000..87ff6aef --- /dev/null +++ b/wazuh/wazuh_managers/syslog-svc.yaml @@ -0,0 +1,23 @@ +apiVersion: v1 +kind: Service +metadata: + name: wazuh-syslog + namespace: wazuh + labels: + app: wazuh-syslog + annotations: + service.beta.kubernetes.io/aws-load-balancer-backend-protocol: tcp + service.beta.kubernetes.io/aws-load-balancer-eip-allocations: eipalloc-09da44be7717957ee, eipalloc-08f9bb7c3445c690e + service.beta.kubernetes.io/aws-load-balancer-subnets: subnet-05fbf4a6250fa2324, subnet-0c3fca6bec1072d2a + service.beta.kubernetes.io/aws-load-balancer-name: external-syslog-lb + service.beta.kubernetes.io/aws-load-balancer-internal: "false" +spec: + type: LoadBalancer + selector: + app: wazuh-manager + node-type: worker #switch to master, worker or remove + ports: + - name: syslog-events + port: 514 + protocol: TCP + targetPort: 514 \ No newline at end of file diff --git a/wazuh/wazuh_managers/wazuh-integrations/custom-w2thive-bash-configmap.yaml b/wazuh/wazuh_managers/wazuh-integrations/custom-w2thive-bash-configmap.yaml new file mode 100644 index 00000000..1a122747 --- /dev/null +++ b/wazuh/wazuh_managers/wazuh-integrations/custom-w2thive-bash-configmap.yaml @@ -0,0 +1,45 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: custom-w2thive-bash + namespace: wazuh +data: + custom-w2thive: | + #!/bin/sh + # Copyright (C) 2015-2020, Wazuh Inc. + # Created by Wazuh, Inc. . + # This program is free software; you can redistribute it and/or modify it under the terms of GP> + + WPYTHON_BIN="framework/python/bin/python3" + + SCRIPT_PATH_NAME="$0" + + DIR_NAME="$(cd $(dirname ${SCRIPT_PATH_NAME}); pwd -P)" + SCRIPT_NAME="$(basename ${SCRIPT_PATH_NAME})" + + case ${DIR_NAME} in + */active-response/bin | */wodles*) + if [ -z "${WAZUH_PATH}" ]; then + WAZUH_PATH="$(cd ${DIR_NAME}/../..; pwd)" + fi + + PYTHON_SCRIPT="${DIR_NAME}/${SCRIPT_NAME}.py" + ;; + */bin) + if [ -z "${WAZUH_PATH}" ]; then + WAZUH_PATH="$(cd ${DIR_NAME}/..; pwd)" + fi + + PYTHON_SCRIPT="${WAZUH_PATH}/framework/scripts/${SCRIPT_NAME}.py" + ;; + */integrations) + if [ -z "${WAZUH_PATH}" ]; then + WAZUH_PATH="$(cd ${DIR_NAME}/..; pwd)" + fi + + PYTHON_SCRIPT="${DIR_NAME}/${SCRIPT_NAME}.py" + ;; + esac + + + ${WAZUH_PATH}/${WPYTHON_BIN} ${PYTHON_SCRIPT} $@ \ No newline at end of file diff --git a/wazuh/wazuh_managers/wazuh-integrations/custom-w2thive-script-configmap.yaml b/wazuh/wazuh_managers/wazuh-integrations/custom-w2thive-script-configmap.yaml new file mode 100644 index 00000000..e24f3f40 --- /dev/null +++ b/wazuh/wazuh_managers/wazuh-integrations/custom-w2thive-script-configmap.yaml @@ -0,0 +1,172 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: custom-w2thive-script + namespace: wazuh +data: + custom-w2thive.py: | + #!/var/ossec/framework/python/bin/python3 + import json + import sys + import os + import re + import logging + import uuid + from thehive4py.api import TheHiveApi + from thehive4py.models import Alert, AlertArtifact + + #start user config + + # Global vars + + #threshold for wazuh rules level + lvl_threshold=3 + #threshold for suricata rules level + suricata_lvl_threshold=3 + + debug_enabled = False + #info about created alert + info_enabled = True + + #end user config + + # Set paths + pwd = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) + log_file = '{0}/logs/integrations.log'.format(pwd) + logger = logging.getLogger(__name__) + #set logging level + logger.setLevel(logging.WARNING) + if info_enabled: + logger.setLevel(logging.INFO) + if debug_enabled: + logger.setLevel(logging.DEBUG) + # create the logging file handler + fh = logging.FileHandler(log_file) + formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s') + fh.setFormatter(formatter) + logger.addHandler(fh) + + + + def main(args): + logger.debug('#start main') + logger.debug('#get alert file location') + alert_file_location = args[1] + logger.debug('#get TheHive url') + thive = args[3] + logger.debug('#get TheHive api key') + thive_api_key = args[2] + thive_api = TheHiveApi(thive, thive_api_key ) + logger.debug('#open alert file') + w_alert = json.load(open(alert_file_location)) + logger.debug('#alert data') + logger.debug(str(w_alert)) + logger.debug('#gen json to dot-key-text') + alt = pr(w_alert,'',[]) + logger.debug('#formatting description') + format_alt = md_format(alt) + logger.debug('#search artifacts') + artifacts_dict = artifact_detect(format_alt) + alert = generate_alert(format_alt, artifacts_dict, w_alert) + logger.debug('#threshold filtering') + if w_alert['rule']['groups']==['ids','suricata']: + #checking the existence of the data.alert.severity field + if 'data' in w_alert.keys(): + if 'alert' in w_alert['data']: + #checking the level of the source event + if int(w_alert['data']['alert']['severity'])<=suricata_lvl_threshold: + send_alert(alert, thive_api) + elif int(w_alert['rule']['level'])>=lvl_threshold: + #if the event is different from suricata AND suricata-event-type: alert check lvl_threshold + send_alert(alert, thive_api) + + + def pr(data,prefix, alt): + for key,value in data.items(): + if hasattr(value,'keys'): + pr(value,prefix+'.'+str(key),alt=alt) + else: + alt.append((prefix+'.'+str(key)+'|||'+str(value))) + return alt + + + + def md_format(alt,format_alt=''): + md_title_dict = {} + #sorted with first key + for now in alt: + now = now[1:] + #fix first key last symbol + dot = now.split('|||')[0].find('.') + if dot==-1: + md_title_dict[now.split('|||')[0]] =[now] + else: + if now[0:dot] in md_title_dict.keys(): + (md_title_dict[now[0:dot]]).append(now) + else: + md_title_dict[now[0:dot]]=[now] + for now in md_title_dict.keys(): + format_alt+='### '+now.capitalize()+'\n'+'| key | val |\n| ------ | ------ |\n' + for let in md_title_dict[now]: + key,val = let.split('|||')[0],let.split('|||')[1] + format_alt+='| **' + key + '** | ' + val + ' |\n' + return format_alt + + + def artifact_detect(format_alt): + artifacts_dict = {} + artifacts_dict['ip'] = re.findall(r'\d+\.\d+\.\d+\.\d+',format_alt) + artifacts_dict['url'] = re.findall(r'http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+',format_alt) + artifacts_dict['domain'] = [] + for now in artifacts_dict['url']: artifacts_dict['domain'].append(now.split('//')[1].split('/')[0]) + return artifacts_dict + + + def generate_alert(format_alt, artifacts_dict,w_alert): + #generate alert sourceRef + sourceRef = str(uuid.uuid4())[0:6] + artifacts = [] + if 'agent' in w_alert.keys(): + if 'ip' not in w_alert['agent'].keys(): + w_alert['agent']['ip']='no agent ip' + else: + w_alert['agent'] = {'id':'no agent id', 'name':'no agent name'} + + for key,value in artifacts_dict.items(): + for val in value: + artifacts.append(AlertArtifact(dataType=key, data=val)) + alert = Alert(title=w_alert['rule']['description'], + tlp=2, + tags=['wazuh', + 'rule='+w_alert['rule']['id'], + 'agent_name='+w_alert['agent']['name'], + 'agent_id='+w_alert['agent']['id'], + 'agent_ip='+w_alert['agent']['ip'],], + description=format_alt , + type='wazuh_alert', + source='wazuh', + sourceRef=sourceRef, + artifacts=artifacts,) + return alert + + + + + def send_alert(alert, thive_api): + response = thive_api.create_alert(alert) + if response.status_code == 201: + logger.info('Create TheHive alert: '+ str(response.json()['id'])) + else: + logger.error('Error create TheHive alert: {}/{}'.format(response.status_code, response.text)) + + + + if __name__ == "__main__": + + try: + logger.debug('debug mode') # if debug enabled + # Main function + main(sys.argv) + + except Exception: + logger.exception('EGOR') diff --git a/wazuh/wazuh_managers/wazuh-master-sts.yaml b/wazuh/wazuh_managers/wazuh-master-sts.yaml index 628204a0..33eda9f5 100644 --- a/wazuh/wazuh_managers/wazuh-master-sts.yaml +++ b/wazuh/wazuh_managers/wazuh-master-sts.yaml @@ -28,6 +28,20 @@ spec: name: wazuh-manager-master spec: volumes: + - name: custom-scripts #########START MY CONFIG############## + configMap: + name: custom-w2thive-script + - name: custom-scripts-bash + configMap: + name: custom-w2thive-bash + - name: temp-storage + emptyDir: {} + - name: sentinelone-rules + configMap: + name: sentinelone-rules-configmap + - name: sentinelone-decoders + configMap: + name: sentinelone-decoders-configmap ########ENDS MY CONFIG###### - name: config configMap: name: wazuh-conf @@ -39,6 +53,75 @@ spec: secretName: wazuh-authd-pass securityContext: fsGroup: 101 + initContainers: + - name: init-permissions + image: 'wazuh/wazuh-manager:4.9.1' + resources: + requests: + cpu: 50m + memory: 128Mi + limits: + cpu: 100m + memory: 256Mi + securityContext: + runAsUser: 0 + runAsGroup: 0 + command: + - 'sh' + - '-c' + - | + echo "Copiando scripts desde ConfigMap a directorio temporal..." + cp /temp-config-w2thive/custom-w2thive.py /temp-storage/ || echo "Error copiando custom-w2thive.py" + cp /temp-config-w2thive/custom-w2thive /temp-storage/ || echo "Error copiando custom-w2thive" + + echo "Cambiando permisos y propietario en /temp-storage" + chmod 750 /temp-storage/custom-w2thive.py /temp-storage/custom-w2thive || echo "Error cambiando permisos" + chown root:wazuh /temp-storage/custom-w2thive.py /temp-storage/custom-w2thive || echo "Error cambiando propietario" + + echo "Instalando thehive4py versión en el entorno de Wazuh..." + /var/ossec/framework/python/bin/pip3 install thehive4py || echo "Error instalando thehive4py" + + ## echo "Copiando archivos a /var/ossec/integrations" + # cp /temp-storage/custom-w2thive.py /var/ossec/integrations/ && echo "Copiado custom-w2thive.py" || echo "Error copiando custom-w2thive.py" + ## cp /temp-storage/custom-w2thive /var/ossec/integrations/ && echo "Copiado custom-w2thive" || echo "Error copiando custom-w2thive" + + # echo "Borrando los archivos originales en /temp-storage" + # rm -f /temp-storage/custom-w2thive.py /temp-storage/custom-w2thive || echo "Error borrando archivos" + + # echo "Verificando archivos en /temp-storage" + # ls -l /temp-storage/custom-w2thive.py /temp-storage/custom-w2thive || echo "Error verificando archivos en /temp-storage" + + # echo "Moviendo archivos de /temp-storage a /config-thive" + # mv /temp-storage/custom-w2thive.py /config-thive/custom-w2thive.py || echo "Error moviendo custom-w2thive.py a /config-thive" + # mv /temp-storage/custom-w2thive /config-thive/custom-w2thive || echo "Error moviendo custom-w2thive a /config-thive" + + # echo "Verificando archivos en /config-thive" + # ls -l /config-thive/custom-w2thive.py /config-thive/custom-w2thive || echo "Error verificando archivos en /config-thive" + + + + # # Asegúrate de que el directorio existe + # echo "Creando directorio /var/ossec/integrations si no existe..." + # mkdir -p /var/ossec/integrations || echo "Error creando /var/ossec/integrations" + + # echo "Verificando existencia de /var/ossec/integrations:" + # ls -ld /var/ossec/integrations + + # echo "Archivos en /temp-storage antes de mover:" + # ls -l /temp-storage/ + + volumeMounts: + - name: temp-storage + mountPath: /temp-storage + readOnly: false + - name: custom-scripts + mountPath: /temp-config-w2thive/custom-w2thive.py + subPath: custom-w2thive.py + #readOnly: true + - name: custom-scripts-bash + mountPath: /temp-config-w2thive/custom-w2thive + subPath: custom-w2thive + #readOnly: true containers: - name: wazuh-manager image: 'wazuh/wazuh-manager:4.9.1' @@ -50,6 +133,28 @@ spec: capabilities: add: ["SYS_CHROOT"] volumeMounts: + - name: config #########START MY CONFIG############## + mountPath: /etc/filebeat/filebeat.yml + subPath: filebeat.yml + - name: temp-storage + mountPath: /temp-storage # Aquí se monta el volumen temporal + readOnly: false + - name: custom-scripts + mountPath: /temp-config-w2thive/custom-w2thive.py + subPath: custom-w2thive.py + readOnly: true + - name: custom-scripts-bash + mountPath: /temp-config-w2thive/custom-w2thive + subPath: custom-w2thive + readOnly: true + - name: sentinelone-rules + mountPath: /var/ossec/etc/rules/sentinelone_rules.xml + subPath: sentinelone_rules.xml + readOnly: true + - name: sentinelone-decoders + mountPath: /var/ossec/etc/decoders/sentinelone_decoders.xml + subPath: sentinelone_decoders.xml + readOnly: true #######ENDS MY CONFIG############### - name: config mountPath: /wazuh-config-mount/etc/ossec.conf subPath: master.conf @@ -110,6 +215,8 @@ spec: name: cluster - containerPort: 55000 name: api + - containerPort: 514 + name: syslog-events env: - name: INDEXER_URL value: 'https://indexer:9200' diff --git a/wazuh/wazuh_managers/wazuh-master-svc.yaml b/wazuh/wazuh_managers/wazuh-master-svc.yaml index 50f19767..0d89db02 100644 --- a/wazuh/wazuh_managers/wazuh-master-svc.yaml +++ b/wazuh/wazuh_managers/wazuh-master-svc.yaml @@ -19,7 +19,7 @@ metadata: # domainName: 'changeme' service.beta.kubernetes.io/aws-load-balancer-backend-protocol: tcp spec: - type: LoadBalancer + type: ClusterIP selector: app: wazuh-manager node-type: master @@ -30,3 +30,4 @@ spec: - name: api port: 55000 targetPort: 55000 + diff --git a/wazuh/wazuh_managers/wazuh-worker-sts.yaml b/wazuh/wazuh_managers/wazuh-worker-sts.yaml index c8f04de3..29644eb4 100644 --- a/wazuh/wazuh_managers/wazuh-worker-sts.yaml +++ b/wazuh/wazuh_managers/wazuh-worker-sts.yaml @@ -13,7 +13,7 @@ metadata: name: wazuh-manager-worker namespace: wazuh spec: - replicas: 2 + replicas: 1 selector: matchLabels: app: wazuh-manager @@ -34,6 +34,20 @@ spec: podAffinityTerm: topologyKey: kubernetes.io/hostname volumes: + - name: custom-scripts #########START MY CONFIG############## + configMap: + name: custom-w2thive-script + - name: custom-scripts-bash + configMap: + name: custom-w2thive-bash + - name: temp-storage + emptyDir: {} + - name: sentinelone-rules + configMap: + name: sentinelone-rules-configmap + - name: sentinelone-decoders + configMap: + name: sentinelone-decoders-configmap ########ENDS MY CONFIG###### - name: config configMap: name: wazuh-conf @@ -42,6 +56,77 @@ spec: secretName: indexer-certs securityContext: fsGroup: 101 + initContainers: + - name: init-permissions + image: 'wazuh/wazuh-manager:4.9.1' + resources: + requests: + cpu: 50m + memory: 128Mi + limits: + cpu: 100m + memory: 256Mi + securityContext: + runAsUser: 0 + runAsGroup: 0 + command: + - 'sh' + - '-c' + - | + echo "Copiando scripts desde ConfigMap a directorio temporal..." + cp /temp-config-w2thive/custom-w2thive.py /temp-storage/ || echo "Error copiando custom-w2thive.py" + cp /temp-config-w2thive/custom-w2thive /temp-storage/ || echo "Error copiando custom-w2thive" + + echo "Cambiando permisos y propietario en /temp-storage" + chmod 750 /temp-storage/custom-w2thive.py /temp-storage/custom-w2thive || echo "Error cambiando permisos" + chown root:wazuh /temp-storage/custom-w2thive.py /temp-storage/custom-w2thive || echo "Error cambiando propietario" + + echo "Instalando thehive4py versión en el entorno de Wazuh..." + /var/ossec/framework/python/bin/pip3 install thehive4py || echo "Error instalando thehive4py" + # echo "Copiando archivos a /var/ossec/integrations" + # cp /temp-storage/custom-w2thive.py /var/ossec/integrations/ && echo "Copiado custom-w2thive.py" || echo "Error copiando custom-w2thive.py" + # cp /temp-storage/custom-w2thive /var/ossec/integrations/ && echo "Copiado custom-w2thive" || echo "Error copiando custom-w2thive" + + # echo "Borrando los archivos originales en /temp-storage" + # rm -f /temp-storage/custom-w2thive.py /temp-storage/custom-w2thive || echo "Error borrando archivos" + + # echo "Verificando archivos en /temp-storage" + # ls -l /temp-storage/custom-w2thive.py /temp-storage/custom-w2thive || echo "Error verificando archivos en /temp-storage" + + # echo "Moviendo archivos de /temp-storage a /config-thive" + # mv /temp-storage/custom-w2thive.py /config-thive/custom-w2thive.py || echo "Error moviendo custom-w2thive.py a /config-thive" + # mv /temp-storage/custom-w2thive /config-thive/custom-w2thive || echo "Error moviendo custom-w2thive a /config-thive" + + # echo "Verificando archivos en /config-thive" + # ls -l /config-thive/custom-w2thive.py /config-thive/custom-w2thive || echo "Error verificando archivos en /config-thive" + + # # Asegúrate de que el directorio existe + # echo "Creando directorio /var/ossec/integrations si no existe..." + # mkdir -p /var/ossec/integrations || echo "Error creando /var/ossec/integrations" + + # echo "Verificando existencia de /var/ossec/integrations:" + # ls -ld /var/ossec/integrations + + # echo "Archivos en /temp-storage antes de mover:" + # ls -l /temp-storage/ + + # echo "Copiando archivos a /var/ossec/integrations" + # cp /temp-storage/custom-w2thive.py /var/ossec/integrations/ && echo "Copiado custom-w2thive.py" || echo "Error copiando custom-w2thive.py" + # cp /temp-storage/custom-w2thive /var/ossec/integrations/ && echo "Copiado custom-w2thive" || echo "Error copiando custom-w2thive" + + + volumeMounts: + - name: temp-storage + mountPath: /temp-storage + readOnly: false + - name: custom-scripts + mountPath: /temp-config-w2thive/custom-w2thive.py + subPath: custom-w2thive.py + #readOnly: true + - name: custom-scripts-bash + mountPath: /temp-config-w2thive/custom-w2thive + subPath: custom-w2thive + #readOnly: true containers: - name: wazuh-manager image: 'wazuh/wazuh-manager:4.9.1' @@ -53,6 +138,28 @@ spec: capabilities: add: ["SYS_CHROOT"] volumeMounts: + - name: config #########START MY CONFIG############## + mountPath: /etc/filebeat/filebeat.yml + subPath: filebeat.yml + - name: temp-storage + mountPath: /temp-storage # Aquí se monta el volumen temporal + readOnly: false + - name: custom-scripts + mountPath: /temp-config-w2thive/custom-w2thive.py + subPath: custom-w2thive.py + readOnly: true + - name: custom-scripts-bash + mountPath: /temp-config-w2thive/custom-w2thive + subPath: custom-w2thive + readOnly: true + - name: sentinelone-rules + mountPath: /var/ossec/etc/rules/sentinelone_rules.xml + subPath: sentinelone_rules.xml + readOnly: true + - name: sentinelone-decoders + mountPath: /var/ossec/etc/decoders/sentinelone_decoders.xml + subPath: sentinelone_decoders.xml + readOnly: true #######ENDS MY CONFIG############### - name: config mountPath: /wazuh-config-mount/etc/ossec.conf subPath: worker.conf @@ -107,6 +214,8 @@ spec: name: agents-events - containerPort: 1516 name: cluster + - containerPort: 514 + name: syslog-events env: - name: INDEXER_URL value: 'https://indexer:9200' diff --git a/wazuh/wazuh_managers/wazuh-workers-svc.yaml b/wazuh/wazuh_managers/wazuh-workers-svc.yaml index 5d2dae69..a8ebd849 100644 --- a/wazuh/wazuh_managers/wazuh-workers-svc.yaml +++ b/wazuh/wazuh_managers/wazuh-workers-svc.yaml @@ -17,9 +17,10 @@ metadata: # dns: route53 annotations: # domainName: 'wazuh-manager.some-domain.com' # TODO: Change this for a Hosted Zone you configured in AWS Route 53 - service.beta.kubernetes.io/aws-load-balancer-internal: 0.0.0.0/0 + #service.beta.kubernetes.io/aws-load-balancer-internal: 0.0.0.0/0 + service.beta.kubernetes.io/aws-load-balancer-internal: "true" spec: - type: LoadBalancer + type: ClusterIP selector: app: wazuh-manager node-type: worker @@ -27,3 +28,4 @@ spec: - name: agents-events port: 1514 targetPort: 1514 + diff --git a/wazuh/wazuh_managers/wazuh_conf/filebeat.yml b/wazuh/wazuh_managers/wazuh_conf/filebeat.yml new file mode 100644 index 00000000..c0c86999 --- /dev/null +++ b/wazuh/wazuh_managers/wazuh_conf/filebeat.yml @@ -0,0 +1,30 @@ +# Wazuh - Filebeat configuration file +filebeat.modules: + - module: wazuh + alerts: + enabled: true + archives: + enabled: true + +setup.template.json.enabled: true +setup.template.overwrite: true +setup.template.json.path: '/etc/filebeat/wazuh-template.json' +setup.template.json.name: 'wazuh' +setup.ilm.enabled: false +output.elasticsearch: + hosts: ['https://indexer:9200'] + username: 'admin' + password: 'SecretPassword' + ssl.verification_mode: 'full' + ssl.certificate_authorities: ['/etc/ssl/root-ca.pem'] + ssl.certificate: '/etc/ssl/filebeat.pem' + ssl.key: '/etc/ssl/filebeat.key' + +logging.metrics.enabled: false + +seccomp: + default_action: allow + syscalls: + - action: allow + names: + - rseq diff --git a/wazuh/wazuh_managers/wazuh_conf/master.conf b/wazuh/wazuh_managers/wazuh_conf/master.conf index 947c584f..a014b779 100644 --- a/wazuh/wazuh_managers/wazuh_conf/master.conf +++ b/wazuh/wazuh_managers/wazuh_conf/master.conf @@ -10,12 +10,12 @@ yes yes - no - no + yes + yes no - smtp.example.wazuh.com - ossecm@example.wazuh.com - recipient@example.wazuh.com + postfix.wazuh.svc.cluster.local + patricio@marveladvisors.com + patricio@marveladvisors.com 12 alerts.log 131072 @@ -25,7 +25,7 @@ 3 - 12 + 3 @@ -33,6 +33,13 @@ plain + + custom-w2thive + http://174.129.57.148:30001 + RSNEdHFYebkTo9lfYYKEOZSxQWCwwHjt + json + + secure 1514 @@ -40,6 +47,18 @@ 131072 + + + + syslog + 514 + tcp + 0.0.0.0/0 + 199.204.124.0/24 + 199.26.60.0/22 + + + no diff --git a/wazuh/wazuh_managers/wazuh_conf/sentinelone-decoders-configmap.yaml b/wazuh/wazuh_managers/wazuh_conf/sentinelone-decoders-configmap.yaml new file mode 100644 index 00000000..f5aa7bc0 --- /dev/null +++ b/wazuh/wazuh_managers/wazuh_conf/sentinelone-decoders-configmap.yaml @@ -0,0 +1,132 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: sentinelone-decoders-configmap + namespace: wazuh # Reemplaza con tu namespace +data: + sentinelone_decoders.xml: | + + sentinel - CEF:\d\|SentinelOne\| + + + + sentinelone + \|SentinelOne\|\w+\|\S+\|\d+\|(\.*) - + log_message1 + + + + sentinelone + \|SentinelOne\|\w+\|\S+\|\d+\|(\.*)\|\d+ + log_message2 + + + + sentinelone + \|SentinelOne\|\w+\|\S+\|\d+\|\.* machine (\.*)\|\d+ + endpoint + + + + sentinelone + osName=(\w*\s*\w*\s*\w*\s*) + operating_system + + + + sentinelone + fileHash=(\S+)\s + file_hash + + + + sentinelone + filePath=(\S+)\s + file_path + + + + sentinelone + activityID=(\S+) + activity_id + + + + sentinelone + suser=(\S+) + suser + + + + sentinelone + siteId=(\d+) + site_id + + + + sentinelone + siteName=(\S+) + site_name + + + + sentinelone + accountId=(\d+) + account_id + + + + sentinelone + accountName=(\w*\s\w*\s) + account_name + + + + + sentinelone + groupId=(\d+) + group_id + + + + sentinelone + groupName=(\S+\s\S+) + group_name + + + + sentinelone + agentId=(\d+) + agent_id + + + + sentinelone + userId=(\d+) + user_id + + + + sentinelone + threadId=(\d+) + thread_id + + + + sentinelone + ip_address=(\d+\.\d+\.\d+\.\d+) + ip_address + + + + sentinelone + confidence_level=(\w+) + confidence_level + + + + sentinelone + storyline=(\S+) + storyline + + diff --git a/wazuh/wazuh_managers/wazuh_conf/sentinelone-rules-configmap.yaml b/wazuh/wazuh_managers/wazuh_conf/sentinelone-rules-configmap.yaml new file mode 100644 index 00000000..e38393a1 --- /dev/null +++ b/wazuh/wazuh_managers/wazuh_conf/sentinelone-rules-configmap.yaml @@ -0,0 +1,1022 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: sentinelone-rules-configmap + namespace: wazuh # Reemplaza con tu namespace +data: + sentinelone_rules.xml: | + + + + sentinelone + Logs from SentinelOne. + + + + + 105000 + Kill performed successfully + SentinelOne: Threat $(file_path) successfully mitigated on $(suser). + + + + + 105000 + New active threat + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + New Suspicious threat detected + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + + 105000 + Quarantine performed successfully + SentinelOne: Threat file $(file_path) quarantined successfully on $(suser). + + + + + 105000 + Hash Defined as Malicious By Cloud + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + New Malicious Threat Not Mitigated + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + New Threat Preemptive Block + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + Threat Unresolved + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + Threat Killed By Policy + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + Threat Mitigation Report Kill Failed + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + Agent Disabled Because of Database Corruption + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + Threat Confidence Level Changed By Cloud + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + User Issued Kill Command + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + New Suspicious Threat Not Mitigated + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + User Created RBAC Role + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + API Token Generated + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + Malicious Macros Mitigation Changed + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + User Added + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + User Modified + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + User Logged In + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + User Logged Out + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + Cloud Intelligence Settings Modified + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + Agent Uninstalled + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + + 105000 + Event Severity Level Modified + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + User Disconnected Agent From Network + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + User Shutdown Agent + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + User Edited RBAC Role + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + User Deleted RBAC Role + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + Enable API Token Generation + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + API Token Revoked + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + User Disabled Agent + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + Agent Disabled + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + Agent Disabled Because of Database Corruption + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + Allowed Domains Settings Changed + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + Opt-in To EA program + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + Existing User Login Failure + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + Unknown User Login + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + Service User creation + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + User Locked from Unrestricted Session + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + User Temporarily Locked + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + 2FA - Delete + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + Live Updates Policy Modified + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + File Upload Settings Modified + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + Suspicious Driver Blocking Changed + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + Windows Signed Drivers Blocking Changed + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + Windows Unsigned Drivers Blocking Changed + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + Malicious Macros Mitigation Changed + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + Agent Disconnected From Network + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + SSO Login Failed + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + SSO User Added + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + User Network Quarantine Container + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + User Network Unquarantine Container + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + Threat Mitigation Report Kill Failed + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + Threat Mitigation Report Remediate Failed + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + Threat Mitigation Report Rollback Failed + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + Threat Mitigation Report Quarantine Failed + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + Agent Mitigation Report Quarantine Network Failed + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + User Marked Application As Threat + SentinelOne: $(log_message1) $(file_path) detected on $(endpoint). + + + + + 105000 + Threat Quarantined By Policy + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + Agent Disconnected From Network Due to Threat Mitigation By Policy + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + Threat Mitigation Report Unquarantine Failed + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + User Added Hash Exclusion + SentinelOne: $(log_message1) performed by user $(username). + + + + + 105000 + Cloud Added Hash Exclusion + SentinelOne: $(log_message1) added in the cloud for $(os_family). + + + + + 105000 + New Path Exclusion + SentinelOne: $(log_message1) added by user $(username) on $(os_family). + + + + + 105000 + New Signer Identity Exclusion + SentinelOne: $(log_message1) added by user $(username) on $(os_family). + + + + + 105000 + New File Type Exclusion + SentinelOne: $(log_message1) added by user $(username) on $(os_family). + + + + + 105000 + New Browser Type Exclusion + SentinelOne: $(log_message1) added by user $(username) on $(os_family). + + + + + 105000 + Path Exclusion Modified + SentinelOne: $(log_message1) modified by user $(username) on $(os_family). + + + + + 105000 + Signer Identity Exclusion Modified + SentinelOne: $(log_message1) modified by user $(username) on $(os_family). + + + + + 105000 + File Type Exclusion Modified + SentinelOne: $(log_message1) modified by user $(username) on $(os_family). + + + + + 105000 + Browser Type Exclusion Modified + SentinelOne: $(log_message1) modified by user $(username) on $(os_family). + + + + + 105000 + Identity Exclusion Created + SentinelOne: $(log_message1) created by user $(username) for $(os_family). + + + + + 105000 + Identity Exclusion Updated + SentinelOne: $(log_message1) updated by user $(username) for $(os_family). + + + + + + 105000 + User Started Remote Shell + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + Remote Shell Created + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + Network Discovery Settings Modified + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + Discovered Networks Settings Modified + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + Network Discovery - Devices Discovered + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + Sentinel Deploy - Master passphrase + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + Sentinel Deploy - Credential Group Created + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + Sentinel Deploy - Credential Group Edited + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + Sentinel Deploy - Credential Group Deleted + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + Sentinel Deploy - Credential Created + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + Sentinel Deploy - Credential Deleted + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + Sentinel Deploy - Credential Overridden + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + Sentinel Deploy - Trusted Hosts + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + Custom Rules - User Created A Rule + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + Custom Rules - User Changed A Rule + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + Custom Rules - User Deleted A Rule + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + Custom Rules - Rule Status Changed + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + Custom Rules - Rule Expired + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + Custom Rules - Rule Reached Alert Limit + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + Account Uninstall Password Viewed + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + Account Uninstall Password Generated + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + Account Uninstall Password Regenerated + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + Account Uninstall Password Revoked + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + New Script Created + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + Script Action Initiated + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + Script Deleted + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + User 2FA Verification Failed + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + User 2FA Email Verification Changed + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + Login Using Saved 2FA Recovery Code + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + + 105000 + Marketplace - App Disabled + SentinelOne: $(log_message1) action performed on $(endpoint). + + + + + 105000 + Network Discovery Self Provisioning Default Features Modified + SentinelOne: $(log_message1) on $(endpoint). + + + + + 105000 + User Disabled Extensive Scan + SentinelOne: $(log_message1) on $(endpoint). + + + + + 105000 + Platform Rules - Rule Deleted + SentinelOne: $(log_message1) performed by $(user_name) on $(endpoint). + + + + + 105000 + Platform Rules - Rule Status Change Failed + SentinelOne: $(log_message1) performed on $(endpoint) due to $(reason). + + + + + 105000 + Custom Rules - Rule Expired + SentinelOne: $(log_message1) on $(endpoint). + + + + + 105000 + Platform Rules - Rule Reached Alert Limit + SentinelOne: $(log_message1) on $(endpoint). + + + + + 105000 + Suspicious Threat Was Marked As Threat + SentinelOne: $(log_message1) performed by $(user_name) on $(endpoint). + + + + + 105000 + New Suspicious Threat Not Mitigated + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + Process Was Marked As Threat + SentinelOne: $(log_message1) performed on $(endpoint). + + + + + 105000 + Suspicious Threat Was Unresolved + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + Policy Setting - Show Suspicious Activities Configuration Disabled + SentinelOne: $(log_message1) changed by $(user_name) on $(endpoint). + + + + + 105000 + Password Expiration Modified + SentinelOne: $(log_message1) performed by $(user_name) on $(endpoint). + + + + + 105000 + User Marked Deep Visibility Event As Threat + SentinelOne: $(log_message1) performed on $(endpoint). + + + + + 105000 + User Marked Deep Visibility Event As Suspicious + SentinelOne: $(log_message1) performed on $(endpoint). + + + + + 105000 + STAR Manual Response Marked Event As Malicious + SentinelOne: $(log_message1) action performed on $(endpoint). + + + + + 105000 + STAR Manual Response Marked Event As Suspicious + SentinelOne: $(log_message1) action performed on $(endpoint). + + + + + 105000 + Watchtower Cloud Detection Engine Marked Event As Threat + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + Watchtower Cloud Detection Engine Marked Event As Suspicious + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + Singularity Threat Intelligence Engine Marked Event As Suspicious + SentinelOne: $(log_message1) detected on $(endpoint). + + + + + 105000 + Site Deleted + SentinelOne: $(log_message1) action performed by $(user_name). + + + + + 105000 + Site Modified + SentinelOne: $(log_message1) performed by $(user_name). + + + + + 105000 + Site Token Regenerated + SentinelOne: $(log_message1) action performed by $(user_name) for $(site_name). + + + + + 105000 + Account Deleted + SentinelOne: $(log_message1) performed by $(user_name). + + + + + 105000 + Device Rule Modified + SentinelOne: $(log_message1) performed by $(user_name). + + + + + 105000 + Device Rule Deleted + SentinelOne: $(log_message1) performed by $(user_name). + + + + + 105000 + Firewall Rule Modified + SentinelOne: $(log_message1) performed by $(user_name). + + + + + 105000 + Firewall Rule Deleted + SentinelOne: $(log_message1) performed by $(user_name). + + + + + 105000 + User Requested Firewall Logging + SentinelOne: $(log_message1) performed by $(user_name). + + + + + 105000 + Network Quarantine Rule Modified + SentinelOne: $(log_message1) performed by $(user_name). + + + + + 105000 + Network Quarantine Rule Deleted + SentinelOne: $(log_message1) performed by $(user_name). + + + + + 105000 + Mobile Incident Detected + SentinelOne: $(log_message1) detected by $(user_name). + + + + + 105000 + Disable and Purge Cloud + SentinelOne: $(log_message1) action performed by $(user_name). + + + + + 105000 + Forensics Profile Executed + SentinelOne: $(log_message1) executed by $(user_name). + + + + + 105000 + User Approved Script Execution + SentinelOne: $(log_message1) approved by $(user_name). + + + + + 105000 + Unknown Mobile Activity + SentinelOne: $(log_message1) detected. + + + + + 105000 + AD Assessment Detected New Exposure + SentinelOne: $(log_message1) on $(domain_name) affecting $(affected_object_count) objects. + + + + + 105000 + User Ran Mitigation Script + SentinelOne: $(log_message1) executed by $(user_name). + + + + + 105000 + Vigilance Response Policy Modified + SentinelOne: $(log_message1) modified by $(user_name). + + + + + 105000 + Sign SAML Request + SentinelOne: $(log_message1) $(sign_request). + + + + + 105000 + Accessing Protected Actions Configuration + SentinelOne: $(log_message1) modified by $(user_name). + + + + + diff --git a/wazuh/wazuh_managers/wazuh_conf/worker.conf b/wazuh/wazuh_managers/wazuh_conf/worker.conf index f55b8d61..ec276a72 100644 --- a/wazuh/wazuh_managers/wazuh_conf/worker.conf +++ b/wazuh/wazuh_managers/wazuh_conf/worker.conf @@ -10,12 +10,12 @@ yes yes - no - no + yes + yes no - smtp.example.wazuh.com - ossecm@example.wazuh.com - recipient@example.wazuh.com + postfix.wazuh.svc.cluster.local + patricio@marveladvisors.com + patricio@marveladvisors.com 12 alerts.log 131072 @@ -25,7 +25,7 @@ 3 - 12 + 3 @@ -33,6 +33,13 @@ plain + + custom-w2thive + http://174.129.57.148:30001 + RSNEdHFYebkTo9lfYYKEOZSxQWCwwHjt + json + + secure 1514 @@ -40,6 +47,17 @@ 131072 + + + syslog + 514 + tcp + 0.0.0.0/0 + 199.204.124.0/24 + 199.26.60.0/22 + + + no