# Patent

## Title
Detecting and defending against man-in-the-middle attacks

## Abstract

A system, method and program product for defending against man in the middle (MITM) attacks directed at a target server. A system is provided that includes an activity recording system that records an incoming IP address, userid, and time of each session occurring with the target server; an activity analysis system that identifies suspect IP addresses by determining if an unacceptable number of sessions are occurring from a single incoming IP address during a predefined time period; and a countermeasure system for taking action against suspect IP addresses.

## Background
CROSS-REFERENCE TO RELATED APPLICATION
This Application is a continuation of currently pending U.S. patent application Ser. No. 11/753,673, which was filed on May 25, 2007 and is hereby incorporated by reference.


FIELD OF THE INVENTION
This disclosure relates generally to protecting the integrity of network communications, and more particularly to a system and method of detecting and defending against man-in-the-middle (MITM) attacks.
BACKGROUND
One of the most difficult network-based attacks to defend against is that of a class known as “man-in-the-middle” (MITM) attacks. These scenarios involve the insertion by an attacker of an untrusted node into a session path. This MITM attack node then impersonates the identity of one session partner to the other while having access to and control over all transmissions between the partners resulting in the potential for eavesdropping and unauthorized modification of session traffic. These attacks are particularly effective when combined with “phishing” techniques which trick an end user into giving up personal information that later results in identity theft or fraud.
FIG. 2 depicts an example of an MITM attack, in which a plurality of users 50 are unsuspectingly engaged in sessions with an MITM Web server 52, which sits between users 50 and the legitimate target Web server 54. In this case, MITM Web server 52 has lured users 50 into believing that they are engaging in a session with the target Web server 54.
Banks and other financial institutions have been particularly hard hit by these attacks as customers are lured into logging onto a malicious MITM node thinking they are connecting to their bank, while the MITM node interacts with the legitimate web site and relays information to the user making the ruse even more believable. It is this last aspect that is particularly distressing to banks as they do not have a good way to detect that they are dealing with an MITM node rather than directly with their customer. Because the attacker's MITM machine looks and acts just like a real end user, the MITM machine acts as a conduit for sensitive information such as userids and passwords and, potentially, for conducting transactions.
While digital certificates could provide a reasonable measure of protection in such an instance, they have thus far proven to be difficult and expensive to deploy and manage across a large end user base especially when those users may have limited technical skills and may also be highly mobile, using many different nodes to conduct transactions.
Another increasingly popular defense is to use “strong” authentication mechanisms such as security tokens, smart cards or biometrics to ensure that the end user is who they claim to be. The problem with these defenses is that in the MITM case, the digitized authentication data is simply passed directly through the intermediate node making it unnecessary for the attacker to actually possess the token, smart card or physical characteristic being measured.
Finally, another technique for alerting end users that they are being lured into logging into a bogus Web site involves the presentation of a graphical image pre-selected by the user. During login, if the user does not see the image they selected during registration (something which only they and the legitimate Web site should know), then they know to abort the authentication process. However, in an MITM case, the target Web site presents the image to the MITM node thinking it is the end user and the MITM node relays this image to the real end user leading them to believe that the attack node is legitimate.
BRIEF SUMMARY OF THE INVENTION
The present invention relates to a system, method and program product for detecting man in the middle attacks. In one embodiment, there is a system for defending against man in the middle (MITM) attacks directed at a target server, comprising: an activity recording system that records an incoming IP address, userid, and time of each session occurring with the target server; an activity analysis system that identifies suspect IP addresses by determining if an unacceptable number of sessions are occurring from a single incoming IP address during a predefined time period; and a countermeasure system for taking action against suspect IP addresses.
In a second embodiment, there is a computer program product stored on a computer readable medium, which when executed includes program instructions for defending against man in the middle (MITM) attacks directed at a target server, the program product comprising: program instructions for recording an incoming IP address, userid, and time of each session occurring with the target server; program instructions for identifying suspect IP addresses by determining if an unacceptable number of sessions are occurring from a single incoming IP address during a predefined time period; and program instructions for taking defensive action against suspect IP addresses.
In a third embodiment, there is method for defending against man in the middle (MITM) attacks directed at a target server, comprising: recording an incoming IP address, userid, and time of each session occurring with the target server; identifying suspect IP addresses by determining if an unacceptable number of sessions are occurring from a single incoming IP address during a predefined time period; and taking defensive action against suspect IP addresses.
In a fourth embodiment, there is a method for deploying a system for defending against man in the middle (MITM) attacks directed at a target server, comprising: providing a computer infrastructure being operable to: record an incoming IP address, userid, and time of each session occurring with the target server; identify suspect IP addresses by determining if an unacceptable number of sessions are occurring from a single incoming IP address during a predefined time period; and take defensive action against suspect IP addresses.
MITM attacks of the sort described herein share a detectable characteristic that can be used to predict to some reasonable certainty that an attack is taking place. Once detected, defensive action can be taken, such as sending a message that will be relayed by the MITM node to the user informing the user of the potential vulnerability and ending the session.
The observable characteristic shared by successful MITM attacks is that to the target server it will appear that a large number of different end users have for no apparent reason begun logging on from the same IP address, i.e., the address of the MITM proxy. If, for instance, certain definable thresholds were exceeded such as N number of userids from a single, previously unknown address within a specific interval of time, then further investigation or even automated defenses would be warranted.
Some advantages to this technique include: the thresholds can be tuned to suit the risk tolerance of the target organization; detection can be automated; countermeasures can be automated to limit further damage; automated detection and response allows for constant vigilance by providing a continuous, 24×7 defense; the basic technique can be extended beyond web spoofing/phishing attacks to other types of MITM scenarios; the more “successful” the attacker is at luring victims, the more likely the attack will be detected and repelled
The illustrative aspects of the present invention are designed to solve the problems herein described and other problems not discussed.



