CN109359488A - A kind of software implementation method of safe U disc - Google Patents

A kind of software implementation method of safe U disc Download PDF

Info

Publication number
CN109359488A
CN109359488A CN201811138724.7A CN201811138724A CN109359488A CN 109359488 A CN109359488 A CN 109359488A CN 201811138724 A CN201811138724 A CN 201811138724A CN 109359488 A CN109359488 A CN 109359488A
Authority
CN
China
Prior art keywords
usb flash
flash disk
information
safe
implementation method
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.)
Pending
Application number
CN201811138724.7A
Other languages
Chinese (zh)
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 Chaoyue CNC Electronics Co Ltd
Original Assignee
Shandong Chaoyue CNC Electronics Co Ltd
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 Chaoyue CNC Electronics Co Ltd filed Critical Shandong Chaoyue CNC Electronics Co Ltd
Priority to CN201811138724.7A priority Critical patent/CN109359488A/en
Publication of CN109359488A publication Critical patent/CN109359488A/en
Pending legal-status Critical Current

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/70Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
    • G06F21/78Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure storage of data
    • G06F21/79Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure storage of data in semiconductor storage media, e.g. directly-addressable memories
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4411Configuring for operating with peripheral devices; Loading of device drivers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K19/00Record carriers for use with machines and with at least a part designed to carry digital markings
    • G06K19/06Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
    • G06K19/067Record carriers with conductive marks, printed circuits or semiconductor circuit elements, e.g. credit or identity cards also with resonating or responding marks without active components
    • G06K19/07Record carriers with conductive marks, printed circuits or semiconductor circuit elements, e.g. credit or identity cards also with resonating or responding marks without active components with integrated circuit chips
    • G06K19/077Constructional details, e.g. mounting of circuits in the carrier
    • G06K19/0772Physical layout of the record carrier
    • G06K19/07732Physical layout of the record carrier the record carrier having a housing or construction similar to well-known portable memory devices, such as SD cards, USB or memory sticks

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • General Engineering & Computer Science (AREA)
  • Microelectronics & Electronic Packaging (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present invention relates to technical field of data security, and are related to the technical fields such as hard disk MBR partition system, linux kernel hook system calling, inline hook, in particular to a kind of software implementation method of safe U disc.The present invention includes two parts, and a part is the register method of USB flash disk, and another part is the recognition methods of USB flash disk.The present invention can guarantee the safety of USB flash disk data to a certain extent, USB flash disk is set to be merely able to the correct carry on the machine for being mounted with USB flash disk identification software, and this method is realized using software completely, reduces the use cost of special-purpose USB flash disk, and do not have any influence to the read and write rate of USB flash disk.This method uses the common formatting method of USB flash disk under windows, linux operating system, can't be to USB flash disk registration information by any influence.

Description

A kind of software implementation method of safe U disc
Technical field
The present invention relates to technical field of data security, and are related to hard disk MBR partition system, linux kernel hook system tune With the technical fields such as, inline hook, in particular to a kind of software implementation method of safe U disc.
Background technique
Increase with information-based, networked instruments, also day is increasingly for the security risk of the following data movable passageway Greatly.In order to guarantee the safety of data, flowing through for document is generally controlled using EDM System in enterprises Journey generally uses safe U disc as the memory carrier of data when inside data of enterprise needs distribution outward.Design a set of peace Full USB flash disk management system, for business data exchange safety management and use, solve presently, there are leakage and safety wind Danger, is necessary.
The safe U disc of the overwhelming majority is realized by dedicated hardware circuit and the method for software cryptography at present, Guarantee the safety of USB flash disk by two methods of encryption data, access control.But there is two aspects for this implementation method Defect: the use cost of USB flash disk is increased using dedicated hardware circuit first;Secondly, also being led to the data encryption in USB flash disk It has caused rate of the data in transmission process to be greatly reduced, has influenced the efficiency of the data transmission of USB flash disk.
Safety and hardware cost, data transmission efficiency are two conflicting aspects, at this stage various Special safety U Disk excessively considers safety, and ignores data transmission cost and efficiency of transmission, has seriously affected the experience of user.
Summary of the invention
In order to solve problems in the prior art, it the present invention provides a kind of software implementation method of safe U disc, realizes One kind having certain safety, and can guarantee the safe U disc of data transmission efficiency.
The technical solution adopted in the present invention is as follows:
A kind of software implementation method of safe U disc, the recognition methods of register method and USB flash disk including USB flash disk, in which:
The register method of the USB flash disk the following steps are included:
A1, USB flash disk information is obtained;
B1, the blank sector for finding USB flash disk;
C1, partition information the write-in blank sector;
D1, original partition information is deleted;
E1, other blank sectors that user information write-in is removed to the blank sector containing the partition information;
The recognition methods of the USB flash disk includes:
A2, detection device insertion;
B2, the partition information for obtaining USB flash disk;
If C2, the partition information obtained are sky, refuse detection device carry;
If D2, the partition information obtained are not sky, partition information is read in specified blank sector;
E2, the carry operation for carrying out detection device;
F2, registration information, Read-write Catrol information are read.
Step B1 searches blank sector using enumerative technique.
Step F2 specific method includes: to control the read-write power of USB flash disk by reading the access limit information being stored in USB flash disk Limit, when USB flash disk only has read right, which refuses all write operation under USB flash disk mount directory, makes it can not Carry out write operation.
Registration information, including user name, organization, USB flash disk access limit.
The invention relates generally to two parts: one, USB flash disk register method;Two, USB flash disk recognition methods;Administrator is common by registration USB flash disk fills in relevant user information, becomes dedicated safe U disc.User is in the operation system for being equipped with USB flash disk identification software Under system, USB flash disk can be normally identified, and under the operating system for being fitted without USB flash disk identification software, it can not normally identify USB flash disk.
Technical solution provided by the invention has the benefit that
It carries out registering USB flash disk under linux and test, have passed through the formatting of linux system formatting and Windows system, Registration information is not wiped, therefore this method has effect.And the USB flash disk registered using this method can not be known being fitted without USB flash disk Identify therefore, there is certain safety and specificity under the operating system of other software, meanwhile, the data transmission of USB flash disk is not influenced Speed.
Detailed description of the invention
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for For those of ordinary skill in the art, without creative efforts, it can also be obtained according to these attached drawings other Attached drawing.
Fig. 1 is that a kind of USB flash disk of the software implementation method of safe U disc of the invention registers functional block diagram;
Fig. 2 is a kind of USB flash disk register method flow chart of the software implementation method of safe U disc of the invention;
Fig. 3 is a kind of USB flash disk recognition methods flow chart of the software implementation method of safe U disc of the invention.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with attached drawing to embodiment party of the present invention Formula is described in further detail.
Embodiment one
As shown in attached drawing 2,3, a kind of software implementation method of safe U disc of the present embodiment relates generally to two parts: one, USB flash disk is infused Volume method;Two, USB flash disk recognition methods;Administrator is filled in relevant user information, is become dedicated by registration common U disk Safe U disc.User can normally identify USB flash disk under the operating system for being equipped with USB flash disk identification software, and know being fitted without USB flash disk Under the operating system of other software, USB flash disk can not be normally identified.
One, USB flash disk register method:
The function of USB flash disk registration software approach mainly registers common U disk, so that it becomes special-purpose USB flash disk, and by associated user USB flash disk is written in information.
The USB flash disk of the overwhelming majority is all the partition method using MBR at present, and this method is that partition information is saved in disk In 64 bytes in first sector (sector MBR), each subregion item occupies 16 bytes, has activity in this 16 bytes Status Flag, file system identifier, start-stop cylinder number, head number, sector number, implicit number of sectors (4 bytes), subregion are always fanned The contents such as area's number (4 bytes).Since the sector MBR only has 64 bytes for partition table, so 4 subregions can only be recorded Information.
First physical sector storage of USB flash disk is MBR, and generally 512 bytes, rear 64 byte is used to store main partition Table.For USB flash disk after subregion, the subregion by test discovery default is i.e. 2048 of front since the 2048th sector of USB flash disk In sector, only first sector is that determination cannot be changed.It is found after being checked using dd order, almost all sector is all 0 value, still by the 2047th sector can be used as a registration information storage region (to prevent influence u disc head portions).
Find that system disk is to carry out subregion from No. 63 sectors by fdisk, the prior art proves, 63 fans of front Area, in addition to first is MBR information, others are hiding sector, i.e., cannot be partitioned, and in system disk subregion, Have found the sector between a large amount of subregion, we, which can enumerate, searches blank sector for storing registration information.
Based on the above test case, the present embodiment using a kind of unified searching blank physical sector method, not into Low lattice of row and again in the case where subregion, using blank sector as our storage region storage registration information.To prevent from destroying Data in magnetic disk needs to find the sector of full 0.
By above analysis, the disk partition information of USB flash disk can be written to other sectors, and by original partition information It deletes, in this way, USB flash disk cannot correctly identify under common operating system, and achievees the purpose that Special safety USB flash disk.In addition, By user information, access limit, the blank sector of USB flash disk is written, is written and read for USB flash disk identification software.Here it is USB flash disks to register software The function of being realized.
Two, USB flash disk recognition methods
USB flash disk recognition methods mainly include the inline hook of equipment carry realize, the system tune of the institute hook of USB flash disk Read-write Catrol With and user's interaction the aspect of visualizing application software three content.
Inline hook, i.e., internal to jump hook, the address at replacement function beginning is jump instruction, jumps to hook Function, for this method for different hardware platforms, hook method is different.In the system, by being inserted into equipment, USB flash disk carry Equal power functions carry out hook, enable a system to the insertion of detection device, according to different partition informations, carry out different carries Step is then common U disk, can refuse the carry of common U disk when partition information is not sky, if the first of disk A Multi-zone disk information is sky, then it is assumed that the USB flash disk is special-purpose USB flash disk, then system is read in carry USB flash disk to specified Free Partition Disk partition information carries out the carry operation of equipment.
Hook system method of calling there are many implementations under linux operating system, call real by the system of kernel Existing mode is to call to interrupt int0x80 excitation by user software, and after int0x80 is performed, kernel obtains the control of CPU Power, and system_call program is transferred to handle.That is sys_call_table is called by system_call.The system In realization, the system calling of hook has the systems such as mount, read, write calling.By reading the read-write being stored in USB flash disk Authority information controls the access limit of USB flash disk, and when USB flash disk only has read right, the system is to all write under USB flash disk mount directory Operation is refused, and makes it that can not carry out write operation.
The function that application software part is realized mainly has, and obtains the user information of safe U disc, including user name, organizes loom The information such as the access limit of structure, USB flash disk, show in the user interface.
The present embodiment includes two parts, and a part is the register method of USB flash disk, and another part is the recognition methods of USB flash disk.Pass through The registration software of USB flash disk, modifies the partition table information of USB flash disk, other sectors then is written in partition table information, and be written and use to USB flash disk Family information.After the completion of USB flash disk registration, since partition table information changes, USB flash disk cannot be normally identified under common operating system. Thus data are played with certain protective effect.USB flash disk identification software reads subregion according to certain mode, from other sectors Table information, carry USB flash disk again, this makes it possible to correctly identify USB flash disk.The invention can guarantee USB flash disk data to a certain extent Safety makes USB flash disk be merely able to the correct carry on the machine for being mounted with USB flash disk identification software, and this method uses software completely It realizes, reduces the use cost of special-purpose USB flash disk, and there is no any influence to the read and write rate of USB flash disk.This method exists The common formatting method that USB flash disk is used under windows, linux operating system, can't be to USB flash disk registration information by any influence.
The foregoing is merely presently preferred embodiments of the present invention, is not intended to limit the invention, it is all in spirit of the invention and Within principle, any modification, equivalent replacement, improvement and so on be should all be included in the protection scope of the present invention.

Claims (4)

1. a kind of software implementation method of safe U disc, the recognition methods of register method and USB flash disk including USB flash disk, in which:
The register method of the USB flash disk the following steps are included:
A1, USB flash disk information is obtained;
B1, the blank sector for finding USB flash disk;
C1, partition information the write-in blank sector;
D1, original partition information is deleted;
E1, other blank sectors that user information write-in is removed to the blank sector containing the partition information;
The recognition methods of the USB flash disk includes:
A2, detection device insertion;
B2, the partition information for obtaining USB flash disk;
If C2, the partition information obtained are sky, refuse detection device carry;
If D2, the partition information obtained are not sky, partition information is read in specified blank sector;
E2, the carry operation for carrying out detection device;
F2, registration information, Read-write Catrol information are read.
2. a kind of software implementation method of safe U disc according to claim 1, which is characterized in that the step B1 is adopted Blank sector is searched with enumerative technique.
3. a kind of software implementation method of safe U disc according to claim 1, which is characterized in that the step F2 tool Body method includes: to control the access limit of USB flash disk by reading the access limit information being stored in USB flash disk, when USB flash disk only reads power In limited time, which refuses all write operation under USB flash disk mount directory, makes it that can not carry out write operation.
4. a kind of software implementation method of safe U disc according to claim 1, which is characterized in that the registration information, Including user name, organization, USB flash disk access limit.
CN201811138724.7A 2018-09-28 2018-09-28 A kind of software implementation method of safe U disc Pending CN109359488A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811138724.7A CN109359488A (en) 2018-09-28 2018-09-28 A kind of software implementation method of safe U disc

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811138724.7A CN109359488A (en) 2018-09-28 2018-09-28 A kind of software implementation method of safe U disc

Publications (1)

Publication Number Publication Date
CN109359488A true CN109359488A (en) 2019-02-19

Family

ID=65348179

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811138724.7A Pending CN109359488A (en) 2018-09-28 2018-09-28 A kind of software implementation method of safe U disc

Country Status (1)

Country Link
CN (1) CN109359488A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111125796A (en) * 2019-12-26 2020-05-08 深信服科技股份有限公司 Method, device, equipment and storage medium for protecting mobile storage equipment
CN111737722A (en) * 2020-08-21 2020-10-02 北京志翔科技股份有限公司 Method and device for safely ferrying data between intranet terminals

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103065102A (en) * 2012-12-26 2013-04-24 中国人民解放军国防科学技术大学 Data encryption mobile storage management method based on virtual disk
CN103679068A (en) * 2013-12-25 2014-03-26 北京云巢动脉科技有限公司 Method, device and system for safely handling USB flash disk
CN106354680A (en) * 2016-08-23 2017-01-25 北京北信源软件股份有限公司 Method and device for quickly recognizing removable storage equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103065102A (en) * 2012-12-26 2013-04-24 中国人民解放军国防科学技术大学 Data encryption mobile storage management method based on virtual disk
CN103679068A (en) * 2013-12-25 2014-03-26 北京云巢动脉科技有限公司 Method, device and system for safely handling USB flash disk
CN106354680A (en) * 2016-08-23 2017-01-25 北京北信源软件股份有限公司 Method and device for quickly recognizing removable storage equipment

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111125796A (en) * 2019-12-26 2020-05-08 深信服科技股份有限公司 Method, device, equipment and storage medium for protecting mobile storage equipment
CN111125796B (en) * 2019-12-26 2022-06-21 深信服科技股份有限公司 Method, device, equipment and storage medium for protecting mobile storage equipment
CN111737722A (en) * 2020-08-21 2020-10-02 北京志翔科技股份有限公司 Method and device for safely ferrying data between intranet terminals

Similar Documents

Publication Publication Date Title
CN113312676B (en) Data access method and device, computer equipment and readable storage medium
CN110287044B (en) Lock-free shared memory processing method and device, electronic equipment and readable storage medium
US10025792B2 (en) Method for divisionally managing files on a user basis, and a storage system and computer program product thereof
US8122181B2 (en) Systems and methods for enhancing a data store for handling semantic information
US10628200B2 (en) Base state for thin-provisioned volumes
US9542112B2 (en) Secure cross-process memory sharing
CN109918380A (en) Data processing method, device, storage medium and electronic equipment
CN109359488A (en) A kind of software implementation method of safe U disc
US10261895B2 (en) System and method for transferring execution of a computer program
CN110287695B (en) Java card and management method of temporary object thereof
CN105550582B (en) Access the method and system of virtual disk
US8984218B2 (en) Drive indicating mechanism for removable media
US7680999B1 (en) Privilege promotion based on check of previous privilege level
CN101324849B (en) Method for integrating DOS operating system by BIOS chip
CN109101455A (en) Shared memory systems and the pending program reading/writing method based on shared memory systems
CN105260130B (en) A kind of reading/writing method of Seagate hard-disk system file
CN111782605A (en) Chip card file management method, device, terminal and storage medium
CN114490054A (en) Context switching method and device, accelerating unit, electronic equipment and system on chip
CN111435331B (en) Data writing method and device for storage volume, electronic equipment and machine-readable storage medium
CN113467844A (en) Control method of embedded system suitable for industrial application scene, embedded system and computer readable storage medium
CN113760193A (en) Data reading and writing method and device for resource-limited device and instruction set
CN107085900A (en) Data processing method, device, system and POS terminal
CN102214479B (en) Hard disk data processing method and video stream pushing server
CN112199159B (en) Method, device, equipment and storage medium for reading and writing operand stack and variable table
CN116756786B (en) Method and device for controlling use and safety of mobile storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190219