hoangprod / andrewspecial Goto Github PK
View Code? Open in Web Editor NEWAndrewSpecial, dumping lsass' memory stealthily and bypassing "Cilence" since 2019.
AndrewSpecial, dumping lsass' memory stealthily and bypassing "Cilence" since 2019.
1
GetProcId
does not close process snapshot in early return
DWORD GetProcId(const wchar_t* ProcName)
{
PROCESSENTRY32 pe32;
HANDLE hSnapshot = NULL;
pe32.dwSize = sizeof(PROCESSENTRY32);
hSnapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
if (Process32First(hSnapshot, &pe32))
{
do {
if (wcscmp(pe32.szExeFile, ProcName) == 0) {
+ CloseHandle(hSnapshot);
return pe32.th32ProcessID;
break;
}
} while (Process32Next(hSnapshot, &pe32));
}
if (hSnapshot != INVALID_HANDLE_VALUE)
CloseHandle(hSnapshot);
return NULL;
}
AndrewSpecial/AndrewSpecial.cpp
Line 15 in 81f7cdb
Incorrect check on CreateFile API
HANDLE hFile = CreateFileA("Andrew.dmp", GENERIC_ALL, 0, nullptr, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, nullptr); //Create the dmp file
if (!hFile)
! This check is incorrect. If CreateFileA fails, hFile will be INVALID_HANDLE_VALUE which is -1 not 0.
{
printf("Failed to write dump: Invalid dump file\n");
}
AndrewSpecial/AndrewSpecial.cpp
Line 154 in 81f7cdb
AndrewSpecial
should call CloseHandle
on hProc
to avoid a handle leak. There are a couple of code paths that exit the function without closing the handle.
AndrewSpecial/AndrewSpecial.cpp
Line 181 in 81f7cdb
AndrewSpecial/AndrewSpecial.cpp
Line 194 in 81f7cdb
AndrewSpecial/AndrewSpecial.cpp
Line 181 in 81f7cdb
Getting Error
Error: MiniDumpWriteDump failed with code 1
Hey there, fun little PoC! After compiling and running against Windows 10 1809 x64, I get the following error:
AndrewSpecial.exe
RPM: 75905440 ---- ntRVM: 00B016BA
ntReadVirtualMemory Syscall is 3f
Got lsass.exe handle: 12c
Error: MiniDumpWriteDump failed with code 8007012b
The exe works as expected against Win7 x32 SP1
Is there anything I need to modify to support my version of Win 10?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.