Digital Forensics · Programming
File Carving from Memory
Intermediate · 3/5
Paid planPractitioner rank required65 points on first solo solveChallenge brief
Find possible file headers in a hexadecimal byte stream. A signature match identifies a candidate location. It does not establish that a complete file is present.
Read one line containing hexadecimal bytes from standard input. Spaces and upper- or lowercase letters are accepted. Report every matching start position, including repeats, in ascending order. Offsets are zero-based byte offsets. Print one line per match as TYPE at offset N, or print No signatures if none match.
| Type | Hexadecimal signature |
|---|---|
| PNG | 89504e470d0a1a0a |
| JPEG | ffd8ffe0 or ffd8ffe1 |
| 25504446 | |
| ZIP | 504b0304 |
For input 00 25 50 44 46 the output is PDF at offset 1.