Skip to content
Commit 50f643b1 authored by Will Harris's avatar Will Harris Committed by Chromium LUCI CQ
Browse files

Add event log message for failed validation

Tested manually by installing Chrome Dev, then trying to decrypt
data from an invalid process, causing the event to trigger. I
couldn't think of a good way to automate these tests.

The event log message looks like this:

```
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Chrome Dev" />
    <EventID Qualifiers="32769">257</EventID>
    <Version>0</Version>
    <Level>3</Level>
    <Task>2</Task>
    <Opcode>0</Opcode>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2024-04-05T04:18:05.8564626Z" />
    <EventRecordID>7529</EventRecordID>
    <Correlation />
    <Execution ProcessID="0" ThreadID="0" />
    <Channel>Application</Channel>
    <Computer>DESKTOP-7L90PGP</Computer>
    <Security UserID="S-1-5-18" />
  </System>
  <EventData>
    <Data>[0404/211805.856:WARNING:caller_validation.cc(141)] Failed to authenticate caller process: C:\Users\user\Desktop\malware.exe</Data>
  </EventData>
</Event>
```

Because full path is needed in the event log, the code is
restructured a little bit as a result, but all the tests remain
the same.

The generated files are generated using command
`mc chrome\common\win\eventlog_messages.mc` from a
Visual Studio Command Prompt.

BUG=332592713

Change-Id: I08b8a1fd3a129c00e925dae64406bd502c8217db
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5427650


Commit-Queue: Will Harris <wfh@chromium.org>
Reviewed-by: default avatarS Ganesh <ganesh@chromium.org>
Reviewed-by: default avatarScott Violet <sky@chromium.org>
Reviewed-by: default avatarBruce Dawson <brucedawson@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1283469}
parent 76747141
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment