![]() |
|
Spaces home Montreal blog on Interne...ProfileFriendsBlogMore ![]() | ![]() |
Montreal blog on Internet Security Software |
|||||||||||
|
May 13 Setting privileges on a specific threadIf you've ever needed to set privileges to a specific thread Id only, and not an entire process, you may of visited quite a few MSDN web pages trying to figure out exactly how to achieve this.
Here is a function that does this, call it using a format such as:
AddThreadPriv(GetCurrentThreadId(), SE_BACKUP_NAME);
AddThreadPriv(const DWORD in_tid, const std::string& in_rstrPrivilegeName)
{ ImpersonateSelf(SECURITY_MAX_IMPERSONATION_LEVEL); HANDLE h = OpenThread( TOKEN_ALL_ACCESS, FALSE, in_tid);
HANDLE hToken = NULL;
if(h)
OpenThreadToken(h, TOKEN_ALL_ACCESS, TRUE, &hToken); if( hToken )
{ TOKEN_PRIVILEGES tpNew = { 1 }; tpNew.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED; if( ::LookupPrivilegeValue( NULL, in_rstrPrivilegeName.c_str(), &tpNew.Privileges[0].Luid ) )
{ VERIFY( ::AdjustTokenPrivileges( hToken, FALSE, &tpNew, 0, NULL, NULL ) ); CLOSEHANDLE(h);
CLOSEHANDLE(hToken); return (ERROR_SUCCESS == GetLastError());
} } CLOSEHANDLE(h);
return false; } Trying to locate the proper documentation shouldn't be this difficult, certainly not for a company that size.
May 10 IPv6 is good for business, and will flush out unmaintained crapwareIpv4 will be out of addresses sooner than most people realize.
This will probably occur within 24 months, and will likely cement Vista as the desktop os replacement for Xp, since its stack has IPv6 out-of-the-box.
The good news is that this will weed out the smaller software products who do not have the man-power to upgrade their existing applications to this newer reality.
We may even see well established products lag behind because they may be dealing with too much legacy Ipv4 code.
Time will tell... May 06 What Will Microsoft Do With Credentica?
Written by Bernard Lunn / May 3, 2008
http://www.readwriteweb.com/archives/what_will_microsoft_do_with_credentica.php
May 05 The Race to ZeroThe Race to Zero contest is being held during Defcon 16 at the Riviera Hotel in Las Vegas, 8-10 August 2008. The event involves contestants being given a sample set of viruses and malcode to modify and upload through the contest portal. The portal passes the modified samples through a number of antivirus engines and determines if the sample is a known threat. The first team or individual to pass their sample past all antivirus engines undetected wins that round. Each round increases in complexity as the contest progresses.
|
|
|||||||||
|
|