CN114978942A - Router detection method and device, electronic equipment and storage medium - Google Patents

Router detection method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114978942A
CN114978942A CN202210521395.4A CN202210521395A CN114978942A CN 114978942 A CN114978942 A CN 114978942A CN 202210521395 A CN202210521395 A CN 202210521395A CN 114978942 A CN114978942 A CN 114978942A
Authority
CN
China
Prior art keywords
target
router
equipment
script file
request
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
CN202210521395.4A
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.)
Sangfor Technologies Co Ltd
Original Assignee
Sangfor Technologies 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 Sangfor Technologies Co Ltd filed Critical Sangfor Technologies Co Ltd
Priority to CN202210521395.4A priority Critical patent/CN114978942A/en
Publication of CN114978942A publication Critical patent/CN114978942A/en
Pending legal-status Critical Current

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/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0876Network utilisation, e.g. volume of load or congestion level
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/06Generation of reports
    • H04L43/065Generation of reports related to network devices
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/20Support for services
    • H04L49/208Port mirroring
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • H04L67/025Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications

Abstract

The application discloses a router detection method, a device, an electronic device and a computer readable storage medium, wherein the method comprises the following steps: monitoring a request message of a target device for accessing a service server; forging a response message corresponding to the request message based on the script file, and sending the forged response message to the target device so that the target device can execute the script file in the forged response message; the script file is at least used for accessing a target router management page address, and sending an access request to the detection equipment after the access is successful; and if the access request sent by the target equipment is received, judging that the target type router exists in the network where the target equipment is located. The method and the device realize the detection of the router type in the network.

Description

