CN112565003B - Communication data testing method and device, storage medium and electronic equipment - Google Patents

Communication data testing method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN112565003B
CN112565003B CN202011327669.3A CN202011327669A CN112565003B CN 112565003 B CN112565003 B CN 112565003B CN 202011327669 A CN202011327669 A CN 202011327669A CN 112565003 B CN112565003 B CN 112565003B
Authority
CN
China
Prior art keywords
data
sent
request
modified
plaintext
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.)
Active
Application number
CN202011327669.3A
Other languages
Chinese (zh)
Other versions
CN112565003A (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.)
Xi'an Clover Cyber Technology Co ltd
Original Assignee
Xi'an Clover Cyber Technology 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 Xi'an Clover Cyber Technology Co ltd filed Critical Xi'an Clover Cyber Technology Co ltd
Priority to CN202011327669.3A priority Critical patent/CN112565003B/en
Publication of CN112565003A publication Critical patent/CN112565003A/en
Application granted granted Critical
Publication of CN112565003B publication Critical patent/CN112565003B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a communication data testing method, a communication data testing device, a storage medium and electronic equipment, relates to the field of computers, and can solve the problems that an existing testing method is time-consuming and difficult. The specific technical scheme is as follows: acquiring at least one group of plaintext and ciphertext corresponding to a request to be sent from a client, and determining a target plaintext according to the at least one group of plaintext and ciphertext; modifying the target plaintext and sending the modified plaintext to the client so that the client encrypts the modified plaintext to obtain a modified ciphertext; obtaining a modified request to be sent according to the modified ciphertext and sending the modified request to be sent to a server, so that the server returns first encrypted data according to the modified request to be sent; sending the first encrypted data to the client so that the client can decrypt the first encrypted data to obtain first data; and acquiring the first data from the client and displaying the first data to a tester. The invention is used for improving the testing efficiency.

Description

