Showing posts with label Windows prefetch. Show all posts
Showing posts with label Windows prefetch. Show all posts

Wednesday, February 22, 2023

DIGITAL FORENSICS:How To Check If Someone Else Is Using Your Computer

DIGITAL FORENSICS:How To Check If Someone Else Is Using Your Computer

This is another digital forensics image that was prepared to cover a full Windows Forensics course.

System Image: here

Forensic Artifacts

Windows Logon Events  วิธีการเช็ค Logon events

Windows  will automatically annotate a login every time one occurs. This means that each time you log in, the time and date is tracked and noted for you to see. 

Export Security event
Export Event security.evtx ('c:/Windows/System32/Winevt/logs/Security.evtx)
Export Security event

Event ID: 4608 Windows is starting up 21-6-2016 6:40


Event ID: 4624 An account was successfully logged on. 21-6-2016 8:07

Windows Logon Events 4624

Event ID: 4672 Special privileges assigned to new logon 21-6-2016 8:07

Event ID: 4672 Special privileges assigned to new logon

Event ID: 4616 The system time was changed. 21-6-2016 7:58

Event ID: 6013 The system uptime is <number> seconds. 21-6-2016 8:41

The system uptime is <number> seconds.


Anonymous Logon / Null



Program execution artifacts

Program execution artifacts indicate programs or applications that were run on the system. The user could cause the execution, or it could be an autostart/run event managed by the system. Some categories overlap with the file knowledge category we discussed earlier in the chapter. I am not going to re-examine those specific artifacts in this section. Just be aware that the artifacts from recent apps, JumpLists, an MRU, and prefetch files will also contain information about program/application activity. 

Program execution artifacts

Prefetch  Windows Prefetch files, are designed to speed up the application startup process. The Prefetch files are stored into the path

 %windir%\Prefetch

and contains the name of the executable, a Unicode list of DLLs used by that executable, a count of how many times the executable has been run, and a timestamp indicating the last time the program was run.

Prefetch
Export *.pf file 
Prefetch
Last Run Time CCLEANER.exe  21-6-2016 12:28

Prefetch

Browser History & Web Search เช็คประวัติบราวเซอร์

Google Chrome, Firefox, and Edge all have a way of allowing you to see your search history. You can usually find it in the Settings, whichever icon that may be, toward the top-right of the screen. Click on it and locate History, then backtrack through it to see if you can notice any inconsistencies. Look for unfamiliar websites as they can be a classic sign that someone else has been accessing your computer.

Web Search 21-6-2016 15:53 "Skype" , 21-6-2016 16:29"kitties"

Browser History

Browser History

Recent Activities เช็คเปิดใช้ไฟล์ล่าสุด

Status checks on specific files and folders is a great way to determine if unauthorized users have been accessing your computer.

How To Check If Someone Else Is Using Your Computer

วิธีตรวจสอบว่ามีคนอื่นใช้คอมพิวเตอร์ของคุณหรือไม่

อ่านเพิ่มเติม : How to Determine the Last Shutdown Time and Date in Windows

                 LastActivityView , 


ที่มา: ultimatewindowssecurity

         Digital Forensic Challenge Images (Datasets)


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

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

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

Monday, January 10, 2022

Digital Forensics:Windows prefetch part III

Digital Forensics:Windows prefetch part III 

วันนี้มาลองทดสอบ Windows prefetch  โดยใช้เครื่องมือ PECmd 

Author: Eric Zimmerman  

https://github.com/EricZimmerman/PECmd


Prefetch เป็นโฟลเดอร์อยู่ที่ C: WindowsWindows ใช้สำหรับเก็บข้อมูลการใช้งานแอปพลิเคชันต่าง ๆ หลักการทำงาน คือ เมื่อเครื่องคอมพิวเตอร์เริ่มทำงานในแต่ละครั้ง วินโดว์จะติดตามวิธีการที่เครื่องคอมพิวเตอร์ของผู้ใช้งานเริ่มต้นทำงานและโปรแกรมที่ผู้ใช้เปิดใช้เป็นประจำ วินโดว์จะบันทึกข้อมูลนี้เป็นไฟล์เล็ก ๆ ไว้ในนี้ ดังนั้น ครั้งต่อไปที่ผู้ใช้เปิดเครื่องคอมพิวเตอร์ วินโดว์จะอ้างถึงไฟล์ต่าง ๆ เหล่านี้ เพื่อช่วยร่นระยะเวลาของกระบวนการเริ่มต้น สรุปคือจะทำให้ผู้ใช้สามารถใช้งานได้เร็วขึ้นนั่นเอง


Prefetch ไฟล์ มีนามสกุล .pf  


เมื่อผู้ใช้เปิดแอปพลิเคชันจากตำแหน่งเฉพาะเป็นครั้งแรก Windows จะสร้างไฟล์ Prefetch (.pf) สำหรับแอปพลิเคชันนั้นภายใต้  %SystemRoot%\Prefetch (C:\Windows\Prefetch).



ไฟล์เหล่านี้ถูกใช้โดยระบบปฏิบัติการเพื่อโหลดข้อมูลที่เก็บไว้ล่วงหน้าจากดิสก์ไปยังหน่วยความจำล่วงหน้า เพื่อเพิ่มความเร็วในการบู๊ตครั้งต่อๆ ไปหรือการเริ่มต้นแอพพลิเคชั่น คิดว่ามันเป็นกลไก AI บางประเภทที่คาดการณ์สิ่งที่คุณต้องการและ "ดึงข้อมูลล่วงหน้า" ให้กับคุณ

Maximum Number of Prefetch files:

  1. Windows XP to Windows 7: 128
  2. Windows 8 to Windows 10: 1024

File Header Offset 04, length of 4 bytes SCCA (0×53, 0×43, 0×43, 0×41)
Signature 'SCCA' (or in hexadecimal representation 0x53 0x43 0x43 0x41)

Prefetch Registry Setting

To see if the Prefetch/ Superfetch is on or off check the following location in the System hive:

HKLM\System\CurrentControlSet\Control\SessionManager\MemoryManagement\PrefetchParameters

EnablePrefetcher Values

0 – Disable PreFetcher
1 – Application launch Prefetching enabled
2 – Boot Prefetching enabled
3 – Application launch and Boot Prefetching enabled

โดยค่าตัวเลขจะมีความหมายดังต่อไปนี้

  • 0 ปิดการใช้งาน Prefetch
  • 1 เปิดใช้งานแอปพลิเคชันเปิดใช้งานการดึงข้อมูลล่วงหน้า
  • 2 เปิดใช้งาน Boot Prefetching
  • 3 เปิดทั้งข้อ 1 และ ข้อ 2 (จะเป็นค่าเริ่มต้นจะอยู่ที่เลข 3 นี้)

EnableSuperfetcher Values

0 – Disable SuperFetch
1 – Enable SuperFetch for boot files only
2 – Enable SuperFetch for applications only
3 – Enable SuperFetch for both boot files and applications

ไมโครซอฟท์คิดค้นฟีเจอร์ที่เรียกว่า Superfetch ขึ้นมาและเปลี่ยนชื่อเป็น SysMain ในตอนหลัง เพื่อให้สามารถเก็บข้อมูลพวกนี้เอาไว้ใน RAM เองเลย และถ้ามันถูกเรียกกลับมาใช้งานจะถูกเรียกจาก RAM ได้เลย

ทดลองทำโจทย์  Hacktober2020 - Prefetch Perfection


Download file

What time was Internet Explorer opened?

ใข้ PECmd เพื่อดึงค่า prefetch

#H:\Software\PECmd>PECmd.exe -d "H:\Hacktober2020\prefetch\prefetch" --csv "H:\CTF\Hacktober2020\prefetch"



จะได้ไฟล์ออกมา  2 file

timestamp_PECmd_Output.csv - detailed access log and timestamp of the process

timestamp_PECmd_Output_timeline.csv - last launch time of the process

ทำการค้นหาค่า RunTime คำว่า IEXPLORE.EXE   จากไฟล์  20220111070609_PECmd_Output_Timeline.csv


5/1/2017  9:11:41 PM

flag{2017–05–01 21:11:41}


สรุปจากทดสอบ

    1.ข้อมูลจากPrefetch สามารถบอก ประวัติการใช้งานแอปพลิเคชัน  IEXPLORE.EXE  เปิดใช้งานเมื่อใด

    2. ค่า PF File Signatures คือ'SCCA'

    3. เราสามารถตรวจสอบได้ว่าค่า Windows Prefetch เปิดหรือปิดอยู่  ใน Prefetch Registry Setting


ทีมา :  prefetch-forensics


ดูเพิ่มเติม : Windows prefetch part II
                 Windows_Prefetch_File_Format
                  Hacktober2020 
                 prefetch-files-in-windows 
               

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

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

Saturday, May 8, 2021

Cloud Forensics:Google Drive

Cloud Forensics:Google Drive

 วันนี้มาทดสอบการตรวจหาร่องรอยจาก GOOGLE DRIVE จากเครื่องคอมพิวเตอร์โดยพิจารณาจากอะไรบ้าง

ขั้นแรกทำการใช้โปรแกรม FTK Imager ทำสำเนาหลักฐานจากเครื่องคอมพิวเตอร์เป้าหมาย  ได้เป็น Forensic Image file ชื่อ CF009.E01 

Acquiring Disk Image with FTK Imager


Run Autopsy 4.15 and select New Case.
Provide the Case Name and the directory to store the case file. Click on Next.
  • Choose the required data source type, in this case Disk Image and click on Next.
  • Give path of the data source and click on Next.
  • You reach here once all the modules have been ingested. You can begin begin investigating but i recommend waiting until analysis and integrity check is complete.

Google Drive Forensic Artifatcs 

Directories created when Google Drive is installed

<SYSTEMROOT>\Program Files\Google\Drive

In this folder you will find the executable file of the application

<SYSTEMROOT>\Program Files (x86)\Google\Drive

Here you will find information about the updates of the application

<SYSTEMROOT>\Users\<username>\GoogleDrive

This is the default folder used for synchronizing the user’s files with Google Drive cloud service

<SYSTEMROOT>\Users\<username>\AppData\Local\Google\Drive

Here you will find all the native app’s files that store information about the app and the user’s data


Registry 

The installation of Google drive creates various keys and values inside the Registry. View the registry hives listed below in the forensic image of the suspect's hard disk.


    SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\Folders

    SOFTWARE\Google\Drive

    NTUSER.DAT\Software\Microsoft\Windows\CurrentVersion\Run\GoogleDriveSync




 From the Registry we can obtain the installed version and the user folder.

Let’s check the Registry to see if the sync process starts automatically with the user’s login. The right key to view here is NTUSER.DAT\Software\Microsoft\Windows\CurrentVersion\Run

 

Event Log

Path

<SYSTEMROOT>\Windows\System32\winevt\Logs\Application.evtx

Event ID

1033

Event Description Summary

Windows installer installed the product

Provider Name

MsInstaller

Event Data

Among others “<EventData> <Data> Backup and Sync From Google3.43.2448.907110330Google,Inc.(NULL)</Data>”



Prefetch

Windows stores Prefetch files at <SYSTEMROOT>\Windows\Prefetch.
WinPrefetchView



LNK (Shortcut) Files

  • <SYSTEMROOT>\Users\<username>\Desktop\Google Drive.lnk
  •  <SYSTEMROOT>\Users\<username>\Links\Google Drive.lnk
  • <SYSTEMROOT>\ProgramData\Microsoft\Windows\Start Menu\Programs\Google \Drive\Google Drive.lnk
You can parse each of these lnk files with Eric Zimmerman's LECmd for detailed information. A truncated output is shown below.

Web-browsing history
You can find an SQLite database with browsing history under C:\Users\%username%\AppData\Local\Google\Chrome\User Data\Default.

The Log File

You can obtain information about the client sync session from the sync_log.log file located at <SYSTEMROOT>\Users\<username>\AppData\Local\Google\Drive\user_default. 
Database Artifacts

Database Artifacts

  • <SYSTEMROOT>\Users\<username>\AppData\Local\ Google\Drive\user_default\snapshot.db
  • <SYSTEMROOT>\Users\<username>\AppData\Local\Google\Drive\user_default\sync_config.db
  •  <SYSTEMROOT>\Users\<username>\AppData\Local\Google\Drive\cloud_graph\cloud_graph.db
  •  <SYSTEMROOT>Users\<username>\AppData\Local\Google\Drive\global.db
  •  snapshot.db

     Sync_config.db

    • Client version installed
    • Local sync root path
    • User email

                      cloud forensics google drive 

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


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

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

    Tuesday, July 21, 2020

    Digital Forensics:Windows prefetch part II

    Digital Forensics:Windows prefetch part II


      วันนี้มาลองทดสอบ Windows prefetch  โดยใช้เครื่องมือ WinPrefetchView
    สำหรับผู้ใช้งาน Windows ถ้าสังเกตจะพบโฟลเดอร์ ใน C:\Windows\Prefetch ไม่ทราบว่าใช้ทำอะไร มีประโยชน์อะไรบางหรือเปล่า แล้วทำไมมีไฟล์อยู่เต็มไปหมด

    Windows Prefetch คืออะไร

    เป็นเทคนิคของ Windows ที่ใช้สำหรับการเก็บข้อมูลโปรแกรมที่เราเรียกใช้งานบ่อยๆ โดยจะเก็บเป็นไฟล์ข้อมูลเล็กๆ นามสกุล .pf  ใช้สำหรับการเก็บข้อมูลโปรแกรมที่เราเรียกใช้งานบ่อยๆ ในครั้งต่อไปที่เราเรียกใช้โปรแกรม  จะทำให้เรียกใช้โปรแกรมต่างๆ ได้เร็วขึ้น

    Windows Prefetch จึงมีความสำคัญต่อการสืบสวนนิติดิจิตอล 
    สำหรับผู้ตรวจสอบทางนิติวิทยาศาสตร์ สามารถใช้ Windows Prefetch  เป็นหลักฐานการใช้งานโปรแกรม   พวกเขาสามารถพิสูจน์ได้ว่าผู้ต้องสงสัยที่รันโปรแกรมเช่น CCleaner เพื่อปกปิดการกระทำผิดที่อาจเกิดขึ้น หากโปรแกรมถูกลบไปตั้งแต่นั้นไฟล์ prefetch อาจยังคงมีอยู่ในระบบเพื่อแสดงหลักฐาน การใช้ไฟล์ prefetch 
    ประโยชน์อีกอย่างหนึ่งคือ ใช้ Windows Prefetch ในการตรวจสอบมัลแวร์ซึ่งสามารถช่วยผู้ตรวจสอบในการกำหนดว่าเมื่อใดจะมีการเรียกใช้โปรแกรมที่เป็นอันตราย เมื่อรวมสิ่งนี้เข้ากับการวิเคราะห์ Timeline  ผู้ตรวจสอบสามารถระบุไฟล์ที่เป็นอันตรายเพิ่มเติม จำนวนครั้งที่โปรแกรม run หรือ execute จากการดาวน์โหลดหรือสร้างขึ้นในระบบและช่วยระบุสาเหตุที่แท้จริงของเหตุการณ์ได้  


    WinPrefetchView เป็นฟรีโปรแกรมที่ใช้ดูประวัติรายละเอียดต่าง ๆ ของ Prefetch

    ซึ่งสามารถแสดงรายละเอียดได้ดีกว่าดูจากโฟลเดอร์ของ Prefetch และแสดงผลในรูปแบบที่เข้าใจได้ง่าย


    prefetch files are found in the directory C:\Windows\Prefetch. Prefetch files have a .pf extension
    Prefetch files contain the following metadata:
    • The name of the corresponding executable
    • The number of times the executable has been run
    • The size of the prefetch file
    • The files and directories that were referenced during the application startup (this is what Windows wants to trace)
    • Information related to the volume that the executable is on, including the volume path and serial number.


    Here’s a sample of some prefetch files from my test host:

    C:\Digital Forensics Tools.exe    = DIGITAL FORENSICS TOOLS.EXE-52542CA8.pf


    \127.0.0.1\C$\Digital Forensics Tools.exe  = DIGITAL FORENSICS TOOLS.EXE-95205518.pf

    C$Digital Forensics Tools.exe


    H:\Digital Forensics Tools.exe  = DIGITA~1.EXE-7EC97B47.pf

    F:\Digital Forensics Tools.exe  = DIGITAL FORENSICS TOOLS.EXE-1C722632.pf

    • z:\Digital Forensics Tools.exe is executed
    • it is mapped to its UNC path 
    • \\Localhost\Z\Digital Forensics Tools.exe = DIGITAL FORENSICS TOOLS.EXE-7DE46524.pf



    Note that I’ve got several applications with the same name, but a different location. That is evidence by the somewhat-similar hashes, and in many application’s cases, is likely indicative of folder structure change.

    สรุปจากทดสอบ
        1 เมื่อUser.เปิดไฟล์ Digital Forensics Tools.exe ใน Drive ที่แตกต่างกัน ค่า prefetch files ที่ได้จึงมีแตกต่างกันตาม 
    ทีมา :  

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

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

    บุก 2 จุด ทลายเครือข่ายค้าคลิปเยาวชนแนว นาย – ทาส เปิดกลุ่มลับเก็บค่าสมาชิก

    บุก 2 จุด ทลายเครือข่ายค้าคลิปเยาวชนแนว นาย – ทาส เปิดกลุ่มลับเก็บค่าสมาชิก Photo Credit:F Bตำรวจสอบสวนกลาง ตำรวจสอบสวนกลาง (CIB) โดย กองบัง...