deftcon 2014 – luigi ranzato - windows registry artifacts: "most recently used"...

30
DEFTCON - MILANO – 11 aprile 2014 – Luigi Ranzato Windows Registry Ar0facts Most Recently Used SHELLBAGS DEFTCON 2014

Upload: deft-association

Post on 29-Nov-2014

729 views

Category:

Government & Nonprofit


0 download

DESCRIPTION

 

TRANSCRIPT

Page 1: DEFTCON 2014 – Luigi Ranzato - Windows Registry Artifacts: "Most Recently Used" Shellbags

DEFTCON - MILANO – 11 aprile 2014 – Luigi Ranzato

Windows  Registry  Ar0facts  Most  Recently  Used  

SHELLBAGS  

DEFTCON 2014

Page 2: DEFTCON 2014 – Luigi Ranzato - Windows Registry Artifacts: "Most Recently Used" Shellbags

DEFTCON - MILANO – 11 aprile 2014 – Luigi Ranzato

SHELLBAGS  –  di  cosa  s0amo  parlando  

Page 3: DEFTCON 2014 – Luigi Ranzato - Windows Registry Artifacts: "Most Recently Used" Shellbags

DEFTCON - MILANO – 11 aprile 2014 – Luigi Ranzato

¡ Dal punto di vista di Microsoft:

¡  La possibilità per l’utente di personalizzare (e ricordare) le preferenze di visualizzazione e posizione delle cartelle

“to remember the size, view, icon or position of a folder”

¡ Dal punto di vista di un Computer Forensic Expert: ¡  La possibilità di tracciare con notevole precisione le attività di

visualizzazione, creazione e modifica delle cartelle degli utenti su Windows Explorer, e non solo …

SHELLBAGS  –  cosa  sono  

Page 4: DEFTCON 2014 – Luigi Ranzato - Windows Registry Artifacts: "Most Recently Used" Shellbags

DEFTCON - MILANO – 11 aprile 2014 – Luigi Ranzato

Most  Recently  Used  

¡  Nel registro sono memorizzati valori e chiavi in forma di liste MRU (most recently used)

¡  Le liste MRU ci aiutano a ordinare i valori delle sottochiavi associati alle liste ¡  L’ordinamento è spesso contenuto in valori chiamati MRUList e MRUListEx ¡  L’ordinamento può avvenire con valori del tipo “0003” “0001” “0002” o “c” “a”

“b” ….. ¡  L’ordinamento può avvenire attraverso lo swap della sottochiave e del

relativo valore; Un nuovo elemento più recente prende il posto dell’elemento precedente “spingendolo” in giù nella lista

T0 T1 123

123 456 000 000

001

Page 5: DEFTCON 2014 – Luigi Ranzato - Windows Registry Artifacts: "Most Recently Used" Shellbags

DEFTCON - MILANO – 11 aprile 2014 – Luigi Ranzato

•  Ricerche  

•  File  aper0  

•  File  salva0  

•  Documen0  recen0  

•  RUN  

•  File  recen0  di  specifiche  applicazioni  •  MS  Word  •  Paint  •  Etc  

 •  User  Assist    •  Shellbags    

Alcune  delle  risorse  MRU  per  cui  esistono  liste  ordinate  

Most  Recently  Used  

Page 6: DEFTCON 2014 – Luigi Ranzato - Windows Registry Artifacts: "Most Recently Used" Shellbags

DEFTCON - MILANO – 11 aprile 2014 – Luigi Ranzato

MRU  SHELLBAGS  

Dove  sono?    

Windows  XP  –  7  –  8  USRCLASS.DAT\Local  SeNngs\SoOware\MicrosoO\Windows\Shell\BagMRU  USRCLASS.DAT\Local  SeNngs\SoOware\MicrosoO\Windows\Shell\Bags  NTUSER.DAT\SoOware\MicrosoO\Windows\Shell\BagMRU  NTUSER.DAT\SoOware\MicrosoO\Windows\Shell\Bags  NTUSER.DAT\SoOware\MicrosoO\Windows\ShellNoRoam\BagMRU  NTUSER.DAT\SoOware\MicrosoO\Windows\ShellNoRoam\Bags        