Communication data testing method and device, storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of computers, and in particular, to a communication data testing method and apparatus, a storage medium, and an electronic device.
Background
For security reasons, many mobile clients currently employ data encryption algorithms in network communication, such as: the method comprises the steps that the mobile client encrypts data in an HTTP post request by adopting an Advanced Encryption Standard (AES) and then sends the encrypted data to a server, the server decrypts the encrypted data in the HTTP post request after receiving the HTTP post request, then executes background services, finally conducts AES Encryption on returned data and sends the returned data to the mobile client, and the mobile client decrypts the data returned by the server and then conducts corresponding processing. The communication encryption mode can improve the difficulty of communication protocol cracking, and compared with plaintext communication, the communication security is improved by one level.
At present, the test of the encrypted data aiming at the communication is relatively complex, and the general flow is as follows:
reversely analyzing a communication encryption algorithm of the mobile terminal client, and mastering the encryption algorithm and related parameters; compiling an encryption and decryption tool according to the grasped encryption algorithm and the related parameters; the method comprises the steps that a request ciphertext sent by a mobile client is subjected to packet capturing, when the request ciphertext is sent by the mobile client, a tester copies the request ciphertext out of a packet capturing tool and pastes the request ciphertext to an encryption and decryption tool, the request ciphertext, namely encrypted request data, is decrypted to obtain a request plaintext, the tester modifies the request plaintext to obtain a modified request plaintext, the modified request plaintext is encrypted to obtain a modified request ciphertext, the tester copies the modified request ciphertext into the packet capturing tool, and the packet capturing tool is used for sending the modified request ciphertext to a server so that the server can return encrypted data corresponding to the modified request ciphertext. When the server returns the encrypted data, the returned encrypted data is copied to the encryption and decryption tool for decryption to obtain the data returned by the server, and whether the communication data has problems or loopholes is judged according to the data returned by the server.
However, with the existing testing method, the encryption and decryption algorithms and related parameters used in communication need to be analyzed in detail. Some encryption and decryption algorithms are complex, time-consuming in analysis process and difficult. In addition, some encryption algorithms, for example, hash algorithms such as md5, sha1, etc. usually used for packet verification are not reversible, and a decryption algorithm cannot be written after encryption, that is, an encryption and decryption tool cannot be written. Moreover, when the existing testing method is adopted for testing, communication data needs to be copied and pasted between the encryption and decryption tool and the packet capturing tool for many times, so that the process is complicated, the efficiency is low, and errors are easy to occur.
Disclosure of Invention
The embodiment of the disclosure provides a communication data testing method, a communication data testing device, a storage medium and electronic equipment, which can solve the problems that the existing testing method is time-consuming, difficult and not suitable for some encryption algorithms. The technical scheme is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided a communication data testing method, including:
obtaining at least one group of plaintext and ciphertext corresponding to a request to be sent from a client, and determining a target plaintext according to the at least one group of plaintext and ciphertext and the request to be sent;
modifying the target plaintext to obtain a modified plaintext, and sending the modified plaintext to the client so that the client can encrypt the modified plaintext to obtain a modified ciphertext;
obtaining the modified ciphertext from the client and obtaining a modified request to be sent according to the request to be sent and the modified ciphertext;
sending the modified request to be sent to a server so that the server returns first encrypted data corresponding to the modified request to be sent according to the modified request to be sent;
sending the first encrypted data to the client so that the client can decrypt the first encrypted data to obtain first data;
and acquiring the first data from the client and displaying the first data to the tester so that the tester can determine a test result according to the first data.
The communication data testing method provided by the embodiment of the disclosure can send the modified plaintext to the client, so that the client encrypts the modified plaintext to obtain the modified ciphertext; the first encrypted data returned from the server can be sent to the client, the client decrypts the first encrypted data to obtain the first data, an encryption and decryption algorithm and related parameters used by the communication data do not need to be analyzed in detail, testing time is greatly saved, testing efficiency is improved, the problem that the communication data cannot be tested if the communication data adopt an irreversible encryption algorithm is solved, communication data do not need to be copied and pasted between an encryption and decryption tool and a packet capturing tool for many times, the operation process is simple, errors are not prone to occurring, and accuracy of a testing result is improved.
In one embodiment, before the obtaining, from the client, at least one set of plaintext and ciphertext corresponding to the request to be sent, the method further includes:
acquiring the request to be sent from a client, wherein the request to be sent comprises a data packet header and a ciphertext to be sent;
the determining a target plaintext according to the at least one group of plaintext and ciphertext and the ciphertext to be sent comprises:
determining a target ciphertext from the at least one group of plaintext and ciphertext, wherein the target ciphertext is consistent with the ciphertext to be sent;
and taking the plaintext corresponding to the target ciphertext as the target plaintext.
By acquiring a request to be sent, taking at least one group of plaintext and ciphertext consistent with a sending ciphertext in the request to be sent as a target ciphertext, and taking the plaintext corresponding to the target ciphertext as the target plaintext, the request data to be sent can be accurately obtained.
In an embodiment, the obtaining a modified request to be sent according to the request to be sent and the modified ciphertext includes:
and obtaining the modified request to be sent according to the data packet header and the modified ciphertext.
The request to be sent can be accurately and quickly generated according to the data packet header and the modified ciphertext.
In one embodiment, after the determining the target plaintext, the method further comprises:
sending the request to be sent to the server so that the server can return second encrypted data corresponding to the request to be sent according to the request to be sent;
sending the second encrypted data to the client so that the client can decrypt the second encrypted data to obtain second data;
acquiring the second data from the client;
the presenting the first data to the tester comprises:
and displaying the first data and the second data to the tester so that the tester can determine a test result according to the first data and the second data.
The server can return second encrypted data corresponding to the request to be sent according to the request to be sent by sending the request to be sent to the server; sending the second encrypted data to the client, so that the client decrypts the second encrypted data to obtain second data; and further acquiring the second data from the client, so that a tester can accurately obtain a test result according to the first data and the second data.
According to a second aspect of the embodiments of the present disclosure, there is provided a communication data testing apparatus including:
the plaintext acquisition module is used for acquiring at least one group of plaintext and ciphertext corresponding to a request to be sent from a client and determining a target plaintext according to the at least one group of plaintext and ciphertext and the request to be sent;
the target plaintext modification module is used for modifying the target plaintext to obtain a modified plaintext and sending the modified plaintext to the client so that the client can encrypt the modified plaintext to obtain a modified ciphertext;
the modified request to be sent generation module is used for acquiring the modified ciphertext from the client and obtaining the modified request to be sent according to the request to be sent and the modified ciphertext;
the modified request to be sent sending module is used for sending the modified request to be sent to a server so that the server can return first encrypted data corresponding to the modified request to be sent according to the modified request to be sent;
the first encrypted data sending module is used for sending the first encrypted data to the client so that the client can decrypt the first encrypted data to obtain first data;
and the first data display module is used for acquiring the first data from the client and displaying the first data to the tester so that the tester can determine a test result according to the first data.
In one embodiment, the apparatus further comprises:
a request to be sent acquisition module, configured to acquire the request to be sent from a client, where the request to be sent includes a data packet header and a ciphertext to be sent;
the plaintext acquisition module is used for:
determining a target ciphertext from the at least one group of plaintext and ciphertext, wherein the target ciphertext is consistent with the ciphertext to be sent;
and taking the plaintext corresponding to the target ciphertext as the target plaintext.
In one embodiment, the modified request to send generation module is configured to:
and obtaining the modified request to be sent according to the data packet header and the modified ciphertext.
In one embodiment, the apparatus further comprises:
a request-to-be-sent sending module, configured to send the request-to-be-sent to the server, so that the server returns second encrypted data corresponding to the request-to-be-sent according to the request-to-be-sent;
the second encrypted data sending module is used for sending the second encrypted data to the client so that the client can decrypt the second encrypted data to obtain second data;
a second data obtaining module, configured to obtain the second data from the client;
the first data presentation module is configured to:
and displaying the first data and the second data to the tester so that the tester can determine a test result according to the first data and the second data.
According to a third aspect of embodiments of the present disclosure, there is provided an electronic device, the electronic device comprising a processor and a memory, the memory having stored therein at least one computer instruction, the instruction being loaded and executed by the processor to implement the steps performed in the communication data testing method of any one of the first aspect.
According to a fourth aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium, in which at least one computer instruction is stored, the instruction being loaded and executed by a processor to implement the steps performed in the method for testing credit data according to any one of the first aspect.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure.
FIG. 1 is a schematic structural diagram of a communication data testing system according to an embodiment of the present disclosure;
fig. 2 is a flowchart of a communication data testing method provided by an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of a communication data testing apparatus according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a communication data testing apparatus according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of an electronic device provided in an embodiment of the present disclosure.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. The following description refers to the accompanying drawings in which the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
Fig. 1 is a schematic structural diagram of a communication data testing system according to an embodiment of the present disclosure. As shown in fig. 1, the system includes: client 101, tester 102, and server 103. The tester 102 is in communication connection with the client 101 and the server 103, respectively. The testing machine 102 may be a terminal device such as a computer, a desktop, a tablet, a mobile phone, and the like, for example, and the embodiment is not limited herein.
In this embodiment, as shown in fig. 1, a hook Remote Procedure Calls (RPC) script may be run on the client 101, an RPC interface is provided for the tester 102 in a hook manner, a packet capture tool and an encryption and decryption plug-in are installed on the tester 102, the packet capture tool on the tester 102 may obtain at least one set of plaintext and ciphertext corresponding to a request to be sent from the client 101 through the RPC interface, the at least one set of plaintext and ciphertext is obtained from an Application (App) of the client in a hook manner, and the request to be sent may be an HTTP post request. hook generally refers to hooking a function, and in this embodiment, hook hooks a key function of an encryption and decryption algorithm in the client.
After the at least one group of plaintext and ciphertext is obtained, the test machine 102 determines a target plaintext according to the at least one group of plaintext and ciphertext and the request to be sent, modifies the target plaintext to obtain a modified plaintext, calls an RPC interface to encrypt by controlling the modified plaintext, sends the modified plaintext to the client 101, and encrypts the modified plaintext by the client 101 to obtain a modified ciphertext; the packet capturing tool installed on the test machine 101 acquires the modified ciphertext from the client 101 through the RPC interface, obtains a modified request to be sent according to the request to be sent and the modified ciphertext, and sends the modified request to be sent to the server, so that the server 103 returns the first encrypted data corresponding to the modified request to be sent according to the modified request to be sent.
After receiving first encrypted data returned by the server 103, a packet capturing tool on the test machine 101 calls an RPC interface to decrypt by controlling the first encrypted data, sends the first encrypted data to the client 101, and decrypts the first encrypted data by the client 101 to obtain first data; the client 101 returns the first encrypted data to the encryption and decryption plug-in of the testing machine through the RPC interface, and the testing machine displays the first data to the testing personnel so that the testing personnel can determine the testing result according to the first data.
According to the communication data testing system provided by the embodiment of the disclosure, the testing machine can send the modified plaintext to the client, so that the client encrypts the modified plaintext to obtain the modified ciphertext; the testing machine can send the first encrypted data returned from the server to the client, the client decrypts the first encrypted data to obtain the first data, an encryption and decryption algorithm and related parameters used by the communication data do not need to be analyzed in detail, testing time is greatly saved, testing efficiency is improved, the problem that the communication data cannot be tested if the communication data adopt an irreversible encryption algorithm is solved, communication data do not need to be copied and pasted between an encryption and decryption tool and a packet capturing tool for many times, the operation process is simple, errors are not prone to occurring, and accuracy of a testing result is improved.
How the communication data testing system provided by the embodiment of the present disclosure performs communication data testing is further described in detail below. Fig. 2 is a flowchart of a communication data testing method provided in an embodiment of the present disclosure. As shown in fig. 2, the method includes:
s201, at least one group of plaintext and ciphertext corresponding to the request to be sent is obtained from the client, and a target plaintext is determined according to the at least one group of plaintext and ciphertext and the request to be sent.
In the step, a packet capturing tool installed on the test machine first obtains a request to be sent from a client, where the request to be sent includes a data packet header and a ciphertext to be sent. In this embodiment, the request to be sent may be an HTTP post request, where the HTTP post request includes an HTTP header and a ciphertext to be sent, the ciphertext to be sent is encrypted request data, and the request data is a request plaintext.
Further, after the request to be sent is obtained, the packet capturing tool installed on the test machine may obtain at least one set of plaintext and ciphertext corresponding to the request to be sent from the client 101 through the RPC interface, where the at least one set of plaintext and ciphertext is obtained from the App application of the client in a hook manner.
The following is a description of how to determine the target plaintext.
Illustratively, a target ciphertext is determined from the at least one set of plaintext and ciphertext, the target ciphertext being consistent with the ciphertext to be transmitted; and taking the plaintext corresponding to the target ciphertext as the target plaintext.
S202, modifying the target plaintext to obtain a modified plaintext, and sending the modified plaintext to the client so that the client can encrypt the modified plaintext to obtain a modified ciphertext.
Further, after the target plaintext is determined, the target plaintext is modified to obtain the modified plaintext.
In this step, the modified plaintext is sent to the client by controlling the modified plaintext to call the RPC interface for encryption, the modified plaintext is encrypted by the client to obtain a modified ciphertext, and a packet capturing tool installed on the test machine acquires the modified ciphertext from the client through the RPC interface.
S203, obtaining the modified ciphertext from the client and obtaining the modified request to be sent according to the request to be sent and the modified ciphertext.
Next, how to obtain the modified request to be sent according to the request to be sent and the modified ciphertext will be described. Illustratively, the modified request to be sent is obtained according to the data packet header and the modified ciphertext. In this embodiment, the request to be sent may be an HTTP post request, and the modified request to be sent may be generated by combining an HTT header in the HTTP post request and the modified ciphertext, where the modified request to be sent is a modified HTTP post request.
And S204, sending the modified request to be sent to a server so that the server returns the first encrypted data corresponding to the modified request to be sent according to the modified request to be sent.
In this embodiment, after the modified request to be sent (i.e., the modified HTTP post request) is generated, the modified HTTP post request is sent to the server, so that the server returns the first encrypted data corresponding to the modified HTTP post request according to the modified HTTP post request.
S205, the first encrypted data is sent to the client so that the client can decrypt the first encrypted data to obtain the first data.
In this step, after receiving first encrypted data returned by the server, the packet capturing tool installed on the test machine calls the RPC interface to decrypt by controlling the first encrypted data, and sends the first encrypted data to the client, and the client decrypts the first encrypted data to obtain the first data.
S206, the first data are obtained from the client side and displayed to the testing personnel, so that the testing personnel can determine the testing result according to the first data.
The client returns the first encrypted data to the encryption and decryption plug-in of the testing machine through the RPC interface, and the testing machine displays the first data to the testing personnel so that the testing personnel can determine a testing result according to the first data.
In this embodiment, after determining the target plaintext, the request to be sent may be sent to the server first, so that the server returns the second encrypted data corresponding to the request to be sent according to the request to be sent.
After receiving second encrypted data returned by the server, a packet capturing tool installed on the test machine calls the RPC interface to decrypt by controlling the second encrypted data, the second encrypted data is sent to the client, the client decrypts the second encrypted data to obtain second data, and an encryption and decryption plug-in of the test machine acquires the second data from the client through the RPC interface.
After the first data and the second data are obtained, the test machine displays the target plaintext, the first data, the modified plaintext and the modified second data to a tester, so that the tester compares the target plaintext, the first data, the modified plaintext and the modified second data to determine a test result.
The communication data testing method provided by the embodiment of the disclosure can send the modified plaintext to the client, so that the client encrypts the modified plaintext to obtain the modified ciphertext; the first encrypted data returned from the server can be sent to the client, the client decrypts the first encrypted data to obtain the first data, an encryption and decryption algorithm and related parameters used by the communication data do not need to be analyzed in detail, testing time is greatly saved, testing efficiency is improved, the problem that the communication data cannot be tested if the communication data adopt an irreversible encryption algorithm is solved, communication data do not need to be copied and pasted between an encryption and decryption tool and a packet capturing tool for many times, the operation process is simple, errors are not prone to occurring, and accuracy of a testing result is improved.
Based on the communication data testing method described in the embodiment corresponding to fig. 2, the following is an embodiment of the apparatus of the present disclosure, which may be used to execute the embodiment of the method of the present disclosure.
Fig. 3 is a schematic structural diagram of a communication data testing apparatus according to an embodiment of the present disclosure. As shown in fig. 3, the apparatus 30 includes:
a plaintext acquisition module 301, configured to acquire at least one set of plaintext and ciphertext corresponding to a request to be sent from a client, and determine a target plaintext according to the at least one set of plaintext and ciphertext and the request to be sent;
a target plaintext modification module 302, configured to modify the target plaintext to obtain a modified plaintext, and send the modified plaintext to the client, so that the client encrypts the modified plaintext to obtain a modified ciphertext;
a modified request to be sent generating module 303, configured to obtain the modified ciphertext from the client, and obtain a modified request to be sent according to the request to be sent and the modified ciphertext;
a modified request-to-be-sent sending module 304, configured to send the modified request-to-be-sent to a server, so that the server returns, according to the modified request-to-be-sent, first encrypted data corresponding to the modified request-to-be-sent;
a first encrypted data sending module 305, configured to send the first encrypted data to the client, so that the client decrypts the first encrypted data to obtain first data;
the first data presentation module 306 is configured to obtain the first data from the client and present the first data to the tester, so that the tester determines a test result according to the first data.
In one embodiment, as shown in fig. 4, the apparatus 30 further comprises:
a request to be sent obtaining module 307, configured to obtain the request to be sent from a client, where the request to be sent includes a packet header and a ciphertext to be sent;
the plaintext obtaining module 301 is configured to:
determining a target ciphertext from the at least one group of plaintext and ciphertext, wherein the target ciphertext is consistent with the ciphertext to be sent;
and taking the plaintext corresponding to the target ciphertext as the target plaintext.
In an embodiment, the modified request to send generation module 303 is configured to:
and obtaining the modified request to be sent according to the data packet header and the modified ciphertext.
In one embodiment, the apparatus 30 further comprises:
a request-to-be-sent sending module 308, configured to send the request-to-be-sent to the server, so that the server returns second encrypted data corresponding to the request-to-be-sent according to the request-to-be-sent;
a second encrypted data sending module 309, configured to send the second encrypted data to the client, so that the client decrypts the second encrypted data to obtain second data;
a second data obtaining module 310, configured to obtain the second data from the client;
the first data presentation module 306 is configured to:
and displaying the first data and the second data to the tester so that the tester can determine a test result according to the first data and the second data.
The implementation process and technical effects of the communication data testing apparatus provided in the embodiment of the present disclosure can be seen in the embodiment of fig. 2, which is not described herein again.
Fig. 5 is a schematic structural diagram of an electronic device provided in the disclosed embodiment. As shown in fig. 5, the electronic device 50 includes a processor 501 and a memory 502, where the memory 502 stores at least one computer instruction, and the instruction is loaded and executed by the processor 501 to implement the steps performed in the communication data testing method described in the corresponding embodiment of fig. 2.
Based on the communication data testing method described in the embodiment corresponding to fig. 2, an embodiment of the present disclosure further provides a computer-readable storage medium, for example, the non-transitory computer-readable storage medium may be a Read Only Memory (ROM), a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like. The storage medium stores computer instructions for executing the communication data testing method described in the embodiment corresponding to fig. 2, which is not described herein again.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the storage medium may be a read-only memory, a magnetic disk or an optical disk.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

