Take the State of DFIR Survey Caseloads, AI, tools and careers. 8 minutes, anonymous, early access to the report. Take the survey ›

Take the survey

Take the State of DFIR Survey

Caseloads, AI, tools and careers. 8 minutes, anonymous, early access to the report.

Take the survey →
Analyse .lnk files ...
 
Notifications
Clear all

Analyse .lnk files with a hex editor

7 Posts
4 Users
0 Reactions
2,299 Views
(@condorman)
Active Member
Joined: 19 years ago
Posts: 18
Topic starter   [#1798]

I've seen articles regarding the format of .lnk files and I'm keen to look into this. I've tried to open them using a hex editor, but it opens the executable, rather than the .lnk file. I know this because the typical "MZ" and "PE" signatures are where they should be for the .exe and, according to the .lnk properties, the file size is around 400 - 500 bytes.

How do I open the .lnk to examine it? I don't know if it's relevant, but I'm using XP Pro SP2, which is fully patched and the filing system is NTFS.

Thanks for your time (and patience!).



   
Quote
(@bithead)
Noble Member
Joined: 22 years ago
Posts: 1206
 

What editor? I just dropped several LNK files into WinHex (14.2) and it opened the file not the executable.



   
ReplyQuote
(@condorman)
Active Member
Joined: 19 years ago
Posts: 18
Topic starter  

I used HEXedit from MiTeC and I've also tried Notepad++. I realise that the latter isn't specifically a hex editor but it does have a hex mode which I've used successfully to examine executables, as well as other files.



   
ReplyQuote
 ddow
(@ddow)
Reputable Member
Joined: 22 years ago
Posts: 278
 

WinHex opens the .lnk file correctly. Hex Workshop (and it appears some others) seem to follow the link instead.



   
ReplyQuote
(@condorman)
Active Member
Joined: 19 years ago
Posts: 18
Topic starter  

Thanks for the input. It looks like I'm going to have to get WinHex. I suspected that it might be something to do with the hex editors rather than what I was doing.



   
ReplyQuote
(@j2222)
Eminent Member
Joined: 21 years ago
Posts: 36
 

I haven't tried it … but how about renaming if x.lnk.txt?



   
ReplyQuote
(@condorman)
Active Member
Joined: 19 years ago
Posts: 18
Topic starter  

I haven't tried it … but how about renaming if x.lnk.txt?

Perfect - nice trick which works like a dream. I guess it's just lateral thinking, but something which I'm going to have to practice!



   
ReplyQuote

Enterprise Partners

  • semantics21 2026 FF logo
  • atola-logo
  • MagnetForensics_ForensicFocus
  • celebrite-logo

Partners

  • Logo_MSAB_Black (2)
  • Aid4Mail-Logo
  • gmdsoft-logo
  • detego-logo
  • ADF
  • logo Belkasoft 135x100

Academic Partners

  • University of Southampton logo 2
Share: