Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/external/source/exploits/CVE-2015-2426/common/ReflectiveDLLInjection.h
Views: 11783
//===============================================================================================//1// Copyright (c) 2013, Stephen Fewer of Harmony Security (www.harmonysecurity.com)2// All rights reserved.3//4// Redistribution and use in source and binary forms, with or without modification, are permitted5// provided that the following conditions are met:6//7// * Redistributions of source code must retain the above copyright notice, this list of8// conditions and the following disclaimer.9//10// * Redistributions in binary form must reproduce the above copyright notice, this list of11// conditions and the following disclaimer in the documentation and/or other materials provided12// with the distribution.13//14// * Neither the name of Harmony Security nor the names of its contributors may be used to15// endorse or promote products derived from this software without specific prior written permission.16//17// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR18// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND19// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR20// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR21// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR22// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY23// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR24// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE25// POSSIBILITY OF SUCH DAMAGE.26//===============================================================================================//27#ifndef _REFLECTIVEDLLINJECTION_REFLECTIVEDLLINJECTION_H28#define _REFLECTIVEDLLINJECTION_REFLECTIVEDLLINJECTION_H29//===============================================================================================//30#define WIN32_LEAN_AND_MEAN31#include <windows.h>3233// we declare some common stuff in here...3435#define DLL_METASPLOIT_ATTACH 436#define DLL_METASPLOIT_DETACH 537#define DLL_QUERY_HMODULE 63839#define DEREF( name )*(UINT_PTR *)(name)40#define DEREF_64( name )*(DWORD64 *)(name)41#define DEREF_32( name )*(DWORD *)(name)42#define DEREF_16( name )*(WORD *)(name)43#define DEREF_8( name )*(BYTE *)(name)4445typedef ULONG_PTR (WINAPI * REFLECTIVELOADER)( VOID );46typedef BOOL (WINAPI * DLLMAIN)( HINSTANCE, DWORD, LPVOID );4748#define DLLEXPORT __declspec( dllexport )4950//===============================================================================================//51#endif52//===============================================================================================//5354