Router detection method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a router detection method and apparatus, an electronic device, and a computer-readable storage medium.
Background
For the fields of device identification, asset identification, etc., it is necessary to identify the type of router in the network, i.e., the specific brand of router. Therefore, how to detect the router type in the network is a technical problem to be solved by those skilled in the art.
Disclosure of Invention
The application aims to provide a router detection method and device, an electronic device and a computer readable storage medium, which realize the detection of the router type in a network.
In order to achieve the above object, the present application provides a router detection method, applied to a detection device, including:
monitoring a request message of a target device for accessing a service server;
forging a response message corresponding to the request message based on a script file, and sending the forged response message to the target device so that the target device can execute the script file in the forged response message; the script file is at least used for accessing a target router management page address, and sending an access request to the detection equipment after the access is successful;
and if the access request sent by the target equipment is received, judging that the router of the target type exists in the network where the target equipment is located.
The monitoring a request message of a target device for accessing a service server includes:
monitoring the flow of a network where target equipment is located;
judging whether the target traffic corresponding to the IP address of the target equipment exists in the traffic;
if yes, determining the target flow as a request message for the target equipment to access a service server.
The target equipment is connected with the service server through a switch;
correspondingly, the monitoring traffic in the network where the target device is located includes:
traffic passing through the switch is monitored.
And the script file is also used for continuously accessing the service corresponding to the request message.
The target equipment is connected with the service server through a switch and the detection equipment;
correspondingly, the monitoring traffic in the network where the target device is located includes:
and monitoring the flow passing through the detection equipment.
Wherein, the forging a response message corresponding to the request message based on the script file includes:
acquiring a response message corresponding to the request message sent by the service server;
and inserting a script file into the response message to obtain a forged response message.
If the traffic contains a target traffic corresponding to the IP address of the target device, the method further includes:
judging whether the target flow belongs to HTTP request flow;
if yes, determining the target flow as a request message for the target equipment to access a service server.
In order to achieve the above object, the present application provides a router detection apparatus, which is applied to a detection device, and includes:
the monitoring module is used for monitoring a request message of the target equipment for accessing the service server;
the forging module is used for forging a response message corresponding to the request message based on the script file and sending the forged response message to the target equipment so that the target equipment can execute the script file in the forged response message; the script file is at least used for accessing a target router management page address, and sending an access request to the detection equipment after the access is successful;
and the judging module is used for judging that the router of the target type exists in the network where the target equipment is positioned when receiving the access request sent by the target equipment.
To achieve the above object, the present application provides an electronic device including:
a memory for storing a computer program;
a processor for implementing the steps of the router detection method as described above when executing the computer program.
To achieve the above object, the present application provides a computer readable storage medium, on which a computer program is stored, which when executed by a processor, implements the steps of the router detection method as described above.
According to the above scheme, the router detection method provided by the application includes: monitoring a request message of a target device for accessing a service server; forging a response message corresponding to the request message based on a script file, and sending the forged response message to the target device so that the target device can execute the script file in the forged response message; the script file is at least used for accessing a target router management page address, and sending an access request to the detection equipment after the access is successful; and if the access request sent by the target equipment is received, judging that the router of the target type exists in the network where the target equipment is located.
According to the router detection method provided by the application, the request message of the target equipment for accessing the service server is monitored, the script file is returned to the target equipment, the target equipment can access the management page address corresponding to the router of the target type when executing the script file, if the access is successful, the access request is sent to the detection equipment, and the detection equipment receives the access request, judges that the router of the target type exists in the network, so that the router type in the network is detected. The application also discloses a router detection device, an electronic device and a computer readable storage medium, and the technical effects can be realized.
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 application.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts. The accompanying drawings, which are included to provide a further understanding of the disclosure and are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the description serve to explain the disclosure without limiting the disclosure. In the drawings:
FIG. 1 is a flow diagram illustrating a method of router detection in accordance with an exemplary embodiment;
FIG. 2 is a flow diagram illustrating a detection device listening for traffic in accordance with an illustrative embodiment;
FIG. 3 is a flow chart illustrating a method of asynchronous router detection in accordance with an exemplary embodiment;
fig. 4 is a flowchart illustrating a script file in a response message in which a target device performs forgery in an asynchronous router detection method according to an example embodiment;
FIG. 5 is a flowchart illustrating a synchronous router detection method in accordance with an exemplary embodiment;
FIG. 6 is a flow diagram illustrating another method of router detection in accordance with an illustrative embodiment;
FIG. 7 is a diagram illustrating a network topology according to an exemplary embodiment;
FIG. 8 is a flow chart illustrating yet another method of router detection in accordance with an illustrative embodiment;
FIG. 9 is a diagram illustrating another network topology according to an exemplary embodiment;
FIG. 10 is a block diagram illustrating a router detection arrangement in accordance with an exemplary embodiment;
FIG. 11 is a block diagram illustrating an electronic device in accordance with an example embodiment.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. It is to be understood that the embodiments described are only a few embodiments of the present application and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application. In addition, in the embodiments of the present application, "first", "second", and the like are used for distinguishing similar objects, and are not necessarily used for describing a specific order or a sequential order.
The embodiment of the application discloses a router detection method, which realizes the detection of the router type in a network.
Referring to fig. 1, a flowchart of a router detection method according to an exemplary embodiment is shown, as shown in fig. 1, including:
s101: monitoring a request message of a target device for accessing a service server;
the execution subject of this embodiment is a detection device, which is deployed in a network where a target device is located, and the purpose of this embodiment is to detect whether a router of a target type exists in the network. In the specific implementation, the target device accesses the service server through the switch in the network, and the detection device monitors a request message of the target device for accessing the service server.
As a possible embodiment, the present step includes: monitoring the flow of a network where target equipment is located; judging whether the target traffic corresponding to the IP address of the target equipment exists in the traffic; if yes, determining the target flow as a request message for the target equipment to access a service server. In specific implementation, the target device accesses the web service server through a switch in the network, the detection device monitors the traffic in the network, and determines whether the source IP address of the monitored traffic belongs to the monitored address range, that is, whether the source IP address is the IP address of the target device, if so, the subsequent steps are continued, and if not, the monitoring is continued.
Preferably, if a target traffic corresponding to the IP address of the target device exists in the traffic, whether the target traffic belongs to the HTTP request traffic is continuously determined; if yes, determining the target flow as a request message for the target equipment to access a service server. In a specific implementation, as shown in fig. 2, the detection device monitors traffic in the network, determines whether a source IP address of the monitored traffic is an IP address of the target device, if yes, continues to determine whether the target traffic belongs to HTTP request traffic, if yes, continues to perform subsequent steps, and if not, continues to monitor.
S102: forging a response message corresponding to the request message based on a script file, and sending the forged response message to the target device so that the target device can execute the script file in the forged response message; the script file is at least used for accessing a target router management page address, and sending an access request to the detection equipment after the access is successful;
in the specific implementation, the target type of the router to be detected is determined, and the corresponding management page address is determined, which may be a direct IP address of the management page, that is, a default fixed IP address of the router of the target type, or may be a virtual domain name, which is a domain name capable of directly accessing the management interface of the router.
Further, a script file is created based on the management page address corresponding to the router of the target type, where the script file may be specifically a js code, and may also be other script languages, such as jQuery, AJAX, and the like, without being limited in detail herein. The script file is used for accessing the management page address, sending an access request to the detection device after the access is successful, and certainly, the script file can also be used for continuously accessing the service corresponding to the request message, so that the original service of the target device cannot be influenced, and the router type detection is realized to be insensitive to the user.
In this step, the detection device forges the response message based on the created script file, and sends the response message to the target device, and the target device executes the script file in the forged response message. The process that the target device executes the script file in the forged response message comprises the following steps: and continuing to access the service corresponding to the request message, sending an access request to the management page address, and if a reply message of successful access is received, sending the access request to the detection equipment, wherein the access request can be an HTTP request.
S103: and if the access request sent by the target equipment is received, judging that the router of the target type exists in the network where the target equipment is located.
In specific implementation, if the detection device receives an access request sent by the target device, it determines that the target type router is stored in the network where the target device is located, and if the access request is not received after time out, it determines that the target type router does not exist in the network. The detection result can be applied to subsequent equipment identification, asset identification and the like.
It should be noted that, in the process of executing the script file by the target device, the synchronous mode or the asynchronous mode may be adopted to continue accessing the service corresponding to the request message and sending the access request to the management page address.
Asynchronous mode as shown in fig. 3, step 1: the detection equipment monitors HTTP request traffic of target equipment; step 2: the detection equipment forges an HTTP response and sends the HTTP response to the target equipment; and step 3: the target equipment accesses the original HTTP service; and 4, step 4: the target device accesses a router management page; and 5: the web service server replies an HTTP 200OK response; step 6: the router replies an HTTP 200OK response to indicate that the management page of the router is successfully accessed; and 7: the target equipment sends an HTTP request to the detection equipment; and 8: the detection device records the type of router detected. In the above process, step 3 and step 4 are performed synchronously.
For the asynchronous mode, the process that the target device executes the script file in the forged response message is shown in fig. 4, the target device receives the script file in the response message, accesses the original HTTP service, accesses the management page of the router through the management page address, determines whether the router returns 200OK, sends an HTTP request to the detection device if the request is positive, and exits if the response is not positive after time out.
As shown in fig. 5, the detection device monitors HTTP request traffic of the target device, the detection device forges an HTTP response and sends the HTTP response to the target device, the target device accesses an original HTTP service, the web service server replies an HTTP 200OK response, the target device accesses a router management page, the router replies the HTTP 200OK response, which indicates that the router management page is successfully accessed, the target device sends an HTTP request to the detection device, and the detection device records the detected type of the router.
The router detection method provided by the embodiment of the application returns the script file to the target device by monitoring the request message of the target device for accessing the service server, the target device accesses the management page address corresponding to the router of the target type when executing the script file, if the access is successful, the access request is sent to the detection device, and the detection device receives the access request, determines that the router of the target type exists in the network, so that the router type in the network is detected.
The embodiment of the application discloses a router detection method, and compared with the previous embodiment, the embodiment further explains and optimizes the technical scheme. Specifically, the method comprises the following steps:
referring to fig. 6 and 7, fig. 6 is a flowchart illustrating another router detection method according to an exemplary embodiment, and fig. 7 is a diagram illustrating a network topology structure according to an exemplary embodiment, as shown in fig. 6, including:
s201: monitoring traffic passing through the switch;
in this embodiment, the detection device is deployed in the network where the target device is located by a bypass deployment manner, which does not change the original topology of the network, that is, the target device still accesses the service server through the switch, an arrow in fig. 7 represents a data flow, and the detection device is connected to the switch and monitors a traffic passing through the switch.
S202: judging whether the target traffic corresponding to the IP address of the target equipment exists in the traffic; if yes, entering S203; if not, the step S201 is re-entered;
s203: judging whether the target flow belongs to HTTP request flow; if yes, entering S204; if not, the step S201 is re-entered;
s204: determining the target flow as a request message of the target equipment for accessing a service server;
s205: forging a response message corresponding to the request message based on a script file, and sending the forged response message to the target device so that the target device can execute the script file in the forged response message; the script file is at least used for accessing a target router management page address, and sending an access request to the detection equipment after the access is successful;
in specific implementation, a script file is created based on the management page address corresponding to the target type router, and the script file is used for continuing to access the service corresponding to the request message, access the management page address, and send an access request to the detection device after the access is successful.
Further, the detection device forges a response message based on the script file, and sends the response message to the target device. It should be noted that, because the detection device is closer to the target device than the service server, the response packet forged by the detection device preferentially arrives at the target device, and the response packet returned by the service server arrives later, and the target device executes the script file in the forged response packet.
The process that the target device executes the script file in the forged response message comprises the following steps: and continuing to access the service corresponding to the request message, sending an access request to the management page address, and if a reply message of successful access is received, sending the access request to the detection equipment.
S206: and if the access request sent by the target equipment is received, judging that the router of the target type exists in the network where the target equipment is located.
The embodiment of the application discloses a router detection method, and compared with the first embodiment, the embodiment further explains and optimizes the technical scheme. Specifically, the method comprises the following steps:
referring to fig. 8 and 9, fig. 8 is a flowchart illustrating a further router detection method according to an exemplary embodiment, and fig. 9 is a diagram illustrating another network topology structure according to an exemplary embodiment, as shown in fig. 8, including:
s301: and monitoring the flow passing through the detection equipment.
In this embodiment, the detection device is deployed in a network where the target device is located in a serial deployment manner, that is, the target device accesses the service server through the switch and the detection device, an arrow in fig. 9 represents a data flow, and the detection device directly monitors a traffic passing through itself.
S302: judging whether the target traffic corresponding to the IP address of the target equipment exists in the traffic; if yes, entering S303; if not, the step S301 is re-entered;
s303: judging whether the target flow belongs to HTTP request flow; if yes, entering S204; if not, the step S301 is re-entered;
s304: determining the target flow as a request message of the target equipment for accessing a service server;
s305: forging a response message corresponding to the request message based on a script file, and sending the forged response message to the target device so that the target device can execute the script file in the forged response message; the script file is at least used for accessing a target router management page address, and sending an access request to the detection equipment after the access is successful;
in this embodiment, the detection device forges the response message based on the script file. In a specific implementation, the detecting device may forge the response packet directly after receiving the request packet, or may insert a script file into the real response packet replied by the service server to obtain a forged response packet after receiving the real response packet, that is, forge the response packet corresponding to the request packet based on the script file, including: acquiring a response message corresponding to the request message sent by the service server; and inserting a script file into the response message to obtain a forged response message.
S306: and if the access request sent by the target equipment is received, judging that the router of the target type exists in the network where the target equipment is located.
In the following, a router detection apparatus provided in an embodiment of the present application is introduced, and a router detection apparatus described below and a router detection method described above may be referred to each other.
Referring to fig. 10, a block diagram of a router detection apparatus according to an exemplary embodiment is shown, as shown in fig. 10, including:
a monitoring module 100, configured to monitor a request packet for a target device to access a service server;
the forging module 200 is configured to forge a response packet corresponding to the request packet based on a script file, and send the forged response packet to the target device, so that the target device executes the script file in the forged response packet; the script file is at least used for accessing a target router management page address, and sending an access request to the detection equipment after the access is successful;
a determining module 300, configured to determine that a router of the target type exists in a network where the target device is located when receiving the access request sent by the target device.
The router detection apparatus provided in the embodiment of the present application returns a script file to a target device by monitoring a request packet for the target device to access a service server, where the target device accesses a management page address corresponding to a router of a target type when executing the script file, and sends an access request to a detection device if the access is successful, and the detection device receives the access request, and determines that the router of the target type exists in a network, thereby implementing detection of the router type in the network.
On the basis of the above embodiment, as a preferred implementation, the listening module 100 includes:
the monitoring unit is used for monitoring the flow in the network where the target equipment is located;
the judging unit is used for judging whether the target traffic corresponding to the IP address of the target equipment exists in the traffic; if yes, starting the working process of the determining unit;
and the determining unit is used for determining the target flow as a request message of the target equipment for accessing the service server.
On the basis of the above embodiment, as a preferred implementation, the target device is connected to the service server through a switch;
correspondingly, the monitoring unit is specifically configured to: traffic passing through the switch is monitored.
On the basis of the above embodiment, as a preferred implementation manner, the script file is further configured to continue to access the service corresponding to the request packet.
On the basis of the above embodiment, as a preferred implementation, the target device is connected to the service server through a switch and the detection device;
correspondingly, the monitoring unit is specifically configured to: and monitoring the flow passing through the detection equipment.
On the basis of the above embodiment, as a preferred implementation manner, the counterfeit module 200 is specifically configured to: acquiring a response message corresponding to the request message sent by the service server; and inserting a script file into the response message to obtain a forged response message.
On the basis of the foregoing embodiment, as a preferred implementation manner, the determining unit is specifically configured to: judging whether the target flow belongs to HTTP request flow; if yes, determining the target flow as a request message for the target equipment to access a service server.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Based on the hardware implementation of the program module, and in order to implement the method according to the embodiment of the present application, an embodiment of the present application further provides an electronic device, and fig. 11 is a structural diagram of an electronic device according to an exemplary embodiment, as shown in fig. 11, the electronic device includes:
a communication interface 1 capable of information interaction with other devices such as network devices and the like;
and the processor 2 is connected with the communication interface 1 to realize information interaction with other equipment, and is used for executing the router detection method provided by one or more technical schemes when running a computer program. And the computer program is stored on the memory 3.
In practice, of course, the various components in the electronic device are coupled together by means of the bus system 4. It will be appreciated that the bus system 4 is used to enable the communication of connections between these components. The bus system 4 comprises, in addition to a data bus, a power bus, a control bus and a status signal bus. For clarity of illustration, however, the various buses are labeled as bus system 4 in fig. 11.
The memory 3 in the embodiment of the present application is used to store various types of data to support the operation of the electronic device. Examples of such data include: any computer program for operating on an electronic device.
It will be appreciated that the memory 3 may be either volatile memory or nonvolatile memory, and may include both volatile and nonvolatile memory. Among them, the nonvolatile Memory may be a Read Only Memory (ROM), a Programmable Read Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), a magnetic random access Memory (FRAM), a Flash Memory (Flash Memory), a magnetic surface Memory, an optical disk, or a Compact Disc Read-Only Memory (CD-ROM); the magnetic surface storage may be disk storage or tape storage. Volatile Memory can be Random Access Memory (RAM), which acts as external cache Memory. By way of illustration and not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), Enhanced Synchronous Dynamic Random Access Memory (Enhanced DRAM), Synchronous Dynamic Random Access Memory (SLDRAM), Direct Memory (DRmb Access), and Random Access Memory (DRAM). The memory 3 described in the embodiments of the present application is intended to comprise, without being limited to, these and any other suitable types of memory.
The method disclosed in the embodiment of the present application may be applied to the processor 2, or may be implemented by the processor 2. The processor 2 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 2. The processor 2 described above may be a general purpose processor, a DSP, or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like. The processor 2 may implement or perform the methods, steps and logic blocks disclosed in the embodiments of the present application. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the method disclosed in the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software modules may be located in a storage medium located in the memory 3, and the processor 2 reads the program in the memory 3 and in combination with its hardware performs the steps of the aforementioned method.
When the processor 2 executes the program, the corresponding processes in the methods according to the embodiments of the present application are realized, and for brevity, are not described herein again.
In an exemplary embodiment, the present application further provides a storage medium, i.e., a computer storage medium, specifically a computer readable storage medium, for example, including a memory 3 storing a computer program, where the computer program is executable by a processor 2 to perform the steps of the foregoing method. The computer readable storage medium may be Memory such as FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface Memory, optical disk, or CD-ROM.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments; and the aforementioned storage medium includes: a removable storage device, a ROM, a RAM, a magnetic or optical disk, or various other media that can store program code.
Alternatively, the integrated units described above in the present application may be stored in a computer-readable storage medium if they are implemented in the form of software functional modules and sold or used as independent products. Based on such understanding, the technical solutions of the embodiments of the present application may be essentially implemented or portions thereof that contribute to the prior art may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling an electronic device (which may be a personal computer, a server, or a network device) to execute all or part of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a removable storage device, a ROM, a RAM, a magnetic or optical disk, or various other media that can store program code.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A router detection method is applied to detection equipment and comprises the following steps:
monitoring a request message of target equipment for accessing a service server;
forging a response message corresponding to the request message based on a script file, and sending the forged response message to the target device so that the target device can execute the script file in the forged response message; the script file is at least used for accessing a target router management page address, and sending an access request to the detection equipment after the access is successful;
and if the access request sent by the target equipment is received, judging that the router of the target type exists in the network where the target equipment is located.
2. The router detection method according to claim 1, wherein the monitoring a request packet for the target device to access the service server includes:
monitoring the flow of a network where target equipment is located;
judging whether the target traffic corresponding to the IP address of the target equipment exists in the traffic;
and if so, determining the target flow as a request message of the target equipment for accessing a service server.
3. The router detection method according to claim 2, wherein the target device is connected to the traffic server through a switch;
correspondingly, the monitoring traffic in the network where the target device is located includes:
traffic passing through the switch is monitored.
4. The router detection method according to claim 3, wherein the script file is further configured to continue to access the service corresponding to the request packet.
5. The router detection method according to claim 2, wherein the target device is connected to the service server through a switch and the detection device;
correspondingly, the monitoring traffic in the network where the target device is located includes:
and monitoring the flow passing through the detection equipment.
6. The router detection method according to claim 5, wherein the forging, based on the script file, the response packet corresponding to the request packet includes:
acquiring a response message corresponding to the request message sent by the service server;
and inserting a script file into the response message to obtain a forged response message.
7. The router detection method according to claim 2, wherein if there is a target traffic corresponding to the IP address of the target device in the traffic, the method further includes:
judging whether the target flow belongs to HTTP request flow;
if yes, determining the target flow as a request message for the target equipment to access a service server.
8. A router detection device is applied to detection equipment and comprises:
the monitoring module is used for monitoring a request message of the target equipment for accessing the service server;
the forging module is used for forging a response message corresponding to the request message based on the script file and sending the forged response message to the target equipment so that the target equipment can execute the script file in the forged response message; the script file is at least used for accessing a target router management page address, and sending an access request to the detection equipment after the access is successful;
and the judging module is used for judging that the router of the target type exists in the network where the target equipment is positioned when receiving the access request sent by the target equipment.
9. An electronic device, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the router detection method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, having stored thereon a computer program which, when being executed by a processor, carries out the steps of the router detection method according to any one of claims 1 to 7.
CN202210521395.4A 2022-05-13 2022-05-13 Router detection method and device, electronic equipment and storage medium Pending CN114978942A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210521395.4A CN114978942A (en) 2022-05-13 2022-05-13 Router detection method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210521395.4A CN114978942A (en) 2022-05-13 2022-05-13 Router detection method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114978942A true CN114978942A (en) 2022-08-30

Family

ID=82983678

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210521395.4A Pending CN114978942A (en) 2022-05-13 2022-05-13 Router detection method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114978942A (en)

Citations (29)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050144467A1 (en) * 2003-12-26 2005-06-30 Fujitsu Limited Unauthorized access control apparatus between firewall and router
CN103152335A (en) * 2013-02-20 2013-06-12 神州数码网络(北京)有限公司 Method and device for preventing ARP (address resolution protocol) deceit on network equipment
CN104113443A (en) * 2013-04-19 2014-10-22 中兴通讯股份有限公司 Network equipment detection method, device and cloud detection system
EP2913980A1 (en) * 2014-02-27 2015-09-02 Xiaomi Inc. Method and device for router access control, and router
CN105245359A (en) * 2015-09-07 2016-01-13 上海斐讯数据通信技术有限公司 Remote router management method, system and device
WO2016023436A1 (en) * 2014-08-12 2016-02-18 华为技术有限公司 Fault detection method for virtual router redundancy protocol and router device
CN106878443A (en) * 2017-03-07 2017-06-20 上海斐讯数据通信技术有限公司 A kind of product response agent method and a kind of proxy response equipment based on Internet of Things
WO2017152754A1 (en) * 2016-03-11 2017-09-14 中兴通讯股份有限公司 Method and apparatus for secure communication of software defined network (sdn)
CN107360061A (en) * 2017-08-08 2017-11-17 上海斐讯数据通信技术有限公司 A kind of attack test system and method for wireless router
WO2018049655A1 (en) * 2016-09-18 2018-03-22 美的智慧家居科技有限公司 Device networking method, apparatus and system
US20180139131A1 (en) * 2016-07-05 2018-05-17 Ologn Technologies Ag Systems, Apparatuses and Methods for Cooperating Routers
US20180227763A1 (en) * 2015-08-13 2018-08-09 Kt Corporation Internet connection device, central management server, and internet connection method
CN108449273A (en) * 2018-01-25 2018-08-24 上海连尚网络科技有限公司 A kind of network accelerating method and system
CN108667681A (en) * 2017-03-27 2018-10-16 丛林网络公司 Routing for Multi-path route tracks
CN109302317A (en) * 2018-10-15 2019-02-01 安徽省水恒科技有限公司 A kind of network device detection methods and detection device
US20190081980A1 (en) * 2017-07-25 2019-03-14 Palo Alto Networks, Inc. Intelligent-interaction honeypot for iot devices
US20190089748A1 (en) * 2017-09-17 2019-03-21 Allot Communications Ltd. System, Method, and Apparatus of Securing and Managing Internet-Connected Devices and Networks
CN110740162A (en) * 2019-08-30 2020-01-31 上海连尚网络科技有限公司 Communication link establishing method, device, electronic equipment and medium
CN110768999A (en) * 2019-10-31 2020-02-07 杭州迪普科技股份有限公司 Method and device for detecting illegal external connection of equipment
CN110809308A (en) * 2019-09-29 2020-02-18 上海商米科技集团股份有限公司 Method and device for automatically connecting IOT device and WIFI router
CN111314109A (en) * 2020-01-15 2020-06-19 太原理工大学 Weak key-based large-scale Internet of things equipment firmware identification method
CN111917682A (en) * 2019-05-07 2020-11-10 阿里巴巴集团控股有限公司 Access behavior identification method, performance detection method, device, equipment and system
CN112242926A (en) * 2020-09-30 2021-01-19 深圳市酷开软件技术有限公司 Equipment attribution mark, data delivery method, device, equipment and storage medium
CN112738095A (en) * 2020-12-29 2021-04-30 杭州迪普科技股份有限公司 Method, device, system, storage medium and equipment for detecting illegal external connection
CN112953794A (en) * 2021-03-31 2021-06-11 百度在线网络技术(北京)有限公司 Network detection method, device, equipment and storage medium of router
CN113411332A (en) * 2021-06-18 2021-09-17 杭州安恒信息技术股份有限公司 CORS vulnerability detection method, device, equipment and medium
CN113473576A (en) * 2020-03-31 2021-10-01 深圳市万普拉斯科技有限公司 Roaming networking processing method and device, mobile terminal and readable storage medium
CN113726717A (en) * 2020-05-11 2021-11-30 诺玛有限公司 Counterfeit device detection method and wireless device maintenance system
CN114466249A (en) * 2022-04-13 2022-05-10 荣耀终端有限公司 Data request processing method, device and storage medium