BRIEF DESCRIPTION OF THE DRAWINGS
These and other features of this invention will be more readily understood from the following detailed description of the various aspects of the invention taken in conjunction with the accompanying drawings.
FIG. 1 depicts a computer system having an MITM defense system in accordance with an embodiment of the present invention.
FIG. 2 depicts an example of an MITM attack.
FIG. 3 depicts an example of an IP address/userid table in accordance with an embodiment of the present invention.
FIG. 4 depicts a flow diagram showing an illustrative implementation of an embodiment of the present invention.



The drawings are merely schematic representations, not intended to portray specific parameters of the invention. The drawings are intended to depict only typical embodiments of the invention, and therefore should not be considered as limiting the scope of the invention. In the drawings, like numbering represents like elements.
DETAILED DESCRIPTION
FIG. 1 depicts a computer system 10 that provides an MITM defense system 18 for a target server 32 communicating with a user 38 via network node 40. In particular, MITM defense system 18 analyzes the IP address 42 of network node 40 to determine whether network node 40 is a legitimate node associated with user 38 or an MITM server that has interposed itself between the user 38 and target server 32. Note that in this illustrative embodiment, computer system 10 containing MITM defense system 18 is shown separated from target server 32. However, it is understood that MITM defense system 18 may be integrated with target server 32 in a single system.
As noted above, an observable characteristic shared by successful MITM attacks is that it will appear to the target server 32 that a large number of different end users have for no apparent reason begun logging on from the same IP address 42, i.e., the address of the MITM server. While this behavior alone will not conclusively indicate malicious activity, identifying and analyzing such behavior can allow for further investigation or countermeasures to be taken. For instance, definable thresholds involving the allowed number of user IDs from a single, previously unknown address within a specific interval of time can be put in place to identify suspicious activity. When a threshold is exceeded, then further investigation or even automated defenses can be implemented.
As shown in this illustrative embodiment, MITM defense system 18 includes a list checking system 22, an activity recording system 24, an IP address activity analysis system 26, and a countermeasure system 28. List checking system 22 is utilized to compare an incoming IP address 42 with either or both a white list 33 and a black list 34. The white list 33 may include a list of known IP addresses that are valid, and need not be analyzed (e.g., the IP address associated with a known legitimate proxy, etc.). The black list 34 may include a list of known IP addresses that are invalid (e.g., sites that are known to have caused attacks in the past). When an IP address 42 is found on the black list 34, the session can, e.g., be immediately terminated.
Activity recording system 24 is utilized to store IP addresses and timing information for sessions occurring with the target server 32. This information is stored in an IP address/userid table 36, which can then be used by IP address activity analysis system 26. IP address/userid table 36 may be implemented in any format that can track userids, login time, and IP addresses.
One possible implementation would involve a hash tree that indexes IP addresses such that each address points to a linked list of userids (and associated login times) that have logged onto the particular IP address. FIG. 3 depicts an illustrative embodiment of such an implementation involving three linked lists 60 for IP Addr 1, IP Addr 2, and IP Addr 3. As can be seen for the first IP address 62 (Addr 1), there have been two logins 64 by userid 9 and userid 2. For each login, there is an associated login time.
IP address activity analysis system 26 (FIG. 1) is utilized to examine the IP address/userid table 36 to identify any IP addresses that have an unusually large number of logins during some predefined time period. For example, threshold values may be utilized that would be customizable by the target organization based on their tolerance for risk (much like a biometric system or intrusion detection system must be tuned to minimize false positives while not overlooking real attacks). These observed values and associated thresholds could be expressed as follows:
N=number of userids logging in from the given IP address
Nt=threshold of acceptable number of userids logging in from any given IP address
T=time interval over which logins from a given IP address have been attempted
Tt=time interval threshold triggering suspicion
Then, the following algorithm could be implemented:
If N>Nt and T>Tt then

    
    
        suspect MITM attack
    
    


