An Internet of Things permission bypass evidence collection method, terminal device and storage medium

By obtaining and modifying the RootFs image of IoT devices, the problem of bypassing the account password permissions of IoT devices and data forensics is solved, and data extraction and analysis is realized in a complex and secure environment, which is suitable for new IoT smart devices.

CN114328418BActive Publication Date: 2024-11-22XIAMEN MEIYA PICO INFORMATION CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111444188.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-30
Publication Date
2024-11-22
Estimated Expiration
2041-11-30

AI Technical Summary

Technical Problem

The existing technology is difficult to effectively bypass the account password permissions of IoT devices, especially when the device is complex and data encryption is complicated. It is difficult to obtain evidence analysis, lacks a mature vulnerability foundation, and it is difficult to extract and analyze user area data with complex permissions. .

Method used

By obtaining the RootFs image, analyzing and recording its compression methods and parameters, decompressing and modifying the compressed data blocks of configuration files and user interaction program files related to system permissions, reassembly and flashing to chip or memory, restarting the system to enter management Data forensics are forged in the staff mode.

Benefits of technology

It realizes the problem of forensics for data without relying on specific vulnerabilities bypassing the account password permissions of IoT devices and entering the system mode to perform data forensics, solving the problem of forensics in the data area with unknown account passwords, and is suitable for new security Complex IoT smart devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114328418B_ABST
    Figure CN114328418B_ABST
Patent Text Reader

Abstract

The present invention relates to an Internet of Things permission bypassing evidence collection method, terminal device and storage medium, the method comprising: S1: obtaining a RootFs image; S2: analyzing and recording the compression mode and compression parameters of the RootFs image; S3: decompressing the compressed data blocks corresponding to the configuration files and / or user interaction program files related to the system permissions in the RootFs image, and modifying the contents of the decompressed data blocks; S4: recompressing the modified data blocks by the recorded compression mode and compression parameters, and reassembling them with the unmodified compressed data blocks in the RootFs image into a RootFs image, and flashing the reassembled RootFs image into a chip image or a memory; S5: restarting the system, entering the administrator mode of the system to download evidence data. The present invention can bypass the account password of the Internet of Things device and enter its system mode to collect data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of Internet of Things evidence collection, and in particular to an Internet of Things permission bypassing evidence collection method, terminal equipment and storage medium. Background Art

[0002] With the advent of the 5G era, a new wave of research on IoT smart devices has been launched. At the same time, as IoT devices become more and more common in daily life, more and more user behavior data is stored on IoT devices, so forensic analysis of IoT devices is becoming more and more important. As IoT devices and human behavior traces become closer and closer, the corresponding IoT security technology is becoming more and more complex, and the requirements for forensic technology for IoT devices are becoming higher and higher. However, as the security of IoT devices becomes more complicated, IoT device systems often encrypt accounts and passwords, and the data stored on them is often encrypted.

[0003] At present, the forensic technology for bypassing IoT password permissions mainly bypasses the underlying permissions through system vulnerabilities and application vulnerabilities. This method relies on existing IoT device vulnerabilities as a basis, but the current IoT embedded devices do not have a mature and comprehensive vulnerability foundation like the traditional Windows and IOS platforms. Forensic personnel need to use their own technology to find breakthroughs, which is difficult. It is also difficult to extract and analyze data from IoT devices with complex permissions or encrypted user areas. Summary of the invention

[0004] In order to solve the above problems, the present invention proposes an IoT permission bypass evidence collection method, a terminal device and a storage medium.

[0005] The specific plan is as follows:

[0006] An IoT permission bypass forensics method includes the following steps:

[0007] S1: Get the RootFs image;

[0008] S2: Analyze and record the compression method and compression parameters of the RootFs image;

[0009] S3: decompressing the compressed data blocks corresponding to the configuration files and / or user interaction program files related to the system permissions in the RootFs image, and modifying the contents of the decompressed data blocks;

[0010] S4: recompress the modified data block using the recorded compression method and compression parameters, reassemble it with the unmodified compressed data block in the RootFs image into a RootFs image, and flash the reassembled RootFs image to the chip image or memory;

[0011] S5: Restart the system and enter the system administrator mode to download the forensic data.

[0012] Furthermore, the method for obtaining the RootFs image is: by entering the system boot mode, the RootFs image is exported through the interface. If the system boot mode cannot be entered, the complete image is performed through chip imaging and the RootFs area is exported.

[0013] Furthermore, it also includes: taking configuration files and user interaction program files related to system permissions as files to be modified, building a list of files to be modified according to the compressed data blocks corresponding to all the files to be modified in the RootFs image, processing the compressed data blocks corresponding to each file to be modified in the list of files to be modified in turn through steps S3 and S4, restarting the system, and judging whether the administrator mode of the system can be entered; if not, deleting the file to be modified corresponding to the processing from the list of files to be modified, and repeating the operation on the compressed data blocks corresponding to the next file to be modified in the list of files to be modified until the list of files to be modified is empty or the administrator mode of the system can be entered.

[0014] Furthermore, the size of the data block after modification in step S4 is the same as the size of the data block before modification.

[0015] An Internet of Things permission bypass forensics terminal device includes a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the method described above in an embodiment of the present invention are implemented.

[0016] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described above in an embodiment of the present invention are implemented.

[0017] The present invention adopts the above technical solution, which can bypass the account password of the Internet of Things device and enter its system mode to perform data forensics. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 Shown is a flow chart of Embodiment 1 of the present invention.

[0019] Figure 2 Shown is a schematic diagram of the Squashfs file system structure in this embodiment. DETAILED DESCRIPTION

[0020] To further illustrate various embodiments, the present invention provides drawings. These drawings are part of the disclosure of the present invention, which are mainly used to illustrate the embodiments and can be used in conjunction with the relevant descriptions in the specification to explain the operating principles of the embodiments. With reference to these contents, ordinary technicians in this field should be able to understand other possible implementations and advantages of the present invention.

[0021] The present invention will now be further described with reference to the accompanying drawings and specific implementation methods.

[0022] Embodiment 1:

[0023] The embodiment of the present invention provides a method for obtaining evidence by bypassing Internet of Things permissions. Figure 1 As shown, the method comprises the following steps:

[0024] S1: Get the RootFs (root file system) image.

[0025] The method for obtaining the RootFs image in this embodiment is: by entering the system boot mode of the embedded device, the RootFs image is exported through the interface. If the system boot mode cannot be entered, the complete image is performed through chip imaging and the RootFs area is exported.

[0026] S2: Analyze and record the compression method and compression parameters of the RootFs image.

[0027] RootFs is often compressed using common compression file systems, such as Squashfs, jffs2, and other file systems. Therefore, the RootFs image is mounted and analyzed by specifying relevant parameters through the file system command of the Linux-like system, and the compression parameters corresponding to the RootFs image are recorded.

[0028] S3: decompress the compressed data blocks corresponding to the configuration files and / or user interaction program files related to the system permissions in the RootFs image, and modify the contents of the decompressed data blocks.

[0029] RootFs is the first file system mounted when the kernel of an embedded device starts. The kernel code image file is stored in the root file system, and the system boot program will load some basic initialization scripts and services from the root file system into the memory to run after it is mounted. Only after successfully mounting RootFs can the system start normally and mount other file systems. The etc directory of RootFs often stores configuration files related to account password permissions. The bin or sbin directory stores key user interaction programs such as SSH, Shell, and mount. The root directory is the root user's directory and stores files related to the root user. The directory for ordinary users is a subdirectory under / home. Others include dev, mnt, usr, lib, tmp and other directories. Through the configuration files and executable programs in these directories, the initial startup of the system is managed and configured, and other file systems are mounted.

