WikiPatents - Community Patent Review
Create Free Account  |  License or Sell Your Patent  |  WikiPatents Marketplace  |  WikiPatents Blog
Username:  Password:  
    
Advanced Search
Apparatus and method for electronic mail virus detection and elimination    
United States Patent5889943   
Link to this pagehttp://www.wikipatents.com/5889943.html
Inventor(s)Ji; Shuang (Foster City, CA); Chen; Eva (Cupertino, CA); Liang; Yung-Chang (Cupertino, CA); Tsai; Warren (Taipei, TW)
AbstractThe detection and elimination of viruses on a computer network is disclosed. An apparatus for detecting and eliminating viruses which may be introduced by messages sent through a postal node of a network electronic mail system includes polling and retrieval modules in communication with the postal node to determine the presence of unscanned messages and to download data associated with them to a node for treatment by a virus analysis and treatment module. A method for detecting and eliminating viruses introduced by an electronic mail system includes polling the postal node for unscanned messages, downloading the messages into a memory of a node, and performing virus detection and analysis at the node.
   














 Title Information Submit all comments and votes
 
Patent Text Patent PDF Print Page Summary File History
Plain text PDF images Print Summary File History
Drawing from US Patent 5889943
Apparatus and method for electronic mail virus detection and elimination - US Patent 5889943 Drawing
Apparatus and method for electronic mail virus detection and elimination
Inventor     Ji; Shuang (Foster City, CA); Chen; Eva (Cupertino, CA); Liang; Yung-Chang (Cupertino, CA); Tsai; Warren (Taipei, TW)
Owner/Assignee     Trend Micro Incorporated (TW)
Patent assignment
All assignments
Publication Date     March 30, 1999
Application Number     08/625,800
PAIR File History     Application Data   Transaction History
Image File Wrapper   Patent Term   Fees
Litigation
Filing Date     March 29, 1996
US Classification    
Int'l Classification    
Examiner     Beausoliel Jr.; Robert W.
Assistant Examiner     Wright; Norman
Attorney/Law Firm     Klivans; Norman R. Skjerven, Morrill, MacPherson, Franklin & Friel
Address
Parent Case     This application is a continuation-in-part of application Ser. No. 08/533,706, filed Sep. 26, 1995, now U.S. Pat. No. 5,623,600.
Priority Data    
USPTO Field of Search    
Patent Tags     electronic mail virus detection elimination
   
Enter a comma (,) or semicolon (;) between multiple tag words/phrases.
Describe this patent:
 Amusing   
 Clever   
 Complex   
 Efficient   
 Historic   
 Important   
 Innovative   
 Interesting   
 Practical   
 Simple   
[no votes]
Patent WIKI

Share information and news about this patent, including information and news about the technology, inventors, company, ligation and licensing.

 References Submit all comments and votes
 
*references marked with an asterisk below are user-added references
 U.S. References
 
Add a new US reference:  
ReferenceRelevancyCommentsReferenceRelevancyComments
 Foreign References
 Other References
 Market Review Submit all comments and votes
   
Market Size
Estimate the gross annual revenues of the relevant market sector:
> $10B
$5B - $10B
$2B - $5B
$500M - $2B
$100M - $500M
$10M - $100M
$1M - $10M
$500K - $1M
$100K - $500K
< $100K
[No votes]
$0
 
$0   $2.5B   $5B   $7.5B   $10B
Market Share
Estimate the percentage of the relevant market sector this invention will capture:
75% - 100%
50% - 74.99%
25% - 49.99%
10 - 24.99%
5 - 9.99%
2 - 4.99%
1 - 1.99%
< 1%
[No votes]
0.0%
 
0%   25%   50%   75%   100%
Reasonable Royalty
What percentage of gross sales should the inventor or assignee be paid?
75% - 100%
50% - 74.99%
25% - 49.99%
10 - 24.99%
5 - 9.99%
2 - 4.99%
1 - 1.99%
< 1%
[No votes]
0.0%
 
0%   25%   50%   75%   100%
Public's "Guesstimation" of Royalty Value
Market SizeN/A[No votes]
xMarket ShareN/A[No votes]
xReasonable RoyaltyN/A[No votes]

N/A

License Availablity
If you are NOT the owner or assignee, answer here:
Yes, license is available for purchase

No, license is not currently available



[No votes]
License Availablity
If you ARE the owner or assignee, answer here:
Yes, license is available for purchase

No, license is not currently available



[No votes]
Competitive Advantage
Does this invention have a significant competitive advantage over similar technologies?
Yes

No



[No votes]
Most helpful competitive advantage comment
[No comments]

Commercial Alternatives
Are there viable commercial alternatives for this invention?
Yes

No



[No votes]
Most helpful commercial alternative comment
[No comments]

 Technical Review Submit all comments and votes
 Claims Submit all comments and votes
 


What is claimed is:

1. An apparatus for detecting and selectively removing viruses in messages transferred using an electronic mail system, the apparatus comprising:

a message detecting module, for detecting the presence of a message; and

a virus analyzing module, in communication with the message detecting module, for determining whether data associated with the message contains a virus.

2. The apparatus of claim 1, further comprising:

a retrieval module, in communication with the message detecting module and the virus analyzing module, for obtaining a copy of the data associated with the message and providing the copy of data to the virus analyzing module.

