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


No comments:

Post a Comment

Digital Forensics:User Access Logging (UAL)

 Digital Forensics:UAL  Log What Is User Access Logging? UAL is a feature included by default in Server editions of Microsoft Windows, start...