[0030] Since this embodiment needs to bypass password permissions for evidence collection, it is necessary to modify the file contents related to password permissions. The corresponding files in RootFs are the configuration files related to account password permissions stored in the etc directory and key user interaction programs such as SSH, Shell, and mount stored in the bin or sbin directory.

[0031] S4: After the modified data block is recompressed using the recorded compression method and compression parameters, it is reassembled with the unmodified compressed data block in the RootFs image into a RootFs image, and the reassembled RootFs image is flashed to the chip image or memory.

[0032] S5: Restart the system, enter the system administrator mode, obtain the data stored in the device in the decrypted user area, and perform forensic analysis on the device.

[0033] Since the types of files that need to be modified when bypassing password permissions in RootFs are large and not fixed, sometimes only some of the files may need to be modified, but sometimes all the files need to be modified. Therefore, in order to reduce the number of flashing times and speed up the processing speed, the embodiment also includes: taking configuration files and user interaction program files related to system permissions as files to be modified, building a file list DFL to be modified according to all the files to be modified in the RootFs image, and processing the compressed data blocks corresponding to each file to be modified in the file list DFL to be modified in turn through steps S3 and S4, restarting the system, and judging whether the administrator mode of the system can be entered; if not, deleting the file to be modified corresponding to the processing from the file list DFL to be modified, and repeating the operation (i.e., the same operation as the previous file to be modified) on the compressed data block corresponding to the next file to be modified in the file list DFL to be modified until the file list DFL to be modified is empty or the administrator mode of the system can be entered.

[0034] If the file list DFL is empty, it means that all files in the file list DFL have been modified, and the system administrator mode cannot be entered by modifying permissions, and failure is returned.

[0035] Since RootFs uses compression file systems such as Squashfs and jffs2, a multi-threaded concurrent compression method is used in the process of recompressing files into an image after modifying the files, the order in which different files are compressed into the actual image will be quite different each time. Therefore, if the verification of local files in the RootFs image cannot be bypassed, it is not possible to directly decompress the entire RootFs image, modify the corresponding local files, and then recompress the modified entire RootFs into an image. In order to solve this technical problem, in this embodiment, after locating the address of the compressed data block corresponding to the local file that needs to be modified in the RootFs image, extract and decompress the compressed data block, and then modify the content of the decompressed compressed data block. After modification, it is recompressed into a data block of the same size as the original size through the compression method and compression parameters recorded in step S2, replacing the corresponding data block in the original RootFs image.

[0036] Take the RootFs image of Squashfs file system type as an example. Figure 2As shown in Table 1, the file system is parsed by indexing the specific file directory information index block director table, file node information index block inode table and fragment data index block Frament table through the superblock in the image, and the files in the file directory tree are traversed in combination with the file directory information index block director table and the file node information index block inode table to find the files that are the same as the files in the file list DFL to be modified, and then the file system is parsed in combination with the file node information index block inode table and the fragment data index block Frament table to locate the position YB and size YS of the specific compressed data blocks corresponding to each file in the file list DFL to be modified. And the data block position list YBL and data block size list YSL corresponding to all files in the file list DFL to be modified are output.

[0037] Table 1

[0038]

[0039] Select a file to be modified in the file list DFL to be modified, find the corresponding data block position YB and data block size YS through YBL and YSL, export the corresponding compressed data block to be modified, decompress the compressed block in combination with the compression algorithm in the superblock, modify the file content that needs to be rewritten, and re-compress it into a compressed data block of the same size in combination with the compression parameters after modification. It should be noted that the modification and compression process must ensure that the size of the compressed block remains unchanged, which can be achieved by adding and deleting unaffected content. Replace the data block content of the YB position and YS size in the image with the compressed block that has been successfully modified.

