Monday, September 24, 2018

Digital Forensics:How to export Master File Table to csv

Digital Forensics:How to export Master File Table to csv


MFT หรือ Master File Table  คือ

ในระบบจัดการไฟล์แบบ NTFS  นั้น Master File Table (MFT) นั้นเปรียบเสมือนหัวใจหลัก เพราะเป็นส่วนที่ใช้เก็บข้อมูล รายละเอียดของไฟล์และไดเร็กทอรี่ทั้งหมด ภายใน MFT จะเก็บข้อมูล เป็น Entry หรือที่เรียกว่า MFT Entry

MFT Entry จะประกอบไปด้วยหลาย Attribute โดยมี Attribute ที่มีข้อมูล ของไฟล์คือ STANDARD_INFORMATION (0x10 (16)) เก็บข้อมูล รายละเอียดมาตรฐานของ MFT Entry, FILENAME (0x30 (48)) เก็บ ข้อมูลรายละเอียดของไฟล์, DATA (0x80 (128)) เก็บข้อมูลตำแหน่งของ เนื้อไฟล์ข้อมูลที่อยู่บนฮาร์ดดิส์ก
MFT Entry
MFT Entry จะมีขนาดทั้งหมดเท่ากับ 1,024 ไบต์ (Bytes)
เป็นไฟล์ในระบบไฟล์แบบ NTFS โดยจะรวบรวมข้อมูลของไฟล์ทั้งหมดในไดร์ฟนั้นๆ  การตรวจสอบไฟล์ $MFT จึงมีประโยชน์อย่างมากในช่วยค้นหาไฟล์ที่ถูกลบเพื่อทำการกู้คืนและการใช้วิเคราะห์ในฐานะของหลักฐานดิจิทัลรูปแบบหนึ่ง
MFT Entry  1,024  Bytes

โดยปกติไฟล์ $MFT จะถูกสร้างขึ้นโดยอัตโนมัติเมื่อมีการฟอร์แมตหรือConvert พาร์ติชันของดิสก์เป็น NTFS โดยวันที่และเวลาที่ไฟล์ $MFT ถูกสร้างขึ้น (หรือวันที่และเวลาที่ดิสก์ถูกฟอร์แมต) จะถูกระบุอยู่ในคุณลักษณะของไฟล์ $MFT ที่หัวข้อ Date created ซึ่งในกรณีโดยส่วนใหญ่ที่ดิสก์ดังกล่าวถูกติดตั้งระบบปฏิบัติการ ไฟล์ของระบบปฏิบัติการจะมีวันที่และเวลาที่ถูกสร้างใกล้เคียงหรือสอดคล้องกับค่า Date created ใน $MFT

แนะนำเครื่องมือสำหรับวิเคราะห์ Master File Table   (MFT analysis free Tools)
1. FTK Imager    
2. MFT Explorer 
3. MFTECmd
4. Mft2csv
5. Timeline Explorer 

Step 1 Export $MFT  ใช้โปรแกรม FTK Imager  Export file $MFT 

FTK Imager  export File $MFT
FTK Imager    สำหรับ export File $MFT

 Step 2   $MFT Export to csv


Step 3 Preview $MFT       ใช้ โปรแกรม MFT Explorer เปิด file  $MFT  

MFT Explorer


 Step 4 Export $MFT    to CSV


 Mft2csv Export csv > 
    - Choose $MFT
    - Set Outout Path
    - Start Processing 
Mft2csv Export csv
OutPut Csv file
MFTECmd Export csv > 
 
 MFTECmd.exe -f "F:\$MFT" --csv "c:\temp"

Examples: 
          MFTECmd.exe -f "C:\Temp\SomeMFT" --csv "c:\temp\out" --csvf MyOutputFile.csv
          MFTECmd.exe -f "C:\Temp\SomeMFT" --csv "c:\temp\out"
          MFTECmd.exe -f "C:\Temp\SomeMFT" --json "c:\temp\jsonout"
          MFTECmd.exe -f "C:\Temp\SomeMFT" --body "c:\temp\bout" --bdl c
          MFTECmd.exe -f "C:\Temp\SomeMFT" --de 5-5

MFTECmd option

Csv file

Step 5   Import csv to Timeline Explorer 


ใช้ Timeline Explorer สามารถแสดงวันเวลา Timestamp โดยเปิดไฟล์จาก CSV ได้

    เมื่อได้ csv file มาแล้วให้ใช้ Timeline Explorer  import csv file เพื่อค้นหาไฟล์และดูวันเวลาที่สงสัย 
Last Access
Suspect File


สรุป 
 เราสามารถใช้ Free Tools ช่วยในการวิเคราะห์ MFT หรือ Master File Table  


