Unlock instant, AI-driven research and patent intelligence for your innovation.

Method and system for intercepting raw socket input and output

A raw socket, input and output technology, applied in transmission systems, electrical components, etc., can solve problems such as low performance, and achieve the effect of improving interception performance

Inactive Publication Date: 2016-12-07
BEIJING KINGSOFT SECURITY MANAGEMENT SYST TECH CO LTD
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Although this method can also intercept raw socket IO, it must first determine the type of socket. If it is SOCK_RAW (raw socket type), then interception processing is performed. Interface type, the performance is relatively low

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and system for intercepting raw socket input and output
  • Method and system for intercepting raw socket input and output
  • Method and system for intercepting raw socket input and output

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0026] In order to make the above objects, features and advantages of the present invention more comprehensible, the present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.

[0027] The embodiment of the invention discloses a method for intercepting raw socket input and output. This method is used in the Linux kernel. Since this method is implemented in the Linux kernel, in order to prevent that other kernel modules may also register the original socket interface, the Linux kernel module needs to be loaded preferentially when the operating system is started. Such as figure 1 As shown in FIG. 2 , it is a flowchart of a method for intercepting raw socket input and output in an embodiment of the present invention. This method specifically comprises the steps as follows:

[0028] Step S101: Find the original socket interface built in the Linux kernel.

[0029] In the Linux kernel, the structure of the ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention provides a method for intercepting raw socket input and output, which is applied to a Linux kernel. The method comprises the following steps: finding a raw socket interface built in the Linux kernel; removing a write protection bit of a control register of a CPU (Central Processing Unit); saving a first receiving message function and a first sending message function in the raw socket interface built in the Linux kernel in a newly-allocated raw socket interface in the Linux kernel; substituting a second receiving message function and a second sending message function for the first receiving message function and the first sending message function in the raw socket interface built in the Linux kernel respectively; and restoring the write protection bit of the control register of the CPU. The invention also provides a system for intercepting the raw socket input and output. Through adoption of the method and the system for intercepting the raw socket input and output, the raw socket input and output of all processes can be intercepted directly, and the intercepting performance is improved.

Description

technical field [0001] The invention relates to the technical field of data interception, in particular to a method and system for intercepting raw socket input and output. Background technique [0002] Raw sockets have a wide range of uses, especially for data transmission and reception of custom protocols (except standard protocols TCP, UDP, and ICMP, etc.). The general method of intercepting socket IO under Linux is to intercept the corresponding socket system calls, sendmsg and sendto for sending, and recvmsg and recvfrom for receiving. Although this method can also intercept raw socket IO, it must first determine the type of socket. If it is SOCK_RAW (raw socket type), then interception processing is performed. Interface type, the performance is relatively low. Contents of the invention [0003] The technical problem to be solved by the present invention is to provide a method for intercepting the input and output of the original socket, directly intercepting the in...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): H04L29/06
CPCH04L63/1466H04L63/168H04L69/162
Inventor 秦青杨锐
Owner BEIJING KINGSOFT SECURITY MANAGEMENT SYST TECH CO LTD