3. The apparatus of claim 2, further comprising:

a virus treatment module, in communication with the virus analyzing module, for treating messages found to contain a virus.

4. The apparatus of claim 3, wherein the message is intended for access by a first node; the message detecting module, the retrieval module, the virus analyzing module, and the virus treatment module reside at the first node; and the message detected by the message detecting module resides at a second node.

5. The apparatus of claim 4, wherein the second node is a postal node in the electronic mail system.

6. The apparatus of claim 5, wherein the virus treatment module includes routines for replacing the attachment at the postal node with a cleaned attachment.

7. The apparatus of claim 1, wherein the message detecting module accesses a mailbox file in the detection of the message.

8. The apparatus of claim 7, wherein the message detecting module emulates polling routines used by the electronic mail system.

9. The apparatus of claim 4, wherein the message comprises a unique message identifier, a header, and at least one attachment.

10. The apparatus of claim 9, further comprising:

a data buffer, in communication with the retrieval module, for keeping a record associated with the message, the record including a first field for storing an indication of the unique message identifier and a second field for storing an indication of whether the message has been analyzed.

11. The apparatus of claim 9, wherein the virus treatment module includes routines for performing a preset action on the message when a virus is detected in the message.

12. The apparatus of claim 11, wherein the preset action performed by the virus treatment module comprises at least one of: allowing message access by the first node without changing the message, preventing message access by the first node, notifying a party regarding the presence of the virus, and modifying the message to remove the virus.

13. The apparatus of claim 12, wherein the message modification performed by the virus treatment module to remove the virus comprises at least one of: cleaning portions of the attachment, deleting the attachment, and stripping infected portions from the attachment.

14. The apparatus of claim 3, wherein the message is intended for access by a first node, the message detecting module and the virus treatment module reside at a server; and the virus treatment module includes routines for performing a preset action on the message when a virus is detected in the message.

15. The apparatus of claim 14, wherein the preset action performed by the virus treatment module comprises at least one of: allowing message access by the first node without changing the message, preventing message access by the first node, notifying a party regarding the presence of the virus, and modifying the message to remove the virus.

16. The apparatus of claim 15, wherein the message modification performed by the virus treatment module to remove the virus comprises at least one of: cleaning portions of an attachment to the message, deleting the attachment, and stripping infected portions from the attachment.

17. A method for detecting and selectively removing viruses in messages transferred using an electronic mail system, the method comprising:

detecting the presence of a message; and

analyzing the message to determine whether data associated with the message contains a virus.

18. The method of claim 17, further comprising the steps of obtaining a copy of the data associated with the mail message and providing the copy of data for analysis.

19. The method of claim 18, further comprising:

treating messages found to contain a virus.

20. The method of claim 19, wherein the message is intended for access by a first node; the steps of detecting the presence of a message and analyzing the message are undertaken at the first node; and the message that is detected resides at a second node.

21. The method of claim 20, wherein the second node is a postal node in the electronic mail system.

22. The method of claim 21, wherein the step of treating the message comprises:

replacing an attachment at the postal node with a cleaned attachment, the attachment corresponding to the message.

23. The method of claim 17, wherein the step of detecting the presence of a message comprises accessing a mailbox file.

24. The method of claim 23, wherein the step of detecting the presence of a message comprises emulating the polling routines used by the electronic mail system.

25. The method of claim 20, wherein the message comprises a unique message identifier, a header, and at least one attachment.

26. The method of claim 25, further comprising:

recording the unique message identifier in a data buffer to log whether the message has been analyzed.

27. The method of claim 25, wherein the step of treating the message comprises performing a preset action on the message when a virus is detected in the message.

28. The method of claim 27, wherein the step of performing a preset action comprises at least one of the steps of: allowing message access by the first node without changing the message, preventing message access by the first node, notifying a party regarding the presence of the virus, and modifying the message to remove the virus.

29. The method of claim 28, wherein the step of modifying the message to remove the virus comprises at least one of the steps of: cleaning portions of the attachment, deleting the attachment, and stripping infected portions from the attachment.

30. The method of claim 19, wherein the message is intended for access by a first node, the step of detecting the presence of a message is undertaken at a server; and the step of treating the message comprises performing a preset action on the message when a virus is detected in the message.

31. The method of claim 30, wherein the step of performing a preset action comprises at least one of the steps of: allowing message access by the first node without changing the message, preventing message access by the first node, notifying a party regarding the presence of the virus, and modifying the message to remove the virus.

32. The method of claim 31, wherein the step of modifying the message to remove the virus comprises at least one of the steps of: cleaning portions of the attachment, deleting the attachment, and stripping infected portions from the attachment.

33. An apparatus for detecting and selectively removing viruses in messages transferred using an electronic mail system, the apparatus comprising:

means for detecting the presence of a message;

means for analyzing the message to determine whether data associated with the message contains a virus.

34. The apparatus of claim 33, further comprising:

means for obtaining a copy of the data associated with the mail message.

35. The apparatus of claim 34, further comprising:

means for treating the message when the message is determined to contain a virus.

36. The apparatus of claim 35, wherein the message is intended for access by a first node; the means for detecting the presence of a message resides at the first node; and the message that is detected resides at a second node.

37. The apparatus of claim 36, wherein the second node is a postal node in the electronic mail system.

38. The apparatus of claim 37, wherein the means for treating the message comprises:

