lnk-core
A panic-free Windows Shell Link (.lnk) reader — [MS-SHLLINK] bytes into a typed ShellLink, no findings.
The reader half of lnk-forensic.
For graded forensic findings, use the
lnk-forensic analyzer crate.
use parse_shell_link;
let link = parse_shell_link.expect;
if let Some = &link.link_info
What it parses
ShellLinkHeader—LinkFlags,FileAttributes, the three target FILETIMEs (creation / access / write → Unix epoch seconds), file size, icon index, show command, hotkey. A wrongHeaderSizeorLinkCLSIDyieldsNone.LinkInfo— theVolumeID(drive_type,drive_serial_number,volume_label), thelocal_base_path, and theCommonNetworkRelativeLink(net_name,device_name).StringData—name,relative_path,working_dir,arguments,icon_location, honoring theIsUnicodeflag (UTF-16LE vs ANSI).LinkTargetIDList— the raw PIDL ItemID blob (kept verbatim; full PIDL decode is a shellbag parser's job).ExtraDataTrackerDataBlock— the origin machine NetBIOS name and the droid / birth-droid volume+object GUIDs.
Format constants (HeaderSize, LinkCLSID, the LinkFlags / FileAttributes bits, the
ExtraData block signatures) come from
forensicnomicon::shlink; the parsing
algorithm lives here.
Trust, but verify
#![forbid(unsafe_code)], bounds-checked on every read (no length field
trusted), and fuzzed — a truncated or hostile link yields absent sub-structures or
None, never a panic.
Privacy Policy · Terms of Service · © 2026 Security Ronin Ltd