Book Image

Practical Hardware Pentesting, Second edition - Second Edition

By : Jean-Georges Valle
Book Image

Practical Hardware Pentesting, Second edition - Second Edition

By: Jean-Georges Valle

Overview of this book

Practical Hardware Pentesting, Second Edition, is an example-driven guide that will help you plan attacks, hack your embedded devices, and secure the hardware infrastructure. Throughout the book, you’ll explore the functional and security aspects of a device and learn how a system senses and communicates with the outside world. You’ll set up a lab from scratch and gradually work towards an advanced hardware lab. The first part of this book will get you attacking the software of an embedded device. This will get you thinking from an attacker point of view; you’ll understand how devices are attacked, compromised, and how you can harden a device against the most common hardware attack vectors. As you progress, you’ll get to grips with the global architecture of an embedded system and sniff on-board traffic, learn how to identify and formalize threats to the embedded system, and understand its relationship with its ecosystem. This 2nd Edition covers real-world examples featuring various devices like smart TVs, baby monitors, or pacemakers, you’ll discover how to analyze hardware and locate its possible vulnerabilities before going on to explore firmware dumping, analysis, and exploitation. By the end of this book, you’ll and understand how to implement best practices to secure your hardware.
Table of Contents (5 chapters)

Mounting filesystems

The mount command (you have to be privileged to use it; use sudo) is the main tool for this.

Modern versions of the command recognize the filesystem automatically. If the detection is not working but you know the filesystem in use, the -t option will allow you to force the filesystem format to be used.

To list the filesystems your kernel is currently supporting, look into the /proc/filesystems file (as a side note, not all modules can be mounted; to get a list of what it does support, look into the /lib/modules/$(uname -r)/kernel/fs directory).

Some filesystems used in embedded systems may not be supported in some usual distribution kernels and so you may need to do the following:

  • Recompile your kernel with more filesystems.
  • Compile additional modules for your kernel.
  • Use userspace filesystem management (such as FUSE).

Since most of the firmware or storage images we get are in the form of a file instead of a block device, some options are useful for managing this...