Skip to content



Folders and files

Last commit message
Last commit date

Latest commit



5 Commits

Repository files navigation

Prime+Count: Novel Cross-world Covert Channels on ARM TrustZone



  • This repository contains codes for Prime+Count paper.
  • You can try to build and test this covert channel between normal world and secure world.
  • The source code in this repository is only for the normal world part.
  • The secure world part can be implemented by using the same approach depending on your environment.

Prime+Count attack

  • Prime+Count implements fast covert channels in single-core and cross-core scenarios in the TrustZone.
  • Prime+Count achieves low-noise covert channel via monitoring how many L1/L2 cache refill events happens.
  • To get full details, See the paper.

How to build

  • See comments in ./ to get usage.
  • Run ./ with proper arguments.
  • After ./, See output files under build/
  • covert_lkm.ko : kernel module for building covert channel
  • main : user application for testing

How to test

  • First of all, You have to update secure-os or trusted application running on secure-os.

    $ insmod covert_lkm.ko
    $ ./main 1 1 images/01/data /tmp/01.csv
      (See comments in src/user/main.c to get full usage and example.)
      (images/01/data :  input image to be transfered through Prime+Count covert channel)
      (/tmp/01.csv :  output encoded image, encoded via bucket method)

Python script to convert bucket-encoded image to real image

  • images/py_scrips/*.py are scripts to convert bucket-encoded image to real image.
  • You can try to convert the bucket-encoded image with below instructions.
    $ cd images/py_scripts/test/
    $ python ../ 01.csv (01.csv is prepared bucket-encoded image for testing)
    $ ls -l output.pbm
      (See output.pbm, and compare it to circle.pbm which is original image.)

Image data

  • images/ : images for experiments.


  title        = {{Prime+Count: Novel Cross-world Covert Channels on ARM TrustZone}},
  author       = {Cho, Haehyun and Zhang, Penghui and Kim, Donguk and Park, Jinbum and Lee, Choong-hoon and Zhao, Ziming and Doup\'{e}, Adam and Ahn, Gail-Joon},
  booktitle    = {In Proceedings of the 34th Annual Computer Security Applications Conference (ACSAC)},
  month        = Dec,
  year         = 2018,
  address      = {San Juan, Puerto Rico, USA},


  • Under GPLv2.
  • Copyrights are specificed under LICENSE.



Prime+Count: A Novel Cross-world Covert Channel on ARM TrustZone







No releases published


No packages published


  • C 80.1%
  • Python 11.9%
  • C++ 5.0%
  • Makefile 1.6%
  • Shell 1.4%