Patent Citations (29)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050144467A1 (en) * 2003-12-26 2005-06-30 Fujitsu Limited Unauthorized access control apparatus between firewall and router
CN103152335A (en) * 2013-02-20 2013-06-12 神州数码网络(北京)有限公司 Method and device for preventing ARP (address resolution protocol) deceit on network equipment
CN104113443A (en) * 2013-04-19 2014-10-22 中兴通讯股份有限公司 Network equipment detection method, device and cloud detection system
EP2913980A1 (en) * 2014-02-27 2015-09-02 Xiaomi Inc. Method and device for router access control, and router
WO2016023436A1 (en) * 2014-08-12 2016-02-18 华为技术有限公司 Fault detection method for virtual router redundancy protocol and router device
US20180227763A1 (en) * 2015-08-13 2018-08-09 Kt Corporation Internet connection device, central management server, and internet connection method
CN105245359A (en) * 2015-09-07 2016-01-13 上海斐讯数据通信技术有限公司 Remote router management method, system and device
WO2017152754A1 (en) * 2016-03-11 2017-09-14 中兴通讯股份有限公司 Method and apparatus for secure communication of software defined network (sdn)
US20180139131A1 (en) * 2016-07-05 2018-05-17 Ologn Technologies Ag Systems, Apparatuses and Methods for Cooperating Routers
WO2018049655A1 (en) * 2016-09-18 2018-03-22 美的智慧家居科技有限公司 Device networking method, apparatus and system
CN106878443A (en) * 2017-03-07 2017-06-20 上海斐讯数据通信技术有限公司 A kind of product response agent method and a kind of proxy response equipment based on Internet of Things
CN108667681A (en) * 2017-03-27 2018-10-16 丛林网络公司 Routing for Multi-path route tracks
US20190081980A1 (en) * 2017-07-25 2019-03-14 Palo Alto Networks, Inc. Intelligent-interaction honeypot for iot devices
CN107360061A (en) * 2017-08-08 2017-11-17 上海斐讯数据通信技术有限公司 A kind of attack test system and method for wireless router
US20190089748A1 (en) * 2017-09-17 2019-03-21 Allot Communications Ltd. System, Method, and Apparatus of Securing and Managing Internet-Connected Devices and Networks
CN108449273A (en) * 2018-01-25 2018-08-24 上海连尚网络科技有限公司 A kind of network accelerating method and system
CN109302317A (en) * 2018-10-15 2019-02-01 安徽省水恒科技有限公司 A kind of network device detection methods and detection device
CN111917682A (en) * 2019-05-07 2020-11-10 阿里巴巴集团控股有限公司 Access behavior identification method, performance detection method, device, equipment and system
CN110740162A (en) * 2019-08-30 2020-01-31 上海连尚网络科技有限公司 Communication link establishing method, device, electronic equipment and medium
CN110809308A (en) * 2019-09-29 2020-02-18 上海商米科技集团股份有限公司 Method and device for automatically connecting IOT device and WIFI router
CN110768999A (en) * 2019-10-31 2020-02-07 杭州迪普科技股份有限公司 Method and device for detecting illegal external connection of equipment
CN111314109A (en) * 2020-01-15 2020-06-19 太原理工大学 Weak key-based large-scale Internet of things equipment firmware identification method
CN113473576A (en) * 2020-03-31 2021-10-01 深圳市万普拉斯科技有限公司 Roaming networking processing method and device, mobile terminal and readable storage medium
CN113726717A (en) * 2020-05-11 2021-11-30 诺玛有限公司 Counterfeit device detection method and wireless device maintenance system
CN112242926A (en) * 2020-09-30 2021-01-19 深圳市酷开软件技术有限公司 Equipment attribution mark, data delivery method, device, equipment and storage medium
CN112738095A (en) * 2020-12-29 2021-04-30 杭州迪普科技股份有限公司 Method, device, system, storage medium and equipment for detecting illegal external connection
CN112953794A (en) * 2021-03-31 2021-06-11 百度在线网络技术(北京)有限公司 Network detection method, device, equipment and storage medium of router
CN113411332A (en) * 2021-06-18 2021-09-17 杭州安恒信息技术股份有限公司 CORS vulnerability detection method, device, equipment and medium
CN114466249A (en) * 2022-04-13 2022-05-10 荣耀终端有限公司 Data request processing method, device and storage medium