means for replacing an attachment at the postal node with a cleaned attachment, the attachment corresponding to the message.

39. The apparatus of claim 33, wherein the means for detecting the presence of a message comprises means for accessing a mailbox file.

40. The apparatus of claim 39, wherein the means for detecting the presence of a message emulates the polling routines used by the electronic mail system.

41. The apparatus of claim 36, wherein the message comprises a unique message identifier, a header, and at least one attachment.

42. The apparatus of claim 41, further comprising:

means for recording the unique message identifier in a data buffer to log whether the message has been analyzed.
 Description Submit all comments and votes
 


BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates generally to computer systems and computer networks. In particular, the present invention relates to a system and method for detecting and removing computer viruses. Still more particularly, the present invention relates to a system and method for detecting and removing computer viruses from file and message transfers between computer networks and to an apparatus and method for detecting and removing computer viruses from files and messages accessed by electronic mail through a network postal node.

2. Description of the Related Art

During the recent past, the use of computers has become widespread. Moreover, the interconnection of computers into networks has also become prevalent. Referring now to FIG. 1, a block diagram of a portion of a prior art information system 20 is shown. The portion of the information system 20 shown comprises a first network 22, a second network 24 and third network 26. This information system 20 is provided only by way of example, and those skilled in the art will realize that the information system 20 may include any number of networks, each of the networks being its own protected domain and having any number of nodes. As shown in FIG. 1, each of the networks 22, 24, 26 is formed from a plurality of nodes 30, 32. Each of the nodes 30, 32 is preferably a microcomputer. The nodes 30, 32 are coupled together to form a network by a plurality of network connections 36. For example, the nodes 30, 32 may be connected together using a token ring format, ethernet format or any of the various other formats known in the art. Each of the networks 22, 24, 26 includes a node 32 that acts as a gateway to link the respective network 22, 24, 26 to other networks 22, 24, 26. Each of the gateway nodes 32 is preferably coupled by a standard telephone line connection 34 such as POTS (Plain Old Telephone Service) or a T-1 link to the other gateway nodes 32 through a telephone switching network 28. All communication between the networks 22, 24, 26 is preferably performed through one of the gateway nodes 32.

Also of increasing prevalence is the use of electronic mail to access information. Referring now to FIG. 9, an electronic mail system 200 is shown to include a plurality of client nodes 230, which preferably are microcomputers, connected to a postal node 232 arranged to facilitate electronic mail accesses such as those between the client nodes 230. The postal node may also include a communications link 234 to another network or may communicate with additional postal nodes (not shown). Electronic mail may be accessed from the postal node 232 to single or multiple users, and may include simple messages or complex information including files with viruses.

One particular problem that has plagued computers, in particular microcomputers, have been computer viruses and worms. A computer virus is a section of code that is buried or hidden in another program. Once the program is executed, the code is activated and attaches itself to other programs in the system. Infected programs in turn copy the code to other programs. The effect of such viruses can be simple pranks that cause a message to be displayed on the screen or more serious effects such as the destruction of programs and data. Another problem in the prior art is worms. Worms are destructive programs that replicate themselves throughout disk and memory using up all available computer resources eventually causing the computer system to crash. Obviously, because of the destructive nature of worms and viruses, there is a need for eliminating them from computers and networks.

The prior art has attempted to reduce the effects of viruses and prevent their proliferation by using various virus detection programs. One such virus detection method, commonly referred to as behavior interception, monitors the computer or system for important operating system functions such as write, erase, format disk, etc. When such operations occur, the program prompts the user for input as to whether such an operation is expected. If such an operation is not expected (e.g., the user was not operating any program that employed such a function), the user can abort the operation knowing it was being prompted by a virus program. Another virus detection method, known as signature scanning, scans program code that is being copied onto the system. The system searches for known patterns of program code used for viruses. Currently, signature scanning only operates on the floppy disk drives, hard drives or optical drives. Yet another prior art approach to virus detection performs a checksum on all host programs stored on a system and known to be free from viruses. Thus, if a virus later attaches itself to a host program, the checksum value will be different and the presence of a virus can be detected.

Nonetheless, these approaches of the prior art suffer from a number of shortcomings. First, behavior interception is not successful at detecting all viruses because critical operations that may be part of the code for a virus can be placed at locations where such critical operations are likely to occur for the normal operation of programs. Second, most signature scanning is only performed on new inputs from disk drives. With the advent of the Internet and its increased popularity, there are no prior art methods that have been able to successfully scan connections 36 such as those utilized by a gateway node in communicating with other networks. Third, many of the above methods require a significant amount of computing resources, which in turn degrades the overall performance of system. Thus, operating the virus detection programs on every computer becomes impractical. Therefore, the operation of many such virus detection programs is disabled for improved performance of individual machines.

Therefore, there is a need for a system and method for effectively detecting and eliminating viruses without significantly effecting the performance of the computer. Moreover, there is a need for a system and method that can detect and eliminate viruses in networks attached to other information systems by way of gateways or the Internet.

Another problem of increasing significance is the spread of computer viruses through electronic mail communications, including intra-network electronic mail accesses which do not need to pass through a network gateway node 33. The referenced prior art shortcomings are also present in the detection and prevention of the spread of viruses through electronic mail. Additionally problematic are electronic mail access by multiple users which may exponentially increase the potential for the spread of viruses, the detection of viruses on encoded or encrypted files, the tendency of computer users not to undertake virus detection and user impatience during virus detection intervals.

