Showing posts with label Shutdown Time. Show all posts
Showing posts with label Shutdown Time. Show all posts

Saturday, January 10, 2026

DIGITAL FORENSICS:How to Determine the Last Shutdown Time and Date in Windows II

How to Determine the Last Shutdown Time and Date in Windows II

หากคุณเป็นผู้ตรวจสอบหลักฐานทางดิจิทัล อาจมีบางครั้งที่คุณจำเป็นต้องทราบประวัติการ ปิดเครื่องของคอมพิวเตอร์  ตัวอย่างที่ 2 

Using Windows  registry

Windows also stores the last shutdown date and time in a REG_BINARY value named ShutdownTime in the following


HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Windows\ShutdownTime

How to Determine the Last Shutdown Time and Date in Windows II

ค่าการปิดเครื่องครั้งล่าสุด (Shutdown Time) ของระบบปฏิบัติการ Windows

ShutdownTime Value = 7F A2 3A F1 36 C5 D4 01  


1. ตัวอย่าง โปรแกรม Registry Viewer

เปิดไฟล์ Software โดยโปรแกรม Registry Viewer  พบว่าค่า วัน 

How to Determine the Last Shutdown Time and Date in Windows II


Last Written Time = 2/15/2019 14:01:26 UTC


2. Convert FILETIME timestamps to human-readable date (hxxps[:]//www[.]epochconverter.com/ldap)

ค่า 7F A2 3A F1 36 C5 D4 01 ถ้าเป็น Windows FILETIME (Little-Endian)
ต้องกลับ byte ก่อน จะได้: 01 D4 C5 36 F1 3A A2 7F

= 0x01D4C536F13AA27F 

 เมื่อแปลงจาก FILETIME   จะได้เวลาเป็น:

GMT: Friday, February 15, 2019 2:01:26 PM


How to Determine the Last Shutdown Time and Date in Windows II

อ่านเพิ่มเติม:


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


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

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

Friday, February 21, 2025

นิติวิทยาศาสตร์ดิจิทัล: การตรวจสอบเหตุการณ์การเปิดและปิดระบบบนระบบปฎิบัติการวินโดว์

นิติวิทยาศาสตร์ดิจิทัล: การตรวจสอบเหตุการณ์การเปิดและปิดระบบบนระบบปฎิบัติการวินโดว์

1. บทนำ: ทำไมเรื่องนี้จึงสำคัญ?

การหาว่าเครื่องคอมพิวเตอร์ถูกเปิดเครื่อง ปิดเครื่อง หรือรีสตาร์ทเมื่อใด เป็นงานพื้นฐานในการสืบสวนด้านนิติวิทยาศาสตร์ดิจิทัล ไทม์ไลน์นี้สามารถช่วยในเรื่องต่อไปนี้:

  • ยืนยันหรือหักล้างคำให้การ: ผู้ต้องสงสัยอ้างว่าไม่ได้ใช้คอมพิวเตอร์ในเวลาที่กำหนด บันทึกของระบบสามารถพิสูจน์ได้ว่าเครื่องกำลังทำงานอยู่

  • สร้างลำดับเวลาของเหตุการณ์: การทำความเข้าใจว่าระบบทำงานเมื่อใด ช่วยให้นักสืบสามารถเชื่อมโยงกิจกรรมของผู้ใช้ (เช่น การเข้าถึงไฟล์ การท่องอินเทอร์เน็ต) กับช่วงเวลาใช้งานที่เฉพาะเจาะจง

  • ระบุกิจกรรมน่าสงสัย: การปิดระบบที่ไม่ปกติ (เช่น ในระหว่างการถ่ายโอนข้อมูล) หรือการรีบูตในช่วงเวลาที่ไม่เหมาะสม (เช่น ตี 3) อาจบ่งชี้ถึงกิจกรรมที่เป็นอันตราย เช่น การติดตั้งมัลแวร์ที่ต้องการให้รีบูตระบบ

  • หาช่วงเวลาที่ระบบทำงานต่อเนื่อง (Uptime): ระบบทำงานติดต่อกันนานแค่ไหน? เซิร์ฟเวอร์ที่มีเวลาการทำงานที่สั้นกว่าที่คาดไว้อย่างไม่ปกติ อาจเกิดจากการขัดข้องหรือการรีบูตโดยไม่ได้รับอนุญาต

2. แหล่งที่มาหลักของหลักฐาน

นักสืบด้านนิติวิทยาศาสตร์ต้องพึ่งพาหลักฐานหลายอย่างภายในระบบปฏิบัติการเพื่อสร้างประวัติสถานะการทำงานของเครื่องขึ้นใหม่ สำหรับระบบ Windows (เป้าหมายที่พบบ่อยที่สุด) แหล่งที่มาหลักได้แก่:

A. บันทึกเหตุการณ์ Windows (Windows Event Logs)
นี่เป็นแหล่งข้อมูลที่น่าเชื่อถือและมีรายละเอียดที่สุด บันทึกหลักได้แก่:

  • System Log: บันทึกเหตุการณ์ที่เกี่ยวข้องกับส่วนประกอบของระบบปฏิบัติการ

    • Event ID 12: System start-up - โปรแกรมหลัก (Kernel) และไดรเวอร์สำหรับการบูตโหลดเรียบร้อยแล้ว นี่เป็นตัวบ่งชี้ที่เชื่อถือได้ว่าระบบได้บูตเสร็จสิ้น

    • Event ID 13: System shut-down - กระบวนการของระบบที่เริ่มการปิดเครื่องถูกเรียกใช้งาน

    • Event ID 6005: Event log service started - บริการบันทึกเหตุการณ์เริ่มทำงาน สิ่งนี้จะถูกบันทึก หลังจาก ระบบเริ่มกระบวนการบูตแล้ว และเป็นเครื่องหมายทั่วไปที่ใช้บอกจุดเริ่มต้นของช่วงการทำงาน

    • Event ID 6006: Event log service stopped - บริการบันทึกเหตุการณ์หยุดทำงาน สิ่งนี้จะถูกบันทึก หลังจาก มีการเริ่มปิดระบบที่สมบูรณ์และถูกต้อง การมีอยู่ของ Event นี้ยืนยันการปิดระบบที่เหมาะสม

    • Event ID 6008: Unexpected shutdown - บ่งชี้ว่าระดับถูกปิดอย่างไม่เหมาะสม (เช่น ไฟฟ้าดับ, กดปุ่ม Reset, ระบบขัดข้องจนจอฟ้า) นี่เป็นสัญญาณสำคัญสำหรับนักสืบ

    • Event Log Startup/shutdown

B. ฐานรีจิสตรี (Registry Hives)
ฐานรีจิสตรีของ Windows รักษาคีย์หลายคีย์ที่ติดตามการบูตของระบบและช่วงการล็อกออนของผู้ใช้

  • System\CurrentControlSet\Control\Windows: ค่า ShutdownTime (ในรูปแบบ FILETIME 64-bit ของ Windows) บันทึกเวลาที่แน่นอนของครั้งล่าสุดที่ปิดระบบอย่างเหมาะสม

  • SYSTEM\CurrentControlSet\Control\Session Manager\Power: ค่า HiberbootSupported สามารถบ่งชี้ว่าระบบรองรับ "Fast Startup" หรือไม่ ซึ่งส่งผลต่อการบันทึกเหตุการณ์การปิดและเปิดระบบ

  • คีย์ UserAssist และ MRU (Most Recently Used): ถึงแม้จะไม่แสดงสถานะการทำงานโดยตรง แต่สามารถแสดงกิจกรรมของผู้ใช้ที่สามารถนำมาเชื่อมโยงกับเวลาที่ระบบทำงานได้

C. ไฟล์ Prefetch
เมื่อแอปพลิเคชันถูกเรียกใช้งานบน Windows ไฟล์ Prefetch (.pf) จะถูกสร้างขึ้น ไฟล์เหล่านี้ประกอบด้วยเวลาที่รันล่าสุดของ executable นั้นๆ เวลาที่ถูกสร้างของไฟล์ Prefetch ไฟล์แรกหลังจากบูต (เช่น ของ WINLOGON.EXE) สามารถเป็นตัวบ่งชี้ที่ดีของเวลาเริ่มต้นระบบ โดยเฉพาะเมื่อบันทึกเหตุการณ์หายไปหรือเสียหาย

D. ไฟล์ Memory Dumps และ Hibernation
ไฟล์ Memory Dumps เต็มรูปแบบ (MEMORY.DMP) หรือไฟล์ Hibernation (hiberfil.sys) เป็นเหมือนภาพถ่ายของ RAM ของระบบในขณะนั้น การวิเคราะห์ไฟล์เหล่านี้สามารถเปิดเผยว่ามีอะไรกำลังทำงานอยู่ตอนที่ระบบขัดข้องหรือเมื่อผู้ใช้ทำให้ระบบเข้าสู่โหมดสลีป/ไฮเบอร์เนต เวลาที่สร้างไฟล์เหล่านี้เป็นประทับเวลาโดยตรงของเหตุการณ์การทำงาน

3. กระบวนการทางนิติวิทยาศาสตร์

  1. การได้มา (Acquisition): สร้างภาพถ่ายของฮาร์ดไดรฟ์ที่ได้มาตรฐานทางนิติวิทยาศาสตร์

  2. การสร้างไทม์ไลน์ (Timeline Creation): ใช้เครื่องมือทางนิติวิทยาศาสตร์ (เช่น Autopsy, FTK Imager,log2timeline) เพื่อแยกวิเคราะห์บันทึกเหตุการณ์ ฐานรีจิสตรี และ Metadata ของระบบไฟล์ เพื่อสร้างไทม์ไลน์รวมของเหตุการณ์ทั้งหมด

  3. การวิเคราะห์ (Analysis):

    • ค้นหา Event ID 6005, 6006, 6008, 12 และ 13

    • ดึงค่า ShutdownTime ออกจากรีจิสตรี

    • เชื่อมโยงเวลาจากแหล่งที่มาต่างๆ เพื่อสร้างไทม์ไลน์ที่เชื่อมั่นได้

    • ค้นหาความไม่สอดคล้องกัน ตัวอย่างเช่น หากมี Event ID 6008 (ปิดระบบไม่Expected) แต่ไม่มีเหตุการณ์ล็อกออนหลังจากนั้นเลย อาจบ่งชี้ว่าระบบไม่ได้ถูกใช้อีกครั้งหรือบันทึกเหตุการณ์ถูกลบ


แบบฝึกหัด: การปิดเครื่องที่น่าสงสัย

สถานการณ์: คุณเป็นนักวิเคราะห์นิติวิทยาศาสตร์ดิจิทัล พนักงานชื่อ "John Doe" ถูกสงสัยว่าขโมยไฟล์ลับของบริษัท เขาอ้างว่าเขาออกจากงานเวลา 12:00 น. ของวันที่ 4 กุมภาพันธ์  2020 และไม่ได้อยู่ใกล้แล็ปท็อปของบริษัทที่เขารับไปหลังจากเวลานั้น อย่างไรก็ตาม บันทึกความปลอดภัยแสดงให้เห็นว่ามีการเข้าถึงไฟล์เซิร์ฟเวอร์จากบัญชีของเขาเวลา 15:17 น. ของวันเดียวกัน ภารกิจของคุณคือวิเคราะห์หลักฐานที่ให้มาเพื่อยืนยันหรือหักล้างคำให้การของเขา

จุดประสงค์: พิจารณาว่าคอมพิวเตอร์ของ John ถูกเปิดเครื่องในช่วงเวลาประมาณ 15:17 น. ของวันที่ 4 กุมภาพันธ์  2020 หรือไม่

หลักฐานที่ให้มา (ข้อมูลจำลอง):

ด้านล่างนี้คือรายการเหตุการณ์ที่กรองแล้วจาก บันทึกเหตุการณ์ System ของคอมพิวเตอร์ และค่าคีย์จาก รีจิสตรี

ส่วน A: การวิเคราะห์บันทึกเหตุการณ์

Event log

วันที่และเวลา (พ.ศ.-ดด-วว ชช:นน:วว)รหัสเหตุการณ์คำอธิบาย


2020-02-4 3:19:25 PM6006The Event log service was stopped.
2020-02-4 3:17:04 PM6005The Event log service was started.
2020-02-4 1:53:34 AM6006The Event log service was stopped.
2020-02-4 1:51:39 AM6005The Event log service was started.

ส่วน B: การวิเคราะห์รีจิสตรี

  • คีย์รีจิสตรี: HKLM\SYSTEM\CurrentControlSet\Control\Windows

  • ชื่อค่า: ShutdownTime

  • ข้อมูลค่า (ในรูปแบบ FILETIME): 2020-02-4 3:19:22


เฉลย:

  1. 1:51:39 น. ระบุโดย Event ID 6005 (บริการบันทึกเหตุการณ์เริ่มทำงาน)

  2. ใช่ ที่เวลา 1:53:34 น. ระบุโดย Event ID 6006 (บริการบันทึกเหตุการณ์หยุดทำงาน) ซึ่งส่งสัญญาณการปิดระบบที่สมบูรณ์

  3. ใช่ บันทึกเหตุการณ์แสดงว่าระดับถูกเริ่มอีกครั้งที่ 3:17:04 น. (Event ID 6005) จากนั้นจึงปิดอีกครั้งที่ 3:19:25 น. (Event ID 6006)

  4. ใช่ สนับสนุนเป็นอย่างมาก ระบบถูกเปิดที่ 3:17:04  น. และทำงานจนถึง 3:19:25 น. ซึ่งหมายความว่าคอมพิวเตอร์อยู่ในสภาพที่ทำงานได้เต็มที่และกำลังทำงานอยู่ในช่วงเวลาที่มีการเข้าถึงไฟล์ที่น่าสงสัย (3:17 น.)

  5. ใช่ สอดคล้องกันเป็นอย่างมาก ค่า ShutdownTime จากรีจิสตรีถูกบันทึกไว้ที่ 3:19:22  น. และบริการบันทึกเหตุการณ์หยุดที่ 3:19:25  น. ความแตกต่าง 3 วินาทีเป็นเรื่องปกติ เนื่องจากบริการบันทึกเหตุการณ์เป็นหนึ่งในบริการสุดท้ายที่หยุดทำงานระหว่างการปิดระบบ ความสอดคล้องนี้ยืนยันการปิดระบบที่เหมาะสมและไม่ใช่การขัดข้อง

Digital Forensics: Examining System Power-On and Power-Off Events

1. Introduction: Why is this Important?

Determining when a computer was turned on, shut down, or restarted is a fundamental task in a digital forensic investigation. This timeline can help:

  • Corroborate or challenge an alibi: A suspect claims they were not using their computer at a specific time. System logs can prove the machine was active.

  • Establish a timeline of events: Understanding when a system was operational helps investigators correlate user activity (e.g., file access, internet browsing) with specific sessions.

  • Identify suspicious activity: Unusual shutdowns (e.g., during a data transfer) or reboots at odd hours (e.g., 3:00 AM) can indicate malicious activity, such as the installation of malware that requires a reboot.

  • Determine system uptime: How long was the system running continuously? A server with unexpectedly short uptime might have been experiencing crashes or unauthorized reboots.

2. Key Sources of Evidence

Forensic investigators rely on several artifacts within the operating system to reconstruct power state history. For Windows systems (the most common subject), the primary sources are:

A. Windows Event Logs
This is the most reliable and detailed source. The key logs are:

  • System Log: Records events related to the operating system components.

    • Event ID 12: System start-up. The kernel and boot drivers have loaded. This is a reliable indicator that the system has finished booting.

    • Event ID 13: System shut-down. The system process that initiates shutdown has been called.

    • Event ID 6005: Event log service started. This is logged after the system has begun booting and is a very common marker for the start of a session.

    • Event ID 6006: Event log service stopped. This is logged after a proper, clean shutdown has been initiated. Its presence confirms a graceful shutdown.

    • Event ID 6008: Unexpected shutdown. This indicates the system was powered off improperly (e.g., power loss, hard reset, blue screen of death). This is a critical flag for investigators.

B. Registry Hives
The Windows Registry maintains several keys that track system boot and user logon sessions.

  • System\CurrentControlSet\Control\Windows: The ShutdownTime value (a 64-bit Windows FILETIME) records the exact time of the last graceful shutdown.

  • SYSTEM\CurrentControlSet\Control\Session Manager\Power: The HiberbootSupported value can indicate if the system supports "Fast Startup," which affects how shutdown and startup events are logged.

  • UserAssist and MRU (Most Recently Used) Keys: While not directly showing power state, they can show user activity that can be correlated with system uptime.

C. Prefetch Files
When an application is run on Windows, a Prefetch file (.pf) is created. These files contain, among other things, the last run time(s) for that executable. The creation time of the first Prefetch file after a boot (e.g., for WINLOGON.EXE) can be a good indicator of the system start time, especially if event logs are missing or corrupted.

D. Memory Dumps and Hibernation Files
A full memory dump (MEMORY.DMP) or hibernation file (hiberfil.sys) is essentially a snapshot of the system's RAM. Analyzing these can reveal what was running at the time of a crash or when the user put the system to sleep/hibernate. The creation time of these files is a direct timestamp of the power event.

3. The Forensic Process

  1. Acquisition: Create a forensically sound image of the hard drive.

  2. Timeline Creation: Use forensic tools (like Autopsy, FTK Imager, log2timeline) to parse the event logs, registry hives, and file system metadata to build a super-timeline of events.

  3. Analysis:

    • Search for Event IDs 6005, 6006, 6008, 12, and 13.

    • Extract the ShutdownTime from the Registry.

    • Correlate the times from different sources to build a confident timeline.

    • Look for inconsistencies. For example, if there is an Event ID 6008 (unexpected shutdown) but no corresponding logon event after that, it might indicate the system was not used again or that logs were cleared.



อ่านเพิ่มเติม

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

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

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


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

Friday, September 16, 2022

DIGITAL FORENSICS:How to Determine the Last Shutdown Time and Date in Windows

DIGITAL FORENSICS:How to Determine the Last Shutdown Time and Date in Windows

หากคุณเป็นผู้ตรวจสอบหลักฐานทางดิจิทัล อาจมีบางครั้งที่คุณจำเป็นต้องทราบประวัติการ ปิดเครื่องของคอมพิวเตอร์ มีหลายวิธี ทำตามขั้นตอนด้านล่างเพื่อดูประวัติการปิดใน Windows เช่น เครื่องมือ Windows ในตัวที่เรียกว่า Event Viewer

Windows Event log.

To find when was a computer last shutdown, check the Event Viewer for the most recent Event ID 1074.

  1. Run eventvwr.msc to start the Event Viewer.
  2. In the Event Viewer, expand Windows Logs → System
  3. Sort the log by Date (descending)
  4. Click Filter Current Log… on the right pane.
  5. Add event id: 1074 in the Includes list, and enable all event types
Determine the Last Shutdown Time and Date in Windows


Event ID 6005 and 6006

Alternately, you can also look for Event ID 6006 “The Event log service was stopped.” and 6005 “The Event log service was started.” which denotes that a shutdown or a restart event had taken place at the specified time.

Last Shutdown Time and Date in Windows

Using Windows  registry

Windows also stores the last shutdown date and time in a REG_BINARY value named ShutdownTime in the following

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Windows

Last Shutdown Time and Date in Windows

ShutdownTime Value = 4A 49 00 25 5C 3D D7 01

Time Decoding Using DCode
DCode™ is a FREE forensic utility for converting data
Format 
 Little-Endian Hexadecimal  Windows Filetime (UTC) 2021-04-30 00:59:59

ShutdownTime Value = 4A 49 00 25 5C 3D D7 01


Working with a forensics image, you can follow the same steps with the image that you’ll have previously mounted as an Item on FTK Imager (or Imager Lite if you prefer).

To do this, you must launch FTK Imager and then click FileAdd Evidence ItemImage file and then click on your image.

To extract Registry files you must search in the directory at the path %SystemRoot%\System32\Config, right-click on the file you need them and then select the export option. To extract the System file.


  • AccessData Registry Viewer is a program that lets you view the contents of Windows operating system registries.

ShutdownTime Data = 4A 49 00 25 5C 3D D7 01  (30-Apr-21 00:59:59 UTC)

Last Shutdown Time and Date in Windows

  • Registry Recon, developed by Arsenal Recon, is a powerful computer forensics tool used to extract, recover, and parse registry data from Windows systems.

ShutdownTime Data = 4A 49 00 25 5C 3D D7 01  (30 Apr 21 12:59:59 AM UTC)

 Time Decoding Using DCode
Determine the Last Shutdown Time and Date in Windows





อ่านเพิ่มเติม : เวลา UTC คือ
                      

                          HOW TO CHECK WINDOWS INSTALL DATE



REF: Windows Registry extraction with FTK Imager

              Shutdown Time and Date in Windows


 

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


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

Volatility Lab

Volatility Lab  Image Wanna.vmem P.73 windows.info #python3  vol.py   -f '/home/kali/Desktop/Wanna/Wanna-MEM.vmem' windows.info     ...