1 of 81

Forensic Files, Episode 1: "Fishing for the Truth"

Sara Allain

Ashley Blewer

Code4lib San José

2019-02-19

2 of 81

Introduction

  • Sara
  • Ashley
  • And you!

3 of 81

Introduction

  • Computers! A refresher
  • What are files
  • What are formats
  • How to analyze files
  • Format registries
  • File analysis tools

4 of 81

Computers!

A refresher

5 of 81

“Ones and Zeros”

Everything digital boils down to a binary system where everything is translated down into 0 or 1, or "no" and "yes" or "off" and "on" or “true/false.”

It's a language somewhat similar to how Morse Code is composed completely of dots and dashes.

6 of 81

Bits and bytes

bit = BInary digiT

byte = 8 bits

A lot of things get sorted out at the byte-level, which is why it is referred to so often.

7 of 81

Endian-ness

When we store a collection of bytes (like a file) in a computer system or transmit a collection of bytes over a network, the bytes are stored or sent in a particular order.

Big endian = bytes are ordered from the most significant bit.

Little endian = bytes are ordered from the least significant bit.

8 of 81

Endian-ness

Big endian = the byte that contains the most significant bit is sent or transmitted first.

Little endian = the byte that contains the least significant bit is sent or transmitted first.�

12345678

Most significant bit

Least significant bit

9 of 81

Encodings

Character encodings help you talk to your computer, or enable your programs to talk to your computer. They are like human-computer translation devices.

ASCII, Hexadecimal, and Unicode are all examples of encodings.

We will talk about Hex more later!

10 of 81

Don’t underestimate the power of encodings!

11 of 81

Don’t underestimate the power of encodings!

A and A and A

“Every platonic letter in every alphabet is assigned a magic number by the Unicode consortium which is written like this: U+0639. This magic number is called a code point. The U+ means “Unicode” and the numbers are hexadecimal. U+0639 is the Arabic letter Ain. The English letter A would be U+0041.”

https://www.joelonsoftware.com/2003/10/08/the-absolute-minimum-every-software-developer-absolutely-positively-must-know-about-unicode-and-character-sets-no-excuses/

12 of 81

Files!

What are they?

13 of 81

Files

A file is an array of bytes that are encoded in a particular way.

Files are things that can be:

  • Open
  • Read
  • Changed
  • Closed
  • Permissions modified

14 of 81

File formats

We have many different types of files! These are categorized into different formats.

The format of your file tells your computer what to do with the data inside the file.

15 of 81

File formats living in binary

16 of 81

Magic numbers

What separates a file from the rest of the binary landscape?

Magic numbers!

17 of 81

Magic numbers

Magic numbers are sometimes known as file signatures. They are a short string of hexadecimal code at the beginning and/or end of a file’s byte array that allow a file to identify itself.

18 of 81

Magic numbers

The magic number for the audio format FLAC is 66 4C 61 43 in hexadecimal, which becomes fLaC when translated to text.

Whenever a program sees 66 4C 61 43 at the beginning of the file, it knows that the file is a FLAC.

19 of 81

File formats living in binary

66 4C 61 43

20 of 81

File structure

The data within a file (the byte array) is organized in a particular order:

  • Magic numbers (file signature)
  • Header
  • Body (or payload)

21 of 81

File format specifications

A specification is a document that defines how a file must be structured to be considered a particular format. It outlines all the rules required to have a valid file - for example, “A FLAC bitstream consists of the "fLaC" marker at the beginning of the stream.” [1]

22 of 81

File format specifications

File format specs can be standardized through a standards body (but don’t have to be). They can be open (anyone can read them) or closed (proprietary, only people in a company/organization/who pay can access them).

23 of 81

Example specification

24 of 81

More complex media

25 of 81

Registries!

People love lists

26 of 81

Registries

PRONOM (UK National Archives)

Format Descriptions (US Library of Congress)

`file` (Unix command)