Therefore, there is also a need for an apparatus and method for detecting viruses which may be spread through electronic mail communications. Moreover, there is a need for such an apparatus and method which can prevent multiplied virus spreading, facilitate encoded file virus detection, trigger without requiring user intervention and operate in the background.

SUMMARY OF THE INVENTION

The present invention overcomes the limitations and shortcomings of the prior art with systems, apparatuses and methods for detecting and eliminating viruses on a computer network.

A system including the present invention is a network formed of a plurality of nodes and a gateway node for connection to other networks. The nodes are preferably microcomputers, and the gateway node comprises: a display device, a central processing unit, a memory forming the apparatus of the present invention, an input device, a network link and a communications unit. The memory further comprises an operating system including a kernel, a File Transfer Protocol (FTP) proxy server, and a Simple Mail Transfer Protocol (SMTP) proxy server. The central processing unit, display device, input device, and memory are coupled and operate to execute the application programs stored in the memory. The central processing unit of the gateway node also executes the FTP proxy server for transmitting and receiving files over the communications unit, and executes the SMTP proxy server for transmitting and receiving messages over the communications unit. The FTP proxy server and SMTP proxy server are preferably executed concurrently with the normal operation of the gateway node. The servers advantageously operate in a manner such that viruses transmitted to or from the network in messages and files are detected before the files are transferred into or from the network. The gateway node of the present invention is particularly advantageous because the impact of using the FTP proxy server and SMTP proxy server for the detection of viruses is minimized because only the files leaving or entering the network are evaluated for the presence of viruses and all other "intra"-network traffic is unaffected.

The present invention also comprises a method for processing a file before transmission into the network and a method for processing a file before transmission from the network. The preferred method for processing a file comprises the steps of: receiving the data transfer command and file name; transferring the file to the proxy server; performing virus detection on the file; determining whether the file contains any viruses; transferring the file from the proxy server to a recipient node if the file does not contain a virus; and performing a preset action with the file if it does contain a virus. The present invention also includes methods for processing messages before transmission to or from the network that operate in a similar manner.

The present invention also comprises an apparatus for detecting and eliminating viruses which may spread throughout a network in messages accessed with an electronic mail system. In such mail systems, messages directed to a user at a client node are typically stored a postal node prior to their access by the client node. Viruses are detected and corrective action taken by a mail scanning apparatus which preferably resides at the client node. The mail scanning apparatus preferably includes: a polling module for determining the presence of unread messages at the postal node, a retrieval module for downloading unread messages to the memory of a client node and a virus analysis and treatment module for determining whether the message contains a virus and for facilitating corrective action to prevent its spread. Preferably, these modules are arranged to operate without requiring action by any electronic mail program files local to the client node to accommodate unobtrusive virus detection in the background and operation without user initiation or triggering. Additionally, the preferable location of the mail scanning apparatus at the client node accommodates virus detection without consuming postal node resources.

The present invention also comprises a method for detecting and eliminating viruses which may spread throughout a network in messages accessed by an electronic mail system. Preferably, the postal node is polled from the client node for unread messages, unread messages are downloaded into the memory of a client node, the messages are scanned for the presence of viruses, and corrective action taken.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of a prior art information system with a plurality of networks and a plurality of nodes upon which the present invention operates;

FIG. 2 is a block diagram of a preferred embodiment for a gateway node including the apparatus of the present invention;

FIG. 3 is a block diagram of a preferred embodiment for a memory of the gateway node including the apparatus of the present invention;

FIG. 4 is a block diagram of a preferred embodiment for a protocol layer hierarchy constructed according to the present invention compared to the OSI layer model of the prior art;

FIG. 5A is a functional block diagram showing a preferred system for sending data files according to a preferred embodiment of the present invention;

FIG. 5B is a functional block diagram showing a preferred system for receiving data files according to a preferred embodiment of the present invention;

FIGS. 6A, 6B and 6C are a flowchart of the preferred method for performing file transfer according to the present invention;

FIG. 7 is a functional block diagram showing a preferred system for transmitting mail messages according to a preferred embodiment of the present invention;

FIGS. 8A and 8B are a flow chart of a preferred method for sending messages to/from a network;

FIG. 9 is a block diagram of a prior art network electronic mail system.

FIG. 10a is a block diagram of a postal node constructed according to the present invention;

FIG. 10b is a block diagram of a memory of the postal node constructed according to the present invention;

FIG. 10c is a block diagram of a data storage device of the postal node constructed according to the present invention;

FIG. 11a is a block diagram of a preferred embodiment for a client node including the present invention;

FIG. 11b is a block diagram of a preferred embodiment for the memory of the client node according to the present invention;

FIG. 11c is a block diagram of a preferred embodiment for the mail scanning module of the present invention;

FIG. 11d is a graphical representation of a preferred format for storing data in the data buffer;

FIG. 12 is a flow chart of a first and preferred embodiment of the method for scanning electronic mail messages according to the present invention;

FIG. 13 is a flow chart of a second embodiment of the method for scanning electronic mail messages according to the present invention;

FIG. 14 is a flow chart of a preferred method for scanning an attachment file of an electronic mail message according to the present invention; and

