Skip to content

Commit

Permalink
added Precise_Spray to repo
Browse files Browse the repository at this point in the history
  • Loading branch information
corelanc0d3r committed Jul 16, 2016
1 parent 37b3a0c commit 7362fb4
Show file tree
Hide file tree
Showing 24 changed files with 396 additions and 0 deletions.
Binary file added Precise_Spray/.vs/Precise_Spray/v14/.suo
Binary file not shown.
28 changes: 28 additions & 0 deletions Precise_Spray/Precise_Spray.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Express 14 for Windows Desktop
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Precise_Spray", "Precise_Spray\Precise_Spray.vcxproj", "{F2676314-A11D-40F4-BD86-655D8CB71721}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{F2676314-A11D-40F4-BD86-655D8CB71721}.Debug|x64.ActiveCfg = Debug|x64
{F2676314-A11D-40F4-BD86-655D8CB71721}.Debug|x64.Build.0 = Debug|x64
{F2676314-A11D-40F4-BD86-655D8CB71721}.Debug|x86.ActiveCfg = Debug|Win32
{F2676314-A11D-40F4-BD86-655D8CB71721}.Debug|x86.Build.0 = Debug|Win32
{F2676314-A11D-40F4-BD86-655D8CB71721}.Release|x64.ActiveCfg = Release|x64
{F2676314-A11D-40F4-BD86-655D8CB71721}.Release|x64.Build.0 = Release|x64
{F2676314-A11D-40F4-BD86-655D8CB71721}.Release|x86.ActiveCfg = Release|Win32
{F2676314-A11D-40F4-BD86-655D8CB71721}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
75 changes: 75 additions & 0 deletions Precise_Spray/Precise_Spray/Precise_Spray.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
// Precise_Spray.cpp : Defines the entry point for the console application.
//

// www.corelan.be
//

#include "stdafx.h"
#include "windows.h"
#include<iostream>


using namespace std;


void print_content(int memaddress)
{
int* pcontent = (int*)memaddress;
int content = *pcontent;
printf(">> Contents at 0x%08x: %08x\n", memaddress, content);
}


int main()
{
HANDLE hChunk;
HANDLE hDefaultHeap;
std::string junkstr;
std::string smallstr;
std::string largestr;
std::string markerstr = "$$$$";

hDefaultHeap = GetProcessHeap();

printf("Default process heap found at 0x%p\n", hDefaultHeap);
printf("Press a key to start...\n");
cin.ignore();

junkstr = "";
smallstr = "";
largestr = "";

while (junkstr.size() < 0xbc4)
{
junkstr += "\x20";
}
smallstr += junkstr;
smallstr += markerstr;

while (smallstr.size() < 0x1000)
{
smallstr += "\x20";
}

while (largestr.size() < 0x40000)
{
largestr += smallstr;
}


for (int i = 1; i <= 0x500; i++)
{
hChunk = HeapAlloc(hDefaultHeap, 0, 0x40000 - 8);
memcpy(hChunk, largestr.c_str(), 0x40000 - 8);
//printf("[%d] Allocated chunk at 0x%p\n", i, hChunk);
}

printf("Spray done, check 0x0c0c0c0c\n");

print_content(0x0c0c0c0c);

cin.ignore();

return 0;

}
163 changes: 163 additions & 0 deletions Precise_Spray/Precise_Spray/Precise_Spray.vcxproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{F2676314-A11D-40F4-BD86-655D8CB71721}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>Precise_Spray</RootNamespace>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>Use</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>Use</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<Text Include="ReadMe.txt" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="stdafx.h" />
<ClInclude Include="targetver.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="Precise_Spray.cpp" />
<ClCompile Include="stdafx.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
</ClCompile>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
36 changes: 36 additions & 0 deletions Precise_Spray/Precise_Spray/Precise_Spray.vcxproj.filters
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<Text Include="ReadMe.txt" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="stdafx.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="targetver.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="stdafx.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Precise_Spray.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>
40 changes: 40 additions & 0 deletions Precise_Spray/Precise_Spray/ReadMe.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
========================================================================
CONSOLE APPLICATION : Precise_Spray Project Overview
========================================================================

