Git Product home page Git Product logo

moneymatters38 / podarch Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 69.68 MB

Architecture feature for secure execution of applications on malicious systems.

Makefile 1.97% C 82.75% Shell 1.15% C++ 3.95% Lex 0.01% Yacc 0.04% Assembly 5.24% Batchfile 0.01% Perl 0.61% Haxe 0.15% Objective-C 2.38% M4 0.67% Python 0.48% NSIS 0.01% Forth 0.52% PHP 0.05% HTML 0.02% GDB 0.01% QMake 0.01% XSLT 0.01%

podarch's Introduction

PodArch

Welcome to project "PodArch". Please use the following steps to compile the source codes in order to get started:

I/ LIBC

The compilation steps are same as standard GNU C Library. The tree cannot be compiled in the source directory, hence use a separate build directory to put all the object files. Please provide an absolute path when using the --prefix option to install the libc. (NOTE: Otherwise it defaults to /usr/local/)

  • cd LIBC_DIR
  • mkdir build
  • mkdir install
  • cd build
  • ../libc/configure --prefix=LIBC_DIR/install
  • make
  • make install

II/ QEMU

PodArch is an extension to x86 architecture, hence create an x86 target machine. Please use the '--enable-podarch' switch, otherwise it defaults to vanilla QEMU behavior.

PRE-REQUISITE PACKAGES

  • libcurl4-gnutls-dev
  • libsdl-console-dev

STEPS

  • cd QEMU_DIR
  • ./configure --target-list=x86_64-softmmu --enable-podarch
  • make
  • x86_64-softmmu/qemu-system-x86_64 -hda DISK_DIR -m 2G -kernel KERNEL_IMG -append "root=/dev/sda"

III/ TOOLCHAIN

This basically has two important scripts: get_pod_int.c - which puts placeholder sections for virtual descriptors makepod.c - which actually converts the given binary to a pod-sealed one.

  • cd TOOLCHAIN_DIR
  • make all

IV/ KERNEL

Please note that we will be using a loadable kernel module (LKM) which can be attached easily (using 'insmod') to your kernel. Update the KDIR location in Makefile to point to the kernel source tree which we will be using with PodArch.

  • cd KERNEL_LKM_DIR
  • make

Sample Demo

After all the codes are compiled successfully, we will see how to get a simple 'HELLO WORLD' executed in PodArch. We will need a disk image in DISK_DIR to work with (Need one? click here).

  • vim TOOLCHAIN_DIR/sample.c [Make sure we place "pod_header.h"]
  • sh TOOLCHAIN_DIR/pod_seal_sample.h
  • Load 'TOOLCHAIN_DIR/pod_sample' and 'KERNEL_DIR/pod_kret.ko' into DISK_DIR
  • cd QEMU_DIR
  • x86_64-softmmu/qemu-system-x86_64 -hda DISK_DIR -m 2G -kernel KERNEL_IMG -append "root=/dev/sda"

After QEMU finishes booting the OS

  • insmod pod_ket.ko
  • ./pod_sample

This should execute the code in TOOLCHAIN_DIR/sample.c

podarch's People

Contributors

moneymatters38 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.