FIG. 15 is a flow chart of a preferred method for treating an infected attachment file according to the present invention to remove viruses.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

The virus detection system and method of the present invention preferably operates on an information system 20 as has been described above with reference to FIG. 1. The present invention, like the prior art, preferably includes a plurality of node systems 30 and at least one gateway node 33 for each network 22, 24, 26. However, the present invention is different from the prior art because it provides novel gateway node 33 that also performs virus detection for all files being transmitted into or out of a network. Furthermore, the novel gateway node 33 also performs virus detection on all messages being transmitted into or out of an associated network.

Referring now to FIG. 2, a block diagram of a preferred embodiment of the novel gateway node 33 constructed in accordance with the present invention is shown. A preferred embodiment of the gateway node 33 comprises a display device 40, a central processing unit (CPU) 42, a memory 44, a data storage device 46, an input device 50, a network link 52, and a communications unit 54. The CPU 42 is connected by a bus 56 to the display device 40, the memory 44, the data storage device 46, the input device 50, the network link 52, and the communications unit 54 in a von Neumann architecture. The CPU 42, display device 40, input device 50, and memory 44 may be coupled in a conventional manner such as a personal computer. The CPU 42 is preferably a microprocessor such as an Motorola 68040 or Intel Pentium or X86 type processor; the display device 40 is preferably a video monitor; and the input device 50 is preferably a keyboard and mouse type controller. The CPU 42 is also coupled to the data storage device 44 such as a hard disk drive in a conventional manner. Those skilled in the art will realize that the gateway node 33 may also be a mini-computer or a mainframe computer.

The bus 56 is also coupled to the network link 52 to facilitate communication between the gateway node 33 and the other nodes 30 of the network. In the preferred embodiment of the present invention, the network link 52 is preferably a network adapter card including a transceiver that is coupled to a cable or line 36. For example, the network link 52 may be an ethernet card connected to a coaxial line, a twisted pair line or a fiber optic line. Those skilled in the art will realize that a variety of different networking configurations and operating systems including token ring, ethernet, or arcnet may be used and that the present invention is independent of such use. The network link 52 is responsible for sending, receiving, and storing the signals sent over the network or within the protected domain of a given network. The network link 52 is coupled to the bus 56 to provide these signals to the CPU 34 and vice versa.

The bus 56 is also coupled to the communications unit 54 to facilitate communication between the gateway node 33 and the other networks. Specifically, the communications unit 54 is coupled to the CPU 42 for sending data and message to other networks. For example, the communications unit 54 may be a modem, a bridge or a router coupled to the other networks in a conventional manner. In the preferred embodiment of the present invention, the communications unit 54 is preferably a router. The communications unit 54 is in turn coupled to other networks via a media 34 such as a dedicated T-1 phone line, fiber optics, or any one of a number of conventional connecting methods.

The CPU 42, under the guidance and control of instructions received from the memory 44 and from the user through the input device 50, provides signals for sending and receiving data using the communications unit 54. The transfer of data between networks is broken down into the sending and receiving files and messages which in turn are broken down into packets. The methods of the present invention employ a virus detection scheme that is applied to all transfers of messages and files into or out of a network via its gateway node 33.

Referring now to FIG. 3, the preferred embodiment of the memory 44 for the gateway node 33 is shown in more detail. The memory 44 is preferably a random access memory (RAM), but may also include read-only memory (ROM). The memory 44 preferably comprises a File Transfer Protocol (FTP) proxy server 60, a Simple Mail Transfer Protocol (SMTP) proxy server 62, and an operating system 64 including a kernel 66. The routines of the present invention for detecting viruses in file transfers and messages primarily include the FTP proxy server 60 and the SMTP proxy server 62. The FTP proxy server 60 is a routine for controlling file transfers to and from the gateway node 33 via the communications unit 54, and thus controlling file transfers to and from a given network of which the gateway node is a part. The operation of the FTP proxy server 60 is described below in more detail with reference to FIGS. 5A, 5B, 6A, 6B and 6C. Similarly, the SMTP proxy server 62 is a routine for controlling the transfer of messages to and from the gateway node 33, and thus to and from the respective network associated with the gateway node 33. The operation of the SMTP proxy server 62 is described below in more detail with reference to FIGS. 7 8A and 8B. The present invention preferably uses a conventional operating system 28 such as Berkeley Software Distribution UNIX. Those skilled in the art will realize how the present invention may be readily adapted for use with other operating systems such as Macintosh System Software version 7.1, DOS, Windows or Windows NT. The memory 44 may also include a variety of different application programs 68 including but not limited to computer drawing programs, word processing programs, and spreadsheet programs. The present invention is particularly advantageous over the prior because it minimizes the impact of virus detection and elimination since the FTP proxy server 60 and SMTP proxy server 62 are preferably only included or installed in the memory 44 of the gateway nodes 33. Thus, all data being transferred inside the protected domain of a given network will not be checked because the data packets might not be routed via the gateway node 33.

While the apparatus of the present invention, in particular the FTP proxy server 60 and SMTP proxy server 62, has been described above as being located and preferably is located on the gateway node 33, those skilled in the art will realize that the apparatus of the present invention could also be included on a FTP server or a world wide web server for scanning files and messages as they are downloaded from the web. Furthermore, in an alternate embodiment, the apparatus of the present invention may be included in each node of a network for performing virus detection on all messages received or transmitted from that node.

