Search

CN-122020626-A - Method, device, equipment and medium for identifying system through Canvas fingerprint

CN122020626ACN 122020626 ACN122020626 ACN 122020626ACN-122020626-A

Abstract

The invention provides a method, a device, equipment and a medium for identifying a system through Canvas fingerprint, wherein the method comprises the steps of locally generating a PNG picture at a client by using the api of Canvas, uploading the PNG picture to a server, detecting metadata of the picture at the server, and acquiring corresponding Type and/or color characteristic values to judge that a real system of the client can accurately identify the real operating system environment of a fingerprint browser.

Inventors

  • LIU ZHIHAI
  • WANG WENSHENG
  • SU FUQING

Assignees

  • 福建紫讯信息科技有限公司

Dates

Publication Date
20260512
Application Date
20250923

Claims (10)

  1. 1. A method for identifying a system through Canvas fingerprints is characterized by comprising the following steps: Step 1, locally generating a PNG picture at a client by using an api of a Canvas; Step 2, uploading the PNG picture to a server; and 3, detecting metadata of the picture at the server, and acquiring corresponding Type and/or color characteristic values to judge the real system of the client.
  2. 2. The method for using Canvas fingerprint recognition system according to claim 1, wherein the step 1 comprises creating a Canvas element, and setting the width and height of the Canvas element; acquiring a 2D drawing context of the Canvas; setting text drawing attributes, namely setting a text baseline; Begin drawing graphics and text: drawing a solid rectangle with a set width and height at a first set coordinate by using a first set color; drawing text at a second set coordinate with the second set color; drawing the same text at a third set coordinate by using a third set color and a set transparency; And finally, exporting the content in the Canvas as PNG pictures.
  3. 3. The method for identifying the system by Canvas fingerprint according to claim 1 or 2, wherein the step 1 is specifically as follows: Firstly, creating a Canvas element, setting the width of the Canvas element to be 220 pixels and the height of the Canvas element to be 30 pixels; acquiring a 2D drawing context of the Canvas; setting a text drawing attribute: Setting a text baseline as a top; Setting the font as an Arial font with 14 pixels; Readjust the text baseline to "alphabetic"; Begin drawing graphics and text: drawing a solid rectangle 62 pixels wide and 20 pixels high at coordinates (125,1) using orange (#f60); Instead, the text "detect os < canvas >1.0" is drawn with dark blue (# 069) at coordinates (2, 15); drawing the same text at coordinates (4, 17) by using a semitransparent green rgba (102,204,0,0.7) to form a superposition effect; And finally, exporting the content in the Canvas as PNG pictures.
  4. 4. The method for passing through the Canvas fingerprint identification system according to claim 1, wherein the step 3 comprises detecting metadata of the picture at a server side and obtaining corresponding Type and/or color feature values; if the type is TrueColorAlpha and/or the color is greater than 256, the real system of the client is a MAC system, and if the type is PALETTEALPHA and/or the color is less than or equal to 256, the real system of the client is a Windows system.
  5. 5. An apparatus for use with a Canvas fingerprint recognition system, comprising: The generation picture module is used for locally generating a PNG picture at the client by using the api of the Canvas; the uploading picture module is used for uploading the PNG picture to a server; and the identification system module is used for detecting the metadata of the picture at the server and acquiring the corresponding Type and/or color characteristic values to judge the real system of the client.
  6. 6. The device for passing through the Canvas fingerprint recognition system according to claim 5, wherein the step of generating the picture module comprises the steps of firstly creating a Canvas element, and setting the width and the height of the Canvas element; acquiring a 2D drawing context of the Canvas; setting text drawing attributes, namely setting a text baseline; Begin drawing graphics and text: drawing a solid rectangle with a set width and height at a first set coordinate by using a first set color; drawing text at a second set coordinate with the second set color; drawing the same text at a third set coordinate by using a third set color and a set transparency; And finally, exporting the content in the Canvas as PNG pictures.
  7. 7. The device for using Canvas fingerprint recognition system according to claim 5 or 6, wherein the image generating module specifically comprises: Firstly, creating a Canvas element, setting the width of the Canvas element to be 220 pixels and the height of the Canvas element to be 30 pixels; acquiring a 2D drawing context of the Canvas; setting a text drawing attribute: Setting a text baseline as a top; Setting the font as an Arial font with 14 pixels; Readjust the text baseline to "alphabetic"; Begin drawing graphics and text: drawing a solid rectangle 62 pixels wide and 20 pixels high at coordinates (125,1) using orange (#f60); Instead, the text "detect os < canvas >1.0" is drawn with dark blue (# 069) at coordinates (2, 15); drawing the same text at coordinates (4, 17) by using a semitransparent green rgba (102,204,0,0.7) to form a superposition effect; And finally, exporting the content in the Canvas as PNG pictures.
  8. 8. The device for passing through the Canvas fingerprint recognition system according to claim 5, wherein the recognition system module specifically detects metadata of the picture at the server side and obtains corresponding Type and/or color feature values; if the type is TrueColorAlpha and/or the color is greater than 256, the real system of the client is a MAC system, and if the type is PALETTEALPHA and/or the color is less than or equal to 256, the real system of the client is a Windows system.
  9. 9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any one of claims 1 to 4 when the program is executed by the processor.
  10. 10. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any one of claims 1 to 4.

Description

Method, device, equipment and medium for identifying system through Canvas fingerprint Technical Field The invention relates to the technical field of browsers, in particular to a method, a device, equipment and a medium for identifying a system through Canvas fingerprints. Background In the current network environment, a fingerprint browser is used as a tool with special functions, one of the core capabilities is to realize browser simulation among different operating systems, and the function is widely applied in the scenes of cross-border e-commerce operation, multi-account management, automatic test and the like. However, this simulation capability also presents a great challenge to authentication and risk management of the network platform, and the platform needs a reliable technical means to identify whether the browser is in a system simulation state. The fingerprint browser realizes the nature of cross-system simulation, namely the fingerprint browser is deeply tampered with the 'system identity information' exposed to the outside by the browser, so that the detection script of the target platform misjudges the operating system environment in which the fingerprint browser runs. In particular, its technology path extends around the replacement of the following critical data dimensions: 1. accurate replacement of core identification data The UA character string is a basic identifier attached when the browser sends a request to the server, and contains key information such as browser type, version, operating system running and the like, for example, UA of a Chrome browser under Windows system may be "Mozilla/5.0(Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36",, operating system field in the UA character string can be directly modified by a "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36". fingerprint browser under Mac system, and meanwhile, the return value of a newly added navigator/userAgentData interface of the modern browser is customized, so that key attributes such as platform (platform), os (operating system) and the like in the interface are completely consistent with a target simulation system. Font list and rendering feature masquerading that different operating systems default pre-installed font inventory is in significant variance, e.g. "microsoft ja black" Song Ti "for Windows systems," apple side "for Mac systems," san francisco ". The fingerprint browser returns a font list matched with the target system in the inquiry or font rendering detection process of the document/fonts interface in a mode of injecting false font information. Meanwhile, the partial advanced fingerprint browser can adjust fine features (such as word spacing, line height and antialiasing effect) of font rendering, so that the probability of font detection and recognition of the simulation state is further reduced. WebGL and hardware information tampering metadata such as renderer (renderer) returned by the WebGL interface, vendor and the like are strongly related to an operating system and a hardware environment, for example, the WebGL metadata of an NVIDIA graphic card under a Windows system may contain 'NVIDIA GeForce GTX 1660/PCIe/SSE 2', and 'Apple M1 Pro' may be displayed under a Mac system. The fingerprint browser directly modifies the returned result of the WebGL interface to replace the hardware identification information bound with the operating system. In addition, for interfaces related to hardware configuration, such as a navigator, hardborecon currency, a navigator, a devicememory, and the like, adaptation adjustment is performed according to common hardware parameters of the target system, so as to create a real hardware running environment artifact. 2. Failure logic for JS API detection The current mainstream network platform judges the core means of the browser running the operating system, which is to acquire the related data of the system through JavaScript APIs (such as navigator objects, webGL interfaces, font detection scripts and the like) and match with a preset operating system feature library. The fingerprint browser completely accords with the characteristics of the target simulation system through comprehensively tampering the returned data of all the key JS APIs, breaks through the corresponding relation between the API data and the operating system, causes the traditional JS API detection method to completely fail, and cannot accurately identify the real operating system environment of the browser. Disclosure of Invention The invention aims to solve the technical problem of providing a method, a device, equipment and a medium for identifying a fingerprint browser through a Canvas fingerprint identification system, which can accurately identify the fact that the fingerprint browser is an operating system environment. In a first aspect, the present invention provides a