otherwise

    
    
        proceed with login and record details.

It is understood that the above is for illustrative purposes only, and more complex algorithms could be utilized, e.g., ones that take into account time of day, past usage history, analysis of the specific userids, etc.

    
    


Countermeasure system 28 is utilized to respond to a suspected MITM attack by taking some defensive action. Any type of countermeasure could be implemented. For instance, in a case where a login is being attempted from a suspicious IP address, the login can simply be denied. In other cases, if a first session is currently underway and a large number of additional sessions are started from the same IP address, the first session could be terminated. In these cases, the suspicious IP address could be added to the black list 34. In still further cases, suspect IP address can be simply outputted to a user for further investigation.
FIG. 4 depicts a flow diagram of a process for implementing MITM defense system 18 (FIG. 1) for a login procedure. At S1, a login request is received and the userid, password and IP address are recorded at S2. At S3, the login credentials are subjected to verification, and if they fail, an authentication failure message is returned at S18, and the session is terminated at S19. If the login credentials succeed, then an MITM white list is searched to locate the incoming IP address at S5. If it is found at S6, then defense processing is skipped and the session is allowed to continue at S7. Otherwise, an MITM black list is searched for the incoming IP address at step S8. If the IP address is found in the black list at S9, then an MITM failure message is returned at S15, and the session is terminated at S17.
If the incoming IP address is not found in the black list, then a search is made for previous login attempts from the incoming IP address at S10. At S11, the number of userids originating from the IP address are determined, and the activity level is determined at S12 (e.g., how many during a particular time period). At S13, the number and activity level are compared against threshold values, and if exceeded, the IP address is added to the black list at S16, an MITM failure message is returned at S15, and the session is terminated at S17. If the threshold values are not exceeded, then at S14, the IP address, userid, and time are recorded in the IP address userid table, and the login continues.
Referring again to FIG. 1, it is understood that computer system 10 may be implemented as any type of computing infrastructure. Computer system 10 generally includes a processor 12, input/output (I/O) 14, memory 16, and bus 17. The processor 12 may comprise a single processing unit, or be distributed across one or more processing units in one or more locations, e.g., on a client and server. Memory 16 may comprise any known type of data storage and/or transmission media, including magnetic media, optical media, random access memory (RAM), read-only memory (ROM), a data cache, a data object, etc. Moreover, memory 16 may reside at a single physical location, comprising one or more types of data storage, or be distributed across a plurality of physical systems in various forms.
I/O 14 may comprise any system for exchanging information to/from an external resource. External devices/resources may comprise any known type of external device, including a monitor/display, speakers, storage, another computer system, a hand-held device, keyboard, mouse, voice recognition system, speech output system, printer, facsimile, pager, etc. Bus 17 provides a communication link between each of the components in the computer system 10 and likewise may comprise any known type of transmission link, including electrical, optical, wireless, etc. Although not shown, additional components, such as cache memory, communication systems, system software, etc., may be incorporated into computer system 10.
Access to computer system 10 may be provided over a network such as the Internet, a local area network (LAN), a wide area network (WAN), a virtual private network (VPN), etc. Communication could occur via a direct hardwired connection (e.g., serial port), or via an addressable connection that may utilize any combination of wireline and/or wireless transmission methods. Moreover, conventional network connectivity, such as Token Ring, Ethernet, WiFi or other conventional communications standards could be used. Still yet, connectivity could be provided by conventional TCP/IP sockets-based protocol. In this instance, an Internet service provider could be used to establish interconnectivity. Further, as indicated above, communication could occur in a client-server or server-server environment.
It should be appreciated that the teachings of the present invention could be offered as a business method on a subscription or fee basis. For example, a computer system 10 comprising a MITM defense system 18 could be created, maintained and/or deployed by a service provider that offers the functions described herein for customers. That is, a service provider could offer to deploy or provide the ability to identify and respond to MITM attacks as described above.
It is understood that in addition to being implemented as a system and method, the features may be provided as a program product stored on a computer-readable medium, which when executed, enables computer system 10 to provide an MITM defense system 18. To this extent, the computer-readable medium may include program code, which implements the processes and systems described herein. It is understood that the term “computer-readable medium” comprises one or more of any type of physical embodiment of the program code. In particular, the computer-readable medium can comprise program code embodied on one or more portable storage articles of manufacture (e.g., a compact disc, a magnetic disk, a tape, etc.), on one or more data storage portions of a computing device, such as memory 16 and/or a storage system, and/or as a data signal traveling over a network (e.g., during a wired/wireless electronic distribution of the program product).
As used herein, it is understood that the terms “program code” and “computer program code” are synonymous and mean any expression, in any language, code or notation, of a set of instructions that cause a computing device having an information processing capability to perform a particular function either directly or after any combination of the following: (a) conversion to another language, code or notation; (b) reproduction in a different material form; and/or (c) decompression. To this extent, program code can be embodied as one or more types of program products, such as an application/software program, component software/a library of functions, an operating system, a basic I/O system/driver for a particular computing and/or I/O device, and the like. Further, it is understood that terms such as “component” and “system” are synonymous as used herein and represent any combination of hardware and/or software capable of performing some function(s).
The block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Although specific embodiments have been illustrated and described herein, those of ordinary skill in the art appreciate that any arrangement which is calculated to achieve the same purpose may be substituted for the specific embodiments shown and that the invention has other applications in other environments. This application is intended to cover any adaptations or variations of the present invention. The following claims are in no way intended to limit the scope of the invention to the specific embodiments described herein.

