Embodiment
For technical problem, technical scheme and advantage that embodiments of the invention will be solved is clearer, be described in detail below in conjunction with the accompanying drawings and the specific embodiments.
Embodiments of the invention at the transmission between computer in the prior art and external network can not be real the problem that obtains safety guarantee, a kind of installation data card on computers and the data processing and the transmission method of data card are provided.
As shown in Figure 1, embodiments of the invention data card 1 comprises:
Receiver module 10 is used for first data message that receiving terminal apparatus sends; The terminal equipment of terminal equipment here such as computer or other network service;
Signal conversion module 11 after being used for first data message carried out format conversion, generates second data message, and sends second data message to external network; And receive the 3rd data message that external network sends according to second data message, and after the 3rd data message carried out format conversion, generate the 4th data message; Wherein, the 3rd data message can be the message of promising of second data message; This signal conversion module 11 mainly is that the message through data card 1 is carried out modulation, as converting network signal to from the data-signal message that computer receives, perhaps converts the network signal message to data-signal that computer can receive;
Network process module 12 is used for the 4th data message is filtered coupling, if the match is successful, generates the 5th data message;
Sending module 13, be used for sending the 5th data message to terminal equipment, wherein, when specific implementation, this sending module 13 can be a module with above-mentioned receiver module 10, and as the interface module of data card, this data card can be connected with terminal equipment by this interface module, the data institute literary composition that sends to data card from terminal equipment can pass through from this interface module so, and the data message that sends to terminal equipment from data card also can pass through from this interface module.
This embodiment is by filtering the data that enter terminal equipments such as computer on data card 1; communicating by letter between computer and the external network carried out security control; by putting teeth in unified security strategy; prevent illegal access and the visit of external network, reach the purpose of safety of protection system for computer and stored resource thereof important information resource in the computer.
As shown in Figure 2, be a concrete structure schematic diagram of data card shown in Figure 1, above-mentioned network process module 12 comprises:
Forwarding module 120, be used to receive first data message that receiver module 10 is received, and be transmitted to signal conversion module 11, this first data message is transmitted to signal conversion module 11 by this forwarding module 120, purpose is to allow network process module 12 can monitor this first data message in advance, and set up being connected at data card 1 and external network based on application layer protocol for this first data message, certainly this first data message also can directly be transmitted to external network by signal conversion module 11, at this moment, because signal conversion module 11 also is the part of data card, equally also can set up being connected between data card 1 and the external network for this first data message based on application layer protocol.
Memory module 121, be used to store prevention policies configuration information by the default application layer protocol of terminal equipment, and according to update instruction, configuration as the prevention policies configuration information of default application layer protocol, prevention policies configuration information to storage upgrades, this prevention policies configuration information such as packet filtering, viral detection, blacklist, attack-defending, IP-MAC address binding etc., can dispose different prevention policies at different application layer protocols, can be single channel agreement, binary channels agreement or other application layer protocol as application layer protocol.
Monitoring module 122, be used for prevention policies configuration information according to the application layer protocol of above-mentioned memory module 121 storages, monitoring is based on the state of the application layer protocol of above-mentioned first data message place connection, as when a connection is set up, source IP, purpose IP, source port, destination interface, protocol number and message data feature etc. based on the application layer protocol of this connection, the state of different application layer protocols is different, enumerates no longer one by one here.
Filtering module 123, be used for according to above-mentioned application layer protocol and state thereof, create a filtering rule, and above-mentioned the 4th data message after signal conversion module 11 conversion is filtered coupling according to this filtering rule, if the match is successful, generate the 5th data message, and the 5th data message is sent to terminal equipment by sending module 13.The filtering module 123 here can adopt ASPF (the Application Specific Packet Filter that adopts usually as in the firewall technology, the packet filtering of application layer) realizes, this ASPF is based on the state that connects, and dynamically whether the determination data bag is allowed to by fire compartment wall or abandons.
As shown in Figure 3, according to the different application layer protocols and the state of this application layer protocol, can create different filtering rules, therefore, based on the single channel agreement that connects the time, above-mentioned filtering module 123 is specifically as follows:
First filtering module 1231, be used for detecting when being the single channel agreement based on the application layer protocol that connects, create the first five-tuple list item, this first five-tuple list item is the Session list item of five-tuple, comprise source IP, purpose IP, source port, destination interface, protocol number, when the 4th data message after signal conversion module 11 receives conversion, according to this first five-tuple Session list item the 4th data message is filtered coupling, if the match is successful, then allow the 4th data message to pass through, generate the 5th data message, and the 5th data message is sent to terminal equipment, otherwise block the 4th data message by sending module 13.
Same, when application layer protocol is during based on the binary channels agreement that connects, adopted the servermap list item mode of combining of the session list item+tlv triple of five-tuple to realize, guaranteed the fail safe of internal network so to a great extent, above-mentioned filtering module 123 also can be specially:
Second filtering module 1232, be used for detecting when being the binary channels agreement based on the application layer protocol that connects, create the second five-tuple list item and tlv triple list item, this second five-tuple list item is the session list item of five-tuple, the tlv triple list item is the servermap list item of tlv triple, when the 4th data message comes, at first can carry out legitimacy to the interface channel that transmits described the 4th data message according to the servermap list item of this tlv triple judges, if it is legal, after data channel has been set up, then according to the session list item of this second five-tuple the 4th data message is filtered coupling again, if the match is successful, then allow the 4th data message to pass through, generate the 5th data message, and the 5th data message is sent to described terminal equipment, otherwise block the 4th data message by sending module 13.Therefore the tlv triple servermap list item here is " interim inlet " list item, after real data message has come, can carry out complete judgement according to this data message+servermap, and this connection is a legal data channel.After data channel had been set up, the servermap list item had just been deleted, and can set up a session passage based on five-tuple this moment for this data channel.So just avoided, because the characteristics of multichannel agreement, and produce a permanent passage, the potential safety hazard that internal network exposes.Certainly, above-mentioned filtering module 123 is except being first filtering module 1231 or being second filtering module 1232, at different application layer protocol the time, can also create at other application layer protocols and create filtering rule, according to this filtering rule the 4th data message is carried out filter operation.
After above-mentioned first filtering module 1231 or 1232 pairs the 4th data messages of second filtering module carry out filter operation, be current connection when finishing, need the filtering rule of interim foundation be upgraded as five-tuple list item or tlv triple list item, therefore, network filtering module 12 also comprises:
Filter update module 124, be used for after detecting 1231 pairs the 4th data messages of first filtering module the match is successful, upgrade this first five-tuple list item, specifically, can revise or delete this five-tuple list item,, rebulid the five-tuple list item again to connect when setting up next time, so that the filtering rule that the connection of passage is each time adopted is all different, reduction external network hacker's etc. risk of attacks;
This filtration update module 124 is judged as when legal at the interface channel that detects 1232 pairs of second filtering modules transmission the 4th data message, delete this tlv triple immediately, to avoid internal network to expose, after detecting 1232 pairs the 4th data messages of second filtering module the match is successful, revise or delete this second five-tuple list item immediately, relevant information with the transmission channel of avoiding transmitting the 4th data message is exposed, and causes potential safety hazard.
Describe in conjunction with of the concrete application of concrete application scenarios more below above-mentioned data card:
As shown in Figure 4, this application scenarios comprises terminal equipment 2, as computer, be installed in the data card 1 in the network interface of this terminal equipment 2, this data card 1 is such as wireless Internet card, modulator-demodulator (Modem) etc., and the external network (as Internet etc.) of communicating by letter with this data card with wireless mode;
Wherein, receiver module 10 that data card 1 has or sending module 13 can be USB interface, pcmcia interface or Express interface etc., and this data card 1 can be connected with computer by these interfaces.
When the data message in the computer 2 sends to external network by data card 1, data card 1 can carry out two-way filtration and detection to this data message, during concrete the filtration, can monitor based on the application layer protocol state that connects, and according to the interim filtering rule of creating of these application layer protocol states, and according to this filtering rule to filtering coupling through the message of this data card 1, if the match is successful, then allow to pass through, otherwise block, so guaranteed fundamentally that the security protection that terminal equipment 2 and all messages of communicating by letter between the external network all pass through this data card 1 filters, guaranteed the high safety of terminal equipment 2 interior resources.
In conjunction with Fig. 4, introduce a concrete application example flow process of above-mentioned data card 1 again;
1) telnet session of user A initialization sends to external network with this conversation request by data card 1;
2) in data card 1, network process module 12 can be finished to connect and set up according to concrete application layer protocol, create corresponding filtering rule, as when finishing TCP three-way handshake, connect and set up, and create filtering rules such as corresponding five-tuple list item or tlv triple list item according to concrete application layer protocol, and safeguard these five-tuple list items or tlv triple list item;
When 3) response message that sends to user A when external network is by data card, after at first can being carried out format conversion by signal conversion module 11, send to network process module 12, this network process module 12 is according to the filtering rule of having created, to its data message that receives, as the 4th above-mentioned data message, filter, the message that can mate filtering rule can pass through, otherwise blocks, message as other users' telnet process gets clogged, and can not pass through;
4) when this telnet session finishes, this filtering rule, deleted immediately as above-mentioned five-tuple list item or tlv triple list item, the invalid packet of forging telnet again also can't pass through, to connect when setting up next time, fire compartment wall can rebulid a new Session list item again.Guaranteed the fail safe of embedded computer system so to a great extent.
In sum, the above embodiment of the present invention data card 1, increased the network protection function, its driver and configuration (as prevention policies, virus base etc.) can be upgraded by CD or special website, at current network security present situation the security protection strategy of data card are upgraded configuration timely.The user also can be on PC carries out the flexible configuration change by special software interface to the security protection strategy of data card, for example the user can cross rate, viral detection, blacklist, attack-defending, IP-MAC binding etc. by the software interface configuration packet of computer, thereby externally data have added last one firm safety curtain before flowing into computer, are not encroached on important, the sensitive data that ensure the individual.
As shown in Figure 5, embodiments of the invention also provide a kind of data processing and transmission method of data card, comprise the steps:
First data message that step S51, receiving terminal apparatus send, and after described first data message carried out format conversion, generate second data message, and send described second data message to external network;
Step S52 receives the 3rd data message that described external network sends according to described second data message, and after described the 3rd data message carried out format conversion, generates the 4th data message; Wherein, described the 3rd data message can be the message of promising of described second data message;
Step S53 filters coupling to described the 4th data message, if the match is successful, generates the 5th data message;
Step S54 sends described the 5th data message to described terminal equipment.
This embodiment before entering computer, carries out filtration treatment by data message that external network is sent earlier, has guaranteed the safety of computer.
Specifically, the method for this embodiment can have following specific implementation process:
First data message that step S61, receiving terminal apparatus send, and this first data message carried out format conversion, generate second data message, and send out this second data message of pound to external network; Wherein, this first data message can be the access request of terminal equipment to external network, and this second data message is the network signal that the first data message format conversion becomes to generate;
Step S62 receives the 3rd data message that external network sends according to second data message, and after the 3rd data message carried out format conversion, generates the 4th data message; Wherein, the 3rd data message can be the message of promising of second data message, and the 4th data message can be the data-signal that generates after the 3rd data message format conversion;
Step S63 according to application layer protocol and the state thereof based on the connection at the above-mentioned first data message place, creates a filtering rule, and according to described filtering rule described the 4th data message is filtered coupling, if the match is successful, generates the 5th data message;
Specifically, detecting when being the single channel agreement based on the application layer protocol that connects, create the first five-tuple Session list item, according to this first five-tuple Session list item above-mentioned the 4th data message is filtered coupling, if the match is successful, then generate the 5th data message, otherwise block the 4th data message.
Perhaps detecting when being the binary channels agreement based on the application layer protocol that connects, create the second five-tuple list item and tlv triple Servermap list item, according to this tlv triple Servermap list item the interface channel that transmits described the 4th data message being carried out legitimacy judges, if it is legal, then described the 4th data message is filtered coupling according to this second five-tuple list item, if the match is successful, then generate the 5th data message, otherwise block described the 4th data message.
Detect based on other application layer protocols that connect, go out to create equally a corresponding filtering rule, and the 4th data message is filtered coupling according to this filtering rule.
Step S64 sends the 5th data message to terminal equipment.
In above-mentioned step S63, after the match is successful to the 4th data message according to filtering rule, when promptly finishing based on the current connection of this application protocol, the filtering rule that deletion or modification have been set up, promptly revise or delete the above-mentioned first five-tuple list item or upgrade the above-mentioned second five-tuple list item, when next connection is set up, can create new filtering rule again, the data message is filtered, guaranteed that so to a greater extent the data channel that connects is not exposed, connect each time and all use different filtering rules that the data message through data card is filtered, guaranteed the high safety of the data in the computer system.
One of ordinary skill in the art will appreciate that all or part of step that realizes in the foregoing description method is to instruct relevant hardware to finish by program, described program can be stored in the computer read/write memory medium, this program is when carrying out, comprise step as above-mentioned method embodiment, described storage medium, as: ROM/RAM, magnetic disc, CD etc.
The above is a preferred implementation of the present invention; should be pointed out that for those skilled in the art, under the prerequisite that does not break away from principle of the present invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.