Skip to content

Instantly share code, notes, and snippets.

View SouhailHammou's full-sized avatar

Souhail Hammou SouhailHammou

View GitHub Profile
DWORD WINAPI Avtr_ThreadProc( pavtr_listelem Elem )
{
if ( !Elem )
return 1;
if ( Elem->technique == 0x80000000 )
{
if ( Avtr_getKernelRoutines() )
{
int priv_value = Elem->privilege_value;
if ( ! --priv_value ) //1 => ordinary user
typedef struct _avtr_listelem
{
struct _avtr_listelem* next;
struct _avtr_listelem* prev;
DWORD technique; /*0x08*/
DWORD privilege_value; /*0x0C*/
DWORD n_tries; /*0x10*/
DWORD milliseconds; /*0x14*/
} avtr_listelem, *pavtr_listelem;
@SouhailHammou
SouhailHammou / VM.c
Created September 22, 2015 17:00
Virtual machine with a custom instruction set.
/*
VM by Souhail Hammou : custom instruction set
data space and stack space are customizable.
Important : In calculations the VM is using unsigned values.
*/
#include <stdio.h>
#include <stdint.h>
#include <conio.h>
#define TRUE 1
#define FALSE 0