## Claims

1. A system comprising:
at least one computing device configured to defend against man in the middle (MITM) attacks directed at a target server, the at least computing device comprising:
an activity recording system that records an incoming IP address, user id, and
time of each session occurring with the target server;
a list checking system for performing the following:
comparing a single incoming IP address with a white list; and
comparing the single incoming IP address with a black list after

the comparing of the single incoming IP address with the white list and after determining that the single incoming IP address is not present on the white list;

an activity analysis system that performs the following after the list checking system compares the single incoming IP address with the black list, and after determining that the single incoming IP address is not present on the black list:
searches for records of a previous login attempt from the single incoming IP address;
determines a number of user ids occurring from the single incoming IP address during a predefined time period;
compares the number of user ids occurring from the single incoming IP address to a predefined threshold number of user ids specific to the predefined time period; and
identifies the single incoming IP address as a suspect IP address in response to the number of user ids occurring from the single incoming IP address exceeding the threshold within the predefined time period; and

a countermeasure system for taking action against the suspect IP address.

2. The system of claim 1, wherein the activity analysis system includes a first value N that represents a number of sessions along with a threshold value Nt and a second value T and its associated threshold value Tt that represents a time frame, and wherein if there are more than N sessions with the single incoming IP address during a time period less than T, the single incoming IP address is identified as a suspect IP address.

3. The system of claim 1, wherein the countermeasure system causes a login session to fail.

4. The system of claim 1, wherein the countermeasure system causes a session to terminate in response to the identifying of the single incoming IP address as a suspect address.

5. The system of claim 1, wherein the countermeasure system causes the suspect IP address to be outputted.

6. A computer program product stored on a non-transitory computer readable medium, which when executed includes program instructions for defending against man in the middle (MITM) attacks directed at a target server, the program product comprising:
program instructions for recording an incoming IP address, user id, and time of each session occurring with the target server;
program instructions for comparing the incoming IP address with a white list;
program instructions for comparing the incoming IP address with a black list after the comparing of the incoming IP address with the white list and after determining that the incoming IP address is not present on the white list;
program instructions for searching for records of a previous login attempt from the incoming IP address;
program instructions for identifying suspect IP addresses by determining a number of user ids occurring from the single incoming IP address during a predefined time period after the comparing of the incoming IP address with the black list, and after determining that the single incoming IP address is not present on the black list;
program instructions for comparing the number of user ids occurring from the single incoming IP address to a predefined threshold number of user ids specific to the predefined time period;
program instructions for identifying the single incoming IP address as a suspect IP address in response to the number of user ids occurring from the single incoming IP address exceeding the threshold within the predefined time period; and
program instructions for taking defensive action against the suspect IP address.