As best shown in FIG. 4, the CPU 42 also utilizes a protocol layer hierarchy to communicate over the network. The protocol layers of the hierarchy of the present invention are shown in FIG. 4 in comparison to the ISO-OSI reference model, for example. The protocol layers 410-426 of the hierarchy of the present invention are similar to the prior art protocol layers for the lower four layers 400-403 including: (1) a physical layer 400 formed of the transmission media 410; (2) a data link layer 401 formed of the network interface cards 411; (3) a network layer 402 formed of address resolution 412, Internet protocol 413 and Internet control message protocol 414; and (4) a transport layer 403 formed of the transmission control protocol 415 and a user datagram protocol 416. Corresponding to the presentation 405 and session 404 layers, the protocol hierarchy of the present invention provides four methods of communication: a file transfer protocol 417, a simple mail transfer protocol 419, a TELNET protocol 419 and a simple network management protocol 420. There are corresponding components on the application layer 406 to handle file transfer 423, electronic mail 424, terminal emulation 425, and network management 426. The present invention advantageously detects, controls and eliminates viruses by providing an additional layer between the application layer 406 and the presentation layer 405 for the gateway nodes 33. In particular, according to the hierarchy of the present invention, a FTP proxy server layer 421 and a SMTP proxy server layer 422 are provided. These layers 421, 422 operate in conjunction with the file transfer layer 423 and file transfer protocol 417, and the electronic mail layer 424 and the SMTP protocol layer 418, to process file transfers and messages, respectively. For example, any file transfer requests are generated by the file transfer application 423, first processed by the FTP proxy server layer 421, then processed by the file transfer protocol 417 and other lower layers 415, 413, 411 until the data transfer is actually applied to the transmission media 410. Similarly, any messaging requests are first processed by the SMTP proxy server layer 418, and thereafter processed by the SMTP protocol and other lower layers 415, 413, 411 until the physical layer is reached. The present invention is particularly advantageous because all virus screening is performed below the application level. Therefore, the applications are unaware that such virus detection and elimination is being performed, and these operations are completely transparent to the operation of the application level layers 406. While the FTP proxy server layer 421 and the SMTP proxy server layer 422 have been shown in FIG. 4 as being their own layer to demonstrate the coupling effects they provide between the file transfer layer 423 and file transfer protocol 417, and the electronic mail layer 424 and the SMTP protocol layer 418, those skilled in the art will realize that the FTP proxy server layer 421 and the SMTP proxy server layer 422 can also be correctly viewed as being part of the file transfer protocol layer 417 and the SMTP protocol layer 418, respectively, because they are invisible or transparent to the application layer 406.

A preferred method of operation and an embodiment for the FTP proxy server 60 will be described focusing on its relationship to and its control of the gateway node 33, and thus, control over access to the medium, line 34, for connections to other networks. The method can best be understood with reference to FIGS. 5A and 5B, that graphically show the functions performed by an Internet daemon 70, the FTP proxy server 60, and an FTP daemon 78, each of which resides on the gateway note 33. In FIGS. 5A and 5B, like reference numbers have been used for like parts and the figures are different only in the direction in which the file is being transferred (either from client task 72 to server task 82 or from server task 82 to client task 72). For the sake of clarity and ease of understanding only the data ports are shown in FIGS. 5A and 5B, and the bi-directional lines represent command or control pathways and are assumed to include a command port although it is not explicitly shown. The operation FTP proxy server 60 will now be described with reference to a file transfer between a client task 72 (requesting machine) and a server task 82 (supplying machine). While it is assumed that the client task 72 (requesting machine) is inside a protected domain and the server task 82 (supplying machine) is outside the protected domain, the invention described below is also used by the gateway node 33 when client task 72 (requesting machine) is outside the protected domain and the server task 82 (supplying machine) is inside the protected domain.

FIGS. 6A-6C are a flowchart of a preferred method for performing file transfers from a controlled domain of a network across a medium 34 to another network (e.g., a file transfer from a node 32 of the second network 24 across the media 34 to a second node 32 of the third network 26). The method begins with step 600 with the client node sending a connection request over the network to the gateway node 33. In step 602, The gateway node 33 preferably has an operating system 64 as described above, and part of the operating system 64 includes a fire wall, or program including routines for authenticating users. The gateway node 33 first tries to authenticate the user and decide whether to allow the connections requested, once the request is received. This is done in a conventional manner typically available as part of UNIX. The Internet daemon 70 creates an instance of the FTP proxy server 60 and passes the connection to the FTP proxy server 60 for servicing in step 602. The Internet daemon 70 is program that is part of the operating system 64, and it runs in the background. When being run, one of the functions of the Internet daemon 70 is to bind socket ports for many well-known services, such as TELNET, login, and FTP. When a connect request is detected, the Internet daemon 70 constructed in accordance with the present invention, spawns the FTP proxy server 60, which is the server that will actually handle the data transfer. Thereafter, the FTP proxy server 60 controls the network traffic passing between the client task 72 and the server task 82. Then in step 604, the client node sends a data transfer request and file name, and established a first data port 76 through which the data will be transferred between the FTP proxy server 60 and the client task 72. In step 606 the data transfer request and file name are received by the FTP proxy server 60. In step 608, the FTP proxy server 60 determines whether the data is being transferred in an outbound direction (e.g., the file is being transferred from the client task 72 to the server task 82). This can be determined by the FTP proxy server 60 by comparing the data transfer request. For example, if the data transfer request is the STOR command then the data is being transferred in an outbound direction; and if the data transfer request is the RETR command then the data is not being transferred in an outbound direction.