[0040] The embodiment of the present invention exports, analyzes, and modifies some security-related configurations or user interaction program files of the RootFs image, and then flashes the storage chip, and then can enter the system to extract data after startup. It involves technologies such as structural analysis of compressed file systems such as squashfs and jffs2, and rewriting of data blocks without decompression. This technology can solve problems such as hardware encryption of data areas and inability to perform forensic analysis due to unknown system account passwords. It is of great significance for the electronic data forensic analysis of new and complex IoT smart devices.

[0041] Embodiment 2:

[0042] The present invention also provides an Internet of Things permission bypass forensics terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps in the above-mentioned method embodiment of the first embodiment of the present invention are implemented.

[0043] Further, as an executable solution, the IoT permission bypass forensics terminal device can be a computing device such as a desktop computer, a notebook, a PDA, and a cloud server. The IoT permission bypass forensics terminal device may include, but is not limited to, a processor and a memory. Those skilled in the art can understand that the composition structure of the IoT permission bypass forensics terminal device described above is only an example of the IoT permission bypass forensics terminal device, and does not constitute a limitation on the IoT permission bypass forensics terminal device. It may include more or less components than the above, or a combination of certain components, or different components. For example, the IoT permission bypass forensics terminal device may also include input and output devices, network access devices, buses, etc., and the embodiments of the present invention do not limit this.

[0044] Further, as an executable solution, the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the IoT permission bypass forensic terminal device, and uses various interfaces and lines to connect various parts of the entire IoT permission bypass forensic terminal device.

[0045] The memory can be used to store the computer program and / or module, and the processor realizes various functions of the IoT permission bypass forensic terminal device by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system and at least one application required for a function; the data storage area can store data created according to the use of the mobile phone, etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0046] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above method in the embodiment of the present invention are implemented.

[0047] If the module / unit integrated in the IoT permission bypass forensic terminal device 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 this understanding, the present invention implements all or part of the process in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory) and software distribution medium, etc.

[0048] Although the present invention has been specifically shown and described in conjunction with the preferred embodiments, it should be understood by those skilled in the art that various changes may be made to the present invention in form and details without departing from the spirit and scope of the present invention as defined by the appended claims, all of which are within the scope of protection of the present invention.

Claims

1. A method for obtaining evidence by bypassing Internet of Things permissions, characterized in that: The following steps are involved: S1: Obtaining a RootFs image; wherein, the method for obtaining the RootFs image is: by entering the system boot mode, exporting the RootFs image through the interface; if the system boot mode cannot be entered, performing a complete image through chip imaging and exporting the RootFs area; S2: Analyze and record the compression method and compression parameters of the RootFs image; S3: decompressing the compressed data blocks corresponding to the configuration files and / or user interaction program files related to the system permissions in the RootFs image, and modifying the contents of the decompressed data blocks; S4: recompressing the modified data block using the recorded compression method and compression parameters, reassembling it with the unmodified compressed data block in the RootFs image into a RootFs image, and flashing the reassembled RootFs image to the chip image or memory; wherein the size of the modified data block is the same as the size of the data block before the modification; S5: Restart the system, enter the system administrator mode, obtain the data stored in the device in the state of decrypting the user area, and perform forensic analysis on the device; The method further includes: taking configuration files and user interaction program files related to system permissions as files to be modified, constructing a list of files to be modified according to all the files to be modified in the RootFs image, processing the compressed data blocks corresponding to each file to be modified in the list of files to be modified in turn through steps S3 and S4, restarting the system, judging whether the administrator mode of the system can be entered, and if not, deleting the file to be modified corresponding to the current processing from the list of files to be modified, and repeating the operation on the compressed data blocks corresponding to the next file to be modified in the list of files to be modified until the list of files to be modified is empty or the administrator mode of the system can be entered.

2. An IoT permission bypass forensics terminal device, characterized by: The method comprises a processor, a memory, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, the steps of the Internet of Things permission bypassing forensics method as claimed in claim 1 are implemented.

3. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the Internet of Things permission bypass forensics method as claimed in claim 1 are implemented.