CN104750675A - Identification method for encrypted file of unknown format - Google Patents

Identification method for encrypted file of unknown format Download PDF

Info

Publication number
CN104750675A
CN104750675A CN201510151456.2A CN201510151456A CN104750675A CN 104750675 A CN104750675 A CN 104750675A CN 201510151456 A CN201510151456 A CN 201510151456A CN 104750675 A CN104750675 A CN 104750675A
Authority
CN
China
Prior art keywords
file
file destination
size
data
destination
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.)
Granted
Application number
CN201510151456.2A
Other languages
Chinese (zh)
Other versions
CN104750675B (en
Inventor
王继志
杨光
陈丽娟
杨英
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong Computer Science Center National Super Computing Center in Jinan
Shandong Computer Science Center
Original Assignee
Shandong Computer Science Center
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 Shandong Computer Science Center filed Critical Shandong Computer Science Center
Priority to CN201510151456.2A priority Critical patent/CN104750675B/en
Publication of CN104750675A publication Critical patent/CN104750675A/en
Application granted granted Critical
Publication of CN104750675B publication Critical patent/CN104750675B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses an identification method for an encrypted file of an unknown format. The method includes the following steps that S1, the file of any format to be identified in an encrypted mode is determined and identified as an object file; S2, data in the object file are extracted; S3, the data extracted in the step S2 are judged, wherein if the data are judged to be plaintext data, the result that the file is a non-encrypted file is output, and if the data are judged to be encrypted files, the result that the file is an encrypted file is output. According to the method, the data in the object file are extracted and the extracted data are subjected to encryption judgment, so under the circumstance that the format of the file is unknown, whether the file of any format is automatically identified and judged, the encrypted file can be identified effectively, judgment efficiency is high, and the problem that time and labor are consumed due to manual judgment can be solved.

Description

A kind of recognition methods of unknown format encrypt file
Technical field
The present invention relates to file identification technical field, specifically a kind of recognition methods of unknown format encrypt file.
Background technology
In computer forensics field, suspect is often encrypted storage important evidence of crime, and change file form.When evidence obtaining personnel obtain the disk that suspect stores evidence of crime, need in mass file, find these encrypted files fast, then adopt the method for password cracking to crack these encrypt files, thus obtain the evidence of crime of suspect.
But for the file of arbitrary format, how robotization judge a file whether through encryption be not an easy thing.At present in computer forensics field, whether a file is encrypted, generally has two kinds of methods.One method is that evidence obtaining personnel judge by hand, such as, open a Word file by hand, if need to input password, then this Word file is encrypted, otherwise can directly open; Another kind method is for specific file type, such as Word file, if a Word file is encrypted, in file header, then there is an encryption indicator to be set to 1, can judge whether this encryption indicator is 1 by programming automation like this, then can whether encrypt by this Word file of automatization judgement.Obviously, front a kind of method efficiency is very low, wastes time and energy, and cannot check the file of magnanimity one by one; A then method, for specific file layout, if the conscious change file layout of assailant, then can only be easy to this decision method of out-tricking, causes effectively to judge encrypt file.
Whether current encrypt file decision method is difficult to automatically judge through encryption the file of the multiple format of the magnanimity run in computer forensics field, therefore, in the urgent need to a kind of technology not knowing whether to judge through encryption file in file layout situation.
Summary of the invention
For above-mentioned deficiency, the invention provides the recognition methods of a kind of unknown format encrypt file, whether it can encrypt arbitrary format file when not knowing file layout is carried out robotization identification decision, effectively can not only identify encrypt file, judge that efficiency is high, and can avoid manually carrying out judging and cause the problem that wastes time and energy, still further provides a kind of data extraction method of unknown format file and a kind of data encryption decision method.
The present invention solves the technical scheme that its technical matters takes: a kind of recognition methods of unknown format encrypt file, is characterized in that, comprise the following steps:
S1: determine the arbitrary format file needing to be encrypted identification, and be designated file destination;
S2: the data in file destination are extracted;
S3: judge the data that step S2 extracts, if be judged to be clear data, then exports the result that this file is non-encrypt file, if be judged to be encrypt file, then exports the result that this file is encrypt file.
Describedly leaching process carried out to the data in file destination comprise the following steps:
S21: open file destination in a binary format;
S22: the content reading file destination with the form of binary word throttling, and by the file destination content of reading stored in buffer area, till the content reading that file destination is all is complete;
S23: close file destination.
Described the process that extracted data judge to be comprised the following steps:
S31: the size calculating file destination byte stream in buffer zone, in units of byte, is designated as size, then content in byte stream is designated as b from the 1st byte successively to size byte 1, b 2..., b size;
S32: by b 1, b 2..., b sizebe converted into signless integer;
S33: computation of mean values μ according to the following equation:
μ = 1 size Σ n = 1 size b n ;
S34: calculate E according to the following equation:
E = 1 size - 1 Σ n = 1 size - 1 ( b n - μ ) ( b n + 1 - μ ) ;
S35: calculate σ according to the following equation:
σ = 1 size Σ n = 1 size ( b n - μ ) 2 ;
S36: calculate R according to the following equation:
R = E σ 2 ;
S37: the threshold values f comparing R Yu preset, if R<f, then judge that file destination is as encrypted file, otherwise then judge the file that file destination is crossed as unencryption.
Described threshold values f is the correlativity after encryption between file byte.
Present invention also offers a kind of data extraction method of file destination, it is characterized in that, comprise the following steps:
S21: open file destination in a binary format;
S22: the content reading file destination with the form of binary word throttling, and by the file destination content of reading stored in buffer area, till the content reading that file destination is all is complete;
S23: close file destination.
Described file destination is the arbitrary format file determining to need to be encrypted identification.
Present invention also offers a kind of data encryption decision method of file destination, it is characterized in that, comprise the process that the data of unknown format file are extracted and the process that extracted data are judged.
Described the process that the data of unknown format file are extracted to be comprised the following steps:
S21: open file destination in a binary format;
S22: the content reading file destination with the form of binary word throttling, and by the file destination content of reading stored in buffer area, till the content reading that file destination is all is complete;
S23: close file destination.
Described the process that extracted data judge to be comprised the following steps:
S31: the size calculating file destination byte stream in buffer zone, in units of byte, is designated as size, then content in byte stream is designated as b from the 1st byte successively to size byte 1, b 2..., b size;
S32: by b 1, b 2..., b sizebe converted into signless integer;
S33: computation of mean values μ according to the following equation:
&mu; = 1 size &Sigma; n = 1 size b n ;
S34: calculate E according to the following equation:
E = 1 size - 1 &Sigma; n = 1 size - 1 ( b n - &mu; ) ( b n + 1 - &mu; ) ;
S35: calculate σ according to the following equation:
&sigma; = 1 size &Sigma; n = 1 size ( b n - &mu; ) 2 ;
S36: calculate R according to the following equation:
R = E &sigma; 2 ;
S37: the threshold values f comparing R Yu preset, if R<f, then judge that file destination is as encrypted file, otherwise then judge the file that file destination is crossed as unencryption, described threshold values f is the correlativity after encryption between file byte.
Described file destination is the arbitrary format file determining to need to be encrypted identification.
The invention has the beneficial effects as follows: the present invention is by carrying out data extraction to file destination and being encrypted judgement to the data extracted, can when not knowing file layout, whether arbitrary format file is encrypted and carries out robotization identification decision, effectively can not only identify encrypt file, judge that efficiency is high, and can avoid manually carrying out judging and cause the problem that wastes time and energy.
The present invention does not need the form knowing file in advance, the format information utilizing file is not needed in decision process yet, just can realize whether judging through the robotization of encryption any file, facilitate evidence obtaining personnel and carry out computer forensics, improve the case handling efficiency of public security organ.
Accompanying drawing explanation
Below in conjunction with Figure of description, the present invention will be described.
Fig. 1 is the process flow diagram of unknown format encrypt file of the present invention recognition methods;
Fig. 2 is the method flow diagram that the present invention extracts file destination data;
Fig. 3 is the method flow diagram that the present invention judges file destination data encryption.
Embodiment
For clearly demonstrating the technical characterstic of this programme, below by embodiment, and in conjunction with its accompanying drawing, the present invention will be described in detail.Disclosing hereafter provides many different embodiments or example is used for realizing different structure of the present invention.Of the present invention open in order to simplify, hereinafter the parts of specific examples and setting are described.In addition, the present invention can in different example repeat reference numerals and/or letter.This repetition is to simplify and clearly object, itself does not indicate the relation between discussed various embodiment and/or setting.It should be noted that parts illustrated in the accompanying drawings are not necessarily drawn in proportion.Present invention omits the description of known assemblies and treatment technology and process to avoid unnecessarily limiting the present invention.
Main thought of the present invention is that unknown file is analyzed autocorrelation between its byte as byte stream, file after encryption can present good randomness, and unencrypted file has correlativity due to meaningful between byte, a therefore criterion whether can encrypting as file of the height of auto-correlation degree.The recognition methods of unknown format encrypt file of the present invention have employed data extraction method and the data encryption decision method of file destination.
As shown in Figure 1, the recognition methods of a kind of unknown format encrypt file of the present invention, it comprises the following steps:
S1: determine the arbitrary format file needing to be encrypted identification, and be designated file destination;
S2: utilize the data extraction method of file destination to extract the data in file destination;
S3: utilize data encryption decision method to judge the data that step S2 extracts, if be judged to be clear data, then exports the result that this file is non-encrypt file, if be judged to be encrypt file, then exports the result that this file is encrypt file.
As shown in Figure 2, the data extraction method of a kind of file destination of the present invention, it comprises the following steps:
S21: open file destination in a binary format;
S22: the content reading file destination with the form of binary word throttling, and by the file destination content of reading stored in buffer area, till the content reading that file destination is all is complete;
S23: close file destination.
As shown in Figure 3, the data encryption decision method of a kind of file destination of the present invention, it comprises the following steps:
S31: the size calculating file destination byte stream in buffer zone, in units of byte, is designated as size, then content in byte stream is designated as b from the 1st byte successively to size byte 1, b 2..., b size;
S32: by b 1, b 2..., b sizebe converted into signless integer;
S33: computation of mean values μ according to the following equation:
&mu; = 1 size &Sigma; n = 1 size b n ;
S34: calculate E according to the following equation:
E = 1 size - 1 &Sigma; n = 1 size - 1 ( b n - &mu; ) ( b n + 1 - &mu; ) ;
S35: calculate σ according to the following equation:
&sigma; = 1 size &Sigma; n = 1 size ( b n - &mu; ) 2 ;
S36: calculate R according to the following equation:
R = E &sigma; 2 ;
S37: the threshold values f comparing R Yu preset, if R<f, then judge that file destination is as encrypted file, otherwise then judge the file that file destination is crossed as unencryption, described threshold values f is the correlativity after encryption between file byte.
File destination described in said method is the arbitrary format file determining to need to be encrypted identification.
The above is the preferred embodiment of the present invention, and for those skilled in the art, under the premise without departing from the principles of the invention, can also make some improvements and modifications, these improvements and modifications are also regarded as protection scope of the present invention.

Claims (10)

1. a recognition methods for unknown format encrypt file, is characterized in that, comprises the following steps:
S1: determine the arbitrary format file needing to be encrypted identification, and be designated file destination;
S2: the data in file destination are extracted;
S3: judge the data that step S2 extracts, if be judged to be clear data, then exports the result that this file is non-encrypt file, if be judged to be encrypt file, then exports the result that this file is encrypt file.
2. the recognition methods of a kind of unknown format encrypt file according to claim 1, is characterized in that, describedly carries out leaching process to the data in file destination and comprises the following steps:
S21: open file destination in a binary format;
S22: the content reading file destination with the form of binary word throttling, and by the file destination content of reading stored in buffer area, till the content reading that file destination is all is complete;
S23: close file destination.
3. the recognition methods of a kind of unknown format encrypt file according to claim 2, is characterized in that, describedly comprises the following steps the process that extracted data judge:
S31: the size calculating file destination byte stream in buffer zone, in units of byte, is designated as size, then content in byte stream is designated as b from the 1st byte successively to size byte 1, b 2..., b size;
S32: by b 1, b 2..., b sizebe converted into signless integer;
S33: computation of mean values μ according to the following equation:
&mu; = 1 size &Sigma; n = 1 size b n ;
S34: calculate E according to the following equation:
E = 1 size - 1 &Sigma; n = 1 size - 1 ( b n - &mu; ) ( b n + 1 - &mu; ) ;
S35: calculate σ according to the following equation:
&sigma; = 1 size &Sigma; n = 1 size ( b n - &mu; ) 2 ;
S36: calculate R according to the following equation:
R = E &sigma; 2 ;
S37: the threshold values f comparing R Yu preset, if R<f, then judge that file destination is as encrypted file, otherwise then judge the file that file destination is crossed as unencryption.
4. the recognition methods of a kind of unknown format encrypt file according to claim 3, is characterized in that, described threshold values f is the correlativity after encryption between file byte.
5. a data extraction method for file destination, is characterized in that, comprises the following steps:
S21: open file destination in a binary format;
S22: the content reading file destination with the form of binary word throttling, and by the file destination content of reading stored in buffer area, till the content reading that file destination is all is complete;
S23: close file destination.
6. the data extraction method of a kind of file destination according to claim 5, is characterized in that, described file destination is the arbitrary format file determining to need to be encrypted identification.
7. a data encryption decision method for file destination, is characterized in that, comprises the process extracted the data of unknown format file and the process judged extracted data.
8. the data encryption decision method of a kind of file destination according to claim 7, is characterized in that, describedly comprises the following steps the process that the data of unknown format file are extracted:
S21: open file destination in a binary format;
S22: the content reading file destination with the form of binary word throttling, and by the file destination content of reading stored in buffer area, till the content reading that file destination is all is complete;
S23: close file destination.
9. the data encryption decision method of a kind of file destination according to claim 7, is characterized in that, describedly comprises the following steps the process that extracted data judge:
S31: the size calculating file destination byte stream in buffer zone, in units of byte, is designated as size, then content in byte stream is designated as b from the 1st byte successively to a si ze byte 1, b 2..., b size;
S32: by b 1, b 2..., b sizebe converted into signless integer;
S33: computation of mean values μ according to the following equation:
&mu; = 1 size &Sigma; n = 1 size b n ;
S34: calculate E according to the following equation:
E = 1 size - 1 &Sigma; n = 1 size - 1 ( b n - &mu; ) ( b n + 1 - &mu; ) ;
S35: calculate σ according to the following equation:
&sigma; = 1 size &Sigma; n = 1 size ( b n - &mu; ) 2 ;
S36: calculate R according to the following equation:
R = E &sigma; 2 ;
S37: the threshold values f comparing R Yu preset, if R<f, then judge that file destination is as encrypted file, otherwise then judge the file that file destination is crossed as unencryption, described threshold values f is the correlativity after encryption between file byte.
10. the data encryption decision method of a kind of file destination according to any one of claim 7 to 9, is characterized in that, described file destination is the arbitrary format file determining to need to be encrypted identification.
CN201510151456.2A 2015-04-01 2015-04-01 A kind of unknown format encrypts the recognition methods of file Active CN104750675B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510151456.2A CN104750675B (en) 2015-04-01 2015-04-01 A kind of unknown format encrypts the recognition methods of file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510151456.2A CN104750675B (en) 2015-04-01 2015-04-01 A kind of unknown format encrypts the recognition methods of file

Publications (2)

Publication Number Publication Date
CN104750675A true CN104750675A (en) 2015-07-01
CN104750675B CN104750675B (en) 2017-09-26

Family

ID=53590387

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510151456.2A Active CN104750675B (en) 2015-04-01 2015-04-01 A kind of unknown format encrypts the recognition methods of file

Country Status (1)

Country Link
CN (1) CN104750675B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112100631A (en) * 2020-08-11 2020-12-18 福建天泉教育科技有限公司 Processing method and terminal for judging encryption of PPTX (Power Point X) document

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050289639A1 (en) * 2004-06-23 2005-12-29 Leung Wai K System and method of securing the management of documentation
CN102567670A (en) * 2011-12-28 2012-07-11 南京邮电大学 Filter drive encryption implementing method for file system
CN103034815A (en) * 2011-09-30 2013-04-10 北大方正集团有限公司 Detection method and device for portable document format (PDF) file
CN103500294A (en) * 2013-09-23 2014-01-08 北京荣之联科技股份有限公司 Document encrypting and decrypting method and device
CN104113601A (en) * 2014-07-29 2014-10-22 深圳市中兴移动通信有限公司 File transfer method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050289639A1 (en) * 2004-06-23 2005-12-29 Leung Wai K System and method of securing the management of documentation
CN103034815A (en) * 2011-09-30 2013-04-10 北大方正集团有限公司 Detection method and device for portable document format (PDF) file
CN102567670A (en) * 2011-12-28 2012-07-11 南京邮电大学 Filter drive encryption implementing method for file system
CN103500294A (en) * 2013-09-23 2014-01-08 北京荣之联科技股份有限公司 Document encrypting and decrypting method and device
CN104113601A (en) * 2014-07-29 2014-10-22 深圳市中兴移动通信有限公司 File transfer method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王义: ""一种加密文件技术的探讨"", 《信息技术与网络服务》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112100631A (en) * 2020-08-11 2020-12-18 福建天泉教育科技有限公司 Processing method and terminal for judging encryption of PPTX (Power Point X) document
CN112100631B (en) * 2020-08-11 2022-09-06 福建天泉教育科技有限公司 Processing method and terminal for judging encryption of PPTX (Power Point X) document

Also Published As

Publication number Publication date
CN104750675B (en) 2017-09-26

Similar Documents

Publication Publication Date Title
CN110795732A (en) SVM-based dynamic and static combination detection method for malicious codes of Android mobile network terminal
Indrayani et al. Increasing the security of mp3 steganography using AES Encryption and MD5 hash function
CN103577835B (en) The method using the multidimensional characteristic vectors detection hidden channel of IP ID
CN111224946A (en) TLS encrypted malicious traffic detection method and device based on supervised learning
CN109995504A (en) A kind of encryption and decryption approaches of character string
CN106599702A (en) File encryption/decryption method and device
CN109981245A (en) A kind of encryption and decryption method of character string
US10635839B2 (en) Fixed-location IoT device for protecting secure storage access information and method for protecting secure storage access information of fixed-location IoT device
CN103530574B (en) A kind of hide Info embedding and extracting method based on English PDF document
Hazarika et al. A novel partial image encryption using chaotic logistic map
CN110489978A (en) A kind of file encryption-decryption method
CN104750675A (en) Identification method for encrypted file of unknown format
Basuki et al. Transaction Document Security Protection In The Form Of Image File, Jpg Or Tif Interbank Transfer Using Steganography And Cryptography
CN109981246A (en) A kind of encryption method and decryption method of character string
CN103559251A (en) Data security protection method based on data hiding
CN102982288B (en) The encryption of data and the equipment of deciphering and method is performed in portable terminal
CN103853933B (en) Android digital forensics-oriented user behavior analysis method and system
CN112134685B (en) DPA attack-preventing circuit to be tested safety simulation analysis method and device
Weerasinghe Secrecy and performance analysis of symmetric key encryption algorithms
CN113064217B (en) Hydrocarbon source rock effectiveness evaluation model construction method and hydrocarbon source rock effectiveness evaluation method
CN213028070U (en) DPA attack prevention to-be-tested circuit safety simulation analysis device
CN213547530U (en) SPA attack prevention to-be-detected circuit safety simulation analysis device
CN108777621A (en) A method of obtaining means of payment Alipay transaction record
WO2017206251A1 (en) Method and device for freezing application
CN114244779A (en) Traffic identification method and device and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant