Week 12 · lesson
Hex Editor Investigation: Read the File Beneath the Preview
A file viewer shows the interpretation of a file.
A hex editor shows the bytes.
That difference matters when a defender needs to answer questions such as:
- Does the file begin with the expected structure?
- Is there readable text in an unexpected location?
- Does data continue after the apparent end of the normal content?
- Does the file extension match what the bytes suggest?
This lesson uses only teacher-provided synthetic files.
The extension is a label
A filename such as:
photo.jpg
suggests an image type, but the extension alone does not prove the internal file format.
Applications can inspect file signatures or structure to decide how to interpret the bytes.
For this class, think of a file signature as a recognizable byte pattern near the beginning of some file formats.
You do not need to memorize a library of signatures. You need to understand why byte-level inspection can verify or challenge the filename label.
Hex-editor layout
A typical hex view shows:
- byte offset
- hexadecimal byte values
- text interpretation where printable characters exist
Example synthetic row:
00000000 52 4f 42 4f 54 4e 49 58 ROBOTNIX
The left side tells you where the bytes occur. The center shows hex. The right side may show readable characters.
Investigate three synthetic artifacts
Artifact A: renamed file
Filename:
notes.png
The teacher-provided byte view begins with data associated with a text file rather than the expected image structure.
Your job is to document the mismatch, not execute or open unknown content.
Artifact B: appended note
An otherwise normal classroom image has readable synthetic text after the expected media data:
GSC{check_beyond_the_preview}
Record the offset and explain why the image preview did not reveal the appended text.
Artifact C: metadata clue
A supplied file contains a readable metadata string naming an editing application and a fictional timestamp.
Explain what the metadata supports and what it does not prove about the author.
Use offsets as evidence
If you claim that a string exists inside a file, record where you found it.
Example:
At offset
0x01F0, the supplied byte view contains the readable ASCII stringarchive=week12.
That statement is stronger than:
There is hidden stuff in the file.
The first claim is inspectable.
File structure versus payload
A hidden payload can be:
- embedded within a carrier using a steganography method
- stored in metadata
- appended after other file content
- simply encoded text inside the file
These are not all the same technique.
Use accurate language based on the evidence.
Build a byte-level evidence table
| Artifact | Filename claim | Byte-level observation | Offset | Interpretation | Limitation |
|---|---|---|---|---|---|
| A | PNG image | supplied structure does not match expected image | possible renamed/mislabeled file | does not establish malicious intent |
Complete all three rows.
Safe tool workflow
If the course provides a browser hex viewer or teacher VM:
- verify the artifact is teacher-provided
- open it only in the approved inspection tool
- record file hash or lab identifier if supplied
- inspect offsets and readable strings
- do not execute extracted content
- save notes, not unnecessary copies of the artifact
Compare preview and bytes
For Artifact B, create two observations:
Preview-level observation
What does a normal viewer show?
Byte-level observation
What additional data is visible?
Then answer:
Which view is more useful for proving that the extra string exists, and why?
Evidence for Lesson 2
Submit:
- three-artifact byte-level evidence table
- offset notes
- preview-versus-bytes comparison
- one paragraph explaining why a filename extension is not sufficient evidence of file type
Finish with:
The byte-level view changed my conclusion when ________.
A hex editor is useful because it exposes representation directly. The analysis still depends on knowing what the observed bytes actually support.