If the data is being transferred in an outbound direction, then the method transitions from step 608 to step 610. Referring now to FIG. 6B in conjunction with FIG. 5A, the process for transferring data out of the protected domain of the network is described in more detail. In step 610, the FTP proxy server 60 determines whether the file to be transferred is of a type that can contain viruses. This step is preferably performed by checking the extension of the file name. For example, .txt, .bmd, .pcx and .gif extension files indicate that the file is not likely to contain viruses while .exe, .zip, and .com extension files are of the type that often contain viruses. If the file to be transferred is not of a type that can contain viruses, then the method continues in step 612. In step 612, a second data port 80 is established and the data transfer request & the file are sent from the FTP proxy server 60 to the FTP daemon 78 so that the file can be sent to the server task 82. The FTP daemon 78 is a program executed by the gateway node 33 that communicates the transfer commands to the server task 82, establishes a third port 84 for sending the file including binding the server task 82 and FTP daemon 78 to the third port 84, and transmits the file to the server task 82. Once transmitted, the method is complete and ends. However, if it is determined in step 610 that the file to be transferred is of a type that can contain viruses, the method proceeds to step 614. In step 614, the FTP proxy server 60 transfers the file from the client to the FTP proxy server 60 through the first port 76, and in step 616, the file is temporarily stored at the gateway node 33. Then in step 618, the temporarily stored file is analyzed to determine if it contains viruses. This is preferably done by invoking a virus-checking program on the temporarily stored file. For example, a program the performs a version of signature scanning virus detection such as PC-Cillin manufactured and sold by Trend Micro Devices Incorporated of Cupertino, Calif. may be used. However, those skilled in the art will realize that various other virus detection methods may also be used in step 618. In step 620, output of the virus checking program is preferably echoed to the user/client task 72 by the FTP proxy server 60 as part of a reply message. Next in step 622, the method determines whether any viruses were detected. If no viruses are detected, the method continues in step 612 and transmits the file as has been described above. However, if a virus is detected, the present invention advantageously allows the FTP proxy server 60 to respond in any number of a variety of ways. The response of the FTP proxy server 60 is determined according to user's needs and wants as specified in a configuration file. This configuration file is preferably fully modifiable according to input from the user and stored in memory 44. For example, some options the user might specify are: 1) to do nothing and transfer the file; 2) to delete or erase the temporary file and do not transfer the file; or 3) to rename the file and store it in a specified directory on the gateway node 33 and notify the user of the new file name and directory path which can used to manually request the file from the system administrator. Those skilled in the art will realize that there are variety of other alternatives that users might specify, and steps 624, 626, and 628 are provided only by way of example. Next in step 624, the configuration file is retrieved to determine the handling of the temporary file. In step 626, the FTP proxy server 60 determines if it is to ignore the existence of a virus and a continue the transfer. If so, the method continues in step 612 where the file is passed to the FTP daemon 78 and the temporary file is deleted. If not the method continues to step 628 where either the file is deleted and not sent to the server task 82, and the temporary file is erased from the gateway node 33; or the file is renamed and stored in a specified directory on the gateway node 33 and the user is notified of the new file name and directory path which can used to manually request the file from the system administrator, and the temporary file is erased the gateway node 33. The action taken in step 628 depends on the configuration settings as determined in step 624. After step 628, the method ends. As can be seen from FIG. 5A, the path for the file is from client task 72 through the first data port 76 to the FTP proxy server 60, then to the FTP daemon 78 through the second data port 80 and finally to the server task 82 through the third data port 84.

Referring back to step 608 of FIG. 6A, if the data is not being transferred in an outbound direction, then the method transitions from step 608 to step 640. Referring now to FIG. 6C in conjunction with FIG. 5B, the process for transferring data into the protected domain of the network is described in more detail. In step 640, the FTP proxy server 60 next sends the data transfer request and file name first to the FTP daemon 78 and then on to the server task 82. In step 642, a second port 80 is established between the FTP proxy server 60 and the FTP daemon 78. Then a third data port 84 is established between the FTP daemon 78 and the server task 82. Both ports 80, 84 are established similar to the establishment of the first port 76. The FTP daemon 78 will request and obtain the third port 84 from the Internet daemon 70, and send a port command to the server task 82 including an address for the third port 84. The server task 82 will then connect to the third port 84 and begin the data transfer in step 644. The FTP daemon 78 in turn sends the file to the FTP proxy server 60. Next in step 646, the FTP proxy server 60 determines whether the file to be transferred is of a type that can contain viruses. This is done the same was as described above with reference to step 610. If the file to be transferred is not of a type that can contain viruses, then the method continues in step 648 where the file is transferred from the FTP proxy server 60 through the first port 76 to the client task 72, then the method is complete and ends. On the other hand, if the file to be transferred is a type that can contain viruses, the method in step 650 temporarily stores the file at the gateway node. Then in step 652, the temporarily stored file is analyzed to determine if it contains viruses. The analysis here is the same as step 618. In step 652, the output of the virus checking program is preferably echoed to the client task 72 by the FTP proxy server 60 as part of a reply message. Next in step 656, the method determines whether any viruses were detected. If no viruses are detected, the method continues in step 648 as has been described above. However, if a virus is detected, the present invention retrieves the configuration file to determine the handling of the temporary file. In step 660, the FTP proxy server 60 determines if it is to ignore the existence of a virus and a continue the file transfer. If so the method continues in step 648 where the file is passed to the client task 72 and the temporary file is erased. If not the method continues to step 662 where the temporary file is erased, and the file is either deleted and not sent to the client task 72 or the file is renamed, stored on the gateway node 33, and the client task 72 is notified of new name and path so that the file may be manually retrieved by the system administrator. The method then ends. As can be seen from FIG. 5B, the data transfer request is passed from the client task 72, to the FTP proxy server 60, then to the FTP daemon 78, and to the server task 82 which in response sends the file through the third port to the FTP daemon 78, and through the second port 80 on to the FTP proxy server 60, and finally through the first port 76 to the client task 72.

