>_ IzzyLab

Hands-on task

This task is step 6 of the course “Investigating a server”

Restore a file from hex

easy~3 min

The file /root/payload.hex contains a regular xxd hex dump — with offsets on the left and an ASCII column on the right. Restore the original bytes from it and save them to /root/payload.bin.

What you'll practise:
  • xxd
  • hex
  • reverse conversion
  • binary data
  • encoding

Topic breakdown

A hex dump is a reversible text representation of bytes, and xxd can unfold it back into binary. The reverse direction is handled by a separate reverse flag, but that alone isn't enough: if the input is "flat" hex without addresses or columns, you also need to enable plain mode, otherwise the tool expects the format with addresses. Combining both modes yields the restored bytes, which are directed into a file.

What's checked

  1. bytes restored from the dump

What it looks like