Showing posts with label LNK FILES. Show all posts
Showing posts with label LNK FILES. Show all posts

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 เพื่อแก้ไขต่อไป
    ขอบคุณครับ

    Friday, January 22, 2021

    DIGITAL FORENSICS:WINDOWS FORENSIC .LNK FILES-PART 3

    DIGITAL FORENSICS:WINDOWS FORENSIC .LNK FILES-PART 3


    วันนี้เราลองมาทดลองทำ Lab  WINDOWS FORENSIC  LNK File โดยใช้ LECmd  ต่อจาก PART 2

    เครื่องมือ

    Location

    Normally, most of LNK-files are located on the following paths:

    • For Windows 7 to 10: C:\Users\%USERNAME%\AppData\Roaming\Microsoft\Windows\Recent
    • อย่างไรก็ตามมีที่อื่น ๆ อีกมากมายที่ผู้ตรวจสอบสามารถค้นหาไฟล์ LNK ได้: บนเดสก์ท็อป (ทางลัดดังกล่าวมักสร้างขึ้นโดยผู้ใช้สะดวกในการเข้าถึงเอกสารและแอพอย่างรวดเร็ว)
    จากภาพด้านซ้าย
    shows what the lnk files look like to the user.

    shows some other files are displayed in the forensic tool FTK Imager


    1 เมื่อเราเปิดหรือ Run ไฟล์ ZIP-Password-BruteForcer.py
    2.Lnk File  จะถูกสร้างขึ้น จากการเปิดไฟล์ และสังเกตุว่า มีวันที่สร้าง(Created)และวันที่แก้ไข (Modified) เท่ากัน  หมายความว่าเราเพิ่งเปิดไฟล์ครั้งเดียว
    3. ใน Lnk File  หากวันที่แก้ไข (Modified)ช้ากว่าวันที่สร้าง (Created) หมายความว่า เราเปิดมันมากกว่าหนึ่งครั้ง
    4. เมื่อกลับไปดู Timestamp ของไฟลฺต้นฉบับ จะแสดงให้เห็นว่า วันที่และเวลาแตกต่างกันกับ วันเวลาของ Lnk File  เพราะ วันที่และเวลาของไฟล์นี้คือ วันที่และเวลาของไฟล์ต้นฉบับ
    5. หากไฟล์ต้นฉบับถูกลบไป  Lnk File  จะไม่ถูกลบไปด้วย เราสามารถค้นหาข้อมูลจาก Lnk File  เพื่อย้อนไปดูว่าเกิดอะไรขึ้นก่อนหน้านี้้
    6. การที่เราจะดูข้อมูลจาก  Lnk File จำเป็นต้องใข้เครื่องมือ ใน lab เราจะใช้ เครืองมือ Eric Zimmerman LMC LECMD



    ทำการอ่านค่า .LNK FILE โดยใช้โปรแกรม LECmd.exe


    C:\Users\User\Downloads\LECmd>LECmd.exe -f C:\Users\User\AppData\Roa
    ming\Microsoft\Windows\Recent\ZIP-Password-BruteForcer.py.lnk 

    Source Create:  คือ วันเวลาสร้างของไฟล์ Lnk
    Source Modified:  คือ วันเวลาแก้ไขของไฟล์ Lnk  ถ้าค่าสองครั้งนี้เท่ากันนั้นหมาบความว่าไฟล์ถูกเปิดเพียงครั้งเดียว
                                                  ถ้ามีการเปิดไฟล์มากกว่าหนึ่งครุ้ง  ค่าเวลาแก้ไขของไฟล์จะแสดงค่าวันเวลาที่เปิดไฟล์
    Drive type Removeable  สื่อบันทึกข้อมูลแบบถอดได้

    #C:\Users\User\Downloads\LECmd>LECmd.exe -d "C:\Users\localadmin\AppData\Ro
    aming\Microsoft\Windows\Recent" --csv "C:\Users\User\Downloads"
    ทำการ Export ไฟล์ออกมาเพื่อง่ายในการวิเคราะห์


    This file can tell an investigator if the user:

    • Has accessed a specific file
    • The name of the file
    • The original path to the target file (the file it is referencing)
    • MAC (Modified, Accessed, Created) timestamps of the target file and the .lnk file
    • The size of the target file
    • Attributes of the target file (read-only, hidden, system)

    LNK files-Part


    สรุป

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

    หมายเหตุ : ก่อนหน้านี้ ไฟล์ .LNK เคยถูกใช้เป็นช่องทางในการแพร่กระจายมัลแวร์ เช่น ใส่สคริปต์​เรียกคำสั่ง PowerShell เพื่อดาวน์โหลด​มัลแวร์​เรียก​ค่าไถ่ รูปแบบการโจมตี มีทั้งการฝังคำสั่งในไฟล์ .LNK เพื่อให้เรียก PowerShell, CMD.exe, MSHTA.exe หรือโปรแกรมอื่นๆ ที่สามารถรับคำสั่งแล้วนำไปประมวลผลได้

    DIGITAL FORENSICS:WINDOWS FORENSIC .LNK FILES-PART 2


    ที่มา:The SANS 3MinMax series with Kevin Ripa

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

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

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

    Saturday, June 6, 2020

    DIGITAL FORENSICS:WINDOWS FORENSIC .LNK FILES-PART 2

    DIGITAL FORENSICS:Windows Forensic .LNK files-Part 2


    วันนี้เราลองมาทดลองทำ Lab  WINDOWS FORENSIC  LNK File โดยใช้ LECmd
    Where LNK extension link files are stored varies depending on the operating system. These files :
    Windows XP :
    • \Documents and Settings\UserName\Recent
    Windows Vista and Windows 7 :
    • \Users\UserName\AppData\Roaming\Microsoft\Windows\Recent Items

    LNK file signature 
    Hex Signature 4C 00 00 00 01 14 02 00
    ASCII  8 Bytes
    File Extension LNK
    Magic value     ‘L’  ,       L.......
     


    เครื่องมือที่ใช้สำหรับทำ Lab 


     Download LECmd
    ตัวอย่างคำสั่งที่ใช้

    Examples:
    วิเคราะห์ LNK file
              LECmd.exe -f "C:\Temp\foobar.lnk"
              LECmd.exe -f "C:\Temp\somelink.lnk" --json "D:\jsonOutput" --jsonpretty
             
    Export CSV
              LECmd.exe -d "C:\Temp" --csv "c:\temp" --html c:\temp --xml c:\temp\xml -q
              LECmd.exe -d "C:\Temp" --all

    1. ทดสอบเปิด Folder & File ใน External drive

    The original path of the file
    F:\18 Computer Forensics\CTF\dfchallenge.org\201 - Let_s dig new memories

    F:\18 Computer Forensics\CTF
    2. เปิด ตำแหน่งของ LNK File  ที่อยู่บนเครื่อง computer
    "Users\UserName\AppData\Roaming\Microsoft\Windows\Recent Items"

    \Users\UserName\AppData\Roaming\Microsoft\Windows\Recent Items
    3. Run Commnad 

     .\LECmd.exe  -f "C:\Users\UserName\AppData\Roaming\Microsoft\Windows\Recent\201 - Let_s dig new memories.lnk"



    - File size of the linked file = 25,314
    - Working Directory: F:\18 Computer Forensics\CTF\dfchallenge.org\201 - Let_s dig new memories

    Target ID information 


    Link Information -- ระบุรายละเอียดตำแหน่งของไฟล์ต้นฉบับ
    Volume name and serial number
    Label:  2019_2T
    Serial number: 0C5D7EA3
    Local path: F:\18 Computer Forensics\CTF\dfchallenge.org\201 - Let_s dig new memories


    เมื่อมีการ เปิดไฟล์ 201 - Let_s dig new memories.docx ครั้งที่ 1
    Source File: C:\Users\UserName-\AppData\Roaming\Microsoft\Windows\Recent\201 - Let_s dig new memories.lnk

    Create Date    2020-06-26
    Modified Date 2020-06-26  เมื่อมีการเปิดไฟล์ ค่า Modified จะมีการบันทึกค่าล่าสุด


    เมื่อมีการ เปิดไฟล์ 201 - Let_s dig new memories.docx ครั้งที่ 2

    Source File: C:\Users\UserName-\AppData\Roaming\Microsoft\Windows\Recent\201 - Let_s dig new memories.lnk

    Create Date    2020-06-26
    Modified Date 2020-07-13  เมื่อมีการ เปิดไฟล์อีกครั้ง ค่า Modified จะมีการบันทึกค่าล่าสุด
    Computer name
    Mac Address



    4. Run Command Export to CSV File.
    \LECmd.exe -d "C:\Users\Training-4\AppData\Roaming\Microsoft\Windows\Recent" --csv "c:\temp1"






    Episode 19: “Quick Win” files #3 - .LNK files-Part 1

    Episode 20: “Quick Win” files #3 - .LNK files-Part 2



    WINDOWS FORENSIC .LNK FILES-PART 1


    What are LNK Files?

    LNK files are a relatively simple but valuable artifact for the forensics investigator. They are shortcut files that link to an application or file commonly found on a user’s desktop, or throughout a system and end with an .LNK extension. LNK files can be created by the user, or automatically by the Windows operating system. Each has their own value and meaning. Windows-created LNK files are generated when a user opens a local or remote file or document, giving investigators valuable information on a suspect’s activity.

    Why are LNK Files Important to Your Digital Forensics Investigation?

    LNK files are excellent artifacts for forensic investigators who are trying to find files that may no longer exist on the system they’re examining. The files might have been wiped or deleted, stored on a USB or network share, so although the file might no longer be there, the LNK files associated with the original file will still exist (and reveal valuable information as to what was executed on the system).
    Credit :www.magnetforensics

    Windows Shortcut File (LNK)

    สรุป
           .LNK จะถูกสร้างขึ้นโดยอัตโนมัติเมื่อ User มีการเปิดไฟล์ (Open File) จะมีนามสกุล .LNK
           .LNK จะถูกสร้างขึ้นเมื่อ User สร้าง shortcut ของโปรแกรมหรือไฟล์ และจะมีนามสกุล LNK
           เมื่อมีการเปิดไฟล์ LNK File จะมีการ Update  ค่าวันเวลา Create ,Modify ,Access
           เมื่อมีการลบ File หรือ Folder ต้นฉบับ แต่ไฟล์ .LNK จะไม่ถูกลบไปด้วย
         
    ที่มา:
    https://medium.com/ctf-writeups/hack-the-box-access-write-up-33ab4cb7d9b3
    https://medium.com/@snowshoe/ctf-secplayground-2018-write-up-a18e711341a1
    https://nandynarwhals.org/codegate2012-forensics100/
    https://or10nlabs.tech/defcon-dfir-ctf-2018/#file-server-basic
    https://ericzimmerman.github.io/#!index.md
    https://blog.nviso.eu/2017/04/04/tracking-threat-actors-through-lnk-files/
    https://www.magnetforensics.com/blog/forensic-analysis-of-lnk-files

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

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

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


    Volatility Lab

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