
Ricerca e analisi rapida degli artefatti forensi di Windows
Chainsaw fornisce una potente capacità di 'first-response' per identificare rapidamente minacce all'interno di artefatti forensi di Windows come i registri eventi e il file MFT. Chainsaw offre un metodo generico e veloce per cercare attraverso i registri eventi per parole chiave, e per identificare minacce utilizzando il supporto integrato per le regole di rilevamento Sigma, e tramite regole di rilevamento personalizzate di Chainsaw.
Informazioni estese sono disponibili nella Wiki di questo strumento: https://github.com/WithSecureLabs/chainsaw/wiki
Presso WithSecure Countercept, acquisiamo un'ampia gamma di fonti di telemetria dagli endpoint tramite il nostro agente EDR per fornire il nostro servizio di rilevamento e risposta gestiti. Tuttavia, ci sono circostanze in cui dobbiamo analizzare rapidamente artefatti forensi che non sono stati catturati dal nostro EDR, un esempio comune è rappresentato dalle indagini di risposta agli incidenti su un'infrastruttura dove il nostro EDR non era installato al momento della compromissione. Chainsaw è stato creato per fornire ai nostri threat hunter e consulenti di risposta agli incidenti uno strumento per eseguire un rapido triage degli artefatti forensi in queste circostanze.
I registri eventi di Windows forniscono una ricca fonte di informazioni forensi per il threat hunting e le indagini di risposta agli incidenti. Sfortunatamente, l'elaborazione e la ricerca attraverso i registri eventi può essere un processo lento e dispendioso in termini di tempo, e nella maggior parte dei casi richiede il sovraccarico di infrastrutture circostanti – come uno stack ELK o un'istanza Splunk – per cacciare efficientemente attraverso i dati dei registri e applicare la logica di rilevamento. Questo sovraccarico spesso significa che i blue team non sono in grado di eseguire rapidamente il triage dei registri eventi di Windows per fornire la direzione e le conclusioni necessarie a far progredire le loro indagini. Chainsaw risolve il problema poiché consente la rapida ricerca e caccia attraverso i registri eventi di Windows.
Al momento della scrittura, ci sono pochissimi strumenti open-source e standalone che forniscono un metodo semplice e veloce per il triage dei registri eventi di Windows, identificando elementi interessanti all'interno dei registri e applicando un formato di regole di logica di rilevamento (come Sigma) per rilevare segni di attività malevola. Nei nostri test, gli strumenti esistenti faticavano ad applicare efficientemente la logica di rilevamento a grandi volumi di registri eventi, rendendoli inadatti a scenari in cui è richiesto un triage rapido.
Utilizzando i parametri --sigma e --mapping è possibile specificare una directory contenente un sottoinsieme di regole di rilevamento SIGMA (o semplicemente l'intero repository git SIGMA) e chainsaw caricherà, convertirà ed eseguirà automaticamente queste regole contro i registri eventi forniti. Il file di mapping indica a chainsaw quali campi nei registri eventi utilizzare per la corrispondenza delle regole. Per impostazione predefinita, Chainsaw supporta un'ampia gamma di tipi di registri eventi, inclusi ma non limitati a:
| Tipo di evento | ID evento |
|---|---|
| Process Creation (Sysmon) | 1 |
| Network Connections (Sysmon) | 3 |
| Image Loads (Sysmon) | 7 |
| File Creation (Sysmon) | 11 |
| Registry Events (Sysmon) | 13 |
| Powershell Script Blocks | 4104 |
| Process Creation | 4688 |
| Scheduled Task Creation | 4698 |
| Service Creation | 7045 |
Consulta il file di mapping per l'elenco completo dei campi utilizzati per il rilevamento delle regole, e sentiti libero di estenderlo secondo le tue esigenze.
Oltre a supportare le regole sigma, Chainsaw supporta anche un formato di regole personalizzato. Nel repository troverai una directory rules che contiene varie regole di Chainsaw che consentono agli utenti di:
Con il rilascio di Chainsaw v2, abbiamo deciso di non includere più i repository Sigma Rules e EVTX-Attack-Samples come sottomoduli di Chainsaw. Consigliamo di clonare questi repository separatamente per assicurarti di avere le versioni più recenti.
Se hai ancora bisogno di un pacchetto tutto-in-uno contenente il binario di Chainsaw, le regole Sigma e i registri eventi di esempio, puoi scaricarlo dalla sezione releases di questo repository GitHub. In questa sezione releases troverai anche versioni precompilate solo binario di Chainsaw per varie piattaforme e architetture.
Se vuoi compilare Chainsaw da solo, puoi clonare il repository di Chainsaw:
git clone https://github.com/WithSecureLabs/chainsaw.git
e compilare il codice da solo eseguendo: cargo build --release. Una volta terminata la build, troverai una copia del binario compilato nella cartella target/release.
Assicurati di compilare con il flag --release poiché questo garantirà un tempo di esecuzione significativamente più veloce.
Se vuoi vedere rapidamente come appare Chainsaw quando viene eseguito, puoi clonare i repository Sigma Rules e EVTX-Attack-Samples:``` git clone https://github.com/SigmaHQ/sigma git clone https://github.com/sbousseaden/EVTX-ATTACK-SAMPLES.git
e poi esegui Chainsaw con i parametri seguenti:```
./chainsaw hunt EVTX-ATTACK-SAMPLES/ -s sigma/ --mapping mappings/sigma-event-logs-all.yml
├───devShells │ └───x86_64-linux │ └───default: development environment 'nix-shell' ├───formatter │ └───x86_64-linux: package 'alejandra-3.1.0' └───packages └───x86_64-linux ├───chainsaw: package 'chainsaw-2.10.1' └───default: package 'chainsaw-2.10.1'
Chainsaw, come pacchetto, è disponibile tramite [nixpkgs](https://search.nixos.org/packages?query=chainsaw).
Se stai usando NixOS, aggiungi semplicemente `chainsaw` al tuo file di configurazione del sistema.
Tuttavia, se non stai usando NixOS, puoi comunque installare Chainsaw tramite Nix. Il metodo consigliato è tramite `nix-shell`, che modificherà temporaneamente la tua variabile d'ambiente $PATH.
Per farlo, esegui il seguente comando:```
nix-shell -p chainsaw
Puoi anche sfruttare il fatto che questo repo è un flake, e puoi eseguire quanto segue:``` nix profile install github:WithSecureLabs/chainsaw
Tuttavia, se vuoi compilare chainsaw da solo, usando Nix, puoi ancora una volta utilizzare `flake.nix`, che è fornito con questo repository.
Per compilare il binario, esegui il seguente comando, nella directory root del repository clonato```
nix build .#
Questo creerà la directory ./result, con il binario chainsaw situato in ./result/bin/chainsaw.
Quando si scarica e si esegue chainsaw, è possibile che il proprio motore EDR / AntiVirus locale rilevi Chainsaw come malevolo. Puoi vedere esempi di questo nelle seguenti issue di GitHub: Esempio1, Esempio2.
Questi avvisi sono tipicamente dovuti ai log di eventi di esempio e/o alle regole Sigma che contengono riferimenti a stringhe malevole (ad es. "mimikatz"). Abbiamo anche visto casi in cui il binario di Chainsaw è stato rilevato da un piccolo sottoinsieme di motori Anti-Virus, probabilmente a causa di una qualche forma di rilevamento euristico.
Nel luglio 2022 abbiamo rilasciato la versione 2 di Chainsaw, che rappresenta una revisione importante del funzionamento di Chainsaw. Chainsaw v2 contiene diversi miglioramenti significativi, tra cui il seguente elenco di punti salienti:
Se desideri comunque utilizzare la versione 1 di Chainsaw, puoi trovare i binari compilati nella sezione releases, oppure puoi accedere al codice sorgente nel branch v1.x.x. Tieni presente che Chainsaw v1 non è più mantenuto e tutti gli utenti dovrebbero passare a Chainsaw v2.
Un enorme ringraziamento a @AlexKornitzer che è riuscito a trasformare il codebase del "Christmas Project" di Chainsaw v1 in un prodotto rifinito nella v2.
USAGE:
chainsaw search [FLAGS] [OPTIONS] <pattern> [--] [path]...
FLAGS:
-h, --help Prints help information
-i, --ignore-case Ignore the case when searching patterns
--json Print the output in json format
--load-unknown Allow chainsaw to try and load files it cannot identify
--local Output the timestamp using the local machine's timestamp
-q Suppress informational output
--skip-errors Continue to search when an error is encountered
-V, --version Prints version information
OPTIONS:
--extension <extension>... Only search through files with the provided extension
--from <from> The timestamp to search from. Drops any documents older than the value provided
-o, --output <output> The path to output results to
-e, --regex <pattern>... A string or regular expression pattern to search for
-t, --tau <tau>... Tau expressions to search with. e.g. 'Event.System.EventID: =4104'
--timestamp <timestamp> The field that contains the timestamp
--timezone <timezone> Output the timestamp using the timezone provided
--to <to> The timestamp to search up to. Drops any documents newer than the value provided
ARGS:
<pattern> A string or regular expression pattern to search for. Not used when -e or -t is specified
<path>... The paths containing event logs to load and hunt through
Cerca in tutti i file .evtx la stringa "mimikatz" senza distinzione tra maiuscole e minuscole
./chainsaw search mimikatz -i evtx_attack_samples/
*Cerca in tutti i file .evtx gli eventi powershell script block (Event ID 4014)
./chainsaw search -t 'Event.System.EventID: =4104' evtx_attack_samples/
Cerca in uno specifico log evtx gli eventi di logon, con un pattern regex corrispondente, output in formato JSON
./chainsaw search -e "DC[0-9].insecurebank.local" evtx_attack_samples --json
USAGE:
chainsaw hunt [FLAGS] [OPTIONS] [--] [path]...
FLAGS:
--csv Print the output in csv format
--full Print the full values for the tabular output
-h, --help Prints help information
--json Print the output in json format
--load-unknown Allow chainsaw to try and load files it cannot identify
--local Output the timestamp using the local machine's timestamp
--log Print the output in log like format
--metadata Display additional metadata in the tablar output
-q Suppress informational output
--skip-errors Continue to hunt when an error is encountered
-V, --version Prints version information
OPTIONS:
--column-width <column-width> Set the column width for the tabular output
--extension <extension>... Only hunt through files with the provided extension
--from <from> The timestamp to hunt from. Drops any documents older than the value provided
--kind <kind>... Restrict loaded rules to specified kinds
--level <level>... Restrict loaded rules to specified levels
-m, --mapping <mapping>... A mapping file to tell Chainsaw how to use third-party rules
-o, --output <output> A path to output results to
-r, --rule <rule>... A path containing additional rules to hunt with
-s, --sigma <sigma>... A path containing Sigma rules to hunt with
--status <status>... Restrict loaded rules to specified statuses
--timezone <timezone> Output the timestamp using the timezone provided
--to <to> The timestamp to hunt up to. Drops any documents newer than the value provided
ARGS:
<rules> The path to a collection of rules to use for hunting
<path>... The paths containing event logs to load and hunt through
Esegui l'hunt su tutti i file evtx utilizzando le regole Sigma come logica di rilevamento
./chainsaw hunt evtx_attack_samples/ -s sigma/ --mapping mappings/sigma-event-logs-all.yml
Esegui l'hunt su tutti i file evtx utilizzando le regole Sigma e le regole Chainsaw come logica di rilevamento e output in formato CSV nella cartella results
./chainsaw hunt evtx_attack_samples/ -s sigma/ --mapping mappings/sigma-event-logs-all.yml -r rules/ --csv --output results
Esegui l'hunt su tutti i file evtx utilizzando le regole Sigma come logica di rilevamento, cerca solo tra timestamp specifici e output dei risultati in formato JSON
./chainsaw hunt evtx_attack_samples/ -s sigma/ --mapping mappings/sigma-event-logs-all.yml --from "2019-03-17T19:09:39" --to "2019-03-17T19:09:50" --json
$ ./chainsaw hunt -r rules/ evtx_attack_samples -s sigma/rules --mapping mappings/sigma-event-logs-all.yml --level critical
██████╗██╗ ██╗ █████╗ ██╗███╗ ██╗███████╗ █████╗ ██╗ ██╗
██╔════╝██║ ██║██╔══██╗██║████╗ ██║██╔════╝██╔══██╗██║ ██║
██║ ███████║███████║██║██╔██╗ ██║███████╗███████║██║ █╗ ██║
██║ ██╔══██║██╔══██║██║██║╚██╗██║╚════██║██╔══██║██║███╗██║
╚██████╗██║ ██║██║ ██║██║██║ ╚████║███████║██║ ██║╚███╔███╔╝
╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚═╝ ╚═══╝╚══════╝╚═╝ ╚═╝ ╚══╝╚══╝
By WithSecure Countercept (@FranticTyping, @AlexKornitzer)
[+] Loading detection rules from: ../../rules/, /tmp/sigma/rules
[+] Loaded 129 detection rules (198 not loaded)
[+] Loading event logs from: ../../evtx_attack_samples (extensions: .evtx)
[+] Loaded 268 EVTX files (37.5 MB)
[+] Hunting: [========================================] 268/268
[+] Group: Antivirus
┌─────────────────────┬────────────────────┬──────────┬───────────┬─────────────┬────────────────────────────────┬──────────────────────────────────┬────────────────────┐
│ timestamp │ detections │ Event ID │ Record ID │ Computer │ Threat Name │ Threat Path │ User │
├─────────────────────┼────────────────────┼──────────┼───────────┼─────────────┼────────────────────────────────┼──────────────────────────────────┼────────────────────┤
│ 2019-07-18 20:40:00 │ ‣ Windows Defender │ 1116 │ 37 │ MSEDGEWIN10 │ Trojan:PowerShell/Powersploit. │ file:_C:\AtomicRedTeam\atomic- │ MSEDGEWIN10\IEUser │
│ │ │ │ │ │ M │ red-team-master\atomics\T1056\ │ │
│ │ │ │ │ │ │ Get-Keystrokes.ps1 │ │
├─────────────────────┼────────────────────┼──────────┼───────────┼─────────────┼────────────────────────────────┼──────────────────────────────────┼────────────────────┤
│ 2019-07-18 20:53:31 │ ‣ Windows Defender │ 1117 │ 106 │ MSEDGEWIN10 │ Trojan:XML/Exeselrun.gen!A │ file:_C:\AtomicRedTeam\atomic- │ MSEDGEWIN10\IEUser │
│ │ │ │ │ │ │ red-team-master\atomics\T1086\ │ │
│ │ │ │ │ │ │ payloads\test.xsl │ │
└─────────────────────┴────────────────────┴──────────┴───────────┴─────────────┴────────────────────────────────┴──────────────────────────────────┴────────────────────┘
[+] Group: Log Tampering
┌─────────────────────┬───────────────────────────────┬──────────┬───────────┬────────────────────────────────┬───────────────┐
│ timestamp │ detections │ Event ID │ Record ID │ Computer │ User │
├─────────────────────┼───────────────────────────────┼──────────┼───────────┼────────────────────────────────┼───────────────┤
│ 2019-01-20 07:00:50 │ ‣ Security Audit Logs Cleared │ 1102 │ 32853 │ WIN-77LTAPHIQ1R.example.corp │ Administrator │
└─────────────────────┴───────────────────────────────┴──────────┴───────────┴────────────────────────────────┴───────────────┘[+] Group: Sigma
┌─────────────────────┬────────────────────────────────┬───────┬────────────────────────────────┬──────────┬───────────┬──────────────────────────┬──────────────────────────────────┐
│ timestamp │ detections │ count │ Event.System.Provider │ Event ID │ Record ID │ Computer │ Event Data │
├─────────────────────┼────────────────────────────────┼───────┼────────────────────────────────┼──────────┼───────────┼──────────────────────────┼──────────────────────────────────┤
│ 2019-04-29 20:59:14 │ ‣ Malicious Named Pipe │ 1 │ Microsoft-Windows-Sysmon │ 18 │ 8046 │ IEWIN7 │ --- │
│ │ │ │ │ │ │ │ Image: System │
│ │ │ │ │ │ │ │ PipeName: "\\46a676ab7f179e511 │
│ │ │ │ │ │ │ │ e30dd2dc41bd388" │
│ │ │ │ │ │ │ │ ProcessGuid: 365ABB72-D9C4-5CC │
│ │ │ │ │ │ │ │ 7-0000-0010EA030000 │
│ │ │ │ │ │ │ │ ProcessId: 4 │
│ │ │ │ │ │ │ │ RuleName: "" │
│ │ │ │ │ │ │ │ UtcTime: "2019-04-29 20:59:14. │
│ │ │ │ │ │ │ │ 430" │
├─────────────────────┼────────────────────────────────┼───────┼────────────────────────────────┼──────────┼───────────┼──────────────────────────┼──────────────────────────────────┤
│ 2019-04-30 20:26:51 │ ‣ CobaltStrike Service │ 1 │ Microsoft-Windows-Sysmon │ 13 │ 9806 │ IEWIN7 │ --- │
│ │ Installations in Registry │ │ │ │ │ │ Details: "%%COMSPEC%% /b /c st │
│ │ │ │ │ │ │ │ art /b /min powershell.exe -no │
│ │ │ │ │ │ │ │ p -w hidden -noni -c \"if([Int │
│ │ │ │ │ │ │ │ Ptr]::Size -eq 4){$b='powershe │
│ │ │ │ │ │ │ │ ll.exe'}else{$b=$env:windir+'\ │
│ │ │ │ │ │ │ │ \syswow64\\WindowsPowerShell\\ │
│ │ │ │ │ │ │ │ v1.0\\powershell.exe'};$s=New- │
│ │ │ │ │ │ │ │ Object System.Diagnostics.Proc │
│ │ │ │ │ │ │ │ essStartInfo;$s.FileName=$b;$s │
│ │ │ │ │ │ │ │ .Arguments='-noni -nop -w hidd │
│ │ │ │ │ │ │ │ en -c &([scriptblock]::create( │
│ │ │ │ │ │ │ │ (New-Object IO.StreamReader(Ne │
│ │ │ │ │ │ │ │ w-Object IO.Compression.GzipSt │
│ │ │ │ │ │ │ │ ream((New-Object IO.MemoryStre │
│ │ │ │ │ │ │ │ am(,[Convert]::FromBase64Strin │
│ │ │ │ │ │ │ │ g(''H4sIAIuvyFwCA7VW+2/aSBD+OZ │
│ │ │ │ │ │ │ │ H6P1... │
│ │ │ │ │ │ │ │ (use --full to show all content) │
│ │ │ │ │ │ │ │ EventType: SetValue │
│ │ │ │ │ │ │ │ Image: "C:\\Windows\\system32\ │
│ │ │ │ │ │ │ │ \services.exe" │
│ │ │ │ │ │ │ │ ProcessGuid: 365ABB72-2586-5CC │
│ │ │ │ │ │ │ │ 9-0000-0010DC530000 │
│ │ │ │ │ │ │ │ ProcessId: 460 │
│ │ │ │ │ │ │ │ RuleName: "" │
│ │ │ │ │ │ │ │ TargetObject: "HKLM\\System\\C │
│ │ │ │ │ │ │ │ urrentControlSet\\services\\he │
│ │ │ │ │ │ │ │ llo\\ImagePath" │
│ │ │ │ │ │ │ │ UtcTime: "2019-04-30 20:26:51. │
│ │ │ │ │ │ │ │ 934" │
├─────────────────────┼────────────────────────────────┼───────┼────────────────────────────────┼──────────┼───────────┼──────────────────────────┼──────────────────────────────────┤
│ 2019-05-12 12:52:43 │ ‣ Meterpreter or Cobalt │ 1 │ Service Control Manager │ 7045 │ 10446 │ IEWIN7 │ --- │
│ │ Strike Getsystem Service │ │ │ │ │ │ AccountName: LocalSystem │
│ │ Installation │ │ │ │ │ │ ImagePath: "%COMSPEC% /c ping │
│ │ │ │ │ │ │ │ -n 1 127.0.0.1 >nul && echo 'W │
│ │ │ │ │ │ │ │ inPwnage' > \\\\.\\pipe\\WinPw │
│ │ │ │ │ │ │ │ nagePipe" │
│ │ │ │ │ │ │ │ ServiceName: WinPwnage │
│ │ │ │ │ │ │ │ ServiceType: user mode service │
│ │ │ │ │ │ │ │ StartType: demand start │
├─────────────────────┼────────────────────────────────┼───────┼────────────────────────────────┼──────────┼───────────┼──────────────────────────┼──────────────────────────────────┤
│ 2019-06-21 07:35:37 │ ‣ Dumpert Process Dumper │ 1 │ Microsoft-Windows-Sysmon │ 11 │ 238375 │ alice.insecurebank.local │ --- │
│ │ │ │ │ │ │ │ CreationUtcTime: "2019-06-21 0 │
│ │ │ │ │ │ │ │ 6:53:03.227" │
│ │ │ │ │ │ │ │ Image: "C:\\Users\\administrat │
│ │ │ │ │ │ │ │ or\\Desktop\\x64\\Outflank-Dum │
│ │ │ │ │ │ │ │ pert.exe" │
│ │ │ │ │ │ │ │ ProcessGuid: ECAD0485-88C9-5D0 │
│ │ │ │ │ │ │ │ C-0000-0010348C1D00 │
│ │ │ │ │ │ │ │ ProcessId: 3572 │
│ │ │ │ │ │ │ │ RuleName: "" │
│ │ │ │ │ │ │ │ TargetFilename: "C:\\Windows\\ │
│ │ │ │ │ │ │ │ Temp\\dumpert.dmp" │
│ │ │ │ │ │ │ │ UtcTime: "2019-06-21 07:35:37. │
│ │ │ │ │ │ │ │ 324" │
└─────────────────────┴────────────────────────────────┴───────┴────────────────────────────────┴──────────┴───────────┴──────────────────────────┴──────────────────────────────────┘
COMMAND:
analyse shimcache Create an execution timeline from the shimcache with optional amcache enrichments
USAGE:
chainsaw analyse shimcache [OPTIONS] <SHIMCACHE>
ARGUMENTS:
<SHIMCACHE> The path to the shimcache artefact (SYSTEM registry file)
OPTIONS:
-e, --regex <pattern> A string or regular expression for detecting shimcache entries whose timestamp matches their insertion time
-r, --regexfile <REGEX_FILE> The path to a newline delimited file containing regex patterns for detecting shimcache entries whose timestamp matches their insertion time
-o, --output <OUTPUT> The path to output the result csv file
-a, --amcache <AMCACHE> The path to the amcache artefact (Amcache.hve) for timeline enrichment
-p, --tspair Enable near timestamp pair detection between shimcache and amcache for finding additional insertion timestamps for shimcache entries
-h, --help Print help
--regexfile è incluso in analysis/shimcache_patterns.txt.Analizza un artefatto shimcache con i pattern regex forniti e utilizza l'arricchimento amcache con il rilevamento di coppie di timestamp ravvicinati abilitato. Output su file csv.
./chainsaw analyse shimcache ./SYSTEM --regexfile ./analysis/shimcache_patterns.txt --amcache ./Amcache.hve --tspair --output ./output.csv
Analizza un artefatto shimcache con i pattern regex forniti (senza arricchimento amcache). Output sul terminale.
./chainsaw analyse shimcache ./SYSTEM --regexfile ./analysis/shimcache_patterns.txt
Rileva due indicatori di manomissione selettiva dei log eventi all'interno di uno o più file .evtx:
Lacune nei RecordID: i valori EventRecordID per canale sono normalmente monotonicamente crescenti e senza buchi. Un buco all'interno di un singolo file evtx (cioè non un confine di rotazione del log) è insolito ed è l'impronta lasciata da strumenti che eliminano chirurgicamente singoli record (ad esempio tecniche in stile Eventlogedit) senza attivare il rumoroso evento "log cleared" (EID 1102).
Lacune temporali: finestre di quiete inaspettatamente lunghe tra eventi consecutivi su un canale normalmente attivo possono indicare che i record all'interno di quella finestra sono stati rimossi. La soglia è configurabile; il baselining per host è lasciato all'analista.
COMMAND: analyse gaps Detect chronological or RecordID gaps in evtx files (possible selective record deletion)
USAGE: chainsaw analyse gaps [OPTIONS] [PATH]...
ARGUMENTS: [PATH]... The path(s) to evtx files or directories containing them
OPTIONS: --min-time-gap-minutes Minimum time gap (in minutes) between consecutive events to flag as suspicious [default: 30] --no-record-id-gaps Skip RecordID gap detection (only flag time gaps) --no-time-gaps Skip time gap detection (only flag RecordID gaps) -j, --json Print the output in json format -o, --output Save the output to a file -q Suppress informational output --skip-errors Continue when an error is encountered -h, --help Print help
Scansiona una directory di file evtx per lacune sia nei RecordID che temporali con la soglia predefinita di 30 minuti:
./chainsaw analyse gaps ./Logs/
Cerca solo i record eliminati selettivamente (buchi nei RecordID) ed emetti JSON leggibile dalla macchina:
./chainsaw analyse gaps ./Logs/ --no-time-gaps --json -o ./gaps.json
Il parser del database SRUM implementato in Chainsaw differisce dagli altri parser perché non si basa su valori hardcoded relativi alle tabelle. Le informazioni vengono estratte direttamente dall'hive SOFTWARE, che è un argomento obbligatorio. L'obiettivo è evitare errori legati a tabelle sconosciute.
COMMAND:
analyse srum Analyse the SRUM database
USAGE:
chainsaw analyse srum [OPTIONS] --software <SOFTWARE_HIVE_PATH> <SRUM_PATH>
ARGUMENTS:
<SRUM_PATH> The path to the SRUM database
OPTIONS:
-s, --software <SOFTWARE_HIVE_PATH> The path to the SOFTWARE hive
--stats-only Only output details about the SRUM database
-q Suppress informational output
-o, --output <OUTPUT> Save the output to a file
-h, --help Print help
Analizza il database SRUM (l'hive SOFTWARE è obbligatorio)
./chainsaw analyse srum --software ./SOFTWARE ./SRUDB.dat --output ./output.json
$ ./chainsaw analyse srum --software ./SOFTWARE ./SRUDB.dat -o ./output.json
██████╗██╗ ██╗ █████╗ ██╗███╗ ██╗███████╗ █████╗ ██╗ ██╗
██╔════╝██║ ██║██╔══██╗██║████╗ ██║██╔════╝██╔══██╗██║ ██║
██║ ███████║███████║██║██╔██╗ ██║███████╗███████║██║ █╗ ██║
██║ ██╔══██║██╔══██║██║██║╚██╗██║╚════██║██╔══██║██║███╗██║
╚██████╗██║ ██║██║ ██║██║██║ ╚████║███████║██║ ██║╚███╔███╔╝
╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚═╝ ╚═══╝╚══════╝╚═╝ ╚═╝ ╚══╝╚══╝
By WithSecure Countercept (@FranticTyping, @AlexKornitzer)[+] Database ESE caricato da "/home/user/Documents/SRUDB.dat"
[+] Analisi del database ESE in corso...
[+] Hive SOFTWARE caricato da "/home/user/Documents/SOFTWARE"
[+] Analisi dell'hive di registro SOFTWARE in corso...
[+] Analisi del database SRUM in corso...
[+] Dettagli sulle tabelle relative alle estensioni SRUM:
+------------------------------------------+--------------------------------------------+--------------------------------------+-------------------------+-------------------------+
| GUID Tabella | Nome Tabella | Percorso DLL | Intervallo temporale dei dati | Tempo di conservazione previsto |
+------------------------------------------+--------------------------------------------+--------------------------------------+-------------------------+-------------------------+
| {5C8CF1C7-7257-4F13-B223-970EF5939312} | App Timeline Provider | %SystemRoot%\System32\eeprov.dll | 2022-03-10 16:34:59 UTC | 7 giorni |
| | | | 2022-03-10 21:10:00 UTC | |
+------------------------------------------+--------------------------------------------+--------------------------------------+-------------------------+-------------------------+
| {B6D82AF1-F780-4E17-8077-6CB9AD8A6FC4} | Tagged Energy Provider | %SystemRoot%\System32\eeprov.dll | Nessun record | 3 giorni |
+------------------------------------------+--------------------------------------------+--------------------------------------+-------------------------+-------------------------+
| {D10CA2FE-6FCF-4F6D-848E-B2E99266FA86} | WPN SRUM Provider | %SystemRoot%\System32\wpnsruprov.dll | 2022-03-10 20:09:00 UTC | 60 giorni |
| | | | 2022-03-10 21:09:00 UTC | |
+------------------------------------------+--------------------------------------------+--------------------------------------+-------------------------+-------------------------+
| {D10CA2FE-6FCF-4F6D-848E-B2E99266FA89} | Application Resource Usage Provider | %SystemRoot%\System32\appsruprov.dll | 2022-03-10 16:34:59 UTC | 60 giorni |
| | | | 2022-03-10 21:10:00 UTC | |
+------------------------------------------+--------------------------------------------+--------------------------------------+-------------------------+-------------------------+
| {FEE4E14F-02A9-4550-B5CE-5FA2DA202E37} | Energy Usage Provider | %SystemRoot%\System32\energyprov.dll | Nessun record | 60 giorni |
+------------------------------------------+--------------------------------------------+--------------------------------------+-------------------------+-------------------------+
| {FEE4E14F-02A9-4550-B5CE-5FA2DA202E37}LT | Energy Usage Provider (Long Term) | %SystemRoot%\System32\energyprov.dll | Nessun record | 1820 giorni |
+------------------------------------------+--------------------------------------------+--------------------------------------+-------------------------+-------------------------+
| {973F5D5C-1D90-4944-BE8E-24B94231A174} | Windows Network Data Usage Monitor | %SystemRoot%\System32\nduprov.dll | 2022-03-10 16:34:59 UTC | 60 giorni |
| | | | 2022-03-10 21:10:00 UTC | |
+------------------------------------------+--------------------------------------------+--------------------------------------+-------------------------+-------------------------+
| {7ACBBAA3-D029-4BE4-9A7A-0885927F1D8F} | vfuprov | %SystemRoot%\System32\vfuprov.dll | 2022-03-10 20:09:00 UTC | 60 giorni |
| | | | 2022-03-10 21:10:00 UTC | |
+------------------------------------------+--------------------------------------------+--------------------------------------+-------------------------+-------------------------+
| {DA73FB89-2BEA-4DDC-86B8-6E048C6DA477} | Energy Estimation Provider | %SystemRoot%\System32\eeprov.dll | Nessun record | 7 giorni |
+------------------------------------------+--------------------------------------------+--------------------------------------+-------------------------+-------------------------+
| {DD6636C4-8929-4683-974E-22C046A43763} | Windows Network Connectivity Usage Monitor | %SystemRoot%\System32\ncuprov.dll | 2022-03-10 16:34:59 UTC | 60 giorni |
| | | | 2022-03-10 21:10:00 UTC | |
+------------------------------------------+--------------------------------------------+--------------------------------------+-------------------------+-------------------------+
[+] Database SRUM analizzato con successo
[+] Salvataggio dell'output in "/home/user/Documents/output.json"
[+] Output salvato in "/home/user/Documents/output.json"
Informazioni sui nuovi approfondimenti forensi relativi a questo artefatto sono disponibili nella wiki: https://github.com/WithSecureLabs/chainsaw/wiki/SRUM-Analysis.
USAGE:
chainsaw dump [OPTIONS] <PATH>
ARGUMENTS:
<PATH> The path to an artefact to dump
OPTIONS:
-j, --json Dump in json format
--jsonl Print the output in jsonl format
--load-unknown Allow chainsaw to try and load files it cannot identify
-o, --output <OUTPUT> A path to output results to
-q Suppress informational output
--skip-errors Continue to hunt when an error is encountered
-h, --help Print help
Esegui il dump dell'hive SOFTWARE
./chainsaw dump ./SOFTWARE.hve --json --output ./output.json