05 - Forensic data decoding Flashcards

(32 cards)

1
Q

Suppose we’re inspecting a text file (ilovepessoa.txt)
using different editors
They may show different things! Why?

A

Data is encoded using a character encoding scheme
that editor application is having trouble to identify

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the common code text representation?

A

ASCII
(7 bits)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How many bits the ASCII extension uses?

A

8 bits

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the most common unicode?

A

UTF-8

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Why do we in forensics usually need to inspect the raw
bytes, for which we use a hexadecimal editor (hex editor)?

A

Because the raw bytes contain the ground truth.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Most chars use 1 byte, accented chars use … bytes.

A

Accented chars use 2 bytes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How an editor determines the encoding of text file?

A

Uses a default encoding scheme
Uses heuristics
Uses embedded information: BOM

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is BOM?

A

The Byte Order Mark (BOM) is a Unicode char that appears as a magic number at the start of a text stream telling its encoding.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How does an editor see if it’s ASCII?

A

Test if the bit 7 of all bytes is unset.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Integers are stored as a … of one or more bytes.

A

sequence

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Endianness tells the … in which the sequence of bytes is stored

A

order

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Is it possible to encode 2/4-byte characters in little endian or big endian?

A

Yes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Does the BOM marker includes information about endianness?

A

Yes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

UTF-16/UTF-32 without BOM is big endian or small endian by default?

A

Big endian.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Base64 is a popular encoding scheme, for what?

A

Used to encode email attachments and certificates.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Base64 encoding mechanism?

A

[Dados binários] -> 3 bytes (24 bits)
↓ divide
[4 grupos de 6 bits] -> 4 números (0-63)
↓ tabela Base64
[4 caracteres ASCII seguros]

17
Q

What if we need to forensically analyze structured data types?
They are everywhere, e.g., file formats, disk layouts, network packets, etc.

A

Strategy: decode raw bytes using knowledge of the data type layout (tools can help us).

18
Q

Beyond payload data, can file formats include useful meta-data?

A

Yes.
E.g., timestamps, camera model, GPS coordinates, user name, software version that generated the file, etc.

19
Q

Raster image?

A

array of pixels, each encodes a specific color.

20
Q

How many bits per pixel in a raster image?

A

24-bit RGB images encode each pixel with 3 bytes, one per channel: red, green, and blue
Each value tells the intensity of the color varying from 0 (min) to 255 (max) of each channel.

21
Q

What is BMP?

A

Bitmap Image File (ou simplesmente “bitmap”).
File Header - 14 bytes
DIB Header (Bitmap Info Header) - 50-byte
Pixel Data (Bitmap Data) - variável

22
Q

ZIP files: archives that store multiple files. Start with letters…

23
Q

How to decode a file not knowing its format?

A
  • Look for magic numbers: consist of constant numerical
    or text value used to identify a file format or protocol.
  • ## Use helper tools, such as “file” (‘file’ and other tools check for magic numbers)
24
Q

What does the string command do?

A

Strings command: prints out the readable characters from a file.
Useful for looking at data fiels without the originating program, searching executables for useful strings, etc.

25
What if the file is corrupted?
Inspect the file using a hex editor and apply fix.
26
What if files are encrypted?
Cracking approaches: - Brute force: try every possible key / password until succeeds - Dictionary attacks: reduce the number of trials required and will usually be attempted before brute force Automated by password cracking software - A password cracker works by trial and error - Examples: fcrackzip (for zip files), pdfcrack (for pdfs)
27
What is a rainbow table attack?
- Type of dictionary attack that uses pre-computed tables of data to reduce the time required to crack passwords - Rainbow tables are usually created by hashing all possible passwords with a cryptographic hash function and then storing the hashes in a large database - If have access to the hashed pwd and the pwd hash is not salted (i.e., same pwd will always generate same hash), you can compare it with value in table
28
Tips for interpreting file content?
Extension not entirely reliable Open the file and check between (text / binary) Look for known header and footer information - In particular check for file format signatures (e.g., magic numbers) Use tools that know how to interpret specific file format If the file format is unknown, we analyze it manually
29
What is Steganography?
Steganography: Art and science of communicating in a way that hides the existence of a message. Steganography simply takes one piece of information (secret) and hides it within another (carrier / cover).
30
What is digital steganography?
Digital steganography works by encoding secret bits in files, such as photos or audio files, with secret data. - The secret message and the carrier message are digital objects.
31
Ways to do steganography (exploiting the image format).
Hide the secret into unused portions of the carrier file. Idea behind this is to abuse the recognition of EOF: - Opening Stego.jpg on photo editor ignores anything coming after the EOF tag - However, when opened in Notepad, our message reveals itself Append secret into headers: - In Extended File Information (EXIF) - In GIF’s comment extension - ZIP also has a region for adding comments
32
What is LSB?
Least Significant Bit (LSB): - The LSB of a pixel is used to encode hidden information.