diff options
author | nsylvain@chromium.org <nsylvain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-20 16:05:56 +0000 |
---|---|---|
committer | nsylvain@chromium.org <nsylvain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-20 16:05:56 +0000 |
commit | ff608eb386a2662bbe076a2a59b21eb90bc34532 (patch) | |
tree | 63c82289115c4b64d6d444816aab4f895f43917c /sandbox/sandbox_poc | |
parent | 1e3af029048d55a3b7c39100683121d71c8ea673 (diff) | |
download | chromium_src-ff608eb386a2662bbe076a2a59b21eb90bc34532.zip chromium_src-ff608eb386a2662bbe076a2a59b21eb90bc34532.tar.gz chromium_src-ff608eb386a2662bbe076a2a59b21eb90bc34532.tar.bz2 |
Add support for alternate window station.
TEST: Start chrome, make sure it loads pages, then user process explorer to make sure the WindowStation handle name is not the same as the browser process.
BUG:10996
Review URL: http://codereview.chromium.org/113190
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16483 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sandbox/sandbox_poc')
-rw-r--r-- | sandbox/sandbox_poc/main_ui_window.cc | 4 | ||||
-rw-r--r-- | sandbox/sandbox_poc/pocdll/spyware.cc | 10 |
2 files changed, 11 insertions, 3 deletions
diff --git a/sandbox/sandbox_poc/main_ui_window.cc b/sandbox/sandbox_poc/main_ui_window.cc index 8963fb0..9669c4b 100644 --- a/sandbox/sandbox_poc/main_ui_window.cc +++ b/sandbox/sandbox_poc/main_ui_window.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -509,7 +509,7 @@ bool MainUIWindow::SpawnTarget() { policy->SetJobLevel(sandbox::JOB_LOCKDOWN, 0); policy->SetTokenLevel(sandbox::USER_RESTRICTED_SAME_ACCESS, sandbox::USER_LOCKDOWN); - policy->SetDesktop(L"random_desktop_name"); + policy->SetAlternateDesktop(true); policy->SetDelayedIntegrityLevel(sandbox::INTEGRITY_LEVEL_LOW); // Set the rule to allow the POC dll to be loaded by the target. Note that diff --git a/sandbox/sandbox_poc/pocdll/spyware.cc b/sandbox/sandbox_poc/pocdll/spyware.cc index e653c92..b9bf64a 100644 --- a/sandbox/sandbox_poc/pocdll/spyware.cc +++ b/sandbox/sandbox_poc/pocdll/spyware.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -13,6 +13,14 @@ void POCDLL_API TestSpyKeys(HANDLE log) { HandleToFile handle2file; FILE *output = handle2file.Translate(log, "w"); + if (RegisterHotKey(NULL, 1, 0, 0x42)) { + fprintf(output, "[GRANTED] successfully registered hotkey\r\n"); + UnregisterHotKey(NULL, 1); + } else { + fprintf(output, "[BLOCKED] Failed to register hotkey. Error = %d\r\n", + ::GetLastError()); + } + fprintf(output, "[INFO] Logging keystrokes for 15 seconds\r\n"); fflush(output); std::wstring logged; |