- Confidentiality
- Resources should be protected from unauthorized access
- Prioritized by governments
- Concepts
- Sensitivity
- How harmful is disclosure
- Sensitivity
- Discretion
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <sys/time.h> | |
| #include <sys/resource.h> | |
| #include <time.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <unistd.h> | |
| #define ONE_SECOND 1000000000L | |
| #define ONE_MS 1000000L |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // copied from https://github.com/gkaindl/meltdown-poc/blob/master/meltdown.c | |
| // flush_reload from https://github.com/defuse/flush-reload-attacks | |
| // TSX from https://github.com/andikleen/tsx-tools | |
| // dump_hex from https://gist.github.com/ccbrown/9722406 | |
| #include <stdio.h> | |
| #include <stdint.h> | |
| #include <stdlib.h> | |
| #include <unistd.h> | |
| #include <errno.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <stdint.h> | |
| #ifdef _MSC_VER | |
| #include <intrin.h> /* for rdtscp and clflush */ | |
| #pragma optimize("gt",on) | |
| #else | |
| #include <x86intrin.h> /* for rdtscp and clflush */ | |
| #endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* Simple PT dumper */ | |
| /* | |
| * Copyright (c) 2015, Intel Corporation | |
| * Author: Andi Kleen | |
| * All rights reserved. | |
| * | |
| * Redistribution and use in source and binary forms, with or without | |
| * modification, are permitted provided that the following conditions are met: | |
| * | |
| * 1. Redistributions of source code must retain the above copyright notice, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* Some test definition here */ | |
| #define DEFINED_BUT_NO_VALUE | |
| #define DEFINED_INT 3 | |
| #define DEFINED_STR "ABC" | |
| /* definition to expand macro then apply to pragma message */ | |
| #define VALUE_TO_STRING(x) #x | |
| #define VALUE(x) VALUE_TO_STRING(x) | |
| #define VAR_NAME_VALUE(var) #var "=" VALUE(var) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Hook main() using LD_PRELOAD, because why not? | |
| * Obviously, this code is not portable. Use at your own risk. | |
| * | |
| * Compile using 'gcc hax.c -o hax.so -fPIC -shared -ldl' | |
| * Then run your program as 'LD_PRELOAD=$PWD/hax.so ./a.out' | |
| */ | |
| #define _GNU_SOURCE | |
| #include <stdio.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| % perf stat ./tsx_per_core | |
| Aborts: 73381 | |
| No reason: 57535 | |
| reason 0: 0 | |
| reason 1: 15833 | |
| reason 2: 15833 | |
| reason 3: 13 | |
| reason 4: 0 | |
| reason 5: 0 | |
| 81597398 68933303 85476712 72654716 76819140 72119787 77728188 74167801 75244800 72119632 75951739 72606078 74035109 70998737 89185152 58165171 86098994 83338241 88201758 81982602 77964219 77861602 75642915 79207346 73514808 79929374 74429694 71508632 0 0 0 0 |
This is basically a rehash of an original post on CNXSoft - all credit (particularly for the Virtio device arguments used below) belongs to the author of that piece.
Download the latest uefi1.img image. E.g. ubuntu-16.04-server-cloudimg-arm64-uefi1.img from https://cloud-images.ubuntu.com/releases/16.04/release/
Download the UEFI firmware image QEMU_EFI.fd from https://releases.linaro.org/components/kernel/uefi-linaro/latest/release/qemu64/
Determine your current username and get your current ssh public key:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Activation Key: 54703-98224-69173-57729-64687 | |
| File Installation Key: 60915-54893-59227-06046-00879-23758-40953-46389-00580-22272-43569-01202-13854 |