File Formats Wiki (ArchiveTeam)

27 of 81

Registries

28 of 81

Registries

29 of 81

More about format registries/signatures

My first file format signature - Jenny Mitcham, DPC

Five Star File Format Signature Development - Ross Spencer, Artefactual

30 of 81

Break time!

31 of 81

Hex editor: What am I looking at?

32 of 81

Reading hexadecimal

Humans count in base-10, which means we get to nine and then we go to one-plus-zero, or ten, followed by one-plus-one (11), one-plus-two (12), etc.

Computers count in base-2. Binary is just 0 and 1.

Hexadecimal is base-16, which means it gets to 16 and then starts over. It's confusing to think about. But they are represented in our common human-language as 0-9 and A-F.

One Hexadecimal can represent four bits.

33 of 81

Reading hexadecimal

  • To do it yourself:
    • Download Hex Fiend or HxD another editor
    • The below are built into UNIX-based systems (macOS, Linux)
    • Use xxd in your terminal
      • xxd [options] file
      • cat file | xxd
    • Use hexdump in your terminal
      • hexdump [options] file
      • cat file | hexdump

34 of 81

Hex Fiend (macOS)

35 of 81

HxD (Windows)

https://mh-nexus.de/en/hxd/

36 of 81

Hex editor: What am I looking at?

Try these formats:

  • Plain .txt file
  • Word document
  • CSV file
  • Excel spreadsheet
  • A zip file

37 of 81

File analysis tools!

Awww yeah, now we’re getting to the good stuff.

38 of 81

File analysis tools

Tools that read and analyze digital objects for you!

  • JHOVE
  • FIDO
  • Siegfried
  • Exiftool
  • MediaInfo

39 of 81

FIDO

FIDO (Format Identification for Digital Objects) identifies file formats based on their file signature, which it obtains from the PRONOM file signature registry.

40 of 81

Siegfried

Like FIDO, Siegfried is a signature-based file format identification tool, but it’s more robust. It implements:

  • PRONOM file format signatures
  • freedesktop.org’s MIME-info file format signatures
  • the Library of Congress’s FDD file format signatures (beta).

41 of 81

JHOVE

JHOVE is a tool for format identification, validation, and characterization of digital objects.

Format validation conformance is determined at three levels:

  • Well-formedness
  • Validity
  • Consistency

42 of 81

JHOVE Format validation

  • Well-formed: the digital object meets the purely syntactic requirements for its format
    • Example: TIFF starts with 8 byte header...
  • Valid: the digital object is well-formed and it meets the higher-level semantic requirements for format validity
    • Example: TIFF’s RGB section has at least 3 samples per pixel
  • Consistent: the digital object is valid and its internally extracted representation information is consistent with externally supplied representation information
    • Example: TIFF is consistent with NISO Z39.87 metadata

43 of 81

Exiftool

Exiftool is used for reading, writing and editing metadata.

It’s especially useful for image files, but also works with audio, video, and PDF files.

(has no logo)

44 of 81

MediaInfo & family

MediaInfo extracts metadata, primarily but not exclusively from audiovisual files. It is a characterization tool.

For a video file, this would include information like the format, codec ID, aspect, frame rate, bit rate, color space, etc.

45 of 81

MediaInfo & family

MediaConch is a file format conformance checker (validation tool) for working with FFV1, MKV, and LPCM formats.

It will tell you if your file is well-formed, valid, and consistent with the specification.

46 of 81

MediaInfo & family

MediaConch is also a policy checker, validating a file against an institution-created policy.

You can create a policy that says all videos must have a frame rate of 24 fps and use MediaConch to confirm that all the videos in your collection conform to this policy.

47 of 81

MediaInfo & family

MediaTrace extracts file information at the binary level. It looks at the chunks of data that make up audiovisual files to tell you about the internal structure of a chunk.

(has no logo)

48 of 81

Let’s play!

