Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(624)

Issue 6711024: Example of how to interpose yourself in a message stream. (Closed)

Created:
9 years, 9 months ago by Tom Sepez
Modified:
9 years, 7 months ago
CC:
chromium-reviews, pam+watch_chromium.org, darin-cc_chromium.org
Visibility:
Public.

Description

IPC outgoing message filters interpose yourself in a message stream. Minimally invasive baseline for building IPC tests to abuse browser along the lines of a compromised renderer. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=84076

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Patch Set 7 : '' #

Patch Set 8 : '' #

Total comments: 3

Patch Set 9 : '' #

Patch Set 10 : '' #

Total comments: 4

Patch Set 11 : '' #

Patch Set 12 : '' #

Patch Set 13 : '' #

Patch Set 14 : '' #

Patch Set 15 : '' #

Total comments: 1

Patch Set 16 : '' #

Patch Set 17 : '' #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+834 lines, -27 lines) Patch
M chrome/chrome.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +18 lines, -10 lines 0 comments Download
M chrome/chrome_common.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/common/chrome_switches.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/chrome_switches.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +3 lines, -0 lines 0 comments Download
A chrome/common/external_ipc_fuzzer.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +13 lines, -0 lines 0 comments Download
A chrome/common/external_ipc_fuzzer.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +40 lines, -0 lines 0 comments Download
M chrome/renderer/chrome_content_renderer_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/tools/ipclist/all_messages.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
A chrome/tools/ipclist/ipcfuzz.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +688 lines, -0 lines 1 comment Download
M chrome/tools/ipclist/ipclist.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +34 lines, -13 lines 0 comments Download
M content/browser/renderer_host/browser_render_process_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M content/common/child_thread.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +2 lines, -2 lines 0 comments Download
M ipc/ipc_channel_proxy.h View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +19 lines, -0 lines 0 comments Download
M ipc/ipc_channel_proxy.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +7 lines, -2 lines 0 comments Download

Messages

Total messages: 20 (0 generated)
Tom Sepez
John, This isn't something to be Commited yet, but I'm trying to reduce the impact ...
9 years, 8 months ago (2011-04-21 21:24:14 UTC) #1
jam
Not sure if you wanted me to look now? I'd prefer that instead of adding ...
9 years, 8 months ago (2011-04-26 19:11:35 UTC) #2
tsepez (do not use)
Ok. Seems reasonable. The follow-up question is from where to best invoke this. Got a ...
9 years, 8 months ago (2011-04-26 20:28:09 UTC) #3
jam
Are you trying to do this in browser_tests or in chrome? If browser_tests, then I'd ...
9 years, 8 months ago (2011-04-27 21:17:17 UTC) #4
Tom Sepez
Actually, I think I want to start with just the renderer, since that's the place ...
9 years, 8 months ago (2011-04-27 21:48:25 UTC) #5
jam
http://codereview.chromium.org/6711024/diff/33001/chrome/chrome.gyp File chrome/chrome.gyp (right): http://codereview.chromium.org/6711024/diff/33001/chrome/chrome.gyp#newcode877 chrome/chrome.gyp:877: 'chrome', are all these needed? i.e. chrome_resources/chrome_strings etc http://codereview.chromium.org/6711024/diff/33001/content/common/child_thread.cc ...
9 years, 8 months ago (2011-04-27 21:58:07 UTC) #6
Tom Sepez
the code that you added in content should be in chrome layer instead I think, ...
9 years, 8 months ago (2011-04-28 19:13:56 UTC) #7
jam
In the renderer, you can have RenderThread take a OutgoingMessageFilter*. also, since you're doing this ...
9 years, 8 months ago (2011-04-28 21:30:33 UTC) #8
Tom Sepez
Ok, please review again. It seems more precise to fuzz the message before it's sent ...
9 years, 8 months ago (2011-04-28 23:01:29 UTC) #9
jam
http://codereview.chromium.org/6711024/diff/32021/chrome/chrome.gyp File chrome/chrome.gyp (right): http://codereview.chromium.org/6711024/diff/32021/chrome/chrome.gyp#newcode852 chrome/chrome.gyp:852: 'test_support_common', nit: spacing is off http://codereview.chromium.org/6711024/diff/32021/content/common/child_thread.h File content/common/child_thread.h (right): ...
9 years, 8 months ago (2011-04-28 23:43:46 UTC) #10
jam
On 2011/04/28 23:01:29, Tom Sepez wrote: > Ok, please review again. > > It seems ...
9 years, 8 months ago (2011-04-28 23:47:14 UTC) #11
Tom Sepez
John, another version. Thanks heaps. > do we have any error checking in IPC::Channel that ...
9 years, 7 months ago (2011-05-02 18:38:07 UTC) #12
jam
lgtm with the one change http://codereview.chromium.org/6711024/diff/40002/ipc/ipc_sync_channel.cc File ipc/ipc_sync_channel.cc (right): http://codereview.chromium.org/6711024/diff/40002/ipc/ipc_sync_channel.cc#newcode403 ipc/ipc_sync_channel.cc:403: if (outgoing_message_filter()) this should ...
9 years, 7 months ago (2011-05-02 20:06:10 UTC) #13
Tom Sepez
Wondering if I can do that. The behaviour of the message filter is actually to ...
9 years, 7 months ago (2011-05-02 20:14:09 UTC) #14
jam
On Mon, May 2, 2011 at 1:14 PM, <tsepez@chromium.org> wrote: > Wondering if I can ...
9 years, 7 months ago (2011-05-02 20:20:12 UTC) #15
Tom Sepez
> The message isn't stored, only information from it. Is that what you were > ...
9 years, 7 months ago (2011-05-02 20:31:42 UTC) #16
Tom Sepez
Ah, but if its already preserved above the channel proxy, the duplicated message can just ...
9 years, 7 months ago (2011-05-02 21:16:40 UTC) #17
Tom Sepez
New version doesn't touch ipc_sync_message, but there is a cost -- changes in ipcfuzz.cc. There's ...
9 years, 7 months ago (2011-05-02 23:55:38 UTC) #18
jam
lgtm (I always prefer ugly hacks in testing code at the expense of shipping code ...
9 years, 7 months ago (2011-05-03 06:39:19 UTC) #19
jam
9 years, 7 months ago (2011-05-03 06:39:26 UTC) #20
http://codereview.chromium.org/6711024/diff/42013/chrome/tools/ipclist/ipcfuz...
File chrome/tools/ipclist/ipcfuzz.cc (right):

http://codereview.chromium.org/6711024/diff/42013/chrome/tools/ipclist/ipcfuz...
chrome/tools/ipclist/ipcfuzz.cc:214: // No-op fuzzer.  Rewrites each message
unchaged to check if the message
nit: unchanged

Powered by Google App Engine
This is Rietveld 408576698