Last Update 24-9-2019

Resident Data

Ref:

https://www.andreafortuna.org/2017/07/18/how-to-extract-data-and-timeline-from-master-file-table-on-ntfs-filesystem/
https://github.com/jschicht
https://forensicswiki.org/wiki/Encase_image_file_format
https://www.andreafortuna.org/2017/07/18/how-to-extract-data-and-timeline-from-master-file-table-on-ntfs-filesystem/
https://binaryforay.blogspot.com/2018/06/introducing-mftecmd.html
https://whereismydata.wordpress.com/2009/06/05/forensics-what-is-the-mft/
https://ericzimmerman.github.io/#!index.md
https://dforensicexaminer.wordpress.com/2019/03/31/new-technologies-file-system-ntfs/
https://www.i-secure.co.th/2019/07/forensic-analysis-mft/

หมายเหตุ:เนื้อหาในเว็บไซต์นี้มีขึ้นเพื่อวัตถุประสงค์ในการให้ข้อมูลและเพื่อการศึกษาเท่านั้น

* หากมีข้อมูลข้อผิดพลาดประการใด ขออภัยมา ณ ที่นี้ด้วย  รบกวนแจ้ง Admin เพื่อแก้ไขต่อไป
ขอบคุณครับ


#WindowsForensic #ComputerForensics #dfir #forensics #digitalforensics #computerforensic #investigation #cybercrime #fraud


Wednesday, September 19, 2018

Digital Forensics: Loki - Simple IOC and Incident Response Scanner

Digital Forensics:  Loki - Simple IOC and Incident Response Scanner 

ทดสอบ virus  ติดตั้ง Loki  (https://github.com/Neo23x0/Loki) บน Ubuntu
LOKI
git clone https://github.com/Neo23x0/Loki.git
( https://github.com/Neo23x0/Loki.git )

apt-get update
apt-get upgrade
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python get-pip.py
apt-get install git 
apt-get install gcc
git clone https://github.com/Neo23x0/Loki.git
apt-get install python-setuptools
apt-get install python-dev
apt-get install libssl-dev
pip install pycrypto
pip install yara-python psutil netaddr pylzma colorama

python loki-upgrader.py
Loki


หมายเหตุ:เนื้อหาในเว็บไซต์นี้มีขึ้นเพื่อวัตถุประสงค์ในการให้ข้อมูลและเพื่อการศึกษาเท่านั้น

* หากมีข้อมูลข้อผิดพลาดประการใด ขออภัยมา ณ ที่นี้ด้วย  รบกวนแจ้ง Admin เพื่อแก้ไขต่อไป
ขอบคุณครับ


#Memory Forensic Tools 
#Digital Forensics Certification
#Forensics
# dforensic.blogspot.com/
#DForensics-Examiner
#Malware Forensics

Saturday, September 15, 2018

DIGITAL FORENSICS:FILE SYSTEM FORENSIC ANALYSIS

DIGITAL FORENSICS:File system Forensic Analysis


The Computer Incident Response Center Luxembourg (CIRCL)



Abstract
Forensic Analysis is based on the assumption that everything leaves a trace behind. A trace in an information system can be any data that helps to identify space and time actions. Post mortem analysis is a key tool to discover and analyse security incidents. This course will teach the participant on how to find answers to what has happened by analysing different layer from the physical medium to the file system up to the application level.
Goals
  • Perform disk acquisition the right way
  • Introduce to file system analysis (NTFS/FAT)
  • Analyse operating system artifacts (MS Windows)
  • Find evidences in communication applications (e.g. browser or chat history)
Who
IT department staff - Local Incident Response Team
Level
Knowledge of operating systems and IT security is required
Duration
8 hours
Language
English, German
Training materials freely available
Digital Forensics - An Introduction - Training Materials

CIRCL FORENSICS TRAINING

Training Materials: Edition May 2020

Forensics Challenge ZIP

Use low level tools like ‘xxd’ and ‘dd’ to recover data out of broken ZIP archives.

cyberday.lu 2019

Download and dump the image of the USB device over your own USB stick to replay the exercises. Please take care to not accidentally overwrite your internal drive. We advice to use tools like ‘dd’ with root rights only on virtual machines or test PC’s but not on production machines.
ที่มา:

หมายเหตุ:เนื้อหาในเว็บไซต์นี้มีขึ้นเพื่อวัตถุประสงค์ในการให้ข้อมูลและเพื่อการศึกษาเท่านั้น

* หากมีข้อมูลข้อผิดพลาดประการใด ขออภัยมา ณ ที่นี้ด้วย  รบกวนแจ้ง Admin เพื่อแก้ไขต่อไป
ขอบคุณครับ


#WINDOWSFORENSIC #COMPUTERFORENSICS #DFIR #FORENSICS #DIGITALFORENSICS #COMPUTERFORENSIC #INVESTIGATION #CYBERCRIME #FRAUD 

Digital Forensics: Memory Forensic Tools

Digital Forensics: Memory Forensic Tools 


Memory forensics tools are used to acquire and/or analyze a computer's volatile memory (RAM). They are often used in incident response situations to preserve evidence in memory that would be lost when a system is shutdown, and to quickly detect stealthy malware by directly examining the operating system and other running software in memory.

Acquisition of Memory  (เครื่องมือสำหรับ ทำ Dump Memory )

FTK Imager

The Ftk Imager creates a bit-by-bit image, including unallocated space and slack space. It helps to capture the live RAM  but cannot analyze.
   ใช้คำสั่ง Capture Memory
โปรแกรม FTK Imager Lite  ของบริษัท AccessData สามารถดาวน์โหลด  FTK Imager Lite version 3.1.1  downloads เพียงแค่ดาวน์โหลดมาแล้วแตกไฟล์ใส่ลงใน Thumb drive ก็สามารถใช้งานได้เลย โดยเลือกคำสั่ง Capture Memory จากเมนูที่แสดง โดยก่อนใช้งานจะต้องรู้รหัสผ่านของผู้ดูแลระบบที่จะทำสำเนา Ram จึงจะสามารถรันโปรแกรมนี้ได้


                                                     
ตั้งชื่อ Xpmemdump.mem  เสร็จแล้วได้ไฟล์ตามภาพ

Belkasoft Live RAM Capturer
Photo credit by :oreilly: Windows Forensics Cookbook by Oleg Skulkin, Scar de Courcier


Belkasoft Live RAM Capturer  is a free volatile memory
forensic tool to capture the live RAM . It is equipped with 32-bit and 64-bit kernel drivers
allowing the tool to operate in the most privileged kernel
mode.

DumpIt
It is a very interesting tool for those who want to capture the RAM of some suspicious or under observation person. This tool can be stored on a pen drive and takes less than a minute to acquire the live RAM.

Memory Analysis Tools (เครื่องมือสำหรับวิเคราะห์ Memory)

Volatililty
Redline
YARA





Rekall 

Rekall is an advanced forensic and incident response framework. While it began life purely as a memory forensic framework, it has now evolved into a complete platform.  Rekall implements the most advanced analysis techniques in the field, while still being developed in the open, with a free and open source license. Many of the innovations implemented within Rekall have been published in peer reviewed papers .  

Rekall provides an end-to-end solution to incident responders and forensic analysts. From state of the art acquisition tools, to the most advanced open source memory analysis framework. Rekall at a glanceDownload 

Magnet AXIOM

Recover digital evidence from the most sources, including smartphones, cloud services, computers, IoT devices and third-party images.

Magnet AXIOM เป็นซอฟต์แวร์สำหรับตรวจพิสูจน์หลักฐานดิจิทัล พัฒนาโดยบริษัท Magnet Forensics ช่วยในการตรวจพิสูจน์ข้อมูลดิจิทัล เพื่อสืบค้นและวิเคราะห์ข้อมูล ที่บันทึกอยู่ในสื่อบันทึกข้อมูลดิจิทัลต่าง ๆ อีกทั้งยังสามารถสืบค้นและวิเคราะห์ข้อมูล  memory ,windows usb,ระบบโซเลียลเน็ตเวิร์ค ข้อมูลร่องรอยการใช้งานระบบโซเลียลเน็ตเวิร์คได้อีกด้วย  

Magnet AXIOM 2.0 — Memory Analysis
Evidence Sources



volatility-workbench
จาก PassMark Software  พัฒนาจาก Volatility  นอกจากนี้ยัง สนับสนุน Mac and Linux memory ด้วยครับ

Volatility Workbench is a graphical user interface (GUI) for the Volatility tool. Volatility is a command line memory analysis and forensics tool for extracting artifacts from memory dumps. Volatility Workbench is free, open source and runs in Windows. 


 

 

References

https://en.wikipedia.org/wiki/List_of_digital_forensics_tools


หมายเหตุ:เนื้อหาในเว็บไซต์นี้มีขึ้นเพื่อวัตถุประสงค์ในการให้ข้อมูลและเพื่อการศึกษาเท่านั้น

* หากมีข้อมูลข้อผิดพลาดประการใด ขออภัยมา ณ ที่นี้ด้วย  รบกวนแจ้ง Admin เพื่อแก้ไขต่อไป
ขอบคุณครับ


สนใจสอบ Cert Accessdata 
#Memory Forensic Tools 
#Digital Forensics Certification
#dforensic.blogspot.com/
#DForensics-Examiner
#DFE Forensics

Friday, September 14, 2018

Digital Forensics: Malware Forensics > Yara



เดิม Admin ศึกษา The Volatility memory forensics framework พบว่ามีการใช้ คำสั่ง yarascan  จึงเริ่มต่อยอด เพิ่มเติมกับ Yara Rule


การจะเขียน rule ได้  เราต้อง แกะ พฤติกรรมของ malware   ลักษะเฉพาะของมัลแว ตัวนั้นเช่น ข้อความ ,จุดที่เขียนใน registry, การสร้างไฟล์  ,hash มีหลายอย่างประกอบ  นำมาเขียน yara Rule


#Yara –Help

เริ่ม เขียน Yara Rule WildcardExample

 แบ่งเป็น  meta , String , condition  


String
  • Hexadecimal strings, which are useful for defining raw bytes;
  • Text strings;
  • Regular expressions.

  rule Myrule
{
    
    Meta:  
 
         Description = “Test Yara rules”
          Author = “Neo”
 
    strings:
        $s1 = "Hellow World"
         $s2 = "c99.php"  fullword ascii
 
 
    condition:
        1 of ($s)
 
}

.........................................................................................




rule WildcardExample
{
    strings:
       $hex_string = { E2 34 ?? C8 A? FB }

    condition:
       $hex_string
}

.........................................................................................



เริ่ม เขียน Yara Rule Metasploit Meterpreter
        rule My_Meterpreter
{
    
    Meta:  
 
         Description = “Test Yara rules Meterpreter
          Author = “Neo”
 
    strings:
        $s1 = "MACHINE\SYSTEM\CONTROLSET001\SERVICES\WINSOCK2\PARAMETERS\PROTOCOL_CATALOG9"
        $st1 = "MACHINE\SYSTEM\CONTROLSET001\SERVICES\WINSOCK2\PARAMETERS\NAMESPACE_CATALOG5 "
        $su1 = "MACHINE\SYSTEM\CONTROLSET001\CONTROL\NLS\CUSTOMLOCALE"
        $s4 = "MACHINE\SOFTWARE\MICROSOFT\WINDOWS NT\CURRENTVERSION\IMAGE FILE EXECUTION OPTIONS"
 
 
    condition:
        all of ($s*)  or (all of (st*) and of (su*))
 
}


# yara -w -m /root/Desktop/Yara/*.yar /root/Desktop/Dump/winxp.vmem
                                      
           ใช้คำสั่ง yara ตรวจสอบ  ไฟล์ dump memory   ชื่อ winxp.vmem




หมายเหตุ สรุป :  ให้เราเอา staring  จาก IOC  มาใส่ใน Yara rule  เป็นเทคนิคลดเวลาในการสร้าง  Yara rule  อย่างหนึ่ง  อ. ของ admin ได้กล่าวไว้

Indicator of compromise (IOC) — in computer forensics is an artifact observed on a network or in an operating system that with high confidence indicates a computer intrusion. Typical IOCs are virus signatures and IP addresses, MD5 hashes of malware files or URLs or domain names of botnet command and control servers.

 
ดูตัวอย่าง Rule ได้ที่

https://yara.readthedocs.io/en/v3.4.0/writingrules.html
https://www.bsk-consulting.de/loki-free-ioc-scanner/
https://en.wikipedia.org/wiki/Indicator_of_compromise
https://blog.malwarebytes.com/security-world/technology/2017/09/explained-yara-rules/
https://securityintelligence.com/signature-based-detection-with-yara/
https://www.joesandbox.com
https://github.com/Yara-Rules
#Malware Forensics 

หมายเหตุ:เนื้อหาในเว็บไซต์นี้มีขึ้นเพื่อวัตถุประสงค์ในการให้ข้อมูลและเพื่อการศึกษาเท่านั้น


* หากมีข้อมูลข้อผิดพลาดประการใด ขออภัยมา ณ ที่นี้ด้วย  รบกวนแจ้ง Admin เพื่อแก้ไขต่อไป
ขอบคุณครับ

#WindowsForensic #ComputerForensics #dfir #forensics #digitalforensics #computerforensic #investigation #cybercrime #fraud

DIGITAL FORENSICS: BINWALK CTF

 DIGITAL FORENSICS: BINWALK CTF วันนี้แอดมาแนะนำหลักสูตร ด้านความมั่นคงปลอดภัยไซเบอร์ (Basic Cyber security) สำหรับผู้เริ่มต้นศึกษามี Lab ให...