Este documento presenta una introducción al análisis de memoria RAM en sistemas Windows. Explica qué es la memoria RAM, qué tipos de información puede contener como procesos, conexiones de red, contraseñas y datos ocultos. Describe métodos para capturar volcados de memoria RAM y herramientas para verificar la integridad de los datos y extraer información a través de un análisis estructurado y desestructurado. El documento concluye resaltando los retos del análisis forense de memoria RAM.
7. Volátil Memoria de acceso aleatorio Memoria para programas y datos Memoria temporal Se pierde al apagar el equipo
8. Introducción Qué puede contener un volcado de memoria Procesos en ejecución Iexplore LSASS Procesos en fase de terminación Conexiones activas TCP UDP Puertos
10. Ficheros mapeados Drivers Ejecutables Ficheros Objetos Caché Direcciones Web Passwords Comandos tipeados por consola Elementos ocultos Rootkits (Userland & KernelLand)
11. ¿Cómo se estructura la memoria? KernelLand (Ring0) Tendrá permiso para acceder a todo el espacio de memoria Podrá comunicarse con el Hardware UserLand (Ring3) Apis podrán comunicarse con el Kernel Nivel con menor privilegio Acceso a Memoria Virtual
12. Qué se busca y por qué… EPROCESS Estructura que contiene datos relativos a un proceso Representación que hace Windows para cada proceso Fecha Creación, cuotas de uso, Token, PID THREADS Cada proceso puede crear 1 o más hilos en ejecución Como mínimo se crea uno por cada proceso en ejecución (Puntero a proceso) Tiempo de Kernel PEB Información sobre la Imagen Estructuras que residen en el espacio de memoria del usuario Virtual Memory & PhysicalMemory Permite al proceso usar más memoria que la que hay realmente Cada proceso obtiene 4GB de memoria RAM virtuales (32Bits) El S.O. se encarga de traducir esas direcciones virtuales a direcciones físicas de memoria
13. Captura de memoria RAM Siguiendo el orden de volatilidad, los datos contenidos en la RAM son extremadamente volátiles. Reinicios Apagados Corrupciones Verificar la integridad de los datos Se tiene que preparar el sistema para que lo soporte
14. No sólo se captura lo activo… La información que podemos recopilar depende de muchos factores Sistema operativo Time Live de la máquina Tamaño de la memoria
15. Memoria RAM Paginada Paginación Pagefile.sys Hyberfil.sys Configuración de limpieza http://support.microsoft.com/kb/314834 HKEY_LOCAL_MACHINEYSTEMurrentControlSetontrolession Manageremory Management Reg_DWORD type ClearPagefileAtShutdown Value = 1 (Activado)
17. Verificar la integridad DumpChk (Support Tools) Herramienta para verificar la integridad de un volcado de memoria Muy completa (Uptime, Arquitectura, Equipo, fallo, etc…) Línea de comandos DumpCheck (Citrix) Creada por DmitryVostokov Nos muestra sólo si cumple con la integridad o no Entorno gráfico
20. Análisis desestructurado de memoria RAM Strings de Sysinternals Herramienta para extraer cadenas (ASCII & UNICODE) de un archivo Podemos identificar objetos almacenados en memoria, datos persistentes, conexiones, Passwords, etc… FindStr (Microsoft nativa) Herramienta utilizada para buscar una cadena de texto en el interior de uno o varios archivos Con la combinación de ambas herramientas podemos extraer gran cantidad de información
21. Análisis estructurado dememoria RAM Windbg Poderosa herramienta de depuración Necesitamos los símbolos para poder trabajar con procesos Pensada para “todos los públicos” Mucha granularidad a nivel de comandos Escalable (Plugins) Se necesita mucha experiencia Memparser Nace con un reto forense de RAM (DFRWS 2005) Válida sólo para Windows 2000 Una de las más completas en cuanto a funcionalidad Evoluciona a las KntTools (Pago por licencia) Ptfinder Desarrollada en Perl Extrae información sobre procesos, threads y procesos ocultos (DKOM) Interpretación gráfica de la memoria Válida para W2K, XP,XPSP2, W2K3
22. Detección de procesos ocultos Wmft Creada por Mariusz Burdach (http://forensic.seccure.net) Demo para BlackHat 2006 Válida para Windows 2003 Memory Analisys Tools Creada por Harlan Carvey (Windows Incident Response) Disponibles en Sourceforge (http://sourceforge.net/project/showfiles.php?group_id=164158) Válida para Windows 2000 Similar a Memparser
23. Conexiones de Red A partir de un PID se puede Extraer información sobre conexiones de red Sockets abiertos Procesos en fase de terminación
24. Representación gráfica Ptfinder En todas sus versiones, esta herramienta es capaz de representar gráficamente el estado de la memoria. Podemos analizar qué procesos son los padres y cuáles los hijos Ideal para proyectos forenses
25. Volatility Volatility Inicialmente desarrollada por KomokuInc Comprada por Microsoft en 2008 Proyecto vivo! Capaz de buscar sockets, puertos, direcciones IP, etc..
27. Conclusiones Cifrado de RAM Cumplimiento de LOPD? Ficheros temporales ¿Es sólo la RAM? Ficheros temporales de: Documentos ofimáticos Hyberfil.sys Impresión de documentos
29. Referencias Introducción a la informática forense en entornos Windows Autor: Silverhack http://www.elhacker.net/InfoForenseWindows.htm Introducción a la informática forense en entornos Windows 2ª parte Autor: Silverhack http://www.elhacker.net/InfoForenseWindows2.htm Introducción a la informática forense en entornos Windows 3ª parte Autor: Silverhack http://www.elhacker.net/InfoForense3.html Formas de Analizar un Virus Autor: Juan Garrido http://windowstips.wordpress.com/2007/02/25/formas-de-analizar-un-virus-un-paseo-por-rapidshare/ Comportamiento Virus Plataformas Windows Autor: Silverhack http://www.elhacker.net/comportamiento-virus.htm
31. WebCast Microsoft Análisis Forense Sistemas Windows Ponente: Juan Luis Rambla (MVP Security Informática 64) UrlWebCast http://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?EventID=1032326593&EventCategory=4&culture=es-ES&CountryCode=ES Análisis Forense entorno Malware Ponente: Juan Luis Rambla (MVP Security Informática 64) UrlWebCast http://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?EventID=1032326597&EventCategory=5&culture=es-VE&CountryCode=VE
32. WebCast Microsoft Análisis Forense de RAM en Sistemas Windows Ponente: Juan Garrido (Consultor seguridad I64) UrlWebCast https://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?EventID=1032396459&EventCategory=5&culture=es-ES&CountryCode=ES
33. TechNews de Informática 64 Suscripción gratuita en http://www.informatica64.com/boletines.html
Stacked, 3-D text at dramatic angle(Intermediate)To reproduce the text on this slide, do the following:On the Home tab, in theSlides group, click Layout, and then click Blank.On the Insert tab, in the Text group, click Text Box, and then on the slide, drag to draw the text box.Enter text in the text box, select the text, and then on the Home tab, in the Font group, select Impact from the Font list, and then change the font size of each line so that the text is approximately the same width. For example, if you entered FIRST on one line, SECOND on the next line, and so on (as shown on the slide), do the following:Select the first line of text, and then on the Home tab, in the Font group, enter 100 in the Font Size box. Select the second line of text, and then on the Home tab, in the Font group, enter 70 in the Font Size box. Select the third line of text, and then on the Home tab, in the Font group, enter 94 in the Font Size box. Select the fourth line of text, and then on the Home tab, in the Font group, enter 75.5 in the Font Size box. Select all of the text. On the Home tab, in the Font group, click Character Spacing, and then click More Spacing. In the Font dialog box, on the Character Spacingtab, in the Spacing list, select Expanded. In the By box, enter 2.On the Home tab, in the Paragraph group, click Center to center the text in the text box.Under Drawing Tools, on the Format tab, in the bottom right corner of the WordArt Styles group, click the Format Text Effects dialog box launcher. In the Format Text Effects dialog box, click Text Fill in the left pane, select Gradient fill in the Text Fill pane, and then do the following:In the Type list, select Radial.Click the button next to Direction, and then click From Corner (second option from the left).Under Gradient stops, click Add or Remove until two stops appear in the drop-down list.Also under Gradient stops, customize the gradient stops that you added as follows:Select Stop 1 from the list, and then do the following:In the Stop position box, enter0%.Click the button next to Color, and then under Theme Colorsclick White, Background 1, Darker 15%(third row, first option from the left).Select Stop 2 from the list, and then do the following:In the Stop position box, enter100%.Click the button next to Color, and then under Theme Colorsclick White, Background 1, Darker 50%(sixth row, first option from the left).Also in the Format Text Effects dialog box, click 3-D Rotation in the left pane. In the 3-D Rotation pane, click the button next to Presets, and then under Perspectiveclick Perspective Heroic Extreme Left (third row, second option from the left).Also in the Format Text Effects dialog box, click 3-D Format in the left pane, and then do the following in the 3-D Format pane: Under Bevel, click the button next to Top, and then under Bevel click Cool Slant (first row, fourth option from the left). Under Depth, in the Depth box, enter 70 pt. Also in the Format Text Effects dialog box, click Shadowin the left pane. In the Shadowpane, click the button next to Presets, and then under Perspectiveclick Perspective Diagonal Upper Right (first row, second option from the left). To reproduce the background on this slide, do the following:Right-click the slide background area, and then clickFormat Background.In the Format Background dialog box, click Fill in the left pane, select Gradient fill in the Fill pane, and then do the following:In the Type list, select Linear.Click the button next to Direction, and then click Linear Down (first row, second option from the left).Under Gradient stops, click Add or Remove until two stops appear in the drop-down list.Also under Gradient stops, customize the gradient stops that you added as follows:Select Stop 1 from the list, and then do the following:In the Stop position box, enter64%.Click the button next to Color, and then under Theme Colorsclick Black, Text 1(first row, second option from the left).Select Stop 2 from the list, and then do the following:In the Stop position box, enter100%.Click the button next to Color, and then under Theme Colorsclick Black, Text 1, Lighter 35% (third row, second option from the left).