aboutsummaryrefslogtreecommitdiff
path: root/Exfiltration/LogonUser
diff options
context:
space:
mode:
authorMatt Graeber <mattgraeber@gmail.com>2014-02-12 19:40:32 -0500
committerMatt Graeber <mattgraeber@gmail.com>2014-02-12 19:40:32 -0500
commit331d54eeaf3dfb945579c9d4560422f0b601a95f (patch)
tree4592dcf5d4beba8094abe5ea59773e60febdc00b /Exfiltration/LogonUser
parent92fcfdc3846ab705a1f86796d19b410864292520 (diff)
parentb684da050ad6a9b91ae1afc6caaf3faf54c38f72 (diff)
downloadPowerSploit-331d54eeaf3dfb945579c9d4560422f0b601a95f.tar.gz
PowerSploit-331d54eeaf3dfb945579c9d4560422f0b601a95f.zip
Merge pull request #28 from clymb3r/master
Inject-LogonCredentials has been renamed to Invoke-CredentialInjection.
Diffstat (limited to 'Exfiltration/LogonUser')
-rw-r--r--Exfiltration/LogonUser/LogonUser/logon/logon.cpp12
-rw-r--r--Exfiltration/LogonUser/LogonUser/logon/logon.vcxproj10
2 files changed, 13 insertions, 9 deletions
diff --git a/Exfiltration/LogonUser/LogonUser/logon/logon.cpp b/Exfiltration/LogonUser/LogonUser/logon/logon.cpp
index 8011ed8..a06da47 100644
--- a/Exfiltration/LogonUser/LogonUser/logon/logon.cpp
+++ b/Exfiltration/LogonUser/LogonUser/logon/logon.cpp
@@ -32,26 +32,29 @@ extern "C" __declspec( dllexport ) void VoidFunc()
wchar_t* password = new wchar_t[strSize];
DWORD bytesRead = 0;
- BOOL success = ReadFile(pipe, domain, strSize, &bytesRead, NULL);
+ BOOL success = ReadFile(pipe, domain, bytesToRead, &bytesRead, NULL);
if (!success)
{
return;
}
domain[bytesRead/2] = '\0';
+ bytesRead = 0;
- success = ReadFile(pipe, username, strSize-2, &bytesRead, NULL);
+ success = ReadFile(pipe, username, bytesToRead, &bytesRead, NULL);
if (!success)
{
return;
}
username[bytesRead/2] = '\0';
+ bytesRead = 0;
- success = ReadFile(pipe, password, strSize-2, &bytesRead, NULL);
+ success = ReadFile(pipe, password, bytesToRead, &bytesRead, NULL);
if (!success)
{
return;
}
password[bytesRead/2] = '\0';
+ bytesRead = 0;
//Get the logon type from the pipe
USHORT logonType = 10;
@@ -60,6 +63,7 @@ extern "C" __declspec( dllexport ) void VoidFunc()
{
return;
}
+ bytesRead = 0;
//Get the authentication package to use. 1 = Msv1_0, 2 = Kerberos
USHORT authPackageToUse = 0;
@@ -68,7 +72,7 @@ extern "C" __declspec( dllexport ) void VoidFunc()
{
return;
}
-
+ bytesRead = 0;
/////////////
//Build the parameters to call LsaLogonUser with
diff --git a/Exfiltration/LogonUser/LogonUser/logon/logon.vcxproj b/Exfiltration/LogonUser/LogonUser/logon/logon.vcxproj
index 7fb078b..dcba5a8 100644
--- a/Exfiltration/LogonUser/LogonUser/logon/logon.vcxproj
+++ b/Exfiltration/LogonUser/LogonUser/logon/logon.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -27,26 +27,26 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
- <PlatformToolset>v110</PlatformToolset>
+ <PlatformToolset>v120</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
- <PlatformToolset>v110</PlatformToolset>
+ <PlatformToolset>v120</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
- <PlatformToolset>v110</PlatformToolset>
+ <PlatformToolset>v120</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
- <PlatformToolset>v110</PlatformToolset>
+ <PlatformToolset>v120</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>