Skip to content

Instantly share code, notes, and snippets.

@alxrogan
Last active September 29, 2016 00:00
Show Gist options
  • Select an option

  • Save alxrogan/2268cf011e70294510a428fcfe184946 to your computer and use it in GitHub Desktop.

Select an option

Save alxrogan/2268cf011e70294510a428fcfe184946 to your computer and use it in GitHub Desktop.
How to make custom Hak5 LAN Turtle firmware images for mass deployment/etc
Aaron, @alxrogan
All testing done on Kali 2.X Rolling, with various things already installed. Make sure you have binwalk installed as well as liblzma-dev
1) Download the latest Turtle firmware from https://downloads.lanturtle.com/
2) Download the firmware-mod-kit from https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/firmware-mod-kit/fmk_099.tar.gz
3) cd to extracted fmk/src, ./configure and make
4) Edit fmk/shared-ng.inc, make the BINWALK statement look like BINWALK="/usr/bin/binwalk -v".
5) From within the fmk directory, run ./extract-firmware.sh /path/to/turtle-2.bin
6) The firmware will be extracted to fmk/image_parts (footer.img, header.img, rootfs.img), fmk/logs, and fmk/rootfs (contains the extracted squashfs which becomes the turtle's filesystem when installed)
7) Make modifications to the rootfs (assuming that's what you want to do)
8) For whatever reason, the build-firmware script defaults to lzma compression for the squashfs, which is incorrect (it should be xz). Edit the build-firmware.sh and where it says COMP="-comp lzma", replace lzma with xz, so that it states COMP="-comp xz". I also changed it for the else statement as well just for good measure.
9) From there, you should be able to take the fmk/fmk/new-firmware.bin and upgrade the turtle with the usual methods. (https://lanturtle.com/wiki/#!index.md)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment