Kernel Installation Guide

Kernel Installation Guide

Downloading the Kernel

  1. Download kernel version 2.6.36 to the appropriate
    directory. If
    you just plan to install or upgrade the kernel running on your machine,
    the appropriate directory is /usr/src/. If you are going to be hacking
    this kernel, download to somewhere like your home directory.

    tar xzvf linux-2.6.36.tar.gz

Continue reading “Kernel Installation Guide”

Game Development With Phaser.js – “Hello World”

As every coding tutorial starts with a “Hello World” example, we’ll also follow the same. Our first tutorial on game development with phajer.js will be a “Hello World” example and a little extension over that to make you familiarize with basic functions of phaser.js. All our source code will be available in github. Continue reading “Game Development With Phaser.js – “Hello World””

Virtual Function Table Attack

Virtual function table (A.K.A vtable) is the key to manage virtual function which is a key mechanism to support polymorphism in C++ language. VTable is used to support dynamic dispatch or runtime method binding in C++. At the same time it is a popular target of malicious programmers to execute their malicious behavior on the system. Attacker exploits the virtual function table mechanism to execute shellcode in the system. In this writing we’ll see how attacker can execute virtual function table attack. Continue reading “Virtual Function Table Attack”

Create Camera Preview In Android

I was trying to create a simple camera application in android. For my application purpose I needed to display the camera preview. So I followed android developers site and also some other blogs to create a camera preview in android. So everything was working except there was one major bug. If I lock my device while the application is still running and then unlock, my application is no longer in the screen which is completely not what I wanted. So after doing some research I found that most of the tutorial I was following didn’t take care of the application life cycle which is very important for this kind of application. Hence I’m writing this tutorial to show how to create a camera preview in android application. I’ll try to show how to manage the full application life cycle for a camera application. Continue reading “Create Camera Preview In Android”

Virtual Serial Connection Between Two QEMU VM

If you are a Linux user for your most of the research work and you come upon the task of debugging Windows kernel, but don’t want to switch to a Windows platform for that, QEMU can help you. We can create a virtual serial connection between two QEMU VM. One VM acts as the debugger and the other as debugee, and the virtual connection between them act as the communication channel. Continue reading “Virtual Serial Connection Between Two QEMU VM”

Kernel Debugging Using GDB & QEMU

The effect of a bug in the kernel is catastrophic and may lead to system crash. Kernel debugging is an important step for kernel developers to find out bugs or debugging kernel execution. Many developers use virtual machine while working on kernel level. QEMU is a famous virtualization tool among the kernel developers. In this tutorial we’ll learn kernel debugging using GDB and QEMU. We’ll use QEMU to run our guest kernel(the one to debug) and in the host machine we’ll run GDB which will connect to QEMU. I’ll use 32-bit Ubuntu-12.04 kernel in this tutorial. Continue reading “Kernel Debugging Using GDB & QEMU”

Writing Char Device Driver Part 2

This is the second part of our char device driver development tutorial. In part1, we learnt how to write a simple char device driver that supports read or write functions. We dynamically assigned a major number for our driver and using the assigned major, we manually created a device file in /dev directory. Continue reading “Writing Char Device Driver Part 2”

Writing Char Device Driver Part 1

In this post we’ll take our 1st step of writing a char device driver for Linux. In our previous post, which I would recommend you to read unless you already did, we created a very simple kernel module. Other than dumping some log message, it didn’t do anything fancy. In this post we’ll create a char device driver which creates a device file in /dev directory. We’ll also show how a user space program can read from or write to this device file. And finally we’ll modify it to reverse a string. We’ll name our device driver as “reversedev“. I also assume, by now you know how to compile and install a kernel module and how to test kernel log using dmesg command. If you don’t you definitely need to read this. Continue reading “Writing Char Device Driver Part 1”