CyberKit

File Signatures

Also called magic bytes, file headers, magic numbers.

Header/footer byte patterns that identify a file's true type regardless of name.

What it is

Characteristic byte sequences at the start (and sometimes end) of a file (magic numbers) that identify its real format independent of its extension. Carving and type-identification tools key off these headers and footers.

Why it matters

Signatures let examiners detect files renamed to hide their nature (an executable masquerading as a .jpg) and drive signature-based carving, which recovers files from unallocated space by recognizing headers and footers when no file-system metadata remains.

In practice

A file named report.jpg carried an executable's magic bytes, exposing a renamed payload staged for later use.

What to look for

  • Header and footer bytes such as MZ for executables or PK for zip files.
  • Files whose extension does not match their signature.
  • Fragments that start correctly but end early.

Common mistake

Trusting extensions. The signature tells you what a file really is.

Use it in CyberKit

In the field

Well-known tools where this shows up on the job. They are listed to show the landscape, not as a recommendation.

  • Ghidra Open source

    A disassembler and decompiler for reading what a sample's code actually does. Our notes.

  • YARA Open source

    Writes rules that match a family's code or strings across many files. Our notes.

  • VirusTotal Commercial

    Shows how many engines flag a file, plus its relations to domains and other samples.

  • ANY.RUN Commercial

    An interactive sandbox where you watch a sample run and click through what it asks for.

Read next

  • Slack-Space Hiding: Concealing data in slack, unused, or non-standard disk areas to evade detection.
  • Unallocated Space: Disk areas not currently assigned to a file but often holding recoverable data.
  • Deleted-File Recovery: Restoring removed files from lingering metadata or residual cluster data.

Sources