Page 7: DEFTCON 2014 – Luigi Ranzato - Windows Registry Artifacts: "Most Recently Used" Shellbags

DEFTCON - MILANO – 11 aprile 2014 – Luigi Ranzato

MRU  SHELLBAGS    

Visualizzazione da REGEDIT

Numero max di registrazioni

Cartelle in unità remote

Cartelle in unità locali

Hanno la stessa struttura interna

Page 8: DEFTCON 2014 – Luigi Ranzato - Windows Registry Artifacts: "Most Recently Used" Shellbags

DEFTCON - MILANO – 11 aprile 2014 – Luigi Ranzato

MRU  SHELLBAGS  

primo

secondo

BagMRU contiene riferimenti alle cartelle navigate dall’utente utilizzando Explorer

Bags contiene le impostazioni di visualizzazione delle cartelle

Page 9: DEFTCON 2014 – Luigi Ranzato - Windows Registry Artifacts: "Most Recently Used" Shellbags

DEFTCON - MILANO – 11 aprile 2014 – Luigi Ranzato

Esempio di decodifica - 01

Corrisponde al Desktop

Leggo MRUListEx …

Visualizzo il contenuto del valore 8 …

MRU  SHELLBAGS  

Page 10: DEFTCON 2014 – Luigi Ranzato - Windows Registry Artifacts: "Most Recently Used" Shellbags

DEFTCON - MILANO – 11 aprile 2014 – Luigi Ranzato

Esempio di decodifica - 02

Visualizzo il contenuto della cartella 8 e leggo il suo MRUListEx. Il primo valore è 0

MRU  SHELLBAGS  

Page 11: DEFTCON 2014 – Luigi Ranzato - Windows Registry Artifacts: "Most Recently Used" Shellbags

DEFTCON - MILANO – 11 aprile 2014 – Luigi Ranzato

Esempio di decodifica - 03

La sottochiave 8 non ha ulteriori sottochiavi quindi la navigazione termina quì

L’utente ha navigato - Desktop\rr_20080909\plugins

MRU  SHELLBAGS  

Page 12: DEFTCON 2014 – Luigi Ranzato - Windows Registry Artifacts: "Most Recently Used" Shellbags

DEFTCON - MILANO – 11 aprile 2014 – Luigi Ranzato

MRU  SHELLBAGS   http://www.4n6k.com/2013/12/shellbags-forensics-addressing.html

UsrClass.dat\Local Settings\Software\Microsoft\Windows\Shell\BagMRU\0\0\2\0\

Desktop\MyComputer\K:\Documents\Personal\PDFs

Page 13: DEFTCON 2014 – Luigi Ranzato - Windows Registry Artifacts: "Most Recently Used" Shellbags

DEFTCON - MILANO – 11 aprile 2014 – Luigi Ranzato

Interazione  con  l’utente  

www.dfrws.org/2009/proceedings/p69-zhu.pdf Digital investigation 6 (2009) – Zhu, Gladyshev, James

MRU  SHELLBAGS    

Page 14: DEFTCON 2014 – Luigi Ranzato - Windows Registry Artifacts: "Most Recently Used" Shellbags

DEFTCON - MILANO – 11 aprile 2014 – Luigi Ranzato

Quali  informazioni  si  possono  o;enere  a;raverso  l’analisi  delle  shellbags?        

Per  ogni  folder  (BagMRU)  oTerremo:    1)  Bag  Number  2)  Registry  key  last  write  Ime  3)  Folder  name  4)  Full  path  5)  Embedded  creaIon  date  /  Ime  6)  Embedded  modify  date  /  Ime  7)  Embedded  access  date  /  Ime    

MRU  SHELLBAGS  

…  possiamo  o;enere  più  informazioni?        

Page 15: DEFTCON 2014 – Luigi Ranzato - Windows Registry Artifacts: "Most Recently Used" Shellbags

DEFTCON - MILANO – 11 aprile 2014 – Luigi Ranzato

MRU  SHELLBAGS  

Time

MFT Record Entry

Sequence Number

Bag Name

MFT File reference number

Page 16: DEFTCON 2014 – Luigi Ranzato - Windows Registry Artifacts: "Most Recently Used" Shellbags

DEFTCON - MILANO – 11 aprile 2014 – Luigi Ranzato

Da  dove  vengono  presi  i  metadaI  delle  cartelle  e  dei  file?      -­‐  Provengono  da  MFT,  e  tradoX  da  FileFormat  a  DOSDate  Timestamp  

(minore  granularità  –  100ns  :  2Sec).  Queste  date  verranno  mai  aggiornate  

-­‐  L’a;ributo  della  entry  MFT  da  cui  provengono  le  date  è  $FILE_NAME    -­‐  Tu;e  le  date  sono  in  formato  UTC  

-­‐  Alcuni  tools  rappresentano  la  RegKey  associata  alla  so;ochiave  che  conIene  la  bag  con  precisione  al  millisecondo,  altri  sono  un  po  meno  precisi…  

     

MRU  SHELLBAGS  

Page 17: DEFTCON 2014 – Luigi Ranzato - Windows Registry Artifacts: "Most Recently Used" Shellbags

DEFTCON - MILANO – 11 aprile 2014 – Luigi Ranzato

Quali  Ipi  di  contenuI  vengono  tracciaI  nelle  shellbags?    -­‐  Navigazioni  nelle  cartelle  “speciali”  es.  “My  Computer”  -­‐  Navigazioni  nelle  cartelle  locali  -­‐  Navigazioni  nelle  cartelle  di  rete  -­‐  Navigazione  nelle  cartelle  di  device  USB  MSC  es.  “Pendrive”  -­‐  Navigazione  nelle  cartelle  di  device  USB  MTP  es.  “Cell  Phone”  -­‐  A  volte  è  possibile  o;enere  la  lista  dei  file  contenuI  nelle  

cartelle  navigate  con  relaIvi  metadaI  -­‐  ….  Vi  viene  in  mente  altro?  

MRU  SHELLBAGS  

Page 18: DEFTCON 2014 – Luigi Ranzato - Windows Registry Artifacts: "Most Recently Used" Shellbags

DEFTCON - MILANO – 11 aprile 2014 – Luigi Ranzato

•  Cosa succede se elimino una cartella reale / fisica, già registrata nelle shellbags?

•  Cosa succede se elimino alcune sottochiavi da bagMRU?

•  Cosa succede se vado a modificare la risoluzione del monitor?

•  Cosa succede se eseguo Ccleaner ( as administrator ) allo scopo di eliminare questi artefatti?

MRU  SHELLBAGS  -­‐  Domande  

Page 19: DEFTCON 2014 – Luigi Ranzato - Windows Registry Artifacts: "Most Recently Used" Shellbags

DEFTCON - MILANO – 11 aprile 2014 – Luigi Ranzato

Esempio di decodifica – Lettura dei file

A volte è possibile individuare il valore

ItemPos

MRU  SHELLBAGS  

Page 20: DEFTCON 2014 – Luigi Ranzato - Windows Registry Artifacts: "Most Recently Used" Shellbags

DEFTCON - MILANO – 11 aprile 2014 – Luigi Ranzato

ItemPos

Nel valore ItemPos Sono elencati i contenuti della

BagMRU, file e cartelle

File

Il valore ItemPos spesso non è presente all’interno della Bags

MRU  SHELLBAGS  

Page 21: DEFTCON 2014 – Luigi Ranzato - Windows Registry Artifacts: "Most Recently Used" Shellbags

DEFTCON - MILANO – 11 aprile 2014 – Luigi Ranzato

Dblclick Move Resize

Le operazioni causano la scrittura dell’elenco file nelle ShellBags

Elenco dei file della parent folder (la stessa in cui si trova il file .zip)

Case  study  

Page 22: DEFTCON 2014 – Luigi Ranzato - Windows Registry Artifacts: "Most Recently Used" Shellbags

DEFTCON - MILANO – 11 aprile 2014 – Luigi Ranzato

TOOLS  

o  TZWorks  –  sbag.exe  o  hTps://www.tzworks.net/prototype_page.php?proto_id=14  

