Is it possible to impersonate a user without supplying user name/password? Basically, I'd like to get the CSIDL_LOCAL_APPDATA
for a user (not the current one) using the ShGetFolderPath()
function. All I currently have is a SID for that user.
相关问题
- the application was unable to start correctly 0xc0
- “Zero out” sensitive String data in Swift
- how to call a C++ dll from C# windows application
- efficiently calling unmanaged method taking unmana
- Handle button click in another application
相关文章
- Warning : HTML 1300 Navigation occured?
- Why windows 64 still makes use of user32.dll etc?
- Security concerns about CORS
- How do I prevent SQL injection with ColdFusion
- Can WM_NEXTDLGCTL be used with non-dialog windows?
- Windows EventLog: How fast are operations with it?
- C++: Callback typedefs with __stdcall in MSVC
- Are resource files compiled as UNICODE or ANSI cod
No, you have to call Win32 API LogonUser function to get windows account token back so you can then impersonate.
You can impersonate a user without supplying password by calling ZwCreateToken. See the CreatePureUserToken function in this article: GUI-Based RunAsEx You must be running as an admin (or LocalSystem) for this to work.
Another technique is to use Windows Subauthentication Packages. This allows you to override windows built-in authentication and allow a LogonUser to succeed even if no password was supplied. See this KB article.