# US 2024/0205265 A1 · Multi-layer browser-based context emulation detection

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2024/0205265 A1
- Document ID: US20240205265A1
- Status: Published application
- Kind: A1
- Application number: 18/066,842
- Filed: 2022-12-15
- Published: 2024-06-20
- Earliest claimed: 2022-12-15
- Assignees: Microsoft Technology Licensing, LLC
- Applicants: Microsoft Technology Licensing, LLC
- Inventors: Itamar AZULAY; Nitzan FROGEL; Meir Baruch BLACHMAN; Tomer CHERNI
- Web page: https://patentgrep.com/patent/US20240205265A1

## CPC

- H04L 63/20: {for managing network security; network security policies in general (filtering policies H04L63/0227)}
- H04L 67/2871: Implementation details of single intermediate entities
- H04L 63/10: {for controlling access to devices or network resources}
- H04L 67/561: Adding application-functional data or data for application control, e.g. adding metadata
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

Methods, systems and computer program products are provided for multi-layer, browser-based context emulation detection, which may be implemented by a proxy for browsers. A policy may be enforced against requests if a request context indicates a restricted context. Context may be detected and indicated in a response header and body based on one or more context detection/indication rules. Context may be indicated by marking or not marking resources indicated in responses. Code may be injected to cause the client web browser to indicate context. A response may be forwarded to the client with a response header context, a response body context, and/or injected code, which a client browser may process to generate a request with one or more indications of request context.

## Claims

### Claim 1

A computing device that includes a proxy server, the proxy server comprising:
an interface configured to:
receive a request associated with a client web browser, the request comprising a request header and a request body;
receive a response associated with a web server, the response comprising a response header and a response body;
a multi-layer browser context detector configured to:
inspect the request header for an indication of a request context;
enforce a policy against the request if the indication of the request context indicates a restricted context;
inspect the response header and the response body for a response header context and a response body context;
determine whether to mark the response header to indicate the response header context based at least on context detection rules; and
determine whether to mark the response body to indicate the response body context based at least on the context detection rules;
wherein the interface is configured to forward to the client a response indicating at least one of the response header context or the response body context.

### Claim 2 (depends on 1)

The computing device of claim 1,
wherein at least one of the response header context or the response body context indicates the restricted context; and
wherein at least one of the response header context or the response body context indicates an unrestricted context.

### Claim 3 (depends on 2)

The computing device of claim 2,
wherein the restricted context indicates a download action; and
wherein the unrestricted context indicates a webpage rendering resource.

### Claim 4 (depends on 2)

The computing device of claim 2,
wherein the unrestricted context in the response header context indicates whether a navigation response header in the response corresponds to a navigate resource; and
wherein the unrestricted context in the response body context indicates whether resource indicators in the response correspond to hypertext markup language (HTML) resources, JavaScript resources, style sheet resources, or image resources.

### Claim 5 (depends on 1)

The computing device of claim 1, wherein the request is created based at least on the forwarded response.

### Claim 6 (depends on 1)

The computing device of claim 1, wherein the proxy server further comprises:
a code injector configured to inject code into the forwarded response, wherein the injected code is configured to cause the client web browser to mark the request with at least a portion of the request context.

### Claim 7 (depends on 6)

The computing device of claim 6, wherein the injected code is configured to cause the client web browser to mark the request with at least a portion of the request context for dynamically generated request content.

### Claim 8 (depends on 6)

The computing device of claim 6, wherein the injected code is configured to cause the client web browser to mark the request with at least a portion of the request context if the request is captured by a client-side service worker.

### Claim 9 (depends on 1)

The computing device of claim 1, wherein the interface is further configured to:
receive a plurality of requests associated with a plurality of client web browsers, including the request, where the request comprises a fetch metadata request header and at least one of the other plurality of requests does not comprise a fetch metadata request header; and
map an indication in the fetch metadata request header to the restricted context or to an unrestricted context.

### Claim 10 (depends on 1)

The computing device of claim 1, wherein client is an unmanaged client.

### Claim 11

A computer-implemented method comprising:
receiving a request associated with a client web browser, the request comprising a request header and a request body;
inspecting the request header for an indication of a request context;
enforcing a policy against the request if the indication of the request context indicates a restricted context;
receiving a response associated with a web server, the response comprising a response header and a response body;
inspecting the response header and the response body for a response header context and a response body context;
determining based at least on context detection rules whether to:
mark the response header to indicate the response header context;
mark the response body to indicate the response body context based at least on the context detection rules; or
inject code into the response, wherein the injected code is configured to cause the client web browser to mark the request with at least a portion of the request context; and
forwarding to the client a response indicating at least one of the response header context, the response body context, or including the injected code.

### Claim 12 (depends on 11)

The computer-implemented method of claim 11,
wherein at least one of the response header context or the response body context indicates, by marking or not marking, a download action; and
wherein at least one of the response header context or the response body context indicates, by marking or not marking, a webpage rendering resource.

### Claim 13 (depends on 11)

The computer-implemented method of claim 11,
wherein the header context indicates whether a navigation response header in the response corresponds to a navigate resource; and
wherein the response body context indicates whether resource indicators in the response correspond to hypertext markup language (HTML) resources, JavaScript resources, style sheet resources, or image resources.

### Claim 14 (depends on 11)

The computer-implemented method of claim 11, wherein the injected code is configured to cause the client web browser to mark the request with at least a portion of the request context for dynamically generated request content.

### Claim 15 (depends on 11)

The computer-implemented method of claim 11, wherein the injected code is configured to cause the client web browser to mark the request with at least a portion of the request context if the request is captured by a client-side service worker.

### Claim 16 (depends on 11)

The computer-implemented method of claim 11, further comprising:
receiving a plurality of requests associated with a plurality of client web browsers, including the request, where the request comprises a fetch metadata request header and at least one of the other plurality of requests does not comprise a fetch metadata request header; and
mapping an indication in the fetch metadata request header to the restricted context or to an unrestricted context.

### Claim 17

A computer-readable storage medium having program instructions recorded thereon that, when executed by a processing circuit, perform a method comprising:
receiving a request associated with a client web browser, the request comprising a request header and a request body;
inspecting the request header for an indication of a request context;
enforcing a policy against the request if the indication of the request context indicates a restricted context;
receiving a response associated with a web server, the response comprising a response header and a response body;
inspecting the response header and the response body for a response header context and a response body context;
determining based at least on context detection rules whether to:
mark the response header to indicate the response header context;
mark the response body to indicate the response body context based at least on the context detection rules; or
inject code into the forwarded response, wherein the injected code is configured to cause the client web browser to mark the request with at least a portion of the request context; and
forwarding to the client a response indicating at least one of the response header context, the response body context, or including the injected code.

### Claim 18 (depends on 17)

The computer-readable storage medium of claim 17,
wherein at least one of the response header context or the response body context indicates, by marking or not marking, a download action; and
wherein at least one of the response header context or the response body context indicates, by marking or not marking, a webpage rendering resource.

### Claim 19 (depends on 17)

The computer-readable storage medium of claim 17,
wherein the header context indicates whether a navigation response header in the response corresponds to a navigate resource; and
wherein the response body context indicates whether resource indicators in the response correspond to hypertext markup language (HTML) resources, JavaScript resources, style sheet resources, or image resources.

### Claim 20 (depends on 17)

The computer-readable storage medium of claim 17, the method further comprising:
receiving a plurality of requests associated with a plurality of client web browsers, including the request, where the request comprises a fetch metadata request header and at least one of the other plurality of requests does not comprise a fetch metadata request header; and
mapping an indication in the fetch metadata request header to the restricted context or to an unrestricted context.
