Ajout de la personnalisation X à DeepBlueHash
This commit is contained in:
206
README.md
206
README.md
@ -1,163 +1,153 @@
|
|||||||
# DeepBlueCLI
|
# DeepBlueCLI
|
||||||
|
|
||||||
DeepBlueCLI - a PowerShell Module for Threat Hunting via Windows Event Logs
|
DeepBlueCLI - un module PowerShell pour la chasse aux menaces (Threat Hunting) via les journaux d'événements Windows.
|
||||||
|
|
||||||
Eric Conrad, Backshore Communications, LLC
|
https://sahelcyber.com
|
||||||
|
|
||||||
deepblue `at` backshore `dot` net
|
Des exemples de fichiers EVTX se trouvent dans le répertoire `.\evtx`.
|
||||||
|
|
||||||
Twitter: [@eric_conrad](https://twitter.com/eric_conrad)
|
**Note :** Si votre antivirus s'affole après avoir téléchargé DeepBlueCLI, il réagit probablement aux fichiers EVTX inclus dans le répertoire `.\evtx` (qui contiennent des journaux de lignes de commande d'attaques malveillantes, entre autres artefacts). Les fichiers EVTX sont inoffensifs. Vous devrez peut-être configurer votre antivirus pour qu'il ignore le répertoire de DeepBlueCLI.
|
||||||
|
|
||||||
http://ericconrad.com
|
## Table des Matières
|
||||||
|
- [Utilisation](#usage)
|
||||||
|
- [Journaux d'événements Windows traités](#windows-event-logs-processed)
|
||||||
|
- [Événements détectés](#detected-events)
|
||||||
|
- [Exemples](#examples)
|
||||||
|
- [Sortie](#output)
|
||||||
|
- [Configuration de la journalisation](#logging-setup)
|
||||||
|
- Voir le [README de DeepBlue.py](READMEs/README-DeepBlue.py.md) pour les informations sur DeepBlue.py
|
||||||
|
- Voir le [README de DeepBlueHash](READMEs/README-DeepBlueHash.md) pour les informations sur DeepBlueHash (mise en liste blanche via les journaux Sysmon)
|
||||||
|
|
||||||
Sample EVTX files are in the .\evtx directory
|
## Usage :
|
||||||
|
|
||||||
**Note** If your antivirus freaks out after downloading DeepBlueCLI: it's likely reacting to the included EVTX files in the .\evtx directory (which contain command-line logs of malicious attacks, among other artifacts). EVTX files are not harmful. You may need to configure your antivirus to ignore the DeepBlueCLI directory.
|
`.\DeepBlue.ps1 <nom_journal_evenements> <nom_fichier_evtx>`
|
||||||
|
|
||||||
## Table of Contents
|
Consultez le [README sur Set-ExecutionPolicy](READMEs/Set-ExecutionPolicy.md) si vous recevez une erreur "l'exécution de scripts est désactivée sur ce système".
|
||||||
- [Usage](#usage)
|
|
||||||
- [Windows Event Logs processed](#windows-event-logs-processed)
|
|
||||||
- [Detected events](#detected-events)
|
|
||||||
- [Examples](#examples)
|
|
||||||
- [Output](#output)
|
|
||||||
- [Logging setup](#logging-setup)
|
|
||||||
- See the [DeepBlue.py Readme](READMEs/README-DeepBlue.py.md) for information on DeepBlue.py
|
|
||||||
- See the [DeepBlueHash Readme](READMEs/README-DeepBlueHash.md) for information on DeepBlueHash (detective safelisting using Sysmon event logs)
|
|
||||||
|
|
||||||
## Usage:
|
### Traiter le journal de sécurité local de Windows (PowerShell doit être exécuté en tant qu'Administrateur) :
|
||||||
|
|
||||||
`.\DeepBlue.ps1 <event log name> <evtx filename>`
|
|
||||||
|
|
||||||
See the [Set-ExecutionPolicy Readme](READMEs/Set-ExecutionPolicy.md) if you receive a 'running scripts is
|
|
||||||
disabled on this system' error.
|
|
||||||
|
|
||||||
### Process local Windows security event log (PowerShell must be run as Administrator):
|
|
||||||
|
|
||||||
`.\DeepBlue.ps1`
|
`.\DeepBlue.ps1`
|
||||||
|
|
||||||
or:
|
ou :
|
||||||
|
|
||||||
`.\DeepBlue.ps1 -log security`
|
`.\DeepBlue.ps1 -log security`
|
||||||
|
|
||||||
### Process local Windows system event log:
|
### Traiter le journal système local de Windows :
|
||||||
|
|
||||||
`.\DeepBlue.ps1 -log system`
|
`.\DeepBlue.ps1 -log system`
|
||||||
|
|
||||||
### Process evtx file:
|
### Traiter un fichier evtx :
|
||||||
|
|
||||||
`.\DeepBlue.ps1 .\evtx\new-user-security.evtx`
|
`.\DeepBlue.ps1 .\evtx\new-user-security.evtx`
|
||||||
|
|
||||||
## Windows Event Logs processed
|
## Journaux d'événements Windows traités
|
||||||
|
|
||||||
- Windows Security
|
- Sécurité Windows
|
||||||
- Windows System
|
- Système Windows
|
||||||
- Windows Application
|
- Application Windows
|
||||||
- Windows PowerShell
|
- Windows PowerShell
|
||||||
- Sysmon
|
- Sysmon
|
||||||
|
|
||||||
### Command Line Logs processed
|
### Journaux de ligne de commande traités
|
||||||
|
|
||||||
See [Logging setup](#logging-setup) section below for how to configure these logs
|
Voir la section [Configuration de la journalisation](#logging-setup) ci-dessous pour savoir comment configurer ces journaux.
|
||||||
|
|
||||||
- Windows Security event ID 4688
|
- Événement de sécurité Windows ID 4688
|
||||||
- Windows PowerShell event IDs 4103 and 4104
|
- Événements Windows PowerShell ID 4103 et 4104
|
||||||
- Sysmon event ID 1
|
- Événement Sysmon ID 1
|
||||||
|
|
||||||
## Detected events
|
## Événements détectés
|
||||||
|
|
||||||
* Suspicious account behavior
|
* Comportement de compte suspect
|
||||||
* User creation
|
* Création d'utilisateur
|
||||||
* User added to local/global/universal groups
|
* Utilisateur ajouté à des groupes locaux/globaux/universels
|
||||||
* Password guessing (multiple logon failures, one account)
|
* Tentatives de deviner le mot de passe (plusieurs échecs de connexion, un seul compte)
|
||||||
* Password spraying via failed logon (multiple logon failures, multiple accounts)
|
* Attaque par pulvérisation de mots de passe via échec de connexion (plusieurs échecs, plusieurs comptes)
|
||||||
* Password spraying via explicit credentials
|
* Attaque par pulvérisation de mots de passe via informations d'identification explicites
|
||||||
* Bloodhound (admin privileges assigned to the same account with multiple Security IDs)
|
* Bloodhound (privilèges d'administrateur attribués au même compte avec plusieurs ID de sécurité)
|
||||||
* Command line/Sysmon/PowerShell auditing
|
* Audit de la ligne de commande/Sysmon/PowerShell
|
||||||
* Long command lines
|
* Lignes de commande longues
|
||||||
* Regex searches
|
* Recherches par expressions régulières (Regex)
|
||||||
* Obfuscated commands
|
* Commandes obfusquées
|
||||||
* PowerShell launched via WMIC or PsExec
|
* PowerShell lancé via WMIC ou PsExec
|
||||||
* PowerShell Net.WebClient Downloadstring
|
* PowerShell Net.WebClient Downloadstring
|
||||||
* Compressed/Base64 encoded commands (with automatic decompression/decoding)
|
* Commandes compressées/encodées en Base64 (avec décompression/décodage automatique)
|
||||||
* Unsigned EXEs or DLLs
|
* EXE ou DLL non signés
|
||||||
* Service auditing
|
* Audit des services
|
||||||
* Suspicious service creation
|
* Création de service suspecte
|
||||||
* Service creation errors
|
* Erreurs de création de service
|
||||||
* Stopping/starting the Windows Event Log service (potential event log manipulation)
|
* Arrêt/démarrage du service Journal d'événements Windows (manipulation potentielle des journaux)
|
||||||
* Mimikatz
|
* Mimikatz
|
||||||
* `lsadump::sam`
|
* `lsadump::sam`
|
||||||
* EMET & Applocker Blocks
|
* Blocages EMET & Applocker
|
||||||
|
|
||||||
|
...et plus encore.
|
||||||
|
|
||||||
...and more
|
## Exemples
|
||||||
|
|
||||||
## Examples
|
| Événement | Commande |
|
||||||
|
|---|---|
|
||||||
|
| Manipulation du journal d'événements | `.\DeepBlue.ps1 .\evtx\disablestop-eventlog.evtx` |
|
||||||
|
| Cible native Metasploit (sécurité) | `.\DeepBlue.ps1 .\evtx\metasploit-psexec-native-target-security.evtx` |
|
||||||
|
| Cible native Metasploit (système) | `.\DeepBlue.ps1 .\evtx\metasploit-psexec-native-target-system.evtx` |
|
||||||
|
| Cible PowerShell Metasploit (sécurité) | `.\DeepBlue.ps1 .\evtx\metasploit-psexec-powershell-target-security.evtx` |
|
||||||
|
| Cible PowerShell Metasploit (système) | `.\DeepBlue.ps1 .\evtx\metasploit-psexec-powershell-target-system.evtx` |
|
||||||
|
| Mimikatz `lsadump::sam` | `.\DeepBlue.ps1 .\evtx\mimikatz-privesc-hashdump.evtx` |
|
||||||
|
| Création d'un nouvel utilisateur | `.\DeepBlue.ps1 .\evtx\new-user-security.evtx` |
|
||||||
|
| Obfuscation (encodage) | `.\DeepBlue.ps1 .\evtx\Powershell-Invoke-Obfuscation-encoding-menu.evtx` |
|
||||||
|
| Obfuscation (chaîne de caractères) | `.\DeepBlue.ps1 .\evtx\Powershell-Invoke-Obfuscation-string-menu.evtx` |
|
||||||
|
| Tentatives de deviner le mot de passe | `.\DeepBlue.ps1 .\evtx\smb-password-guessing-security.evtx` |
|
||||||
|
| Attaque par pulvérisation de mots de passe | `.\DeepBlue.ps1 .\evtx\password-spray.evtx` |
|
||||||
|
| PowerSploit (sécurité) | `.\DeepBlue.ps1 .\evtx\powersploit-security.evtx` |
|
||||||
|
| PowerSploit (système) | `.\DeepBlue.ps1 .\evtx\powersploit-system.evtx` |
|
||||||
|
| PSAttack | `.\DeepBlue.ps1 .\evtx\psattack-security.evtx` |
|
||||||
|
| Utilisateur ajouté au groupe administrateur| `.\DeepBlue.ps1 .\evtx\new-user-security.evtx` |
|
||||||
|
|
||||||
|Event|Command|
|
## Sortie
|
||||||
|-----|-------|
|
|
||||||
|Event log manipulation|`.\DeepBlue.ps1 .\evtx\disablestop-eventlog.evtx`|
|
|
||||||
|Metasploit native target (security)|`.\DeepBlue.ps1 .\evtx\metasploit-psexec-native-target-security.evtx`|
|
|
||||||
|Metasploit native target (system)|`.\DeepBlue.ps1 .\evtx\metasploit-psexec-native-target-system.evtx`|
|
|
||||||
|Metasploit PowerShell target (security)|` .\DeepBlue.ps1 .\evtx\metasploit-psexec-powershell-target-security.evtx`|
|
|
||||||
|Metasploit PowerShell target (system)|` .\DeepBlue.ps1 .\evtx\metasploit-psexec-powershell-target-system.evtx`|
|
|
||||||
|Mimikatz `lsadump::sam`|`.\DeepBlue.ps1 .\evtx\mimikatz-privesc-hashdump.evtx`|
|
|
||||||
|New user creation|`.\DeepBlue.ps1 .\evtx\new-user-security.evtx`|
|
|
||||||
|Obfuscation (encoding)|`.\DeepBlue.ps1 .\evtx\Powershell-Invoke-Obfuscation-encoding-menu.evtx`|
|
|
||||||
|Obfuscation (string)|`.\DeepBlue.ps1 .\evtx\Powershell-Invoke-Obfuscation-string-menu.evtx`|
|
|
||||||
|Password guessing|`.\DeepBlue.ps1 .\evtx\smb-password-guessing-security.evtx`|
|
|
||||||
|Password spraying|`.\DeepBlue.ps1 .\evtx\password-spray.evtx`|
|
|
||||||
|PowerSploit (security)|`.\DeepBlue.ps1 .\evtx\powersploit-security.evtx`|
|
|
||||||
|PowerSploit (system)|`.\DeepBlue.ps1 .\evtx\powersploit-system.evtx`|
|
|
||||||
|PSAttack|`.\DeepBlue.ps1 .\evtx\psattack-security.evtx`|
|
|
||||||
|User added to administrator group|`.\DeepBlue.ps1 .\evtx\new-user-security.evtx`|
|
|
||||||
|
|
||||||
## Output
|
DeepBlueCLI génère des objets PowerShell, permettant une variété de méthodes et de types de sortie, y compris JSON, HTML, CSV, etc.
|
||||||
|
|
||||||
DeepBlueCLI outputs in PowerShell objects, allowing a variety of output methods and types, including JSON, HTML, CSV, etc.
|
Par exemple :
|
||||||
|
|
||||||
For example:
|
| Type de Sortie | Syntaxe |
|
||||||
|
|---|---|
|
||||||
|
| CSV | `.\DeepBlue.ps1 .\evtx\psattack-security.evtx \| ConvertTo-Csv` |
|
||||||
|
| Format liste (défaut) | `.\DeepBlue.ps1 .\evtx\psattack-security.evtx \| Format-List` |
|
||||||
|
| Format tableau | `.\DeepBlue.ps1 .\evtx\psattack-security.evtx \| Format-Table` |
|
||||||
|
| GridView | `.\DeepBlue.ps1 .\evtx\psattack-security.evtx \| Out-GridView` |
|
||||||
|
| HTML | `.\DeepBlue.ps1 .\evtx\psattack-security.evtx \| ConvertTo-Html` |
|
||||||
|
| JSON | `.\DeepBlue.ps1 .\evtx\psattack-security.evtx \| ConvertTo-Json` |
|
||||||
|
| XML | `.\DeepBlue.ps1 .\evtx\psattack-security.evtx \| ConvertTo-Xml` |
|
||||||
|
|
||||||
|Output Type|Syntax|
|
## Configuration de la journalisation
|
||||||
|-----------|------|
|
|
||||||
|CSV|`.\DeepBlue.ps1 .\evtx\psattack-security.evtx \| ConvertTo-Csv`|
|
|
||||||
|Format list (default)|`.\DeepBlue.ps1 .\evtx\psattack-security.evtx \| Format-List`|
|
|
||||||
|Format table|`.\DeepBlue.ps1 .\evtx\psattack-security.evtx \| Format-Table`|
|
|
||||||
|GridView|`.\DeepBlue.ps1 .\evtx\psattack-security.evtx \| Out-GridView`|
|
|
||||||
|HTML|`.\DeepBlue.ps1 .\evtx\psattack-security.evtx \| ConvertTo-Html`|
|
|
||||||
|JSON|`.\DeepBlue.ps1 .\evtx\psattack-security.evtx \| ConvertTo-Json`|
|
|
||||||
|XML|`.\DeepBlue.ps1 .\evtx\psattack-security.evtx \| ConvertTo-Xml`|
|
|
||||||
|
|
||||||
## Logging setup
|
### Événement de sécurité 4688 (Audit de la ligne de commande) :
|
||||||
|
|
||||||
### Security event 4688 (Command line auditing):
|
Activez l'audit de la ligne de commande Windows : https://support.microsoft.com/fr-fr/kb/3004375
|
||||||
|
|
||||||
Enable Windows command-line auditing: https://support.microsoft.com/en-us/kb/3004375
|
### Événement de sécurité 4625 (Échecs de connexion) :
|
||||||
|
|
||||||
### Security event 4625 (Failed logons):
|
Nécessite l'audit des échecs de connexion : https://technet.microsoft.com/fr-fr/library/cc976395.aspx
|
||||||
|
|
||||||
Requires auditing logon failures: https://technet.microsoft.com/en-us/library/cc976395.aspx
|
### Audit PowerShell (PowerShell 5.0) :
|
||||||
### PowerShell auditing (PowerShell 5.0):
|
|
||||||
|
|
||||||
DeepBlueCLI uses module logging (PowerShell event 4103) and script block logging (4104). It does not use transcription.
|
DeepBlueCLI utilise la journalisation des modules (événement PowerShell 4103) et la journalisation des blocs de script (4104). Il n'utilise pas la transcription.
|
||||||
|
|
||||||
See: https://www.fireeye.com/blog/threat-research/2016/02/greater_visibilityt.html
|
Voir : https://www.fireeye.com/blog/threat-research/2016/02/greater_visibilityt.html
|
||||||
|
|
||||||
To get the PowerShell commandline (and not just script block) on Windows 7 through Windows 8.1, add the following to \Windows\System32\WindowsPowerShell\v1.0\profile.ps1
|
Pour obtenir la ligne de commande PowerShell (et pas seulement le bloc de script) sur Windows 7 jusqu'à Windows 8.1, ajoutez ce qui suit à `\Windows\System32\WindowsPowerShell\v1.0\profile.ps1` :
|
||||||
```
|
```powershell
|
||||||
$LogCommandHealthEvent = $true
|
$LogCommandHealthEvent = $true
|
||||||
$LogCommandLifecycleEvent = $true
|
$LogCommandLifecycleEvent = $true
|
||||||
```
|
|
||||||
See the following for more information:
|
|
||||||
- https://logrhythm.com/blog/powershell-command-line-logging/
|
|
||||||
- http://hackerhurricane.blogspot.com/2014/11/i-powershell-logging-what-everyone.html
|
|
||||||
|
|
||||||
Thank you: [@heinzarelli](https://twitter.com/heinzarelli) and [@HackerHurricane](https://twitter.com/hackerhurricane)
|
Consultez les liens suivants pour plus d'informations :
|
||||||
|
- https://logrhythm.com/blog/powershell-command-line-logging/
|
||||||
|
- http://hackerhurricane.blogspot.com/2014/11/i-powershell-logging-what-everyone.html
|
||||||
|
|
||||||
### Sysmon
|
Sysmon
|
||||||
|
|
||||||
Install Sysmon from Sysinternals: https://docs.microsoft.com/en-us/sysinternals/downloads/sysmon
|
Installez Sysmon depuis Sysinternals : https://docs.microsoft.com/fr-fr/sysinternals/downloads/sysmon
|
||||||
|
|
||||||
DeepBlue and DeepBlueHash currently use Sysmon events, 1, 6 and 7.
|
DeepBlue et DeepBlueHash utilisent actuellement les événements Sysmon 1, 6 et 7.
|
||||||
|
|
||||||
Log SHA256 hashes. Others are fine; DeepBlueHash will use SHA256.
|
|
||||||
|
|
||||||
|
Journalisez les hachages SHA256. Les autres sont acceptables ; DeepBlueHash utilisera SHA256.
|
@ -1,23 +1,22 @@
|
|||||||
# DeepBlue.py
|
# DeepBlue.py
|
||||||
|
|
||||||
DeepBlueCLI, ported to Python. Designed for parsing evtx files on Unix/Linux.
|
DeepBlueCLI, porté en Python. Conçu pour analyser les fichiers `evtx` sur Unix/Linux.
|
||||||
|
|
||||||
Current version: alpha. It supports command line parsing for Security event log 4688, PowerShell log 4014, and Sysmon log 1. Will be porting more functionality from DeepBlueCLI after DerbyCon 7.
|
Version actuelle : alpha. Il supporte l'analyse en ligne de commande pour le journal de sécurité (ID 4688), le journal PowerShell (ID 4014) et le journal Sysmon (ID 1). D'autres fonctionnalités de DeepBlueCLI seront portées après la conférence DerbyCon 7.
|
||||||
|
|
||||||
## libevtx
|
## libevtx
|
||||||
|
|
||||||
Requires libevtx: https://github.com/libyal/libevtx
|
Ce projet nécessite `libevtx` pour fonctionner.
|
||||||
|
Lien : https://github.com/libyal/libevtx
|
||||||
|
|
||||||
## Other evtx frameworks
|
## Autres frameworks evtx
|
||||||
|
|
||||||
Note that I tested a few Unix/Linux/Python evtx frameworks.
|
Notez que j'ai testé plusieurs frameworks `evtx` pour Unix/Linux/Python.
|
||||||
|
|
||||||
This is quite popular: https://github.com/williballenthin/python-evtx
|
Celui-ci est assez populaire : https://github.com/williballenthin/python-evtx
|
||||||
|
|
||||||
I ran into trouble with *some* .evtx files, where it would crash with this error:
|
J'ai rencontré des problèmes avec *certains* fichiers `.evtx`, où il plantait avec cette erreur :
|
||||||
|
|
||||||
```
|
|
||||||
UnicodeDecodeError: 'utf16' codec can't decode bytes in position 0-1: illegal UTF-16 surrogate
|
UnicodeDecodeError: 'utf16' codec can't decode bytes in position 0-1: illegal UTF-16 surrogate
|
||||||
```
|
|
||||||
|
|
||||||
I found libevtx 'just worked', and had the added benefit of both Python and compiled options.
|
J'ai trouvé que `libevtx` "fonctionnait tout simplement", avec l'avantage supplémentaire d'offrir des options à la fois en Python et compilées.
|
@ -1,76 +1,68 @@
|
|||||||
# DeepBlueHash
|
# DeepBlueHash
|
||||||
|
|
||||||
Detective safelisting using Sysmon event logs.
|
Mise en liste blanche ("safelisting") de type "détective" en utilisant les journaux d'événements Sysmon.
|
||||||
|
|
||||||
Parses the Sysmon event logs, grabbing the SHA256 hashes from process creation (event 1), driver load (event 6, sys), and image load (event 7, DLL) events.
|
Ce script analyse les journaux d'événements Sysmon, récupérant les hachages SHA256 des événements de création de processus (événement 1), de chargement de pilote (événement 6, .sys), et de chargement d'image (événement 7, .dll).
|
||||||
|
|
||||||
## VirusTotal and Safelisting setup
|
## Configuration de VirusTotal et de la liste blanche
|
||||||
|
|
||||||
**Note**: Virustotal has changed their free API for some users. My old account has this limitation:
|
**Note** : Virustotal a modifié son API gratuite pour certains utilisateurs. Mon ancien compte a cette limitation :
|
||||||
|
|
||||||
- Daily quota 1 lookups / day
|
- Quota journalier : 1 requête / jour
|
||||||
- Monthly quota 31 lookups / month
|
- Quota mensuel : 31 requêtes / mois
|
||||||
|
|
||||||
New accounts get this:
|
Les nouveaux comptes obtiennent ceci :
|
||||||
|
|
||||||
- Request rate 4 lookups / min
|
- Taux de requêtes : 4 requêtes / min
|
||||||
- Daily quota 500 lookups / day
|
- Quota journalier : 500 requêtes / jour
|
||||||
- Monthly quota 15.5 K lookups / month
|
- Quota mensuel : 15 500 requêtes / mois
|
||||||
|
|
||||||
Not sure why that is, so FYI.
|
Je ne suis pas sûr de la raison de ce changement, donc c'est pour votre information.
|
||||||
|
|
||||||
Setting up VirusTotal hash submissions and safelisting:
|
Mise en place des soumissions de hachages à VirusTotal et de la liste blanche :
|
||||||
|
|
||||||
The hash checker requires VirusTotalAnalyzer: https://github.com/EvotecIT/VirusTotalAnalyzer
|
Le vérificateur de hachage nécessite VirusTotalAnalyzer : https://github.com/EvotecIT/VirusTotalAnalyzer
|
||||||
|
|
||||||
It also requires a VirusTotal API key:
|
Il nécessite également une clé d'API VirusTotal :
|
||||||
|
|
||||||
- https://www.virustotal.com/en/documentation/public-api/
|
- https://www.virustotal.com/en/documentation/public-api/
|
||||||
|
|
||||||
The script assumes a personal API key, and waits 15 seconds between submissions.
|
Le script suppose une clé d'API personnelle et attend 15 secondes entre les soumissions.
|
||||||
|
|
||||||
## Sysmon setup
|
## Configuration de Sysmon
|
||||||
|
|
||||||
Sysmon is required: https://docs.microsoft.com/en-us/sysinternals/downloads/sysmon
|
Sysmon est requis : https://docs.microsoft.com/fr-fr/sysinternals/downloads/sysmon
|
||||||
|
|
||||||
Must log the SHA256 hash, DeepBlueHash will ignore the others.
|
Il doit journaliser le hachage SHA256, DeepBlueHash ignorera les autres.
|
||||||
|
|
||||||
This minimal Sysmon 6.0 config will log the proper events/hashes. Note that image (DLL) logging may create performance issues. This config ignores DLLs signed by Microsoft (which should lighten the load), but please test!
|
Cette configuration minimale de Sysmon 6.0 journalisera les événements/hachages appropriés. Notez que la journalisation des images (.dll) peut créer des problèmes de performance. Cette configuration ignore les DLL signées par Microsoft (ce qui devrait alléger la charge), mais veuillez tester !
|
||||||
|
|
||||||
```xml
|
```xml
|
||||||
<Sysmon schemaversion="3.3">
|
<Sysmon schemaversion="3.3">
|
||||||
<!-- Capture SHA256 hashes only -->
|
<HashAlgorithms>SHA256</HashAlgorithms>
|
||||||
<HashAlgorithms>SHA256</HashAlgorithms>
|
<EventFiltering>
|
||||||
<EventFiltering>
|
<DriverLoad onmatch="exclude">
|
||||||
<!-- Log all drivers (.sys) except if the signature contains Microsoft or Windows -->
|
<Signature condition="contains">microsoft</Signature>
|
||||||
<DriverLoad onmatch="exclude">
|
<Signature condition="contains">windows</Signature>
|
||||||
<Signature condition="contains">microsoft</Signature>
|
</DriverLoad>
|
||||||
<Signature condition="contains">windows</Signature>
|
<ImageLoad onmatch="exclude">
|
||||||
</DriverLoad>
|
<Signature condition="contains">microsoft</Signature>
|
||||||
<!-- Log all images (.dll) except if the signature contains Microsoft or Windows -->
|
<Signature condition="contains">windows</Signature>
|
||||||
<!-- Note: this may create a performance issue, please test -->
|
</ImageLoad>
|
||||||
<ImageLoad onmatch="exclude">
|
<ProcessTerminate onmatch="include" />
|
||||||
<Signature condition="contains">microsoft</Signature>
|
<ProcessCreate onmatch="exclude" />
|
||||||
<Signature condition="contains">windows</Signature>
|
</EventFiltering>
|
||||||
</ImageLoad>
|
|
||||||
<!-- Do not log process termination -->
|
|
||||||
<ProcessTerminate onmatch="include" />
|
|
||||||
<!-- Log process creation -->
|
|
||||||
<ProcessCreate onmatch="exclude" />
|
|
||||||
</EventFiltering>
|
|
||||||
</Sysmon>
|
</Sysmon>
|
||||||
```
|
|
||||||
These are the events used by DeepBlueCLI and DeepBlueHash.
|
|
||||||
|
|
||||||
You can go *much* further than this with Sysmon. The Sysinternals Sysmon page has a good basic configuration: https://docs.microsoft.com/en-us/sysinternals/downloads/sysmon
|
Ce sont les événements utilisés par DeepBlueCLI et DeepBlueHash.
|
||||||
|
|
||||||
Also see @swiftonsecurity's awesome Sysmon config here: https://github.com/SwiftOnSecurity/sysmon-config
|
Vous pouvez aller beaucoup plus loin que cela avec Sysmon. La page Sysmon de Sysinternals a une bonne configuration de base : https://docs.microsoft.com/fr-fr/sysinternals/downloads/sysmon
|
||||||
|
|
||||||
## Generating a Safelist
|
Consultez également l'excellente configuration Sysmon de @swiftonsecurity ici : https://github.com/SwiftOnSecurity/sysmon-config
|
||||||
|
|
||||||
Generate a custom safelist on Windows (note: this is optional):
|
Générer une liste blanche (Safelist)
|
||||||
|
Générez une liste blanche personnalisée sur Windows (note : c'est optionnel) :
|
||||||
|
|
||||||
```
|
|
||||||
PS C:\> Get-ChildItem c:\windows\system32 -Include '*.exe','*.dll','*.sys','*.com' -Recurse | Get-FileHash| Export-Csv -Path safelist.csv
|
PS C:\> Get-ChildItem c:\windows\system32 -Include '*.exe','*.dll','*.sys','*.com' -Recurse | Get-FileHash| Export-Csv -Path safelist.csv
|
||||||
```
|
|
||||||
Note: this will generate (harmless) 'PermissionDenied' warnings for locked files, etc. They may be ignored.
|
Note : cela générera des avertissements (inoffensifs) de type 'PermissionDenied' pour les fichiers verrouillés, etc. Ils peuvent être ignorés.
|
@ -1,15 +1,13 @@
|
|||||||
## Set-ExecutionPolicy
|
## Set-ExecutionPolicy
|
||||||
|
|
||||||
If you see this error: `.\DeepBlue.ps1 : File .\DeepBlue.ps1 cannot be loaded because running scripts is
|
Si vous rencontrez cette erreur : `.\DeepBlue.ps1 : File .\DeepBlue.ps1 cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at http://go.microsoft.com/fwlink/?LinkID=135170.`
|
||||||
disabled on this system. For more information, see about_Execution_Policies at
|
|
||||||
http://go.microsoft.com/fwlink/?LinkID=135170.`
|
|
||||||
|
|
||||||
You must run Set-ExecutionPolicy as Administrator, here is an example (this will warn every time you run a ps1 script):
|
Vous devez exécuter `Set-ExecutionPolicy` en tant qu'**Administrateur**. Voici un exemple (cette commande vous avertira à chaque fois que vous exécuterez un script .ps1) :
|
||||||
|
|
||||||
`Set-ExecutionPolicy RemoteSigned`
|
`Set-ExecutionPolicy RemoteSigned`
|
||||||
|
|
||||||
This command will bypass Set-Execution entirely: `Set-ExecutionPolicy Bypass`
|
Cette commande contournera complètement la politique d'exécution : `Set-ExecutionPolicy Bypass`
|
||||||
|
|
||||||
See `get-help Set-ExecutionPolicy` for more options.
|
Consultez `get-help Set-ExecutionPolicy` pour plus d'options.
|
||||||
|
|
||||||
Please note that "Set-ExecutionPolicy is not a security control" (quoting [@Ben0xA](https://twitter.com/ben0xa))
|
Veuillez noter que "Set-ExecutionPolicy n'est pas un contrôle de sécurité" (citation de [@Ben0xA](https://twitter.com/ben0xa)).
|
Reference in New Issue
Block a user