Claims (10)

1. A communication data testing method, comprising:
obtaining at least one group of plaintext and ciphertext corresponding to a request to be sent from a client, and determining a target plaintext according to the at least one group of plaintext and ciphertext and the request to be sent;
modifying the target plaintext to obtain a modified plaintext, and sending the modified plaintext to the client so that the client can encrypt the modified plaintext to obtain a modified ciphertext;
obtaining the modified ciphertext from the client and obtaining a modified request to be sent according to the request to be sent and the modified ciphertext;
sending the modified request to be sent to a server so that the server returns first encrypted data corresponding to the modified request to be sent according to the modified request to be sent;
sending the first encrypted data to the client so that the client can decrypt the first encrypted data to obtain first data;
and acquiring the first data from the client and displaying the first data to a tester so that the tester can determine a test result according to the first data.
2. The method according to claim 1, wherein before the obtaining at least one set of plaintext and ciphertext corresponding to the request to be sent from the client, the method further comprises:
acquiring the request to be sent from a client, wherein the request to be sent comprises a data packet header and a ciphertext to be sent;
the determining a target plaintext according to the at least one group of plaintext and ciphertext and the ciphertext to be sent comprises:
determining a target ciphertext from the at least one group of plaintext and ciphertext, wherein the target ciphertext is consistent with the ciphertext to be sent;
and taking the plaintext corresponding to the target ciphertext as the target plaintext.
3. The method according to claim 2, wherein the obtaining a modified request to be sent according to the request to be sent and the modified ciphertext comprises:
and obtaining a modified request to be sent according to the data packet header and the modified ciphertext.
4. The method of claim 2, wherein after determining the target plaintext, the method further comprises:
sending the request to be sent to the server so that the server returns second encrypted data corresponding to the request to be sent according to the request to be sent;
sending the second encrypted data to the client so that the client can decrypt the second encrypted data to obtain second data;
obtaining the second data from the client;
the presenting the first data to the tester comprises:
and displaying the first data and the second data to the tester so that the tester can determine a test result according to the first data and the second data.
5. A communication data testing apparatus, comprising:
the plaintext acquisition module is used for acquiring at least one group of plaintext and ciphertext corresponding to a request to be sent from a client and determining a target plaintext according to the at least one group of plaintext and ciphertext and the request to be sent;
the target plaintext modification module is used for modifying the target plaintext to obtain a modified plaintext and sending the modified plaintext to the client so that the client can encrypt the modified plaintext to obtain a modified ciphertext;
a modified request to be sent generation module, configured to obtain the modified ciphertext from the client and obtain a modified request to be sent according to the request to be sent and the modified ciphertext;
the modified request to be sent sending module is used for sending the modified request to be sent to a server so that the server can return first encrypted data corresponding to the modified request to be sent according to the modified request to be sent;
the first encrypted data sending module is used for sending the first encrypted data to the client so that the client can decrypt the first encrypted data to obtain first data;
and the first data display module is used for acquiring the first data from the client and displaying the first data to a tester so that the tester can determine a test result according to the first data.
6. The apparatus of claim 5, further comprising:
a request to be sent acquisition module, configured to acquire the request to be sent from a client, where the request to be sent includes a data packet header and a ciphertext to be sent;
the plaintext acquisition module is used for:
determining a target ciphertext from the at least one group of plaintext and ciphertext, wherein the target ciphertext is consistent with the ciphertext to be sent;
and taking the plaintext corresponding to the target ciphertext as the target plaintext.
7. The apparatus of claim 6, wherein the modified request to send generation module is configured to:
and obtaining the modified request to be sent according to the data packet header and the modified ciphertext.
8. The apparatus of claim 6, further comprising:
the request to be sent sending module is used for sending the request to be sent to the server so that the server can conveniently send second encrypted data corresponding to the request to be sent;
the second encrypted data sending module is used for sending the second encrypted data to the client so that the client can decrypt the second encrypted data to obtain second data;
a second data obtaining module, configured to obtain the second data from the client;
the first data presentation module is configured to:
and displaying the first data and the second data to the tester so that the tester can determine a test result according to the first data and the second data.
9. An electronic device, comprising a processor and a memory, wherein at least one computer instruction is stored in the memory, and wherein the instruction is loaded and executed by the processor to implement the steps performed in the communication data testing method according to any one of claims 1 to 4.
10. A computer-readable storage medium, having stored therein at least one computer instruction, which is loaded and executed by a processor to perform the steps performed in the method for testing integrity data as claimed in any one of claims 1 to 4.
CN202011327669.3A 2020-11-24 2020-11-24 Communication data testing method and device, storage medium and electronic equipment Active CN112565003B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011327669.3A CN112565003B (en) 2020-11-24 2020-11-24 Communication data testing method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011327669.3A CN112565003B (en) 2020-11-24 2020-11-24 Communication data testing method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN112565003A CN112565003A (en) 2021-03-26
CN112565003B true CN112565003B (en) 2022-11-22

