Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Manohar Reddy boddumanohar

🎯
Focusing
  • Kubernetes
  • Bengaluru, Karnataka
View GitHub Profile
View testlibvmi.c
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <sys/mman.h>
#include <stdio.h>
#include <inttypes.h>
#include <libvmi/libvmi.h>
//reg_t cr3;
View bf_lvmi_test_ept.c
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
// intially `data` contains some useful data.
// the goal is to remap the gpa's so that `addr` points to actual values that`buffer`points.
// rema
int main() {
void *addr = aligned_alloc(4096,4096); // gpa1
void *data = aligned_alloc(4096,4096); // gpa2
View test_ept_memorymap.c
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<json-c/json.h>
#define VMI_BIT_MASK(a, b) (((unsigned long long) -1 >> (63 - (b))) & ~((1ULL << (a)) - 1))
unsigned long parse_reg_value(const char *reg, json_object *root)
{
json_object *return_obj = NULL;
View memory-map.md

Notes on Memory Map Detection in the Kernel

Introduction

The kernel needs to know the system memory map to initialize its memory management subsystem at early boot. The memory map defines the physical memory layout, which specifies how much memory is available on the system and which parts of the physical memory are reserved for memory-mapped I/O or other special purposes. The kernel uses the memory map to setup its internal memory management data structures in regions of the memory that are safe to use.

System memory is typically initialized by the firmware, which has most information about hardware in general. The firmware therefore knows the system memory map. The kernel has two methods for obtaining the memory map: the kernel can query the firmware for a memory map or the kernel can ask the boot loader to provide it. Both methods are used by kernels, usually depending on which machine architecture they're running on.

Firmware Methods

@boddumanohar
boddumanohar / test_libvmi_extensions
Created May 21, 2018
This example is used to test `get_register data` bareflank hypercall
View test_libvmi_extensions
//#define _GNU_SOURCE
#include<stdio.h>
int main() {
asm("movl $0, %eax");
asm("vmcall");
const char *output;
asm( "movq %%rdx, %0"
View keybase.md

Keybase proof

I hereby claim:

  • I am boddumanohar on github.
  • I am boddumanohar (https://keybase.io/boddumanohar) on keybase.
  • I have a public key ASDzeJNX2mrVuIkieWTcTfOr-N8W7z_c62V0LxkZuXWAQgo

To claim this, I am signing this object:

View PEMEta output JSON file.
{
"Headers": {
"DosHeader": {
"Magic": "<hexa>",
"e_magic": "<hexa>",
"e_cblp": "<hexa>",
"e_cblp": "<hexa>",
"e_crlc": "<hexa>",
"e_cparhdr": "<hexa>",
"e_minalloc": "<hexa>",
@boddumanohar
boddumanohar / README.md
Created Apr 22, 2017 — forked from chrisjacob/README.md
Setup GitHub Pages "gh-pages" branch and "master" branch as subfolders of a parent project folder ("grandmaster").
View README.md

Intro

Description: Setup GitHub Pages "gh-pages" branch and "master" branch as subfolders of a parent project folder ("grandmaster").

Author: Chris Jacob @_chrisjacob

Tutorial (Gist): https://gist.github.com/833223

The Result

@boddumanohar
boddumanohar / interviewitems.MD
Created Sep 3, 2016 — forked from amaxwell01/interviewitems.MD
My answers to over 100 Google interview questions
View interviewitems.MD

##Google Interview Questions: Product Marketing Manager

  • Why do you want to join Google? -- Because I want to create tools for others to learn, for free. I didn't have a lot of money when growing up so I didn't get access to the same books, computers and resources that others had which caused money, I want to help ensure that others can learn on the same playing field regardless of their families wealth status or location.
  • What do you know about Google’s product and technology? -- A lot actually, I am a beta tester for numerous products, I use most of the Google tools such as: Search, Gmaill, Drive, Reader, Calendar, G+, YouTube, Web Master Tools, Keyword tools, Analytics etc.
  • If you are Product Manager for Google’s Adwords, how do you plan to market this?
  • What would you say during an AdWords or AdSense product seminar?
  • Who are Google’s competitors, and how does Google compete with them? -- Google competes on numerous fields: --- Search: Baidu, Bing, Duck Duck Go