CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/external/source/exploits/CVE-2016-4655/nvpatch.h
Views: 11780
1
/*
2
* nvpatch.h - Patch kernel to unrestrict NVRAM variables
3
* Taken and modified from kern-utils
4
*
5
* Copyright (c) 2014 Samuel Groß
6
* Copyright (c) 2016 Pupyshev Nikita
7
* Copyright (c) 2017 Siguza
8
*/
9
10
#ifndef NVPATCH_H
11
#define NVPATCH_H
12
13
#include <stdio.h>
14
#include <mach/mach.h>
15
16
#define MAX_HEADER_SIZE 0x4000
17
18
typedef struct
19
{
20
vm_address_t addr;
21
vm_size_t len;
22
char *buf;
23
} segment_t;
24
25
int nvpatch(task_t kernel_task, vm_address_t kbase, const char *target);
26
27
#endif
28
29