Skip to content

Instantly share code, notes, and snippets.

struct Value {
_QWORD size;
_QWORD freed; //chỉ lưu 4 byte
struct Value *next;
char content[size];
}
@chung96vn
chung96vn / Dockerfile
Created April 6, 2019 03:23
Dockerfile of Gifremake
FROM ubuntu:18.04
MAINTAINER anonymous
RUN apt-get update
RUN apt-get install netcat -y
RUN apt-get install -y python-pip python-dev build-essential
RUN pip install -I subprocess32==3.5.0rc1
/*gcc exp.c -o exp -static -no-pie*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <string.h>
#include <stdint.h>
#include <sys/mman.h>
@chung96vn
chung96vn / tostring.c
Created January 12, 2019 03:18
root-me challenge
/*Souce from: https://www.root-me.org/en/Challenges/App-System/LinKern32-Buffer-overflow-basic-1*/
#include <linux/module.h>
#include <linux/version.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/kdev_t.h>
#include <linux/fs.h>
#include <linux/device.h>
#include <linux/cdev.h>
#include <asm/uaccess.h>
HCRYPTPROV hProv;
char filename[MAX_PATH];
memset(filename, 0, MAX_PATH);
GetModuleFileNameA(NULL, filename, MAX_PATH);
char *key = strrchr(filename, '\\') + 1;
if (!CryptAcquireContext(&hProv, NULL, NULL, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT)) {
return NULL;
}
HCRYPTHASH hHash;
if (!CryptCreateHash(hProv, CALG_MD5, 0, 0, &hHash)) {