1 of 21

CryptoSmite Setup

From FWSmasher

2 of 21

Re-enrollment steps (done before unenrollment)

Steps MUST be done before unenrolling with any method (useful for those who need to re-enroll with credentials)

  • Setup RigTools
  • Use an extension with the following options:

  • Use the id, and then press download under riienrollment. Save the downloaded file to drive
  • Unenroll immediately, do NOT keep the computer on, this is enough to roll tokens.

3 of 21

Re-enrollment steps to be done after unenrolling

Steps must be done AFTER unenrolling

  • Downgrade to a cryptosmite compatible version and change kernver
  • Open the re-enrollment toolkit by checking github releases.

4 of 21

Riienrollment steps (Done right after

5 of 21

Kernel Version Part 1

To check your kernver, start going to recovery mode.

6 of 21

Kernver check

The kernver located in that image will show up when you press tab, should end in either 2, 1, or 0. If it doesn’t end in any of these digits, your chromebook isn’t supported. If it is supported, downgrade to 118, and proceed with the exploit. If you have already downgraded to a version before 118, stay on that version. The minimum version is V63, so don’t worry about it.

(Downgrading instructions by @cerulyan)

7 of 21

Items to download

RAW RMA SHIM: Check sh1mmer server

Stateful: stateful.tar.xz or smallstate.tar.xz

Cryptsetup chroot: st.tar.xz

Before starting keep all of these ready.

8 of 21

Clone the cryptocrafter repo

In the linux terminal (or wsl) run:

git clone https://github.com/FWSmasher/CryptoCrafter

(If you don’t want to build the cryptosmite shim, use this and after completing those steps, skip to the last slide)

9 of 21

Run cryptosmite_host.sh

Run this command in your linux terminal (wsl or real linux or vm) IT MUST BE IN THE CLONED DIRECTORY

./cryptosmite_host.sh <raw rma shim path> <cryptsetup chroot path> <stateful.tar.xz path>

10 of 21

Prepare the new RMA shim for flashing

Open the Chromebook Recovery Utility, and in the top right corner, select use local image. The image should be the modified rma shim.

11 of 21

Flash the RMA image

Select the USB Drive to flash

[Insert USB Drive selection screen here]

12 of 21

Boot the RMA Shim

  1. You will first need to enter recovery mode.
  2. After entering recovery mode, enable developer mode
  3. Developer mode will be blocked as shown in this screen
  4. Press esc refresh power button, and then plug in the USB you just flashed

13 of 21

Running the injected cryptosmite file

  1. Run cryptosmite.sh in the injected RMA Shim.
  2. In the bash prompt in the edit stateful bash screen, run

tar -xvf /mnt/shim_stateful/stateful.tar.xz -C /mnt/stateful

exit

  • The system will reboot into verified.

14 of 21

What to do in temporary unenroll mode

You should now press the ok button at the oobe screen.

15 of 21

Add user screen

16 of 21

Once you reach the screen displayed in the previous slide

Enable devmode. If you don’t reach this screen, (if it gets stuck), make a github issue.

17 of 21

Instructions of enabling devmode

  1. Press esc+refresh+power
  2. Press Ctrl-D

From here there are two possible ways to proceed. You could stick around for the five minute wait by pressing ctrl-d, or skip the devmode transition.

18 of 21

Skipping 5 minute devmode wait

Once you have reached the devmode is on screen, press esc+refresh+power and boot into rma shim. Select the bash shell, and run the following commands (or add it as a bash script)

mkfs.ext4 /dev/mmcblk0p1 -F

mount -o loop,rw /dev/mmcblk0p1 /tmp

touch /tmp/.developer_mode

umount /tmp && sync

Reboot

On “enrollment” branch shims, this script is already included within the new menu

19 of 21

Running the last two commands in VT2

After enabling devmode, you need to boot into the operating system, and run these following commands (by pressing ctrl-alt-f2, and entering `root`) (these commands will NOT run in a shim)

vpd -i RW_VPD -s check_enrollment=0

cryptohome --action=remove_firmware_management_parameters

Quickly after you boot.

If you don’t get the timing right, powerwash and try again.

20 of 21

Kernel Version Switcher (Unenrolled only)

The kernel version switcher by @kxtz, is an unenrolled only method to change kernel versions. Modifying kernel rollback index in the TPM allows for the usage of newer versions of Chrome OS, without the fear of not being able to downgrade to unenroll again after re-enrollment.

Link: Kernel version switcher on discord

21 of 21

Links to the writeup