o  X-­‐Ways  Forensics  17  o  www.winhex.com  

o  RegRipper    -­‐-­‐    presente  in  DEFT  o  hTps://code.google.com/p/regripper/downloads/list  

o  ShellBagsView  -­‐-­‐    presente  in  DEFT  o  hTp://www.nirsoO.net  

…  Solo  una  parte  dei  tools  che  tra;ano  quesI  artefaX  

Page 23: DEFTCON 2014 – Luigi Ranzato - Windows Registry Artifacts: "Most Recently Used" Shellbags

DEFTCON - MILANO – 11 aprile 2014 – Luigi Ranzato

TOOLS  –  TZWorks  -­‐  Sbag.exe  •  Analisi Slack Space –inc_slack •  Aggiunge continuamente nuove informazioni all’output

Page 24: DEFTCON 2014 – Luigi Ranzato - Windows Registry Artifacts: "Most Recently Used" Shellbags

DEFTCON - MILANO – 11 aprile 2014 – Luigi Ranzato

TOOLS  –  TZWorks  -­‐  Sbag.exe    

Dettaglio OUTPUT

Page 25: DEFTCON 2014 – Luigi Ranzato - Windows Registry Artifacts: "Most Recently Used" Shellbags

DEFTCON - MILANO – 11 aprile 2014 – Luigi Ranzato

TOOLS  –  X-­‐Ways  Forensics  17.X  

Page 26: DEFTCON 2014 – Luigi Ranzato - Windows Registry Artifacts: "Most Recently Used" Shellbags

DEFTCON - MILANO – 11 aprile 2014 – Luigi Ranzato

TOOLS  -­‐  RegRipper  

Ottimo Tool! Harlan Carvey aggiorna i moduli con buona frequenza. Regripper decodifica le MRU e le Shellbags

Page 27: DEFTCON 2014 – Luigi Ranzato - Windows Registry Artifacts: "Most Recently Used" Shellbags

DEFTCON - MILANO – 11 aprile 2014 – Luigi Ranzato

Semplicissimo, Legge NTUSER.DAT – USRClass.DAT locali non legge i riferimenti ai file contenuti nelle cartelle

TOOLS  –  ShellBagsView  

Page 28: DEFTCON 2014 – Luigi Ranzato - Windows Registry Artifacts: "Most Recently Used" Shellbags

DEFTCON - MILANO – 11 aprile 2014 – Luigi Ranzato

… e noi aggiungiamo: ¡ Determinare l’avvenuto accesso a una cartella da parte di uno

specifico utente, sia essa locale o di rete ¡ Determinare l’uso e la navigazione in removable storage devices ¡  L’esistenza, in passato, di una cartella, o file*, oggi eliminati ¡ Metadati storici di una cartella o file*, e la sua posizione in $MFT ¡  Il path di navigazione utilizzato per raggiungere una cartella ¡  Profilare l’utente utilizzatore attraverso le sue preferenze di

navigazione nel filesystem ¡ Mostrare la struttura interna di un volume montato nel sistema e

navigato tramite explorer, compresi i volumi cifrati (truecrypt)

SHELLBAGS  –  per  concludere,  a  cosa  servono  

“to remember the size, view, icon or position of a folder”

Page 29: DEFTCON 2014 – Luigi Ranzato - Windows Registry Artifacts: "Most Recently Used" Shellbags

DEFTCON - MILANO – 11 aprile 2014 – Luigi Ranzato

¡  http://www.dfrws.org/2009/proceedings/p69-zhu.pdf ¡  http://digital-forensics.sans.org/blog/2011/07/05/shellbags ¡  http://www.4n6k.com/2013/12/shellbags-forensics-addressing.html ¡  http://windowsir.blogspot.it/2012/10/shellbag-analysis-revisitedsome-

testing.html

La mia email: [email protected]

SHELLBAGS  –  Riferimen0  

Page 30: DEFTCON 2014 – Luigi Ranzato - Windows Registry Artifacts: "Most Recently Used" Shellbags

DEFTCON - MILANO – 11 aprile 2014 – Luigi Ranzato

THANKS