Family

ID=75043292

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011327669.3A Active CN112565003B (en) 2020-11-24 2020-11-24 Communication data testing method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN112565003B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115150293B (en) * 2021-03-31 2024-06-14 京东科技控股股份有限公司 Interface data monitoring method and device
CN113489705B (en) * 2021-06-30 2023-03-24 中国银联股份有限公司 Method and device storage medium for capturing HTTP (hyper text transport protocol) communication data of application program

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102868699A (en) * 2012-09-26 2013-01-09 北京联众互动网络股份有限公司 Method and tool for vulnerability detection of server providing data interaction services
CN109499071A (en) * 2018-12-06 2019-03-22 珠海西山居移动游戏科技有限公司 A kind of test method and device detecting game server protocol security
CN111555940A (en) * 2020-04-28 2020-08-18 北京字节跳动网络技术有限公司 Client test method and device, electronic equipment and computer readable storage medium
CN111581644A (en) * 2020-03-26 2020-08-25 中国电力科学研究院有限公司 Vulnerability mining method and system for intercepting data packet based on Hook function
CN111614677A (en) * 2020-05-21 2020-09-01 苏州亿歌网络科技有限公司 Server vulnerability detection method and system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9990249B2 (en) * 2015-12-24 2018-06-05 Intel Corporation Memory integrity with error detection and correction
CN109408370A (en) * 2018-09-18 2019-03-01 深圳壹账通智能科技有限公司 Interface testing document generating method, device, computer equipment and storage medium
CN111147461B (en) * 2019-12-13 2022-01-11 北京像素软件科技股份有限公司 Data transmission method, device, server and user terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102868699A (en) * 2012-09-26 2013-01-09 北京联众互动网络股份有限公司 Method and tool for vulnerability detection of server providing data interaction services
CN109499071A (en) * 2018-12-06 2019-03-22 珠海西山居移动游戏科技有限公司 A kind of test method and device detecting game server protocol security
CN111581644A (en) * 2020-03-26 2020-08-25 中国电力科学研究院有限公司 Vulnerability mining method and system for intercepting data packet based on Hook function
CN111555940A (en) * 2020-04-28 2020-08-18 北京字节跳动网络技术有限公司 Client test method and device, electronic equipment and computer readable storage medium
CN111614677A (en) * 2020-05-21 2020-09-01 苏州亿歌网络科技有限公司 Server vulnerability detection method and system

