Open nadinedawi opened 1 year ago
edit line 572 like this
si.lpDesktop = (LPCWSTR)"WinSta0\Default";
and rebuild the project
(LPCWSTR)
Did you mean LPWSTR
? The lpDesktop
item is of type LPWSTR
not LPCWSTR
?
I get several errors compiling on VSC 2022 [{ "resource": "/d:/Users/Administrator/Downloads/Poc-2023-PrivEsc/poc.cpp", "owner": "cpptools", "severity": 8, "message": "cast from 'HMENU' {aka 'HMENU*'} to 'WORD' {aka 'short unsigned int'} loses precision [-fpermissive]", "source": "gcc", "startLineNumber": 122, "startColumn": 33, "endLineNumber": 122, "endColumn": 33 },{ "resource": "/d:/Users/Administrator/Downloads/Poc-2023-PrivEsc/poc.cpp", "owner": "cpptools", "severity": 8, "message": "cast from 'HMENU' {aka 'HMENU'} to 'WORD' {aka 'short unsigned int'} loses precision [-fpermissive]", "source": "gcc", "startLineNumber": 154, "startColumn": 33, "endLineNumber": 154, "endColumn": 33 },{ "resource": "/d:/Users/Administrator/Downloads/Poc-2023-PrivEsc/poc.cpp", "owner": "cpptools", "severity": 8, "message": "cannot convert 'WCHAR' {aka 'wchar_t'} to 'LPCSTR' {aka 'const char'}", "source": "gcc", "startLineNumber": 218, "startColumn": 44, "endLineNumber": 218, "endColumn": 44 },{ "resource": "/d:/Users/Administrator/Downloads/Poc-2023-PrivEsc/poc.cpp", "owner": "cpptools", "severity": 8, "message": "cannot convert 'const wchar_t [12]' to 'LPCSTR' {aka 'const char'} in assignment", "source": "gcc", "startLineNumber": 341, "startColumn": 30, "endLineNumber": 341, "endColumn": 30 },{ "resource": "/d:/Users/Administrator/Downloads/Poc-2023-PrivEsc/poc.cpp", "owner": "cpptools", "severity": 8, "message": "cannot convert 'const wchar_t' to 'LPCSTR' {aka 'const char'}", "source": "gcc", "startLineNumber": 351, "startColumn": 45, "endLineNumber": 351, "endColumn": 45 },{ "resource": "/d:/Users/Administrator/Downloads/Poc-2023-PrivEsc/poc.cpp", "owner": "cpptools", "severity": 8, "message": "cannot convert 'const wchar_t' to 'LPCSTR' {aka 'const char'}", "source": "gcc", "startLineNumber": 480, "startColumn": 54, "endLineNumber": 480, "endColumn": 54 },{ "resource": "/d:/Users/Administrator/Downloads/Poc-2023-PrivEsc/poc.cpp", "owner": "cpptools", "severity": 8, "message": "cannot convert 'const wchar_t' to 'LPCSTR' {aka 'const char*'}", "source": "gcc", "startLineNumber": 482, "startColumn": 57, "endLineNumber": 482, "endColumn": 57 }]
I tried to compile CVE-2023-29336 on Visual Studio 2022 and I got an error in line 572 si.lpDesktop = L"WinSta0\Default";