Awesome Switch

The switch hacking scene has sprouted a lot of useful tools and documentation, but those can be fairly hard to find due to being posted left and right without a central repository to list it all. But no more! This awesome list will attempt to be a complete list of all the useful things that the switch hacking community created.

If you see something missing, feel free to leave a comment here so I can add it in.

Resources

Documentation

  • SwitchBrew Wiki - A wiki with a lot of information, from SVC docs to file format descriptions.
  • SwIPC - (Almost) complete documentation for the switch’s IPC services.
  • SwIPC diff - Switch IPC changes for major versions between 1.0.0 and 7.0.0

Video

  • 34C3 - Console Security - Switch - An introduction of the software stack that powers the Switch, with a heavy look at its security systems and how they were compromised.

Writeups

Tutorials

Toolchains

  • libtransistor - A C/C++ toolchain based on clang.
  • libnx - A C/C++ toolchain based on devkitPro/gcc.
  • Megaton-Hammer - A Rust toolchain
  • Hydrosphère - A work in progress C++ toolchain targeting the Nintendo Switch userland, with 32-bit and 64-bit support.

Language Support

  • PyNX - A Python port, based on libnx.
  • LovePotion - A Lua port, based on libnx.
  • Brew.js - A JavaScript port, based on libnx.

Emulators

  • RyujiNX - An innovative emulator written in C# (using dotnetcore, supports Windows/Mac/Linux)
  • Yuzu - An emulator written in C++
  • Mephisto - A simple emulator written to assist debugging and reverse engineering.

Tools

  • hactoolnet/LibHac - An alternative to hactool that supports more formats, and a C# library for reading file formats used by the Nintendo Switch OS.
  • hactool - A tool to view informataion about, decrypt, and extract common file formats.
  • nx2elf - convert Switch binaries to ELFs for easy loading in IDA
  • HacDiskMount - Allows to open Switch eMMC RawNand dumps and mount them as a drive letter in Windows
  • ninfs - FUSE scripts for Nintendo Switch files, similar to HacDiskMount but cross-platform.
  • SwIPC - IPC code and documentation generator. Auto-generated from swipc-gen.
  • ilia - An IPC Logger for the switch, so you can spy on all the IPC calls.
  • switch_cert.py - Convert nintendo’s raw client certificate into an openssl cert.
  • hthh’s switch-reversing - Various Switch reversing scripts.

Homebrew Launchers

  • twili - A launcher with debugging facilities.
  • hbl - The launcher everybody uses.

CFW/Reimplementations

  • Atmosphere - A WIP customized firmware for the Switch.
  • Hekate - CTCaer’s mod - A complete NX bootloader reimplementation. Functionally equivalent to Atmosphere’s Fusee.
  • oss-rtld - A complete reimplementation of RTLD.

Reverse Engineering Corner

Loaders

IDCs

Useful Plugins

  • FRIEND - An IDA Plugin that (among other things) names system registers.
  • hnight7 - An IDA plugin that fixes system register names in hexray view.
  • Diaphora - A Free and Open Source diffing tool. Use this to match functions with their named equivalent from an SDK binary.
  • idb2pat - Similar to diaphora, idb2pat.py generates IDA Pro FLAIR patterns from existing IDB files, which help IDA Pro recognize common functions in compiled programs and automatically rename them for the reverse engineer