We will do some demonstrations and answer questions; if you have a laptop, play along or on your own!

49 of 81

Thank you!

Cat pictures: S. Allain and A. Blewer

GIFs: gifcities.org

50 of 81

Forensic Files, Episode 2: "A Purr-fect Match"

Sara Allain

Ashley Blewer

Code4lib San José

2019-02-19

51 of 81

Introduction

  • Sara
  • Ashley
  • And you!

52 of 81

Introduction

  • Digital preservation life cycle
  • Preservation of digital cultural objects
  • Access to digital cultural objects
  • Workflows and decision-making
  • Tools, tools, tools!
  • “Just right” level of preservation

53 of 81

Digital preservation lifecycle

How do we end up with all this stuff and what do we do with it?

54 of 81

Digital preservation life cycle

  1. Accessioning/Curation
  2. Digitization
  3. Characterization
  4. Metadata extraction
  5. Normalization
  6. Derivative generation
  7. Presentation

55 of 81

Information gathering

56 of 81

Accessioning/Curation

  • Is this analog object worth keeping?
  • Is this digital object worth storing?

57 of 81

Digitization

  • Is this analog object worth digitizing?
  • Significant decision-making required

58 of 81

Characterization

  • What is this digital object?
  • Does it easily self-identify?
  • Is it a well-known and well-supported format?
  • Is it an open format?

59 of 81

Metadata extraction

  • Saving what you know now for people (and computers) to leverage in the future
  • Metadata-only surrogates of files, so you don’t have to touch the originals (which can be very big)

60 of 81

Normalization

  • Should a copy be made in a preservation format?
  • What formats are recommended for preservation?

61 of 81

Preservation of digital objects

62 of 81

Storage

  • What is our storage capacity?
  • Where do we store things? Locally; a hosted service; big cloud providers?
  • How do we check that our stored materials are safe?

63 of 81

Storage formats

  • How do we package materials for storage, including metadata?

64 of 81

Accessing stored material

65 of 81

Access to digital objects

66 of 81

Derivative generation

  • Should an access copy be created?
  • What formats are good for access for different types of files?

67 of 81

Presentation

  • What to do with access copies?
  • How and what to make public (or semi-public)?
  • That whole “copyright” thing

68 of 81

Discussion

69 of 81

Break time!

70 of 81

Tools

  • Standalone tools
  • Storage platforms
  • Digital preservation systems

71 of 81

Preservation planning using a format policy registry

72 of 81

Designing digital preservation workflows

  1. Who is going to do the work?
  2. What’s the funding situation, for people and infrastructure? How will it change over time?
  3. What is your institutional mandate / what are your legal requirements regarding preservation of digital objects?

73 of 81

Level 1: Bit-level digital preservation

How much control do we have over our digital objects?

  • Selecting objects to be preserved (may include digitization).
  • Moving material to storage locations that are secure, replicated, and regularly monitored.

74 of 81

Level 2: Metadata capture

How much can we find out about a given file?

  • Characterization and metadata extraction.
  • Descriptive metadata generation.
  • Writing metadata in a way that makes clear the relationship between the object and its metadata.

75 of 81

Level 3: Preservation planning

What actions can we take to increase our chances that a file will persist over time?

  • Normalization

76 of 81

Level 4: Accessibility

How do we ensure that we have ongoing access to our data?

  • Health checking
  • Manual or automated spot-checking
  • Migration
  • Software preservation and emulation

77 of 81

See also

NDSA Levels of Digital Preservation

Digital Preservation Handbook (Digital Preservation Coalition)

...and lots of other resources!

78 of 81

“Just right” levels of preservation

What is the right fit for you org?

Your institutional mandate / legal requirements are your foundation - build from there.

What do you need to do?�What do you want to do?�What would you like to do in an ideal world?

79 of 81

Discussion

80 of 81

Thank you!

Cat pictures: S. Allain and A. Blewer

GIFs: gifcities.org

81 of 81

Citations