WO2019228031A1 - Html5文件安全保护方法、系统及终端设备 - Google Patents

Html5文件安全保护方法、系统及终端设备 Download PDF

Info

Publication number
WO2019228031A1
WO2019228031A1 PCT/CN2019/079532 CN2019079532W WO2019228031A1 WO 2019228031 A1 WO2019228031 A1 WO 2019228031A1 CN 2019079532 W CN2019079532 W CN 2019079532W WO 2019228031 A1 WO2019228031 A1 WO 2019228031A1
Authority
WO
WIPO (PCT)
Prior art keywords
html5
read
resource
html5 resource
local
Prior art date
Application number
PCT/CN2019/079532
Other languages
English (en)
French (fr)
Inventor
宋振华
郑任持
任家乐
Original Assignee
百富计算机技术(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 百富计算机技术(深圳)有限公司 filed Critical 百富计算机技术(深圳)有限公司
Priority to US17/791,119 priority Critical patent/US20230035678A1/en
Publication of WO2019228031A1 publication Critical patent/WO2019228031A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/44Program or device authentication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/51Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems at application loading time, e.g. accepting, rejecting, starting or inhibiting executable software based on integrity or source reliability
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/52Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems during program execution, e.g. stack integrity ; Preventing unwanted data erasure; Buffer overflow
    • G06F21/53Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems during program execution, e.g. stack integrity ; Preventing unwanted data erasure; Buffer overflow by executing in a restricted environment, e.g. sandbox or secure virtual machine
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/57Certifying or maintaining trusted computer platforms, e.g. secure boots or power-downs, version controls, system software checks, secure updates or assessing vulnerabilities
    • G06F21/572Secure firmware programming, e.g. of basic input output system [BIOS]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/604Tools and structures for managing or administering access control systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/03Indexing scheme relating to G06F21/50, monitoring users, programs or devices to maintain the integrity of platforms
    • G06F2221/033Test or assess software
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2141Access rights, e.g. capability lists, access control lists, access tables, access matrices

Definitions

  • the invention belongs to the technical field of HTML5, and particularly relates to a method, a system and a terminal device for HTML5 file security protection.
  • HTML is widely used because of its good performance of Web pages and the ability to access local offline databases.
  • Applications developed based on HTML5 technology are also growing and popular.
  • embodiments of the present invention provide an HTML5 file security protection method, system, and terminal device, which can effectively protect the security of HTML files, prevent the HTML files from being tampered with, and reduce the security risks caused by the HTML files being tampered with.
  • a first aspect of the embodiments of the present invention provides a method for protecting an HTML5 file, which includes:
  • the write operation is allowed to be performed; wherein the write operation is used to write data of a local HTML5 resource package to the HTML5 resource read-only protected area to install HTML5 application;
  • the operation is a read operation performed by a non-system authority process
  • the read operation is allowed to be performed; wherein the non-system authority process includes the HTML5 application program;
  • a second aspect of the embodiments of the present invention provides an HTML5 application security protection system, which includes:
  • the first monitoring module is used for the system permission service to monitor the operation of the preset read-only protected area of the HTML5 resource;
  • a first permission control module configured to allow the write operation to be performed when the operation is a write operation performed by a system permission process; wherein the write operation is used to write data of a local HTML5 resource package to the HTML5 resource Read-only protected area to install HTML5 applications;
  • a second monitoring module configured to monitor data accessed by a built-in browser kernel of the HTML5 application when the installation of the HTML5 application is completed;
  • a second permission control module configured to limit the access operation of the built-in browser kernel when the data accessed by the built-in browser kernel is data of a non-HTML5 resource read-only protected area
  • a third authority control module configured to allow the read operation to be performed when the operation is a read operation performed by a non-system authority process; wherein the non-system authority process includes the HTML5 application program;
  • a fourth authority control module is configured to restrict the execution of the non-read operation when the operation is a non-read operation performed by a non-system authority process.
  • a third aspect of the embodiments of the present invention provides a terminal device including a memory, a processor, and a computer program stored in the memory and executable on the processor.
  • the processor executes the computer program, Steps to implement the above method.
  • a computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the foregoing method are implemented.
  • the read-only protected area of the HTML5 resource is established in advance to monitor the operation of the read-only protected area of the HTML5 resource. Only the system permission process is allowed to read and write the read-only protected area of the HTML5 resource. Enter the read-only protected area of HTML5 resources to install HTML5 applications, restrict HTML5 applications from accessing data in read-only protected areas of non-HTML5 resources, and make non-system-privileged processes, including HTML5 applications, read-only to HTML5 resources.
  • the protected area performs read operations, and the system permission process is protected by firmware, which can effectively protect the security of the HTML file, prevent the HTML file from being tampered with, and reduce the security risks caused by the HTML file being tampered with.
  • FIG. 1 is a schematic flowchart of an HTML5 file security protection method provided by Embodiment 1 of the present invention
  • FIG. 2 is a schematic flowchart of an HTML5 file security protection method provided by Embodiment 2 of the present invention.
  • FIG. 3 is a schematic structural diagram of an HTML5 file security protection system according to a third embodiment of the present invention.
  • FIG. 4 is a schematic diagram of a terminal device according to a fourth embodiment of the present invention.
  • a method for protecting an HTML5 file is applied to any running operating system.
  • System, OS System, OS terminal devices, for example, mobile phones, tablet computers, smart bracelets, personal digital assistants, point of sale (POS), servers, personal computer (PC) clients, and so on.
  • the operating system can be used to control and manage HTML-based applications, that is, HTML applications.
  • the terminal device is a POS
  • the operating system is an Android operating system.
  • the HTML5 file includes an installation package of the HTML5 application itself, an HTML5 resource package, and a related configuration file of the HTML5 application.
  • the HTML5 application is Android
  • the installation package is an APK (Android Package, Android installation package)
  • the resource package is an Android HTML5 resource package.
  • the HTML5 file security protection method is executed by firmware.
  • the HTML5 file security protection method provided in this embodiment is applicable to a case where only a local HTML5 resource package can be called, and other browser operations of the Internet cannot be used to call a non-local HTML5 resource package. Source safety.
  • the HTML5 file security protection method provided in this embodiment includes:
  • step S101 the system authority service monitors the operation of the preset read-only protected area of the HTML5 resource.
  • the method before step S101, the method includes:
  • a storage medium external to the terminal device for example, SD (Secure Digital Memory Card) storage space as a read-only protected area of HTML5 resources.
  • the storage space of the internal storage medium should be designated as a read-only protected area of HTML5 resources.
  • the address of the read-only protected area of HTML5 resources is specified, it cannot be directly restricted.
  • the location of the file system's access permissions should be restricted by the system firewall to non-read operations on files at this address.
  • the non-read operation specifically refers to an operation that causes the data in the read-only protected area of the HTML5 resource to be tampered, such as a write operation, a modification operation, a delete operation creation operation, an edit operation, and the like other than a read operation.
  • Step S102 when the operation is a write operation performed by a system permission process, the write operation is allowed to be performed; wherein the write operation is used to write data of a local HTML5 resource package to the HTML5 resource read-only protected area, To install the HTML5 application.
  • the method before step S102, the method includes:
  • the authenticity and integrity of the local HTML5 resource bundle needs to be verified before writing the local HTML5 resource bundle into the HTML5 resource read-only protected area.
  • step S102 the method includes:
  • the operating system is notified to trigger protection of the read-only protected area of the HTML5 resource.
  • the method before step S102, the method includes:
  • step S102 When both the installation package of the HTML5 application and the verification of the local HTML5 resource package pass, the process proceeds to step S102.
  • step S103 when the installation of the HTML5 application is completed, the data accessed by the built-in browser kernel of the HTML5 application is monitored.
  • the HTML5 application in the HTML5 security architecture corresponding to the non-built-in browser that comes with the operating system only includes the shell of the browser and does not include the browser kernel;
  • the HTML5 corresponding to the built-in browser of the firmware in this embodiment corresponds to the HTML5 HTML5 applications in a secure architecture include a built-in browser kernel.
  • step S104 when the data accessed by the built-in browser kernel is data in a read-only protected area of a non-HTML5 resource, the access operation of the built-in browser kernel is restricted.
  • the data of the non-HTML5 resource read-only protected area includes:
  • the access path data exists outside the read-only protected area of the HTML5 resource and includes relative data of the data of the read-only protected area of the HTML5 resource.
  • the browser kernel In specific applications, it is necessary to restrict the browser kernel from directly accessing the addresses of protocols including http, ftp, scp, file, etc., and only allow access to the relative path of data in the read-only protected area of the HTML5 resource.
  • the file path of the data of the HTML5 resource package cannot be linked to the specific location of the data of the read-only protected area of the HTML5 resource, even if the relative path of the data of the read-only protected area of the HTML5 resource is allowed to be accessed, cross-border protection should be set.
  • the address of the folder of the HTML5 resource bundle in the file system is as follows:
  • the HTML5 resource pack banklife can access the resources of other resource packs by crossing the" .. ", In this case, the operating system should detect that it is an illegal relative path and forbid access. Otherwise, all files in the file system can be accessed through the out-of-bounds address segment.
  • restricting access operations of the built-in browser kernel includes:
  • the access operation of the built-in browser kernel is restricted by a URI interception manner, a URL interception manner, or a file handle interception manner.
  • Step S105 when the operation is a read operation performed by a non-system-privilege process, the read operation is allowed to be performed; wherein the non-system-privilege process includes the HTML5 application program;
  • step S106 when the operation is a non-read operation performed by a non-system authority process, execution of the non-read operation is restricted.
  • the method for protecting an HTML5 file in Embodiment 1 further includes:
  • Step S201 Before performing the write operation, verify the local HTML5 resource bundle.
  • Step S202 When the local HTML5 resource package is verified, the local HTML5 resource package is backed up and saved in a preset HTML5 resource backup area.
  • Step S202 may be performed before step S102, when step S102 is performed, or after step S102 is performed.
  • the method before step S202, the method includes:
  • the HTML5 resource backup area is preset.
  • the addresses of the HTML5 resource backup area and the HTML5 resource read-only protection area are different, and belong to different data storage areas, and have completely non-intersecting and non-overlapping storage spaces.
  • step S202 the method includes:
  • Step S203 verifying the local HTML5 resource package backed up and saved in the HTML5 resource backup area every preset time period
  • Step S204 When the local HTML5 resource package saved in the backup of the HTML5 resource backup area passes the verification, the local HTML5 resource package saved in the backup of the HTML5 resource backup area and the HTML5 resource package written in the read-only protected area of the HTML5 resource are verified. Compare
  • Step S205 When the local HTML5 resource pack saved in the backup of the HTML5 resource backup area is inconsistent with the HTML5 resource pack written in the HTML5 resource read-only protected area, notify the operating system to trigger protection of the system operation and use.
  • the protection of the system operation and use refers to the protection of various operations and use conditions of the operating system itself.
  • the HTML5 resource read-only protected area itself can be periodically compared by periodically comparing whether the local HTML5 resource package saved in the backup of the HTML5 resource backup area is inconsistent with the HTML5 resource package written in the HTML5 resource read-only protected area. Periodic self-test verification of authenticity and integrity.
  • the verification includes authenticity verification and integrity verification.
  • verification should include both authenticity verification and integrity verification.
  • This embodiment provides an HTML5 file security protection system for performing the method steps in Embodiment 1 or 2.
  • the HTML5 application security protection system may be any terminal device that can run an operating system (OS). Software program system.
  • the HTML5 file security protection system 100 includes:
  • a first monitoring module 101 configured to monitor the operation of a read-only protected area of a preset HTML5 resource by the system permission service;
  • the first permission control module 102 is configured to allow the write operation to be performed when the operation is a write operation performed by a system permission process; wherein the write operation is used to write data of a local HTML5 resource bundle to the HTML5 Resources are read-only protected areas to install HTML5 applications;
  • a second monitoring module 103 configured to monitor data accessed by a built-in browser kernel of the HTML5 application when the installation of the HTML5 application is completed;
  • a second permission control module 104 configured to limit the access operation of the built-in browser kernel when the data accessed by the built-in browser kernel is data of a non-HTML5 resource read-only protected area;
  • a third permission control module 105 configured to allow the read operation to be performed when the operation is a read operation performed by a non-system permission process; wherein the non-system permission process includes the HTML5 application program;
  • the fourth authority control module 106 is configured to restrict the execution of the non-read operation when the operation is a non-read operation performed by a non-system authority process.
  • the HTML5 file security protection system further includes:
  • a read-only protected area setting module is used to set a read-only protected area of an HTML5 resource in advance.
  • the HTML5 file security protection system further includes:
  • a verification module configured to verify the local HTML5 resource bundle
  • a jump module configured to jump to the first permission control module when the local HTML5 resource package is successfully verified.
  • the HTML5 file security protection system further includes:
  • the second verification module is further configured to verify the local HTML5 resource package written into the read-only protected area of the HTML5 resource every preset time period;
  • the HTML5 file security protection system further includes a notification module, configured to notify the operating system to trigger protection of the system operation and use when the local HTML5 resource package verification fails.
  • the verification module is further configured to:
  • the jump module is further configured to jump to the first permission control module when the installation package of the HTML5 application and the verification of the local HTML5 resource package both pass.
  • the verification module is further configured to verify the local HTML5 resource bundle before performing the write operation.
  • the HTML5 file security protection system further includes a storage module, configured to back up and save the local HTML5 resource package in a preset HTML5 resource backup area when the local HTML5 resource package passes verification.
  • the HTML5 file security protection system further includes:
  • the backup area setting module is configured to preset the HTML5 resource backup area.
  • the verification module is further configured to verify the local HTML5 resource package backed up and saved in the HTML5 resource backup area every preset time period;
  • the HTML5 file security protection system further includes:
  • a comparison module is configured to: when the local HTML5 resource package backed up and saved in the HTML5 resource backup area passes verification, write the local HTML5 resource pack backed up and saved in the HTML5 resource backup area with the Compare HTML5 resource bundles;
  • the notification module is further configured to notify the operating system to trigger read-only access to the HTML5 resource when the local HTML5 resource package backed up and saved in the HTML5 resource backup area is inconsistent with the HTML5 resource package written in the HTML5 resource read-only protected area. Protection of protected areas.
  • an embodiment of the present invention provides a terminal device 200, which includes a processor 201, a memory 202, and a computer program 203 stored in the memory 202 and executable on the processor 201, such as HTML5 file security protection method program.
  • the processor 201 executes the computer program 203
  • the steps in the foregoing embodiments of the HTML5 file security protection method are implemented, for example, steps S101 to S106 shown in FIG.
  • the processor 201 executes the computer program 203
  • the functions of the modules in the foregoing device embodiments are implemented, for example, the functions of the modules 101 to 106 shown in FIG. 3.
  • the computer program 203 may be divided into one or more modules, and the one or more modules are stored in the memory 202 and executed by the processor 201 to complete the present invention.
  • the one or more modules may be a series of computer program instruction segments capable of performing specific functions, and the instruction segments are used to describe an execution process of the computer program 203 in the terminal device 200.
  • the computer program 203 can be divided into a first monitoring module, a first permission control module, a second monitoring module, a second permission control module, a third permission control module, and a fourth permission control module.
  • the specific functions of each module are as follows :
  • the first monitoring module is used for the system permission service to monitor the operation of the preset read-only protected area of the HTML5 resource;
  • a first permission control module configured to allow the write operation to be performed when the operation is a write operation performed by a system permission process; wherein the write operation is used to write data of a local HTML5 resource package to the HTML5 resource Read-only protected area to install HTML5 applications;
  • a second monitoring module configured to monitor data accessed by a built-in browser kernel of the HTML5 application when the installation of the HTML5 application is completed;
  • a second permission control module configured to limit the access operation of the built-in browser kernel when the data accessed by the built-in browser kernel is data of a non-HTML5 resource read-only protected area
  • a third authority control module configured to allow the read operation to be performed when the operation is a read operation performed by a non-system authority process; wherein the non-system authority process includes the HTML5 application program;
  • a fourth authority control module is configured to restrict the execution of the non-read operation when the operation is a non-read operation performed by a non-system authority process.
  • the terminal device 200 may be a computing device such as a desktop computer, a notebook, a palmtop computer, and a cloud server.
  • the terminal device may include, but is not limited to, a processor 201 and a memory 202.
  • FIG. 4 is only an example of the terminal device 200, and does not constitute a limitation on the terminal device 200. It may include more or fewer components than shown in the figure, or combine some components or different components.
  • the terminal device may further include an input / output device, a network access device, a bus, and the like.
  • the so-called processor 201 may be a central processing unit (Central Processing Unit (CPU), or other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (Application Specific Integrated Circuits) Specific Integrated Circuit (ASIC), off-the-shelf Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • CPU Central Processing Unit
  • DSPs Digital Signal Processors
  • ASIC Application Specific Integrated Circuits
  • FPGA off-the-shelf Programmable Gate Array
  • a general-purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
  • the memory 202 may be an internal storage unit of the terminal device 200, such as a hard disk or a memory of the terminal device 200.
  • the memory 202 may also be an external storage device of the terminal device 200, such as a plug-in hard disk, a smart media card (SMC), and a secure digital (SD) provided on the terminal device 200. Card, flash card, etc.
  • the memory 202 may further include both an internal storage unit of the terminal device 200 and an external storage device.
  • the memory 202 is configured to store the computer program and other programs and data required by the terminal device.
  • the memory 202 may also be used to temporarily store data that has been output or will be output.
  • the disclosed apparatus / terminal device and method may be implemented in other ways.
  • the device / terminal device embodiments described above are only schematic.
  • the division of the modules or units is only a logical function division.
  • components can be combined or integrated into another system, or some features can be ignored or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, which may be electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objective of the solution of this embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist separately physically, or two or more units may be integrated into one unit.
  • the above integrated unit may be implemented in the form of hardware or in the form of software functional unit.
  • the integrated module When the integrated module is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the present invention implements all or part of the processes in the method of the foregoing embodiment, and may also be completed by a computer program instructing related hardware.
  • the computer program may be stored in a computer-readable storage medium.
  • the computer When the program is executed by a processor, the steps of the foregoing method embodiments can be implemented. .
  • the computer program includes computer program code, and the computer program code may be in a source code form, an object code form, an executable file, or some intermediate form.
  • the computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signals, telecommunication signals, and software distribution media.
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • electric carrier signals telecommunication signals
  • software distribution media any entity or device capable of carrying the computer program code
  • a recording medium a U disk, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signals, telecommunication signals, and software distribution media.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Automation & Control Theory (AREA)
  • Storage Device Security (AREA)

Abstract

本方案适用于HTML5技术领域,提供一种HTML5文件安全保护方法、系统及终端设备,本方案实施例通过预先建立HTML5资源只读保护区,监测对HTML5资源只读保护区的操作,只允许系统权限进程对HTML5资源只读保护区进行读写操作,将本地HTML5资源包的数据写入所述HTML5资源只读保护区,以安装HTML5应用程序,限制HTML5应用程序访问非HTML5资源只读保护区的数据,使包括HTML5应用程序在内的非系统权限进程只能对HTML5资源只读保护区进行读操作,而系统权限进程受到固件保护,从而可以有效保护HTML文件的安全,防止HTML文件被篡改,降低HTML文件被篡改所带来的安全隐患。

Description

HTML5文件安全保护方法、系统及终端设备 技术领域
本发明属于HTML5技术领域,尤其涉及一种HTML5文件安全保护方法、系统及终端设备。
背景技术
HTML因其良好的Web网页表现性能和访问本地离线数据库的能力,而被广泛应用,基于HTML5技术开发的应用程序也不断增长和普及。
然而,随着HTML5技术的不断普及和应用,有效保护HTML文件的安全,防止HTML文件被篡改,降低HTML文件被篡改所带来的安全隐患成为亟待解决的问题。
技术问题
有鉴于此,本发明实施例提供了一种HTML5文件安全保护方法、系统及终端设备,可以有效保护HTML文件的安全,防止HTML文件被篡改,降低HTML文件被篡改所带来的安全隐患。
技术解决方案
本发明实施例的第一方面提供了一种HTML5文件安全保护方法,其包括:
监测对预设的HTML5资源只读保护区的操作;
当所述操作为系统权限进程执行的写操作时,允许执行所述写操作;其中,所述写操作用于将本地HTML5资源包的数据写入所述HTML5资源只读保护区,以安装HTML5应用程序;
当所述HTML5应用程序安装完成时,监测所述HTML5应用程序的内置浏览器内核访问的数据;
当所述内置浏览器内核访问的数据为非HTML5资源只读保护区的数据时,限制所述内置浏览器内核的访问操作;
当所述操作为非系统权限进程执行的读操作时,允许执行所述读操作;其中,所述非系统权限进程包括所述HTML5应用程序;
当所述操作为非系统权限进程执行的非读操作时,限制执行所述非读操作。
本发明实施例的第二方面提供了一种HTML5应用程序安全保护系统,其包括:
第一监测模块,用于系统权限服务监测对预设的HTML5资源只读保护区的操作;
第一权限控制模块,用于当所述操作为系统权限进程执行的写操作时,允许执行所述写操作;其中,所述写操作用于将本地HTML5资源包的数据写入所述HTML5资源只读保护区,以安装HTML5应用程序;
第二监测模块,用于当所述HTML5应用程序安装完成时,监测所述HTML5应用程序的内置浏览器内核访问的数据;
第二权限控制模块,用于当所述内置浏览器内核访问的数据为非HTML5资源只读保护区的数据时,限制所述内置浏览器内核的访问操作;
第三权限控制模块,用于当所述操作为非系统权限进程执行的读操作时,允许执行所述读操作;其中,所述非系统权限进程包括所述HTML5应用程序;
第四权限控制模块,用于当所述操作为非系统权限进程执行的非读操作时,限制执行所述非读操作。
本发明实施例的第三方面提供了一种终端设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现上述方法的步骤。
本发明实施例的第四方面提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现上述方法的步骤。
有益效果
本发明实施例通过预先建立HTML5资源只读保护区,监测对HTML5资源只读保护区的操作,只允许系统权限进程对HTML5资源只读保护区进行读写操作,将本地HTML5资源包的数据写入所述HTML5资源只读保护区,以安装HTML5应用程序,限制HTML5应用程序访问非HTML5资源只读保护区的数据,使包括HTML5应用程序在内的非系统权限进程只能对HTML5资源只读保护区进行读操作,而系统权限进程受到固件保护,从而可以有效保护HTML文件的安全,防止HTML文件被篡改,降低HTML文件被篡改所带来的安全隐患。
附图说明
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1是本发明实施例一提供的HTML5文件安全保护方法的流程示意图;
图2是本发明实施例二提供的HTML5文件安全保护方法的流程示意图;
图3是本发明实施例三提供的HTML5文件安全保护系统的结构示意图;
图4是本发明实施例四提供的终端设备的示意图。
本发明的实施方式
以下描述中,为了说明而不是为了限定,提出了诸如特定系统结构、技术之类的具体细节,以便透彻理解本发明实施例。然而,本领域的技术人员应当清楚,在没有这些具体细节的其它实施例中也可以实现本发明。在其它情况中,省略对众所周知的系统、装置、电路以及方法的详细说明,以免不必要的细节妨碍本发明的描述。
为了说明本发明所述的技术方案,下面通过具体实施例来进行说明。
实施例一
本实施例一种HTML5文件安全保护方法,应用于任意的可运行操作系统(Operating System,OS)的终端设备,例如,手机、平板电脑、智能手环、个人数字助理、POS(point of sale,销售终端)、服务器、PC(Personal Computer,个人计算机)客户端等。所述操作系统可用于控制和管理基于HTML技术的应用程序,即HTML应用程序。
在一个实施例中,所述终端设备为POS,所述操作系统为安卓(Android)操作系统。
在本实施例中,HTML5文件包括HTML5应用程序本身的安装包、HTML5资源包和HTML5应用程序的相关配置文件。
在具体应用中,当所述操作系统为安卓操作系统时,所述HTML5应用程序为Android HTML5应用程序,所述安装包为APK(AndroidPackage,安卓安装包),所述资源包为Android HTML5资源包。
在具体应用中,所述HTML5文件安全保护方法由固件(Firmware)来执行。
本实施例所提供的HTML5文件安全保护方法适用于仅能调用本地HTML5资源包,无法通过互联网互联的其他浏览器操作来调用非本地HTML5资源包的情况,用于保证固件的内置浏览器访问数据来源的安全。
如图1所示,本实施例所提供的HTML5文件安全保护方法,包括:
步骤S101,系统权限服务监测对预设的HTML5资源只读保护区的操作。
在一个实施例中,步骤S101之前包括:
预先设置HTML5资源只读保护区。
在具体应用中,不允许指定终端设备外部的存储介质(例如,SD(Secure Digital Memory Card)卡)的存储空间作为HTML5资源只读保护区,应当指定内部的存储介质的存储空间作为HTML5资源只读保护区,当指定的HTML5资源只读保护区的地址是在无法直接限制文件系统的访问权限的位置(例如,内部SD卡的存储空间),应当由系统防火墙对该地址的文件的非读操作进行限制。所述非读操作具体是指除了读操作之外的写操作、修改操作、删除操作创建操作、编辑操作等导致HTML5资源只读保护区的数据被篡改的操作。
步骤S102,当所述操作为系统权限进程执行的写操作时,允许执行所述写操作;其中,所述写操作用于将本地HTML5资源包的数据写入所述HTML5资源只读保护区,以安装HTML5应用程序。
在具体应用中,仅允许系统权限进程对HTML5资源只读保护区进行写操作。
在一个实施例中,步骤S102之前包括:
对所述本地HTML5资源包进行验证;
当所述本地HTML5资源包验证通过时,进入步骤S102。
在具体应用中,将本地HTML5资源包写入HTML5资源只读保护区之前,需要对本地HTML5资源包进行真实性和完整性的验证。
在一个实施例中,步骤S102之后包括:
每间隔预设时间周期,对写入所述HTML5资源只读保护区的本地HTML5资源包进行验证;
当所述本地HTML5资源包验证不通过时,通知操作系统触发对所述HTML5资源只读保护区的保护。
在具体应用中,仅允许系统权限进程对HTML5资源只读保护区进行写操作,虽然可以防护非系统权限进程的其他应用对HTML5资源只读保护区的攻击,但是该手段无法防护系统服务及内置浏览器内核的0 day(破解版)漏洞,一旦攻击者入侵得到了操作系统的服务权限或者内置浏览器内核的权限之后,HTML5资源只读保护区将无法得到保护,并且操作系统无法得知攻击者篡改的具体内容。因此需要对HTML5资源只读保护区本身的真实性和完整性进行周期性的自检验证。
在一个实施例中,所述步骤S102之前,包括:
对所述HTML5应用程序的安装包进行验证;
下载所述本地HTML5资源包时,对所述本地HTML5资源包进行验证;
当所述HTML5应用程序的安装包和所述本地HTML5资源包验证均通过时,进入步骤S102。
在具体应用中,在下载本地HTML5资源包时,需要对本地HTML5资源包的真实性和完整性进行验证,在安装HTML5应用程序之前,需要对HTML5应用程序本身的安装包进行验证。
步骤S103,当所述HTML5应用程序安装完成时,监测所述HTML5应用程序的内置浏览器内核访问的数据。
在具体应用中,操作系统自带的非内置浏览器对应的HTML5安全架构中的HTML5应用程序仅包含浏览器的壳、不包含浏览器内核;本实施例中的固件的内置浏览器对应的HTML5安全架构中的HTML5应用程序包含内置浏览器内核。
在具体应用中,仅允许通过验证的HTML5资源只读保护区中的数据被内置浏览器内核访问和使用。由于内置浏览器内核能够支持的扩展性非常强,需要对内置浏览器内核所支持的数据的来源进行严格的数据入口限制,以保证内置浏览器内核不能通过访问非法地址的方式来访问HTML5资源只读保护区之外的数据。
步骤S104,当所述内置浏览器内核访问的数据为非HTML5资源只读保护区的数据时,限制所述内置浏览器内核的访问操作。
在一个实施例中,所述非HTML5资源只读保护区的数据包括:
访问路径与所述HTML5资源只读保护区的数据的路径不同的数据;
访问路径存在于所述HTML5资源只读保护区之外且包括所述HTML5资源只读保护区的数据的相对路径的数据。
在具体应用中,需要限制浏览器内核直接访问包括http、ftp、scp、file等协议的地址,只允许访问HTML5资源只读保护区的数据的相对路径。然而,由于HTML5资源包的数据的file路径无法链接到HTML5资源只读保护区的数据的具体位置,因此,即使允许访问HTML5资源只读保护区的数据的相对路径,也应当设置越界防护。例如文件系统中的HTML5资源包的文件夹的地址如下:
/Share/bankpay/resource.htm
/Share/banklife/resource.htm
如果banklife的HTML5资源包内的resource.htm中包含src=“../bankpay/resource.htm”的超链接,则HTML5资源包banklife通过越界的“..”即可访问其他资源包的资源,这中情况应当被操作系统检查出来是非法相对路径而被禁止访问,否则可以通过越界的地址段访问文件系统中的所有文件。
在一个实施例中,限制所述内置浏览器内核的访问操作,包括:
通过URI拦截方式、URL拦截方式或文件句柄拦截方式限制所述内置浏览器内核的访问操作。
步骤S105,当所述操作为非系统权限进程执行的读操作时,允许执行所述读操作;其中,所述非系统权限进程包括所述HTML5应用程序;
步骤S106,当所述操作为非系统权限进程执行的非读操作时,限制执行所述非读操作。
在具体应用中,仅允许系统安装进行之外的其他应用程序对HTML5资源只读保护区的数据进行读操作,限制这些其他应用程序的非读操作,以防止HTML5资源只读保护区的数据被篡改。
实施例二
如图2所示,在本实施例中,实施例一中的HTML5文件安全保护方法,还包括:
步骤S201,执行所述写操作之前,对所述本地HTML5资源包进行验证。
在具体应用中,将本地HTML5资源包写入HTML5资源只读保护区之前,需要对本地HTML5资源包进行真实性和完整性验证。
步骤S202,当所述本地HTML5资源包验证通过时,在预设的HTML5资源备份区备份保存所述本地HTML5资源包。
在具体应用中,当所述本地HTML5资源包验证通过时,需要备份保存本地HTML5资源包。步骤S202可以在步骤S102之前、步骤S102执行时或步骤S102执行之后执行。
在一个实施例中,步骤S202之前包括:
预设设置所述HTML5资源备份区。
应当理解的是,HTML5资源备份区与HTML5资源只读保护区的地址不同,属于不同的数据存储区域,具有完全不交叉、不重合的存储空间。
在本实施例中,步骤S202之后,包括:
步骤S203,每间隔预设时间周期,对所述HTML5资源备份区备份保存的本地HTML5资源包进行验证;
步骤S204,当所述HTML5资源备份区备份保存的本地HTML5资源包验证通过时,将所述HTML5资源备份区备份保存的本地HTML5资源包与写入所述HTML5资源只读保护区的HTML5资源包进行比对;
步骤S205,当所述HTML5资源备份区备份保存的本地HTML5资源包与写入所述HTML5资源只读保护区的HTML5资源包不一致时,通知操作系统触发对系统操作和使用的保护。
在本实施例中,对系统操作和使用的保护是指对操作系统本身的各项操作和使用情况的保护。
在具体应用中,具体可以通过周期性的比较HTML5资源备份区备份保存的本地HTML5资源包与写入所述HTML5资源只读保护区的HTML5资源包是否不一致,来对HTML5资源只读保护区本身的真实性和完整性进行周期性的自检验证。
在一个实施例中,所述验证包括真实性验证和完整性验证。
在具体应用中,验证应当同时包括真实性验证和完整性验证。
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本发明实施例的实施过程构成任何限定。
实施例三
本实施例提供一种HTML5文件安全保护系统,用于执行实施例一或二中的方法步骤,HTML5应用程序安全保护系统可以是任意的可运行操作系统(Operating System,OS)的终端设备中的软件程序系统。
如图3所示,本实施例所提供的HTML5文件安全保护系统100,包括:
第一监测模块101,用于系统权限服务监测对预设的HTML5资源只读保护区的操作;
第一权限控制模块102,用于当所述操作为系统权限进程执行的写操作时,允许执行所述写操作;其中,所述写操作用于将本地HTML5资源包的数据写入所述HTML5资源只读保护区,以安装HTML5应用程序;
第二监测模块103,用于当所述HTML5应用程序安装完成时,监测所述HTML5应用程序的内置浏览器内核访问的数据;
第二权限控制模块104,用于当所述内置浏览器内核访问的数据为非HTML5资源只读保护区的数据时,限制所述内置浏览器内核的访问操作;
第三权限控制模块105,用于当所述操作为非系统权限进程执行的读操作时,允许执行所述读操作;其中,所述非系统权限进程包括所述HTML5应用程序;
第四权限控制模块106,用于当所述操作为非系统权限进程执行的非读操作时,限制执行所述非读操作。
在一个实施例中,所述HTML5文件安全保护系统还包括:
只读保护区设置模块,用于预先设置HTML5资源只读保护区。
在一个实施例中,所述HTML5文件安全保护系统还包括:
验证模块,用于对所述本地HTML5资源包进行验证;
跳转模块,用于当所述本地HTML5资源包验证通过时,跳转至所述第一权限控制模块。
在一个实施例中,所述HTML5文件安全保护系统还包括:
第二验证模块还用于每间隔预设时间周期,对写入所述HTML5资源只读保护区的本地HTML5资源包进行验证;
所述HTML5文件安全保护系统还包括通知模块,用于当所述本地HTML5资源包验证不通过时,通知操作系统触发对系统操作和使用的保护。
在一个实施例中,所述验证模块还用于:
对所述HTML5应用程序的安装包进行验证;
下载所述本地HTML5资源包时,对所述本地HTML5资源包进行验证;
所述跳转模块还用于当所述HTML5应用程序的安装包和所述本地HTML5资源包验证均通过时,跳转至所述第一权限控制模块。
在一个实施例中,所述验证模块还用于在执行所述写操作之前,对所述本地HTML5资源包进行验证。
所述HTML5文件安全保护系统还包括存储模块,用于当所述本地HTML5资源包验证通过时,在预设的HTML5资源备份区备份保存所述本地HTML5资源包。
在一个实施例中,所述HTML5文件安全保护系统还包括:
备份区设置模块,用于预设设置所述HTML5资源备份区。
在一个实施例中,所述验证模块还用于每间隔预设时间周期,对所述HTML5资源备份区备份保存的本地HTML5资源包进行验证;
所述HTML5文件安全保护系统还包括:
比对模块,用于当所述HTML5资源备份区备份保存的本地HTML5资源包验证通过时,将所述HTML5资源备份区备份保存的本地HTML5资源包与写入所述HTML5资源只读保护区的HTML5资源包进行比对;
所述通知模块还用于当所述HTML5资源备份区备份保存的本地HTML5资源包与写入所述HTML5资源只读保护区的HTML5资源包不一致时,通知操作系统触发对所述HTML5资源只读保护区的保护。
实施例四
如图4所示,本发明实施例提供一种终端设备200,其包括:处理器201、存储器202以及存储在所述存储器202中并可在所述处理器201上运行的计算机程序203,例如HTML5文件安全保护方法程序。所述处理器201执行所述计算机程序203时实现上述各个HTML5文件安全保护方法实施例中的步骤,例如图1所示的步骤S101至S106。或者,所述处理器201执行所述计算机程序203时实现上述各装置实施例中各模块的功能,例如图3所示模块101至106的功能。
示例性的,所述计算机程序203可以被分割成一个或多个模块,所述一个或者多个模块被存储在所述存储器202中,并由所述处理器201执行,以完成本发明。所述一个或多个模块可以是能够完成特定功能的一系列计算机程序指令段,该指令段用于描述所述计算机程序203在所述终端设备200中的执行过程。例如,所述计算机程序203可以被分割成第一监测模块,第一权限控制模块,第二监测模块,第二权限控制模块,第三权限控制模块,第四权限控制模块,各模块具体功能如下:
第一监测模块,用于系统权限服务监测对预设的HTML5资源只读保护区的操作;
第一权限控制模块,用于当所述操作为系统权限进程执行的写操作时,允许执行所述写操作;其中,所述写操作用于将本地HTML5资源包的数据写入所述HTML5资源只读保护区,以安装HTML5应用程序;
第二监测模块,用于当所述HTML5应用程序安装完成时,监测所述HTML5应用程序的内置浏览器内核访问的数据;
第二权限控制模块,用于当所述内置浏览器内核访问的数据为非HTML5资源只读保护区的数据时,限制所述内置浏览器内核的访问操作;
第三权限控制模块,用于当所述操作为非系统权限进程执行的读操作时,允许执行所述读操作;其中,所述非系统权限进程包括所述HTML5应用程序;
第四权限控制模块,用于当所述操作为非系统权限进程执行的非读操作时,限制执行所述非读操作。
所述终端设备200可以是桌上型计算机、笔记本、掌上电脑及云端服务器等计算设备。所述终端设备可包括,但不仅限于,处理器201、存储器202。本领域技术人员可以理解,图4仅仅是终端设备200的示例,并不构成对终端设备200的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如所述终端设备还可以包括输入输出设备、网络接入设备、总线等。
所称处理器201可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器 (Digital Signal Processor,DSP)、专用集成电路 (Application Specific Integrated Circuit,ASIC)、现成可编程门阵列 (Field-Programmable Gate Array,FPGA) 或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
所述存储器202可以是所述终端设备200的内部存储单元,例如终端设备200的硬盘或内存。所述存储器202也可以是所述终端设备200的外部存储设备,例如所述终端设备200上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,所述存储器202还可以既包括所述终端设备200的内部存储单元也包括外部存储设备。所述存储器202用于存储所述计算机程序以及所述终端设备所需的其他程序和数据。所述存储器202还可以用于暂时地存储已经输出或者将要输出的数据。
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将所述装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。实施例中的各功能单元、模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中,上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。另外,各功能单元、模块的具体名称也只是为了便于相互区分,并不用于限制本申请的保护范围。上述系统中单元、模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述或记载的部分,可以参见其它实施例的相关描述。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。
在本发明所提供的实施例中,应该理解到,所揭露的装置/终端设备和方法,可以通过其它的方式实现。例如,以上所描述的装置/终端设备实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通讯连接可以是通过一些接口,装置或单元的间接耦合或通讯连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的模块如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明实现上述实施例方法中的全部或部分流程,也可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一计算机可读存储介质中,该计算机程序在被处理器执行时,可实现上述各个方法实施例的步骤。。其中,所述计算机程序包括计算机程序代码,所述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、电载波信号、电信信号以及软件分发介质等。需要说明的是,所述计算机可读介质包含的内容可以根据司法管辖区内立法和专利实践的要求进行适当的增减,例如在某些司法管辖区,根据立法和专利实践,计算机可读介质不包括是电载波信号和电信信号。
以上所述实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围,均应包含在本发明的保护范围之内。

Claims (10)

  1. 一种HTML5文件安全保护方法,其特征在于,包括:
    系统权限服务监测对预设的HTML5资源只读保护区的操作;
    当所述操作为系统权限进程执行的写操作时,允许执行所述写操作;其中,所述写操作用于将本地HTML5资源包的数据写入所述HTML5资源只读保护区,以安装HTML5应用程序;
    当所述HTML5应用程序安装完成时,监测所述HTML5应用程序的内置浏览器内核访问的数据;
    当所述内置浏览器内核访问的数据为非HTML5资源只读保护区的数据时,限制所述内置浏览器内核的访问操作;
    当所述操作为非系统权限进程执行的读操作时,允许执行所述读操作;其中,所述非系统权限进程包括所述HTML5应用程序;
    当所述操作为非系统权限进程执行的非读操作时,限制执行所述非读操作。
  2. 如权利要求1所述的HTML5文件安全保护方法,其特征在于,所述HTML5文件安全保护方法还包括:
    执行所述写操作之前,对所述本地HTML5资源包进行验证;
    当所述本地HTML5资源包验证通过时,在预设的HTML5资源备份区备份保存所述本地HTML5资源包。
  3. 如权利要求2所述的HTML5文件安全保护方法,其特征在于,当所述本地HTML5资源包验证通过时,在预设的HTML5资源备份区备份保存所述本地HTML5资源包,之后包括:
    每间隔预设时间周期,对所述HTML5资源备份区备份保存的本地HTML5资源包进行验证;
    当所述HTML5资源备份区备份保存的本地HTML5资源包验证通过时,将所述HTML5资源备份区备份保存的本地HTML5资源包与写入所述HTML5资源只读保护区的HTML5资源包进行比对;
    当所述HTML5资源备份区备份保存的本地HTML5资源包与写入所述HTML5资源只读保护区的HTML5资源包不一致时,通知操作系统触发对系统操作和使用的保护。
  4. 如权利要求1所述的HTML5文件安全保护方法,其特征在于,当所述操作为系统权限进程执行的写操作时,允许执行所述写操作之前,包括:
    对所述HTML5应用程序的安装包进行验证;
    下载所述本地HTML5资源包时,对所述本地HTML5资源包进行验证;
    当所述HTML5应用程序的安装包和所述本地HTML5资源包验证均通过时,允许执行所述写操作。
  5. 如权利要求2至4任一项所述的HTML5文件安全保护方法,其特征在于,所述验证包括真实性验证和完整性验证。
  6. 如权利要求1所述的HTML5文件安全保护方法,其特征在于,所述非HTML5资源只读保护区的数据包括:
    访问路径与所述HTML5资源只读保护区的数据的路径不同的数据;
    访问路径存在于所述HTML5资源只读保护区之外且包括所述HTML5资源只读保护区的数据的相对路径的数据。
  7. 如权利要求1所述的HTML5文件安全保护方法,其特征在于,限制所述内置浏览器内核的访问操作,包括:
    通过URI拦截方式、URL拦截方式或文件句柄拦截方式限制所述内置浏览器内核的访问操作。
  8. 一种HTML5应用程序安全保护系统,其特征在于,包括:
    第一监测模块,用于系统权限服务监测对预设的HTML5资源只读保护区的操作;
    第一权限控制模块,用于当所述操作为系统权限进程执行的写操作时,允许执行所述写操作;其中,所述写操作用于将本地HTML5资源包的数据写入所述HTML5资源只读保护区,以安装HTML5应用程序;
    第二监测模块,用于当所述HTML5应用程序安装完成时,监测所述HTML5应用程序的内置浏览器内核访问的数据;
    第二权限控制模块,用于当所述内置浏览器内核访问的数据为非HTML5资源只读保护区的数据时,限制所述内置浏览器内核的访问操作;
    第三权限控制模块,用于当所述操作为非系统权限进程执行的读操作时,允许执行所述读操作;其中,所述非系统权限进程包括所述HTML5应用程序;
    第四权限控制模块,用于当所述操作为非系统权限进程执行的非读操作时,限制执行所述非读操作。
  9. 一种终端设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现如权利要求1至7任一项所述方法的步骤。
  10. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1至7任一项所述方法的步骤。
PCT/CN2019/079532 2018-05-30 2019-03-25 Html5文件安全保护方法、系统及终端设备 WO2019228031A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US17/791,119 US20230035678A1 (en) 2018-05-30 2019-03-25 Method and system for protecting security of html5 file

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810541506.1A CN108898006B (zh) 2018-05-30 2018-05-30 Html5文件安全保护方法、系统及终端设备
CN201810541506.1 2018-05-30

Publications (1)

Publication Number Publication Date
WO2019228031A1 true WO2019228031A1 (zh) 2019-12-05

Family

ID=64343652

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/079532 WO2019228031A1 (zh) 2018-05-30 2019-03-25 Html5文件安全保护方法、系统及终端设备

Country Status (3)

Country Link
US (1) US20230035678A1 (zh)
CN (1) CN108898006B (zh)
WO (1) WO2019228031A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108898006B (zh) * 2018-05-30 2020-04-03 百富计算机技术(深圳)有限公司 Html5文件安全保护方法、系统及终端设备

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104216700A (zh) * 2013-09-10 2014-12-17 侯金涛 基于云计算的html5应用的打包、安装、卸载、运行方法及系统
CN104573068A (zh) * 2015-01-23 2015-04-29 四川中科腾信科技有限公司 一种基于大数据的信息处理方法
CN106682028A (zh) * 2015-11-10 2017-05-17 阿里巴巴集团控股有限公司 获取网页应用的方法、装置及系统
CN108898006A (zh) * 2018-05-30 2018-11-27 百富计算机技术(深圳)有限公司 Html5文件安全保护方法、系统及终端设备

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6904493B2 (en) * 2002-07-11 2005-06-07 Animeta Systems, Inc. Secure flash memory device and method of operation
CN102081393B (zh) * 2010-12-20 2012-05-30 东风汽车股份有限公司 基于html的plc控制的生产线设备信息发布装置
US9575734B2 (en) * 2014-03-28 2017-02-21 Wipro Limited System and method for improved light-weight business process modeling in offline mode using browser resources
US10318489B2 (en) * 2014-05-21 2019-06-11 Vmware, Inc. Avoiding full file replication using sparse files
CN105718210B (zh) * 2014-12-05 2018-12-18 旭景科技股份有限公司 用于操作可携式设备的只读方法与系统
CN104866778A (zh) * 2015-01-30 2015-08-26 武汉华工安鼎信息技术有限责任公司 一种基于Linux内核的文档安全访问控制方法和装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104216700A (zh) * 2013-09-10 2014-12-17 侯金涛 基于云计算的html5应用的打包、安装、卸载、运行方法及系统
CN104573068A (zh) * 2015-01-23 2015-04-29 四川中科腾信科技有限公司 一种基于大数据的信息处理方法
CN106682028A (zh) * 2015-11-10 2017-05-17 阿里巴巴集团控股有限公司 获取网页应用的方法、装置及系统
CN108898006A (zh) * 2018-05-30 2018-11-27 百富计算机技术(深圳)有限公司 Html5文件安全保护方法、系统及终端设备

Also Published As

Publication number Publication date
CN108898006A (zh) 2018-11-27
US20230035678A1 (en) 2023-02-02
CN108898006B (zh) 2020-04-03

Similar Documents

Publication Publication Date Title
US9852289B1 (en) Systems and methods for protecting files from malicious encryption attempts
US11645383B2 (en) Early runtime detection and prevention of ransomware
EP3107024B1 (en) System and method of restoring modified data
EP3123311B1 (en) Malicious code protection for computer systems based on process modification
JP5635993B2 (ja) モバイル装置とコンピュータを組み合わせ、安全な個人ごとの環境を生成する装置および方法
US7409719B2 (en) Computer security management, such as in a virtual machine or hardened operating system
CN110998582A (zh) 安全存储装置
US10931641B1 (en) Hardware control logic based data forwarding control method and system
US9424425B2 (en) Protecting anti-malware processes
US8862892B2 (en) System and method for detecting a security compromise on a device
US10783041B2 (en) Backup and recovery of data files using hard links
US11449602B1 (en) Systems and methods for generating trust binaries
US9942268B1 (en) Systems and methods for thwarting unauthorized attempts to disable security managers within runtime environments
JP2016539405A (ja) 読み出し専用のシステムイメージ内のシステムレベルサービスを更新するためのシステム及び方法
US20150033031A1 (en) System and Method for Detecting a Security Compromise on a Device
US9659182B1 (en) Systems and methods for protecting data files
US10803167B1 (en) Systems and methods for executing application launchers
US10769267B1 (en) Systems and methods for controlling access to credentials
EP2754082B1 (en) Content handling for applications
US10169584B1 (en) Systems and methods for identifying non-malicious files on computing devices within organizations
WO2012034349A1 (zh) 一种电脑安全防护方法和系统
WO2019228031A1 (zh) Html5文件安全保护方法、系统及终端设备
US20230359741A1 (en) Trusted boot method and apparatus, electronic device, and readable storage medium
US11847222B2 (en) System and method for preventing unwanted bundled software installation
US11822647B1 (en) Data structure for trust store

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19810013

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19810013

Country of ref document: EP

Kind code of ref document: A1