Coder Social home page Coder Social logo

m-1-k-3 / firmae_kernel-v4.1 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pr0v3rbs/firmae_kernel-v4.1

0.0 0.0 0.0 139.82 MB

kernel-v4.1 for firmadyne mips

License: Other

Shell 0.06% C++ 0.77% Python 0.05% Perl 0.14% C 96.56% Objective-C 0.08% Clojure 0.01% Assembly 1.99% Scilab 0.01% Awk 0.01% UnrealScript 0.01% Makefile 0.30% XS 0.01% Yacc 0.02% Lex 0.01% M4 0.01% GDB 0.01% Roff 0.01% Gherkin 0.01% sed 0.01%

firmae_kernel-v4.1's Introduction

Introduction

This contains the modified MIPS kernel for the FIRMADYNE framework, which includes an in-tree firmadyne module to perform instrumentation and emulation.

This module can be configured using the following parameters:

Parameter Default Values Description
devfs 1 (on) 0, 1 Create stubs in devfs and emulate behavior
execute 1 (on) 0 - 5 Counter to execute /firmadyne/console after 4th execve() syscall (requires syscall hooks), 0 to disable
reboot 1 (on) 0, 1 Attempt to emulate system reboot by re-executing /sbin/init
procfs 1 (on) 0, 1 Create stubs in procfs and emulate behavior
syscall 255 (all) 0 - 16 Output log bitmask for hooking system calls using the kprobe framework, 0 to disable

Usage

Since MIPS systems can be either big-endian or little-endian, this kernel should be compiled for both endianness. The below instructions produce a little- endian (mipsel) kernel, but should be repeated for a big-endian (mipseb) kernel.

Little-Endian (MIPSEL)

Create the kernel build output directory:

mkdir -p build/mipsel

Copy the configuration file into the build directory:

cp config.mipsel build/mipsel/.config

Assuming that the appropriate cross-compiler is installed in /opt/cross/mipsel-linux-musl, execute:

make ARCH=mips CROSS_COMPILE=/opt/cross/mipsel-linux-musl/bin/mipsel-linux-musl- O=./build/mipsel -j8

The output kernel image will be generated at the following location:

build/mipsel/vmlinux

Big-Endian (MIPSEB)

Create the kernel build output directory:

mkdir -p build/mipseb

Copy the configuration file into the build directory:

cp config.mipseb build/mipseb/.config

Assuming that the appropriate cross-compiler is installed in /opt/cross/mipseb-linux-musl, execute:

make ARCH=mips CROSS_COMPILE=/opt/cross/mipseb-linux-musl/bin/mipseb-linux-musl- O=./build/mipseb -j8

The output kernel image will be generated at the following location:

build/mipseb/vmlinux

Notes

This instrumented MIPS kernel is built for the ARCH_MALTA MIPS Malta target with a 24kf processor. As a result, hardware support on this emulated target is limited to peripherals that are both available on the emulated target and supported by QEMU. Since an emulated PCI bus is available and supported, this allows additional ethernet devices (e.g. rtl8139, smc91c111, pcnet32, etc.) to be attached to the virtualized system. Emulated hard drives can be attached using the IDE block device interface.

As future work, it may be useful to switch to VirtIO on MIPS, since support has been recently merged into the Linux kernel. However, this would require a kernel upgrade. Additionally, it may be useful to add support for MIPS64 systems, although these do not appear to be prevalent. Nevertheless, at the time, we performed our published experiments over our dataset using this kernel for MIPS systems.

Pull requests are greatly appreciated!

firmae_kernel-v4.1's People

Contributors

0xdkay avatar pr0v3rbs 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.