Translated ['src/README.md', 'src/banners/hacktricks-training.md', 'src/

This commit is contained in:
Translator
2024-12-31 20:20:29 +00:00
parent 77a009d308
commit 4bcd54c1b6
245 changed files with 9959 additions and 12700 deletions

View File

@@ -4,68 +4,62 @@
## HSM - Hardware Security Module
Cloud HSM is a FIPS 140 level two validated **hardware device** for secure cryptographic key storage (note that CloudHSM is a hardware appliance, it is not a virtualized service). It is a SafeNetLuna 7000 appliance with 5.3.13 preloaded. There are two firmware versions and which one you pick is really based on your exact needs. One is for FIPS 140-2 compliance and there was a newer version that can be used.
Cloud HSM ist ein FIPS 140 Level zwei validiertes **Hardwaregerät** zur sicheren Speicherung kryptografischer Schlüssel (beachten Sie, dass CloudHSM ein Hardwaregerät ist, es ist kein virtualisierter Dienst). Es handelt sich um ein SafeNetLuna 7000 Gerät mit 5.3.13 vorinstalliert. Es gibt zwei Firmware-Versionen, und welche Sie wählen, hängt wirklich von Ihren genauen Bedürfnissen ab. Eine ist für die FIPS 140-2-Konformität und es gab eine neuere Version, die verwendet werden kann.
The unusual feature of CloudHSM is that it is a physical device, and thus it is **not shared with other customers**, or as it is commonly termed, multi-tenant. It is dedicated single tenant appliance exclusively made available to your workloads
Das ungewöhnliche Merkmal von CloudHSM ist, dass es sich um ein physisches Gerät handelt und daher **nicht mit anderen Kunden geteilt wird**, oder wie es allgemein genannt wird, multi-tenant. Es ist ein dediziertes Single-Tenant-Gerät, das ausschließlich für Ihre Workloads zur Verfügung steht.
Typically, a device is available within 15 minutes assuming there is capacity, but in some zones there could not be.
Typischerweise ist ein Gerät innerhalb von 15 Minuten verfügbar, vorausgesetzt, es gibt Kapazität, aber in einigen Zonen könnte dies nicht der Fall sein.
Since this is a physical device dedicated to you, **the keys are stored on the device**. Keys need to either be **replicated to another device**, backed up to offline storage, or exported to a standby appliance. **This device is not backed** by S3 or any other service at AWS like KMS.
Da dies ein physisches Gerät ist, das Ihnen gewidmet ist, **werden die Schlüssel auf dem Gerät gespeichert**. Schlüssel müssen entweder **auf ein anderes Gerät repliziert**, in Offline-Speicher gesichert oder auf ein Standby-Gerät exportiert werden. **Dieses Gerät wird nicht durch** S3 oder einen anderen Dienst bei AWS wie KMS unterstützt.
In **CloudHSM**, you have to **scale the service yourself**. You have to provision enough CloudHSM devices to handle whatever your encryption needs are based on the encryption algorithms you have chosen to implement for your solution.\
Key Management Service scaling is performed by AWS and automatically scales on demand, so as your use grows, so might the number of CloudHSM appliances that are required. Keep this in mind as you scale your solution and if your solution has auto-scaling, make sure your maximum scale is accounted for with enough CloudHSM appliances to service the solution.
In **CloudHSM** müssen Sie **den Dienst selbst skalieren**. Sie müssen genügend CloudHSM-Geräte bereitstellen, um Ihre Verschlüsselungsbedürfnisse basierend auf den Verschlüsselungsalgorithmen, die Sie für Ihre Lösung implementieren möchten, zu erfüllen.\
Die Skalierung des Key Management Service wird von AWS durchgeführt und skaliert automatisch nach Bedarf, sodass mit dem Wachstum Ihrer Nutzung möglicherweise auch die Anzahl der benötigten CloudHSM-Geräte steigt. Behalten Sie dies im Hinterkopf, während Sie Ihre Lösung skalieren, und wenn Ihre Lösung Auto-Scaling hat, stellen Sie sicher, dass Ihre maximale Skalierung mit genügend CloudHSM-Geräten berücksichtigt wird, um die Lösung zu bedienen.
Just like scaling, **performance is up to you with CloudHSM**. Performance varies based on which encryption algorithm is used and on how often you need to access or retrieve the keys to encrypt the data. Key management service performance is handled by Amazon and automatically scales as demand requires it. CloudHSM's performance is achieved by adding more appliances and if you need more performance you either add devices or alter the encryption method to the algorithm that is faster.
Genau wie bei der Skalierung liegt die **Leistung bei Ihnen mit CloudHSM**. Die Leistung variiert je nach verwendetem Verschlüsselungsalgorithmus und wie oft Sie auf die Schlüssel zugreifen oder sie abrufen müssen, um die Daten zu verschlüsseln. Die Leistung des Key Management Service wird von Amazon verwaltet und skaliert automatisch, wenn die Nachfrage es erfordert. Die Leistung von CloudHSM wird durch das Hinzufügen weiterer Geräte erreicht, und wenn Sie mehr Leistung benötigen, fügen Sie entweder Geräte hinzu oder ändern die Verschlüsselungsmethode auf den schnelleren Algorithmus.
If your solution is **multi-region**, you should add several **CloudHSM appliances in the second region and work out the cross-region connectivity with a private VPN connection** or some method to ensure the traffic is always protected between the appliance at every layer of the connection. If you have a multi-region solution you need to think about how to **replicate keys and set up additional CloudHSM devices in the regions where you operate**. You can very quickly get into a scenario where you have six or eight devices spread across multiple regions, enabling full redundancy of your encryption keys.
Wenn Ihre Lösung **multi-region** ist, sollten Sie mehrere **CloudHSM-Geräte in der zweiten Region hinzufügen und die interregionale Konnektivität mit einer privaten VPN-Verbindung** oder einer anderen Methode sicherstellen, um den Datenverkehr auf jeder Ebene der Verbindung immer zu schützen. Wenn Sie eine Multi-Region-Lösung haben, müssen Sie darüber nachdenken, wie Sie **Schlüssel replizieren und zusätzliche CloudHSM-Geräte in den Regionen einrichten, in denen Sie tätig sind**. Sie können sehr schnell in ein Szenario geraten, in dem Sie sechs oder acht Geräte über mehrere Regionen verteilt haben, was eine vollständige Redundanz Ihrer Verschlüsselungsschlüssel ermöglicht.
**CloudHSM** is an enterprise class service for secured key storage and can be used as a **root of trust for an enterprise**. It can store private keys in PKI and certificate authority keys in X509 implementations. In addition to symmetric keys used in symmetric algorithms such as AES, **KMS stores and physically protects symmetric keys only (cannot act as a certificate authority)**, so if you need to store PKI and CA keys a CloudHSM or two or three could be your solution.
**CloudHSM** ist ein Unternehmensdienst für die sichere Speicherung von Schlüsseln und kann als **Root of Trust für ein Unternehmen** verwendet werden. Es kann private Schlüssel in PKI und Schlüssel von Zertifizierungsstellen in X509-Implementierungen speichern. Neben symmetrischen Schlüsseln, die in symmetrischen Algorithmen wie AES verwendet werden, **speichert KMS nur symmetrische Schlüssel und schützt sie physisch (kann nicht als Zertifizierungsstelle fungieren)**, sodass, wenn Sie PKI- und CA-Schlüssel speichern müssen, ein oder zwei oder drei CloudHSMs Ihre Lösung sein könnten.
**CloudHSM is considerably more expensive than Key Management Service**. CloudHSM is a hardware appliance so you have fix costs to provision the CloudHSM device, then an hourly cost to run the appliance. The cost is multiplied by as many CloudHSM appliances that are required to achieve your specific requirements.\
Additionally, cross consideration must be made in the purchase of third party software such as SafeNet ProtectV software suites and integration time and effort. Key Management Service is a usage based and depends on the number of keys you have and the input and output operations. As key management provides seamless integration with many AWS services, integration costs should be significantly lower. Costs should be considered secondary factor in encryption solutions. Encryption is typically used for security and compliance.
**CloudHSM ist erheblich teurer als der Key Management Service**. CloudHSM ist ein Hardwaregerät, sodass Sie feste Kosten für die Bereitstellung des CloudHSM-Geräts haben, dann fallen stündliche Kosten für den Betrieb des Geräts an. Die Kosten werden mit der Anzahl der benötigten CloudHSM-Geräte multipliziert, um Ihre spezifischen Anforderungen zu erfüllen.\
Zusätzlich müssen beim Kauf von Drittanbietersoftware wie SafeNet ProtectV-Software-Suiten und Integrationszeit und -aufwand Überlegungen angestellt werden. Der Key Management Service basiert auf der Nutzung und hängt von der Anzahl der Schlüssel ab, die Sie haben, sowie von den Eingabe- und Ausgabeoperationen. Da das Key Management nahtlose Integration mit vielen AWS-Diensten bietet, sollten die Integrationskosten erheblich niedriger sein. Kosten sollten als sekundärer Faktor in Verschlüsselungslösungen betrachtet werden. Verschlüsselung wird typischerweise für Sicherheit und Compliance verwendet.
**With CloudHSM only you have access to the keys** and without going into too much detail, with CloudHSM you manage your own keys. **With KMS, you and Amazon co-manage your keys**. AWS does have many policy safeguards against abuse and **still cannot access your keys in either solution**. The main distinction is compliance as it pertains to key ownership and management, and with CloudHSM, this is a hardware appliance that you manage and maintain with exclusive access to you and only you.
**Mit CloudHSM haben nur Sie Zugriff auf die Schlüssel** und ohne zu sehr ins Detail zu gehen, verwalten Sie mit CloudHSM Ihre eigenen Schlüssel. **Mit KMS verwalten Sie und Amazon Ihre Schlüssel gemeinsam**. AWS hat viele Richtlinien-Schutzmaßnahmen gegen Missbrauch und **kann dennoch in keiner der beiden Lösungen auf Ihre Schlüssel zugreifen**. Der Hauptunterschied besteht in der Compliance in Bezug auf den Besitz und die Verwaltung von Schlüsseln, und mit CloudHSM handelt es sich um ein Hardwaregerät, das Sie verwalten und warten, mit exklusivem Zugriff nur für Sie.
### CloudHSM Suggestions
### CloudHSM Vorschläge
1. Always deploy CloudHSM in an **HA setup** with at least two appliances in **separate availability zones**, and if possible, deploy a third either on premise or in another region at AWS.
2. Be careful when **initializing** a **CloudHSM**. This action **will destroy the keys**, so either have another copy of the keys or be absolutely sure you do not and never, ever will need these keys to decrypt any data.
3. CloudHSM only **supports certain versions of firmware** and software. Before performing any update, make sure the firmware and or software is supported by AWS. You can always contact AWS support to verify if the upgrade guide is unclear.
4. The **network configuration should never be changed.** Remember, it's in a AWS data center and AWS is monitoring base hardware for you. This means that if the hardware fails, they will replace it for you, but only if they know it failed.
5. The **SysLog forward should not be removed or changed**. You can always **add** a SysLog forwarder to direct the logs to your own collection tool.
6. The **SNMP** configuration has the same basic restrictions as the network and SysLog folder. This **should not be changed or removed**. An **additional** SNMP configuration is fine, just make sure you do not change the one that is already on the appliance.
7. Another interesting best practice from AWS is **not to change the NTP configuration**. It is not clear what would happen if you did, so keep in mind that if you don't use the same NTP configuration for the rest of your solution then you could have two time sources. Just be aware of this and know that the CloudHSM has to stay with the existing NTP source.
1. Setzen Sie CloudHSM immer in einer **HA-Konfiguration** mit mindestens zwei Geräten in **getrennten Verfügbarkeitszonen** ein, und wenn möglich, setzen Sie ein drittes entweder vor Ort oder in einer anderen Region bei AWS ein.
2. Seien Sie vorsichtig, wenn Sie ein **CloudHSM** **initialisieren**. Diese Aktion **wird die Schlüssel zerstören**, also haben Sie entweder eine andere Kopie der Schlüssel oder seien Sie sich absolut sicher, dass Sie diese Schlüssel nicht benötigen und niemals benötigen werden, um Daten zu entschlüsseln.
3. CloudHSM unterstützt nur **bestimmte Versionen von Firmware** und Software. Stellen Sie vor einem Update sicher, dass die Firmware und/oder Software von AWS unterstützt wird. Sie können immer den AWS-Support kontaktieren, um zu überprüfen, ob der Upgrade-Leitfaden unklar ist.
4. Die **Netzwerkkonfiguration sollte niemals geändert werden.** Denken Sie daran, dass es sich in einem AWS-Rechenzentrum befindet und AWS die Basis-Hardware für Sie überwacht. Das bedeutet, dass sie die Hardware nur ersetzen, wenn sie wissen, dass sie ausgefallen ist.
5. Der **SysLog-Forwarder sollte nicht entfernt oder geändert** werden. Sie können immer einen SysLog-Forwarder hinzufügen, um die Protokolle an Ihr eigenes Sammlungstool weiterzuleiten.
6. Die **SNMP**-Konfiguration hat die gleichen grundlegenden Einschränkungen wie das Netzwerk und den SysLog-Ordner. Diese **sollte nicht geändert oder entfernt** werden. Eine **zusätzliche** SNMP-Konfiguration ist in Ordnung, stellen Sie nur sicher, dass Sie die bereits auf dem Gerät vorhandene nicht ändern.
7. Eine weitere interessante Best Practice von AWS ist, **die NTP-Konfiguration nicht zu ändern**. Es ist unklar, was passieren würde, wenn Sie dies tun, also denken Sie daran, dass, wenn Sie nicht dieselbe NTP-Konfiguration für den Rest Ihrer Lösung verwenden, Sie zwei Zeitquellen haben könnten. Seien Sie sich dessen bewusst und wissen Sie, dass das CloudHSM bei der bestehenden NTP-Quelle bleiben muss.
The initial launch charge for CloudHSM is $5,000 to allocate the hardware appliance dedicated for your use, then there is an hourly charge associated with running CloudHSM that is currently at $1.88 per hour of operation, or approximately $1,373 per month.
Die anfängliche Startgebühr für CloudHSM beträgt 5.000 USD, um das Hardwaregerät für Ihre Nutzung bereitzustellen, dann gibt es eine stündliche Gebühr für den Betrieb von CloudHSM, die derzeit bei 1,88 USD pro Betriebsstunde liegt, oder etwa 1.373 USD pro Monat.
The most common reason to use CloudHSM is compliance standards that you must meet for regulatory reasons. **KMS does not offer data support for asymmetric keys. CloudHSM does let you store asymmetric keys securely**.
Der häufigste Grund für die Verwendung von CloudHSM sind Compliance-Standards, die Sie aus regulatorischen Gründen erfüllen müssen. **KMS bietet keine Unterstützung für asymmetrische Schlüssel. CloudHSM ermöglicht es Ihnen, asymmetrische Schlüssel sicher zu speichern**.
The **public key is installed on the HSM appliance during provisioning** so you can access the CloudHSM instance via SSH.
Der **öffentliche Schlüssel wird während der Bereitstellung auf dem HSM-Gerät installiert**, sodass Sie auf die CloudHSM-Instanz über SSH zugreifen können.
### What is a Hardware Security Module
### Was ist ein Hardware Security Module
A hardware security module (HSM) is a dedicated cryptographic device that is used to generate, store, and manage cryptographic keys and protect sensitive data. It is designed to provide a high level of security by physically and electronically isolating the cryptographic functions from the rest of the system.
Ein Hardware-Sicherheitsmodul (HSM) ist ein dediziertes kryptografisches Gerät, das zur Generierung, Speicherung und Verwaltung kryptografischer Schlüssel und zum Schutz sensibler Daten verwendet wird. Es ist so konzipiert, dass es ein hohes Maß an Sicherheit bietet, indem es die kryptografischen Funktionen physisch und elektronisch vom Rest des Systems isoliert.
The way an HSM works can vary depending on the specific model and manufacturer, but generally, the following steps occur:
Die Funktionsweise eines HSM kann je nach spezifischem Modell und Hersteller variieren, aber im Allgemeinen treten die folgenden Schritte auf:
1. **Key generation**: The HSM generates a random cryptographic key using a secure random number generator.
2. **Key storage**: The key is **stored securely within the HSM, where it can only be accessed by authorized users or processes**.
3. **Key management**: The HSM provides a range of key management functions, including key rotation, backup, and revocation.
4. **Cryptographic operations**: The HSM performs a range of cryptographic operations, including encryption, decryption, digital signature, and key exchange. These operations are **performed within the secure environment of the HSM**, which protects against unauthorized access and tampering.
5. **Audit logging**: The HSM logs all cryptographic operations and access attempts, which can be used for compliance and security auditing purposes.
1. **Schlüsselgenerierung**: Das HSM generiert einen zufälligen kryptografischen Schlüssel mit einem sicheren Zufallszahlengenerator.
2. **Schlüsselspeicherung**: Der Schlüssel wird **sicher innerhalb des HSM gespeichert, wo er nur von autorisierten Benutzern oder Prozessen** abgerufen werden kann.
3. **Schlüsselverwaltung**: Das HSM bietet eine Reihe von Funktionen zur Schlüsselverwaltung, einschließlich Schlüsselrotation, Backup und Widerruf.
4. **Kryptografische Operationen**: Das HSM führt eine Reihe von kryptografischen Operationen durch, einschließlich Verschlüsselung, Entschlüsselung, digitale Signatur und Schlüsselaustausch. Diese Operationen werden **innerhalb der sicheren Umgebung des HSM** durchgeführt, die unbefugten Zugriff und Manipulation schützt.
5. **Audit-Protokollierung**: Das HSM protokolliert alle kryptografischen Operationen und Zugriffsversuche, die für Compliance- und Sicherheitsprüfungszwecke verwendet werden können.
HSMs can be used for a wide range of applications, including secure online transactions, digital certificates, secure communications, and data encryption. They are often used in industries that require a high level of security, such as finance, healthcare, and government.
HSMs können für eine Vielzahl von Anwendungen verwendet werden, einschließlich sicherer Online-Transaktionen, digitaler Zertifikate, sicherer Kommunikation und Datenverschlüsselung. Sie werden häufig in Branchen eingesetzt, die ein hohes Maß an Sicherheit erfordern, wie z.B. Finanzen, Gesundheitswesen und Regierung.
Overall, the high level of security provided by HSMs makes it **very difficult to extract raw keys from them, and attempting to do so is often considered a breach of security**. However, there may be **certain scenarios** where a **raw key could be extracted** by authorized personnel for specific purposes, such as in the case of a key recovery procedure.
Insgesamt macht das hohe Maß an Sicherheit, das von HSMs bereitgestellt wird, es **sehr schwierig, rohe Schlüssel von ihnen zu extrahieren, und der Versuch, dies zu tun, wird oft als Sicherheitsverletzung angesehen**. Es kann jedoch **bestimmte Szenarien** geben, in denen ein **roher Schlüssel** von autorisiertem Personal für spezifische Zwecke extrahiert werden könnte, wie im Falle eines Schlüsselwiederherstellungsverfahrens.
### Enumeration
```
TODO
```
{{#include ../../../banners/hacktricks-training.md}}