AppWizard has created this Precise_Spray application for you.

This file contains a summary of what you will find in each of the files that
make up your Precise_Spray application.


Precise_Spray.vcxproj
This is the main project file for VC++ projects generated using an Application Wizard.
It contains information about the version of Visual C++ that generated the file, and
information about the platforms, configurations, and project features selected with the
Application Wizard.

Precise_Spray.vcxproj.filters
This is the filters file for VC++ projects generated using an Application Wizard.
It contains information about the association between the files in your project
and the filters. This association is used in the IDE to show grouping of files with
similar extensions under a specific node (for e.g. ".cpp" files are associated with the
"Source Files" filter).

Precise_Spray.cpp
This is the main application source file.

/////////////////////////////////////////////////////////////////////////////
Other standard files:

StdAfx.h, StdAfx.cpp
These files are used to build a precompiled header (PCH) file
named Precise_Spray.pch and a precompiled types file named StdAfx.obj.

/////////////////////////////////////////////////////////////////////////////
Other notes:

AppWizard uses "TODO:" comments to indicate parts of the source code you
should add to or customize.

/////////////////////////////////////////////////////////////////////////////
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
c:\users\corelan\desktop\vc++\win10_heap\precise_spray\precise_spray\release\precise_spray.pch
c:\users\corelan\desktop\vc++\win10_heap\precise_spray\precise_spray\release\vc140.pdb
c:\users\corelan\desktop\vc++\win10_heap\precise_spray\precise_spray\release\stdafx.obj
c:\users\corelan\desktop\vc++\win10_heap\precise_spray\precise_spray\release\precise_spray.obj
c:\users\corelan\desktop\vc++\win10_heap\precise_spray\release\precise_spray.exe
c:\users\corelan\desktop\vc++\win10_heap\precise_spray\release\precise_spray.ipdb
c:\users\corelan\desktop\vc++\win10_heap\precise_spray\release\precise_spray.iobj
c:\users\corelan\desktop\vc++\win10_heap\precise_spray\release\precise_spray.pdb
c:\users\corelan\desktop\vc++\win10_heap\precise_spray\precise_spray\release\precise_spray.tlog\cl.command.1.tlog
c:\users\corelan\desktop\vc++\win10_heap\precise_spray\precise_spray\release\precise_spray.tlog\cl.read.1.tlog
c:\users\corelan\desktop\vc++\win10_heap\precise_spray\precise_spray\release\precise_spray.tlog\cl.write.1.tlog
c:\users\corelan\desktop\vc++\win10_heap\precise_spray\precise_spray\release\precise_spray.tlog\link.command.1.tlog
c:\users\corelan\desktop\vc++\win10_heap\precise_spray\precise_spray\release\precise_spray.tlog\link.read.1.tlog
c:\users\corelan\desktop\vc++\win10_heap\precise_spray\precise_spray\release\precise_spray.tlog\link.write.1.tlog
7 changes: 7 additions & 0 deletions Precise_Spray/Precise_Spray/Release/Precise_Spray.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
 stdafx.cpp
Precise_Spray.cpp
Generating code
All 83 functions were compiled because no usable IPDB/IOBJ from previous compilation was found.
Finished generating code
Precise_Spray.vcxproj -> C:\Users\corelan\Desktop\vc++\win10_heap\Precise_Spray\Release\Precise_Spray.exe
Precise_Spray.vcxproj -> C:\Users\corelan\Desktop\vc++\win10_heap\Precise_Spray\Release\Precise_Spray.pdb (Full PDB)
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#TargetFrameworkVersion=v4.0:PlatformToolSet=v140:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=8.1
Release|Win32|C:\Users\corelan\Desktop\vc++\win10_heap\Precise_Spray\|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added Precise_Spray/Precise_Spray/Release/stdafx.obj
Binary file not shown.
8 changes: 8 additions & 0 deletions Precise_Spray/Precise_Spray/stdafx.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// stdafx.cpp : source file that includes just the standard includes
// Precise_Spray.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information

#include "stdafx.h"

// TODO: reference any additional headers you need in STDAFX.H
// and not in this file
Loading

0 comments on commit 7362fb4

Please sign in to comment.