Skip to content

Commit

Permalink
0.6 - fix open file handles
Browse files Browse the repository at this point in the history
  • Loading branch information
GossiTheDog committed Jul 26, 2021
1 parent 0428053 commit 668c301
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion HiveNightmare/HiveNightmare.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
// 0.3 - 20/07/2021 - merge in support for SYSTEM and SECURITY dumping, various bug fixes
// 0.4 - 21/07/2021 - better code shocker :O
// 0.5 - 21/07/2021 - favour retrieving hives from latest snapshot, UTF-16 support, bump to 15 snapshots
// 0.6 - 26/07/2021 - close file handle to avoid being a dummy

#include <windows.h>
#include <io.h>
Expand Down Expand Up @@ -38,6 +39,9 @@ HANDLE getVssFileHandle(TCHAR* path, int maxSearch) {
youngest = lastWriteTime;
wcout << "Newer file found: " << fullPath << endl;
}
else {
CloseHandle(hfile);
}
}
}
}
Expand Down Expand Up @@ -101,7 +105,7 @@ int main(int argc, char* argv[])
searchDepth = 15;
}

wcout << L"\nHiveNightmare v0.5 - dump registry hives as non-admin users\n\nSpecify maximum number of shadows to inspect with parameter if wanted, default is 15.\n\nRunning...\n\n";
wcout << L"\nHiveNightmare v0.6 - dump registry hives as non-admin users\n\nSpecify maximum number of shadows to inspect with parameter if wanted, default is 15.\n\nRunning...\n\n";

HANDLE hFile;

Expand Down
Binary file modified Release/HiveNightmare.exe
Binary file not shown.

0 comments on commit 668c301

Please # to comment.