| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome_elf/blacklist/blacklist.h" | 5 #include "chrome_elf/blacklist/blacklist.h" |
| 6 | 6 |
| 7 #include <string.h> | 7 #include <string.h> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "chrome_elf/blacklist/blacklist_interceptions.h" | 10 #include "chrome_elf/blacklist/blacklist_interceptions.h" |
| 11 #include "chrome_elf/chrome_elf_constants.h" |
| 11 #include "sandbox/win/src/interception_internal.h" | 12 #include "sandbox/win/src/interception_internal.h" |
| 12 #include "sandbox/win/src/internal_types.h" | 13 #include "sandbox/win/src/internal_types.h" |
| 13 #include "sandbox/win/src/sandbox_utils.h" | 14 #include "sandbox/win/src/sandbox_utils.h" |
| 14 #include "sandbox/win/src/service_resolver.h" | 15 #include "sandbox/win/src/service_resolver.h" |
| 15 #include "version.h" // NOLINT | 16 #include "version.h" // NOLINT |
| 16 | 17 |
| 17 // http://blogs.msdn.com/oldnewthing/archive/2004/10/25/247180.aspx | 18 // http://blogs.msdn.com/oldnewthing/archive/2004/10/25/247180.aspx |
| 18 extern "C" IMAGE_DOS_HEADER __ImageBase; | 19 extern "C" IMAGE_DOS_HEADER __ImageBase; |
| 19 | 20 |
| 20 namespace blacklist{ | 21 namespace blacklist{ |
| 21 | 22 |
| 22 const wchar_t* g_troublesome_dlls[kTroublesomeDllsMaxCount] = { | 23 const wchar_t* g_troublesome_dlls[kTroublesomeDllsMaxCount] = { |
| 23 L"datamngr.dll", // Unknown (suspected adware). | 24 L"datamngr.dll", // Unknown (suspected adware). |
| 24 L"hk.dll", // Unknown (keystroke logger). | 25 L"hk.dll", // Unknown (keystroke logger). |
| 25 L"libsvn_tsvn32.dll", // TortoiseSVN. | 26 L"libsvn_tsvn32.dll", // TortoiseSVN. |
| 26 L"lmrn.dll", // Unknown. | 27 L"lmrn.dll", // Unknown. |
| 27 // Keep this null pointer here to mark the end of the list. | 28 // Keep this null pointer here to mark the end of the list. |
| 28 NULL, | 29 NULL, |
| 29 }; | 30 }; |
| 30 | 31 |
| 31 const wchar_t kRegistryBeaconPath[] = L"SOFTWARE\\Google\\Chrome\\BLBeacon"; | |
| 32 const wchar_t kBeaconVersion[] = L"version"; | |
| 33 const wchar_t kBeaconState[] = L"state"; | |
| 34 | |
| 35 } // namespace blacklist | 32 } // namespace blacklist |
| 36 | 33 |
| 37 // Allocate storage for thunks in a page of this module to save on doing | 34 // Allocate storage for thunks in a page of this module to save on doing |
| 38 // an extra allocation at run time. | 35 // an extra allocation at run time. |
| 39 #pragma section(".crthunk",read,execute) | 36 #pragma section(".crthunk",read,execute) |
| 40 __declspec(allocate(".crthunk")) sandbox::ThunkData g_thunk_storage; | 37 __declspec(allocate(".crthunk")) sandbox::ThunkData g_thunk_storage; |
| 41 | 38 |
| 42 namespace { | 39 namespace { |
| 43 | 40 |
| 44 enum Version { | 41 enum Version { |
| (...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 444 sizeof(g_thunk_storage), | 441 sizeof(g_thunk_storage), |
| 445 PAGE_EXECUTE_READ, | 442 PAGE_EXECUTE_READ, |
| 446 &old_protect); | 443 &old_protect); |
| 447 | 444 |
| 448 RecordSuccessfulThunkSetup(&key); | 445 RecordSuccessfulThunkSetup(&key); |
| 449 | 446 |
| 450 return NT_SUCCESS(ret) && page_executable; | 447 return NT_SUCCESS(ret) && page_executable; |
| 451 } | 448 } |
| 452 | 449 |
| 453 } // namespace blacklist | 450 } // namespace blacklist |
| OLD | NEW |