Cybersecurity News
Mostrando entradas con la etiqueta bitlocker. Mostrar todas las entradas
Mostrando entradas con la etiqueta bitlocker. Mostrar todas las entradas

Decrypting DDs from Bitlocker-Encrypted Disks during a Digital Forensics Analysis



Hello everyone!  

Following the article on intrusion analysis via Team Viewer that I recently shared in Flu Project, I was asked by a colleague about how to address forensic cases in which we come across a disk encrypted with Bitlocker. In these cases it is true that the processing of a dd clone is not immediate, and technologies such as Autopsy do not accept (at least without scripts or plugins) the decryption of these disks, so a previous decryption must be performed before using an analysis tool. Luckily, there are already tools that we can use, and one of the most used is bdemount

There is little to say about Bdemount. As its own description indicates, mounts to BitLocker Drive Encryption (BDE) encrypted volume. However, we will obviously need to know the password in advance, and then the offset where the partition begins. There are ways to get the bitlocker key from a memory dump with some tool like Volatility, but I'll leave that for future articles. 

Once the forensic disk is cloned in dd format, we can list its contents using fdisk -l (encryption does not prevent cloning, so up to this point we should have no major drawbacks):  


The disk may contain several partitions, and the one we want to access to may be the one encrypted. You can find out with the Autopsy itself or FTK Imager visually:


Or if you like terminals best, with Hexdump:


To know if a partition is encrypted with Bitlocker you can look at the first bytes and you will find the following string: "-FVE-FS-". Here is a remarkably interesting link including many technical details about Bitlocker encryption:

https://forensicswiki.xyz/wiki/index.php?title=BitLocker_Disk_Encryption

Once the partition is identified, the only thing left to do is mount it in a decrypted form. To do this, here are the parameters to be used:

sudo bdemount -pPASSWORD -o $((512*OFFSET)) forensicsimage.dd /media/destination

Remember to previously have a folder with write permissions on destination. 


Now you can work with it as you deem appropriate. You can make another dd of the decrypted partition, you can analyse it from, for example, the version of Autopsy for Linux, you can extract specific files such as access logs to a certain application, etc.

In addition to bdemount, you can also use other tools such as Dislocker to decrypt an encrypted partition with Bitlocker. Dislocker is available among Kali's tools. Here is an interesting post by Stefan Rows, where he not only explains how to install and use Dislocker, but also details how to prepare a self-assembly script:

https://www.ceos3c.com/linux/open-bitlocker-drive-linux/

Finally, and to bring you some more reading on Bitlocker decryption for this week, here is a Twitter thread that I found thanks to DragonJAR:


A gem of a thread by Jon Aubrey, in which he shows how he managed to decrypt - in fact with Dislocker -, an encrypted laptop, extracting the key at the hardware level with a Saleae analyzer:



I’m sure this thread will have you "playing" for a while with any laptop you may have at hand :) 

I hope you found this article interesting. 

Regards! 

Descifrando DDs de discos cifrados con Bitlocker durante un análisis forense digital



Hola a todos. Al hilo del artículo sobre análisis de intrusiones vía Team Viewer que compartí recientemente en Flu Project, me consultaba un compañero de sector sobre como abordar aquellos casos forenses en los que nos encontrábamos con un disco cifrado con Bitlocker. En estos casos es cierto que el procesado de un clonado dd no es inmediato, y tecnologías como Autopsy no aceptan, al menos sin scripts o plugins, el descifrado de estos discos, por lo que se hace necesario realizar un descifrado previo antes de poder pasárselo a una herramienta de análisis. Por suerte, ya existen herramientas que podemos utilizar, y una de las más usadas es bdemount.

De bdemount no hay mucho que contar. Como su propia descripción indica, mounts a BitLocker Drive Encryption (BDE) encrypted volume. Lo que sí necesitaremos conocer de antemano es, obviamente, la contraseña, y, a continuación, el offset donde comienza la partición. Hay vías para obtener la clave de bitlocker a partir de un dump de memoria con alguna herramienta como Volatility, pero eso lo dejaré para posteriores artículos.

Una vez clonado el disco del forense en formato dd, podremos listar su contenido mediante fdisk -l (el que esté o no cifrado no impide el clonado, por lo que hasta este punto no deberíamos tener mayores inconvenientes): 


Es posible que el disco contenga varias particiones, y la que os interese sea una en concreto, la cifrada. Esto lo podréis averiguar con el propio Autopsy o FTK Imager de forma visual:


O si sois más consoleros, con Hexdump:


Para saber si una partición se encuentra cifrada con Bitlocker podréis mirar los primeros bytes y os encontraréis con la siguiente cadena: "-FVE-FS-". Os dejo con un enlace muy interesante donde se dan muchos detalles técnicos acerca del cifrado de Bitlocker:

https://forensicswiki.xyz/wiki/index.php?title=BitLocker_Disk_Encryption

Con la partición de interés identificada, solo restará montarla de forma descifrada. Para ello, os dejo a continuación los parámetros a utilizar:

sudo bdemount -pCONTRASEÑA -o $((512*OFFSET)) clonadoforense.dd /media/destino

Recordad tener previamente una carpeta con permisos de escritura en destino. 


Ahora podréis trabajar con ella como consideréis. Podréis hacer otro dd de la partición descifrada, podréis analizarla desde, por ejemplo, la versión de Autopsy para Linux, podréis extraer archivos concretos como, por ejemplo, los logs de acceso a determinada aplicación, etc. etc.

Además de bdemount, también podréis utilizar otras herramientas como Dislocker para descifrar una partición cifrada con Bitlocker. Dislocker está disponible entre las herramientas de Kali. Os dejo con un post interesante de Stefan Rows, donde no solo explica como instalar y utilizar Dislocker, sino que también detalla como preparar un script de automontaje:

https://www.ceos3c.com/linux/open-bitlocker-drive-linux/

Finalmente, y por aportaros algo más de lectura sobre descifrado de Bitlocker para esta semana, quería dejaros por aquí un hilo de Twitter con el que me topé gracias a DragonJAR:


Una joya de hilo de Jon Aubrey, en el que muestra como logró descifrar precisamente, con Dislocker, un portátil cifrado, extrayendo la clave a nivel de hardware con un analizador de Saleae:



Con este hilo tendréis lectura para cacharrear un buen rato con algún portátil que tengáis a mano :)

Espero que haya sido de vuestro interés.

¡Saludos!