7. The program product of claim 6, wherein a first value N represents a number of sessions along with a threshold value Nt and a second value T and its associated threshold value Tt represents a time frame, and wherein if there are more than N sessions with the single incoming IP address during a time period less than T, the single incoming IP address is identified as a suspect IP address.

8. The program product of claim 6, wherein the defensive action causes a login session to fail.

9. The program product of claim 6, wherein the defensive action causes a session to terminate in response to the identifying of the single incoming IP address as a suspect address.

10. The program product of claim 6, wherein the defensive action causes the suspect IP address to be outputted.

11. A computer-implemented method performed on at least one computing device for defending against man in the middle (MITM) attacks directed at a target server, the method comprising:
recording an incoming IP address, user id, and time of each session occurring with the target server using the at least one computing device;
comparing the incoming IP address with a white list;
comparing the incoming IP address with a black list after the comparing of the incoming IP address with the white list and after determining that the incoming IP address is not present on the white list;
searching for records of a previous login attempt from the incoming IP address;
identifying suspect IP addresses by determining a number of user ids occurring from the single incoming IP address during a predefined time period after the comparing of the incoming IP address with the black list, and after determining that the single incoming IP address is not present on the black list;
comparing the number of user ids occurring from the single incoming IP address to a predefined threshold number of user ids specific to the predefined time period;
identifying the single incoming IP address as a suspect IP address in response to the number of user ids occurring from the single incoming IP address exceeding the threshold within the predefined time period; and
taking defensive action against the suspect IP address using the at least one computing device.

12. The method of claim 11, wherein a first value N represents a number of sessions along with a threshold value Nt and a second value T and its associated threshold value Tt represents a time frame, and wherein if there are more than N sessions with the single incoming IP address during a time period less than T, the single incoming IP address is identified as a suspect IP address.

13. The method of claim 11, wherein the defensive action causes a login session to fail.

14. The method of claim 11, wherein the defensive action causes a session to terminate in response to the identifying of the single incoming IP address as a suspect address.

15. The method of claim 11, wherein the defensive action causes the suspect IP address to be outputted.

16. A computer-implemented method for deploying a system for defending against man in the middle (MITM) attacks directed at a target server, comprising:
providing at least one computing device being operable to:
record an incoming IP address, user id, and time of each session occurring with the target server;
compare the incoming IP address with a white list;
compare the incoming IP address with a black list after the comparing of the incoming IP address with the white list and after determining that the incoming IP address is not present on the white list;
search for records of a previous login attempt from the incoming IP address;
identify suspect IP addresses by determining a number of user ids occurring from the incoming IP address during a predefined time period after the comparing of the incoming IP address with the black list, and after determining that the single incoming IP address is not present on the black list;
compare the number of user ids occurring from the single incoming IP address to a predefined threshold number of user ids specific to the predefined time period;
identify the single incoming IP address as a suspect IP address in response to the number of user ids occurring from the single incoming IP address exceeding the threshold within the predefined time period; and
take defensive action against the suspect IP address.

17. The method of claim 1, wherein the activity recording system records the incoming IP address, the user id, and the time of each session occurring with the target server in a hash tree that indexes the incoming IP address with the user id and the time of each session.

18. The method of claim 17, wherein the activity analysis system searches for the records of the previous login attempt from the single incoming IP address and determines the number of user ids occurring from the single incoming IP address using the hash tree.

19. The computer program product of claim 6, wherein the incoming IP address, the user id, and the time of each session occurring with the target server are recorded in a hash tree that indexes the incoming IP address with the user id and the time of each session.

20. The computer program product of claim 19, wherein the program instructions for identifying suspect IP addresses determines the number of user ids occurring from the single incoming IP address during the predefined time period using the hash tree.

21. The computer implemented method of claim 11, wherein the incoming IP address, the user id, and the time of each session occurring with the target server are recorded in a hash tree that indexes the incoming IP address with the user id and the time of each session.

22. The computer implemented method of claim 21, wherein the identifying of suspect IP addresses determines the number of user ids occurring from the single incoming IP address during the predefined time period using the hash tree.