WO2018165951A1 - Procédé et dispositif d'authentification de signature pendant un démarrage d'apk android - Google Patents
Procédé et dispositif d'authentification de signature pendant un démarrage d'apk android Download PDFInfo
- Publication number
- WO2018165951A1 WO2018165951A1 PCT/CN2017/076974 CN2017076974W WO2018165951A1 WO 2018165951 A1 WO2018165951 A1 WO 2018165951A1 CN 2017076974 W CN2017076974 W CN 2017076974W WO 2018165951 A1 WO2018165951 A1 WO 2018165951A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- file
- signature
- apk
- android
- sgn
- Prior art date
- Legal status (The legal status 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 status listed.)
- Ceased
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/30—Authentication, i.e. establishing the identity or authorisation of security principals
- G06F21/44—Program or device authentication
Definitions
- the present invention relates to the field of Android APK security authentication, and in particular, to a method and device for launching a signature authentication of an Android APK.
- the original Android system will check the signature when the APK is installed. The signature is different. If there is no signature or the signature is not passed, it cannot be installed or overwritten.
- ART uses the OAT format file (OAT format file), installs the installer in the APK application, optimizes the APK installation package to the local machine code through the executable code de oat, that is, the installed file and the original file have very
- OAT format file OAT format file
- the original APK is only installed after verifying the signature file in the META-INF directory inside the original APK file, but it will not be verified after startup. Android will no longer verify the APK when the APK is launched, which may result in the possibility of tampering with the successfully installed APK, which is a security risk.
- the object of the present invention is to provide a method and device for launching an Android APK to initiate signature verification, and to perform signature verification when the APK is launched, to avoid using an APK that has been maliciously tampered with after installation.
- the method for converting the original APK installation file into a signature SGN file includes,
- the oatdata and oatexec segments in the OAT format file are calculated by the HASH256+RSA2048 algorithm to obtain a signature SGN file.
- the method further includes
- the step of loading and loading the executable code converted by the installed APK into the 0AT signature file includes,
- the step of determining whether the 0AT signature file is consistent with the signature SGN file includes
- the present invention also provides an apparatus for launching ⁇ signature authentication of an Android APK, including:
- a signature file obtaining unit configured to acquire a signature SGN file converted from an original APK installation file And loading the OAT signature file converted from the executable code of the installed APK;
- the change determining unit is configured to determine whether the OAT signature file is consistent with the signature SGN file, and if so, load the APK, otherwise, prohibiting the launch of the APK.
- a conversion unit is further included, configured to convert the original APK installation file into an OAT format file.
- a recovery unit and a packaging unit are further included.
- the restoring unit is configured to put the signature SGN file into the original APK package file directory META-INF;
- the packaging unit is configured to repackage the APK file, and install a new APK file into the Android system.
- the signature file obtaining unit includes a loading module, and the loading module is configured to load the 0AT signature file into a memory of the Android ART virtual machine.
- the change determination unit includes a file tampering determination module and a numerical value determination module;
- the file tampering determination module is configured to determine whether the signature SGN file under the META-INF corresponding to the APK has been tampered with, and if the tampering has been performed, the APK fails to be started, otherwise, the Oatdata of the 0AT signature file is calculated.
- the value judging module is configured to determine whether the HASH256 value of the 0AT signature file is consistent with the HASH256 value stored in the signature SGN file under META-INF, and if the signature is consistent, the signature verification succeeds.
- the beneficial effects of the present invention compared with the prior art are:
- the method and device for launching the ⁇ signature authentication of the Android APK of the present invention by acquiring the 0AT signature file and the signature SGN file, starting ⁇ , performing signature verification on the 0AT signature file Therefore, according to whether the 0AT signature file is changed, the behavior of the APK is restricted, and the APK that has been successfully installed is activated, the signature is authenticated, and the APK is not arbitrarily falsified.
- the APK can be started. And found that the user has been tampered with and the slogan has not been run, reducing the security risks.
- FIG. 1 is a block diagram of a method for triggering signature authentication of an Android APK according to an embodiment of the present invention
- FIG. 2 is a block diagram showing a specific process for determining whether an OAT signature file is changed according to an embodiment of the present invention
- 3 is a structural block diagram of an OAT format file according to an embodiment of the present invention
- FIG. 4 is a structural block diagram of an apparatus for initiating ⁇ signature authentication of an Android APK according to an embodiment of the present invention
- FIG. 5 is a structural block diagram of a change judging unit according to an embodiment of the present invention.
- first”, “second” and the like in the present invention are for the purpose of description only, and are not to be understood as indicating or implying their relative importance or implicitly indicating the number of indicated technical features. .
- features defining “first” and “second” may include at least one of the features, either explicitly or implicitly.
- the technical solutions between the various embodiments may be combined with each other, but must be based on the realization of those skilled in the art, and when the combination of the technical solutions is contradictory or impossible to implement, it should be considered that the combination of the technical solutions does not exist. It is also within the scope of protection required by the present invention.
- the method for launching the signature authentication of the Android APK provided by the embodiment, the method includes:
- S2 Calculate the oatdata and oatexec segments in the OAT format file by using a HASH256+RSA2048 algorithm to obtain a signature SGN file.
- S6 Determine whether the OAT signature file is consistent with the signature SGN file. If not, S7 prohibits starting the APK; if yes, S8, loading the APK.
- the original APK format is mainly converted into the installed 0AT format file by using a homemade computer tool.
- the signature SGN file is obtained, specifically, the signature SGN of the oatdata and oatexec segments in the OAT format file is calculated by the HASH256+RSA2048 algorithm as the signature SGN file.
- Google's original signature scheme will sign all the files and put the signature in the META-INF directory.
- the executable code will be converted into a 0AT signature file, 0AT signature file. It is in 0AT format. Since the 0AT format file is essentially an ELF file, it has the structure of a general ELF file in the outermost layer. For example, it has a standard ELF file header and describes the file contents through Sections.
- a private ELF file, the 0AT format file contains two special segments, oatdata and oatexec. The former contains the contents of the dex file used to generate the local machine instructions. The latter contains the generated local machine instructions. The relationship between them is passed.
- three symbols oatdata, oatexec, and oatl astword are exported, and their values are used to define the start and end positions of the oatdata segment and the oatexec segment, where [oatdat a, oatexec-l] describes It is the starting and ending position of the oatdata segment, and [oatexec, oatlastword+3] describes the starting and ending position of oat exec.
- the local machine command after the APK is installed according to the OAT format file can be used to convert the APK installation file into an OAT format file on the computer using the self-made computer tool, using the private key pair.
- OAT performs HASH256+RSA2048 signature, obtains the signed SGN file, puts the signed SGN file into the META-INF directory, and then repackages the APK, so that the OAT file signature can be authenticated at startup.
- step S5 the APK starts, and the step of loading the OAT signature file is specifically loading the OAT signature file into the memory of the Android ART virtual machine.
- step S6 specifically includes the following steps:
- S61 Determine whether the signature SGN file under the META-INF corresponding to the APK has been tampered with, and if it has been tampered with, S7, prohibiting the activation of the APK;
- step S62 calculate the Oatdata of the OAT signature file and the HASH256 value of the oatexec segment, and proceeds to step S63;
- S63 Determine whether the HASH256 value of the OAT signature file is consistent with the HASH256 value stored in the signature SGN file under the META-INF. If they are consistent, the S8, the signature verification succeeds, the APK is loaded, or, if not, the S7 , prohibit the launch of the APK.
- the above Android APK launches the method of signature authentication, by acquiring the signature SGN file, the APK of the Android system is started, and the signature SGN file is signature-authenticated, thereby limiting the behavior of the APK according to whether the signature SGN file is changed.
- To enable the successful installation of the APK verify the signature, and ensure that the APK is not arbitrarily tampered with. Once the APK has been tampered with, the APK can be found after the APK is launched, and the user has been tampered with and cannot be run. , reduce security risks.
- the device for initiating ⁇ signature authentication of the Android APK provided in this embodiment includes a conversion unit 1, a signature file acquisition unit 2, a loading module 5, and a change determination unit 6.
- a conversion unit 1 the conversion unit is configured to convert an original APK installation file into a 0AT format file, And calculating the oatdata and oatexec segments in the OAT format file by using the HASH256+RSA2048 algorithm
- the signature file obtaining unit 2 is configured to acquire a signature SGN file converted from the original APK installation file, and load an OAT signature file converted by the executable code of the installed APK.
- the signature file obtaining unit 2 includes a loading module 5 for loading the OAT signature file into the memory of the Android ART virtual machine.
- the change determining unit 6 is configured to determine whether the OAT signature file is consistent with the signature SGN file, and if so, load the APK, otherwise, prohibiting the activation of the APK.
- the conversion unit 1 described above converts the original APK format into a file of the installed OAT format file by using a homemade computer tool in the conversion file.
- the signature file obtaining unit 2 obtains the signature SGN file, specifically, the Oatdata and oatexec segments in the OAT format file are calculated by the HASH256+RSA2048 algorithm as the signature SGN file.
- the executable code will be converted into an OAT signature file, and the OAT signature file is an OAT format file.
- the 0AT format file is essentially an ELF file, it has the structure of a general ELF file at the outermost layer, for example, it has a standard ELF file header and describes the file content by Section, as a private Android.
- An ELF file the 0AT format file contains two special sections oatdata and oatexec, the former contains the contents of the dex file used to generate the local machine instructions, and the latter contains the generated local machine instructions, the relationship between them is stored in Oat header description in front of the oatdata section.
- oatdata, oatexec, and o atlastword are exported, and their values are used to define the start and end positions of the oatdata segment and the oatexec segment, where [oat data, oatexec-l] describes It is the starting and ending position of the oatdata segment, and [oatexec, oatlastword+3] describes the starting and ending position of oatexec.
- the loading module 5 described above specifically loads the OAT signature file into the memory of the Android ART virtual machine.
- the device for launching the signature authentication of the Android APK further includes a restoration unit 3 and a packaging unit 4.
- the restoration unit 3 is configured to put the signature SGN file into the original APK package file directory META-INF.
- the packaging unit 4 is configured to repackage the APK file and install the new APK file into the Android system.
- the change judging unit 6 includes a file tampering judging module 61 and a numerical value judging module 62.
- the file tampering determination module 61 is configured to determine whether the signature SGN file under the META-INF corresponding to the APK has been tampered with, and if the tampering has been performed, the APK fails to be started. Otherwise, the 0 atdata of the OAT signature file is calculated.
- the HASH256 value of the oatexec segment is calculated.
- the value judging module 62 is configured to determine whether the HASH256 value of the OAT signature file and the HASH256 value stored in the signature SGN file under the META-INF are consistent. If the signature is consistent, the signature verification succeeds, the APK is loaded, or If it is inconsistent, it is forbidden to start the APK.
- the device for initiating the signature authentication of the Android APK is configured to acquire the signature SG N file and the OAT signature file by the signature file acquiring unit 2, and the change determination unit 6 performs signature verification on the signature SGN file and the OAT signature file, thereby According to whether the OAT signature file is consistent with the signature SGN file, the behavior of the APK is restricted, and the successfully installed APK is activated, the signature is authenticated, and the A PK is not arbitrarily falsified.
- the APK is tampered with, the APK is started. You can find out that the user has been tampered with, has been tampering, can't run, and reduces security risks.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Storage Device Security (AREA)
Abstract
L'invention concerne un procédé et un dispositif d'authentification de signature pendant un démarrage d'APK Android, le procédé consistant : à obtenir un fichier SGN de signature converti à partir d'un fichier d'installation APK d'origine et à charger un fichier de signature OAT d'un APK installé ; à déterminer si le fichier de signature OAT est comptable avec le fichier SGN de signature ; si tel est le cas, à charger l'APK et, si ce n'est pas le cas, à interdire le démarrage d'APK. Le fichier de signature OAT est authentifié pendant un démarrage d'APK afin de déterminer si l'APK peut être utilisé.
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/CN2017/076974 WO2018165951A1 (fr) | 2017-03-16 | 2017-03-16 | Procédé et dispositif d'authentification de signature pendant un démarrage d'apk android |
| CN201780001547.5A CN107690643A (zh) | 2017-03-16 | 2017-03-16 | 安卓apk启动时签名认证的方法及其装置 |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/CN2017/076974 WO2018165951A1 (fr) | 2017-03-16 | 2017-03-16 | Procédé et dispositif d'authentification de signature pendant un démarrage d'apk android |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2018165951A1 true WO2018165951A1 (fr) | 2018-09-20 |
Family
ID=61154886
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2017/076974 Ceased WO2018165951A1 (fr) | 2017-03-16 | 2017-03-16 | Procédé et dispositif d'authentification de signature pendant un démarrage d'apk android |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN107690643A (fr) |
| WO (1) | WO2018165951A1 (fr) |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104049973A (zh) * | 2014-06-25 | 2014-09-17 | 北京思特奇信息技术股份有限公司 | 安卓应用程序的安全验证方法及装置 |
| CN105069357A (zh) * | 2015-08-06 | 2015-11-18 | 福建天晴数码有限公司 | 扫描漏洞的方法、云端服务器及系统 |
| CN106355081A (zh) * | 2016-09-07 | 2017-01-25 | 深圳市新国都支付技术有限公司 | 一种安卓程序启动校验方法和装置 |
Family Cites Families (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103914654A (zh) * | 2013-12-25 | 2014-07-09 | 武汉安天信息技术有限责任公司 | 一种对Android ART运行时代码进行恶意代码检测的方法及系统 |
| US9558096B2 (en) * | 2014-03-21 | 2017-01-31 | Marvell World Trade Ltd. | Method and apparatus for supporting performance analysis |
| CN104156638B (zh) * | 2014-06-06 | 2018-04-20 | 国家计算机网络与信息安全管理中心 | 一种面向安卓系统软件的扩展签名的实现方法 |
| CN106228041B (zh) * | 2016-07-21 | 2018-11-20 | 北京理工大学 | 一种针对Android预编译的代码保护方法 |
-
2017
- 2017-03-16 WO PCT/CN2017/076974 patent/WO2018165951A1/fr not_active Ceased
- 2017-03-16 CN CN201780001547.5A patent/CN107690643A/zh active Pending
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104049973A (zh) * | 2014-06-25 | 2014-09-17 | 北京思特奇信息技术股份有限公司 | 安卓应用程序的安全验证方法及装置 |
| CN105069357A (zh) * | 2015-08-06 | 2015-11-18 | 福建天晴数码有限公司 | 扫描漏洞的方法、云端服务器及系统 |
| CN106355081A (zh) * | 2016-09-07 | 2017-01-25 | 深圳市新国都支付技术有限公司 | 一种安卓程序启动校验方法和装置 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN107690643A (zh) | 2018-02-13 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US9792440B1 (en) | Secure boot for vehicular systems | |
| JP5571704B2 (ja) | 周辺デバイスを用いた完全性検証 | |
| US11886593B2 (en) | Verification of a provisioned state of a platform | |
| CN113407911A (zh) | 验证驻留在远程计算设备上的软件 | |
| US20150067884A1 (en) | Method and system for protecting software | |
| JP6391439B2 (ja) | 情報処理装置、サーバ装置、情報処理システム、制御方法及びコンピュータプログラム | |
| TWI687840B (zh) | 記憶體子系統、安全客戶端裝置與認證方法 | |
| CN109753788B (zh) | 内核运行时的完整性校验方法及计算机可读存储介质 | |
| CN112699343A (zh) | 一种软件完整性保护、校验的方法及装置 | |
| CN111832012A (zh) | 一种ecu及其启动方法 | |
| CN112148314B (zh) | 一种嵌入式系统的镜像验证方法、装置、设备及存储介质 | |
| JP4983521B2 (ja) | ソフトウェア更新検証装置、方法及びプログラム | |
| CN113495729A (zh) | 一种软件升级方法及装置 | |
| CN109977662A (zh) | 应用程序的处理方法、装置、终端及存储介质 | |
| EP3952244A1 (fr) | Dispositif de commande de véhicule, procédé de démarrage de dispositif de commande de véhicule et support d'enregistrement | |
| JP2013041587A (ja) | 遠隔ソースからコマンドを実行するためのシステム及び方法 | |
| CN120353489A (zh) | 固件更新方法、设备及存储介质 | |
| WO2018165951A1 (fr) | Procédé et dispositif d'authentification de signature pendant un démarrage d'apk android | |
| CN117874784B (zh) | 一种车辆加密系统和方法 | |
| CN104346568A (zh) | 识别恶意应用程序的方法、装置及移动设备 | |
| CN101009888A (zh) | 安全启动方法及用于该方法的移动终端 | |
| CN114282205B (zh) | 固件启动方法及装置、计算机可读存储介质 | |
| WO2016188231A1 (fr) | Procédé et appareil de vérification | |
| WO2020233044A1 (fr) | Procédé et dispositif de vérification de module d'extension, et serveur et support d'informations lisible par ordinateur | |
| CN117349849A (zh) | 芯片启动方法和芯片 |
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: 17901242 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 17/01/2020) |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 17901242 Country of ref document: EP Kind code of ref document: A1 |