Also Published As

Publication number Publication date
CN112565003A (en) 2021-03-26

Similar Documents

Publication Publication Date Title
CN112019332B (en) Encryption and decryption method based on micro-service, API gateway system and equipment
US10341093B2 (en) Method, apparatus and system for device identification
CN108347361B (en) Application program testing method and device, computer equipment and storage medium
CN106055936B (en) Executable program data packet encrypting/decrypting method and device
CN106650355B (en) Method and device for protecting function call
CN112565003B (en) Communication data testing method and device, storage medium and electronic equipment
CN112019541B (en) Data transmission method and device, computer equipment and storage medium
CN108400978B (en) Vulnerability detection method and device, computer equipment and storage medium
CN108959990B (en) Two-dimensional code verification method and device
CN110069241B (en) Pseudo-random number acquisition method and device, client device and server
CN106330817A (en) Webpage access method, device and terminal
CN112039902A (en) Data encryption method and device
CN112783787A (en) Interface test method, device and system and electronic equipment
CN104104650B (en) data file access method and terminal device
CN111224834A (en) Simulation test method, simulation test device, server and storage medium
CN115150821A (en) Offline package transmission and storage method and device
CN109697163B (en) Program testing method and device
CN110753257A (en) Data display method, display terminal, server, display system, and storage medium
CN110555303A (en) Method and device for preventing machine script from being maliciously accessed
CN109120576B (en) Data sharing method and device, computer equipment and storage medium
CN108763934B (en) Data processing method and device, storage medium and server
CN113114681B (en) Test message processing method, device, computer system and readable storage medium
CN115688059A (en) Image data processing method and device, electronic equipment and storage medium
CN109445979B (en) Abnormal log reporting method and system for wearable device
CN112416763A (en) Method, device and equipment for automatically testing interface and 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
GR01 Patent grant
GR01 Patent grant