Referring now to FIGS. 7, 8A and 8B, the operation of the SMTP proxy server 62 will now be described. The SMTP proxy server 62 controls the only other entry channel through which data, and therefore viruses, can enter the protected domain of a given network. The SMTP proxy server 62 is preferably a program that resides on the gateway node 33, and controls and handles all transfers of electronic messages or mail in and out of the network through the communications unit 54 and media 34. While the SMTP proxy server 62 will now be described with reference to the transfer of a mail message from a client task 92 within the protected domain of the network to a server task 102 at a node on a different network outside the protected domain, those skilled in the art will understand how the SMTP proxy server 62 handles incoming mail messages in the same way. All mail messages are handled by the SMTP proxy server 62 in the same way and only the designation of which node 32 is the server and which is the client change depending on the direction the message is being sent from the perspective of the gateway node 33. Since mail messages are passed using the command pathways between nodes, only these pathways are shown in FIG. 7. For ease of understanding, the command ports have not been shown in FIG. 7, but will be discussed below in the relevant steps of the preferred method.

Referring now to FIG. 8A, the preferred method of the present invention for sending electronic mail begins in step 802 with the spawning or running the SMTP proxy server 62. Next in step 804, a first command port 96 for communication between the client task(s) 92 and the SMTP proxy server 62 is created. The address of the first port 96 along with a port command is provided to the SMTP proxy server 62. Then in step 806, the SMTP proxy server 62 is bound to the first port 96 to establish a channel for sending a mail message between any client tasks and the SMTP proxy server 62. Next in step 808, the SMTP proxy server 62 spawns a SMTP daemon 98 or SMTP server. The SMTP daemon 98 is preferably the existing program "sendmail" that is part of the BSD UNIX operating system. This is particularly advantageous because it reduces the amount of code that needs to be written and assures compatibility with the lower layers of the OSI reference model. Then in step 810 a second command port is created for communication between the SMTP proxy server 62 and the SMTP daemon 98. In step 812, the SMTP daemon 98 is bound to the second command port for communication with the SMTP proxy server 62. Actually, the present invention binds the SMTP daemon 98 to the appropriate port, namely the second port by redefining the bind function in a shared library that is part of the operating system 64. The present invention advantageously exploits the fact that the SMTP daemon 98 (sendmail programs on most UNIX systems) are dynamically linked. The present invention utilizes a shared library which redefines the system call bind() and forces sendmail to link with the redefined version of the bind() call when executed. If the redefined version of the bind() call determines the SMTP daemon 98 (sendmail program) is trying to bind to the first command port (the smtp port), it will return to it a socket whose other end is the SMTP proxy server 62 (a socket to the second command port). Next in step 800, the client task 92 request a connection from the SMTP proxy server and is directed to used the first command port for communication. Then in step 818, the message is transmitted from the client task 92 through the first command port to the SMTP proxy server 62.

Referring now to FIG. 8B, the method continues in step 820 with the SMTP proxy server 62 scanning the message body and checking for any portions that are encoded. The present invention preferably scans the message for portions that have been encoded with an "uuencoded" encoding scheme that encodes binary data to ASCII data. "Uuencoded" portions of messages usually start with a line like "begin 644 filename," and end with a line like "end." The existence of such encoded portions suggests the possibility that a file may contain viruses. This scanning for "uuencoded" portions is just one of many scanning techniques that may be used, and those skilled in the art will realize that the present invention could be modified to scan for other encoded portions such as those encoded according to other schemes such as mime. Next in step 822, the SMTP proxy server 62 determines whether the message includes any encoded portions. If the message does not include any encoded portions, the SMTP proxy server 62 transmits the message through the second command port to the SMTP daemon 98 in step 824. Next in step 814, the SMTP daemon 98 creates a third command port for communication between the SMTP daemon 98 and the server task 102. Then in step 816 the server task 102 is bound to the third command port to establish communication between the server task 102 and the SMTP daemon 98. Those skilled in the art will realize that if the server task 102 resides on the gateway node 33, then steps 814 and 816 are not needed and may be omitted since no further transfer of data across the network is needed. Then the SMTP daemon 98 transmits the message through the third command port to the server task 102 in step 826 thereby completing the method.

On the other hand if in step 822 it is determined the message does include encoded portions, the SMTP proxy server 62 stores each of the encoded portions of the message in its own temporary file at th