Similar Documents

Publication Publication Date Title
CN112272186B (en) Network traffic detection device and method, electronic equipment and storage medium
CN113900941A (en) Micro-service processing method, micro-service system, electronic device and storage medium
CN112818307A (en) User operation processing method, system, device and computer readable storage medium
CN112769775B (en) Threat information association analysis method, system, equipment and computer medium
CN111800490B (en) Method, device and terminal equipment for acquiring network behavior data
CN113190405B (en) Node health detection method and device, electronic equipment and storage medium
CN111885217A (en) Data communication method, device, equipment and storage medium
CN110619022B (en) Node detection method, device, equipment and storage medium based on block chain network
CN113067875A (en) Access method, device and equipment based on dynamic flow control of micro-service gateway
CN113992396A (en) Flow detection method and device, electronic equipment and storage medium
CN114363062A (en) Domain name detection method, system, equipment and computer readable storage medium
CN112398738B (en) Method and device for acquiring connection relation, equipment and computer readable storage medium
CN114978942A (en) Router detection method and device, electronic equipment and storage medium
CN115022366A (en) Asset identification method and device, electronic equipment and storage medium
CN112866265B (en) CSRF attack protection method and device
CN114138371A (en) Configuration dynamic loading method and device, computer equipment and storage medium
CN114531253A (en) Threat information generation method, equipment, system and storage medium
CN113347203B (en) Network attack detection method and device, electronic equipment and storage medium
CN114500261B (en) Network asset identification method and device, electronic equipment and storage medium
CN112929429B (en) Request processing method, device and equipment
KR102248991B1 (en) Apparatus, method and program for controlling connection of neighbor node in block-chain network
CN111314266B (en) Traffic fraud detection method and device, electronic equipment and storage medium
CN115118464A (en) Method and device for detecting defect host, electronic equipment and storage medium
CN115022217A (en) Network card detection method and device, electronic equipment and storage medium
CN117640184A (en) Safety communication method and safety communication system for internal and external networks in power grid system

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