SYSTEM AND METHOD FOR DETERMING KEYSTROKES IN SECURE SHELL (SSH) SESSIONS
20220311802 · 2022-09-29
Assignee
Inventors
Cpc classification
G06F11/3006
PHYSICS
H04L63/16
ELECTRICITY
H04L63/18
ELECTRICITY
H04L63/0861
ELECTRICITY
International classification
Abstract
A system and method for determining human keystrokes in a secure shell (SSH) session from SSH session data traffic provides insight and evidence of an intrusion into a computer network. In one embodiment, the presence of human keystroke(s) in an SSH session may be inferred using a sensor appliance. In one embodiment, the SSH data traffic is encoded in a vector, one or more communication patterns are identified in the vector and the presence of human keystrokes may be inferred from the one or more communication patterns.
Claims
1. A method, comprising: receiving, by a processor, secure shell (SSH) data traffic for a current session; identifying, by the processor, at least one communication pattern in a connection portion of the current SSH data traffic; comparing, by the processor, the at least one communication pattern of the SSH connection portion to a communication pattern of a stored SSH connection portion being a connection portion from a past SSH session wherein the communication pattern of the connection portion from the past SSH session indicates at least one human keystroke during the connection portion; and inferring, by the processor, a presence of human keystrokes in the current session of the SSH data traffic based on a match of the communication pattern of the current session and the communication pattern of the past SSH session.
2. The method of claim 1 further comprising encoding, by the processor, the current session SSH data traffic into a vector and identifying, by the processor, the at least one communication pattern in the vector.
3. The method of claim 2, wherein the vector further comprises a sequence of signed integers.
4. The method of claim 2, wherein each signed integer is a length of a packet in the SSH session.
5. The method of claim 4, wherein the vector further comprises a positive integer value for a packet length from a client in the SSH session and a negative integer value for a packet length from a server in the SSH session.
6. The method of claim 1, wherein comparing the at least one communication pattern further comprises comparing, by the processor, the at least one communication pattern of the current SSH session to a plurality of stored prior SSH sessions that each have one or more communication patterns that evidences human keystrokes.
7. The method of claim 2, wherein the at least one communication pattern is one of a size of a packet in the vector, an order of the packets in the vector, a timing between packets in the vector and a direction of a packet.
8. The method of claim 1 further comprising capturing, by a sensor appliance that includes the processor, the SSH data traffic for the current session.
9. The method of claim 1, wherein inferring the presence of human keystrokes further comprising distinguishing between presence of human keystrokes and keepalive messages.
10. The method of claim 9, wherein distinguishing between presence of human keystrokes and keepalive messages further comprises comparing a variance in inter-arrival deltas for human keystrokes to a constant inter-arrival delta for keepalive messages.
11. An apparatus, comprising: a processor; a plurality of lines of instructions executed by the processor that configure the processor to: receive secure shell (SSH) data traffic for a current session; identify at least one communication pattern in a connection portion of the current SSH data traffic; compare the at least one communication pattern of the current SSH session to a communication pattern of a stored SSH session being a past SSH session wherein the communication pattern from the past SSH session indicates at least one human keystroke present in the past SSH session; and inferring that human keystrokes are present in the current session of the SSH data traffic based on a match of the communication pattern of the current session SSH and the communication pattern of the past SSH session.
12. The apparatus of claim 11, wherein the processor is further configured to encode the current session SSH data traffic into a vector and to identify the at least one communication pattern in the vector.
13. The apparatus of claim 12, wherein the vector further comprises a sequence of signed integers.
14. The apparatus of claim 12, wherein each signed integer is a length of a packet in the SSH session.
15. The apparatus of claim 14, wherein the vector further comprises a positive integer value for a packet length from a client in the SSH session and a negative integer value for a packet length from a server in the SSH session.
16. The apparatus of claim 11, wherein the processor is further configured to compare the at least one communication pattern of the current SSH session to a plurality of stored prior SSH sessions that each have one or more communication patterns that evidence a presence of human keystrokes in the stored prior SSH sessions.
17. The apparatus of claim 12, wherein the at least one communication pattern is one of a size of a packet in the vector, an order of the packets in the vector, a timing between packets in the vector and a direction of a packet.
18. The apparatus of claim 11, wherein the processor is further configured to distinguish between presence of human keystrokes and keepalive messages.
19. The apparatus of claim 18, wherein the processor is further configured to compare a variance in inter-arrival deltas for human keystrokes to a constant inter-arrival delta for keepalive messages.
20. A sensor appliance, comprising: a processor; a plurality of lines of instructions executed by the processor that configure the processor to: capture secure shell (SSH) data traffic for a current session; identify at least one communication pattern in a connection portion of the current SSH data traffic; compare the at least one communication pattern of the current SSH data traffic to a communication pattern of a stored SSH session being a past SSH session wherein the communication pattern of the past SSH session indicates a presence of human keystrokes in the past SSH session; and inferring a presence of human keystrokes in the current session of the SSH data traffic based on a match of the communication pattern of the current session SSH and the communication pattern of the past SSH session.
21. The appliance of claim 20, wherein the processor is further configured to encode the current session SSH data traffic into a vector and to identify the at least one communication pattern in the vector.
22. The appliance of claim 21, wherein the vector further comprises a sequence of signed integers.
23. The appliance of claim 21, wherein each signed integer is a length of a packet in the SSH session.
24. The appliance of claim 23, wherein the vector further comprises a positive integer value for a packet length from a client in the SSH session and a negative integer value for a packet length from a server in the SSH session.
25. The appliance of claim 20, wherein the processor is further configured to compare the at least one communication pattern of the current SSH session to a plurality of stored prior SSH sessions that each have one or more communication patterns that indicate a presence of human keystrokes in the stored prior SSH session.
26. The appliance of claim 21, wherein the at least one communication pattern is one of a size of a packet in the vector, an order of the packets in the vector, a timing between packets in the vector and a direction of a packet.
27. The appliance of claim 20, wherein the processor is further configured to distinguish between presence of human keystrokes and keepalive messages.
28. The appliance of claim 27, wherein the processor is further configured to compare a variance in inter-arrival deltas for human keystrokes to a constant inter-arrival delta for keepalive messages.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0006]
[0007]
[0008]
[0009]
[0010]
[0011]
[0012]
DETAILED DESCRIPTION OF ONE OR MORE EMBODIMENTS
[0013] The disclosure is particularly applicable to an sensor appliance in a computer network that can detect and identify a presence of human keystrokes in the data of an SSH session using an inference process and it is in this context that the disclosure will be described. It will be appreciated, however, that the human keystroke detection in the SSH session has greater utility since it can be implemented in other devices that can capture SSH data traffic and can identify the presence of human keystrokes. The disclosed system and method overcomes the limitations and technical problems of the above known techniques and approaches.
[0014] The disclosed system and method provides a technical solution to the above technical problem in network traffic monitoring in which the system infers the presence of human keystrokes. The disclosed system and method may be used in various contexts including network security monitoring, incident response and network forensics and/or mis-use detection. For the network security monitoring context, the determination of the presence of human keystrokes may be used to detect a network intrusion since the SSH sessions should be automated processes (no human keystrokes). Same advantage may exist for incidence response or mis-use detection.
[0015]
[0016] As shown, each SSH connection/session may be established over a communications path 112 between each client and the SSH server 106. In the system shown in
[0017]
[0018] In the connection sub-protocol 206 of an SSH session, the SSH connection has been established and the client and server now exchange data and commands. There are a plurality of different commands and data that may be exchanged. An SSH session in a computer network between a client and a server may be either an automated process or a human involved process. In the automated process, the client and server communicate data and commands programmatically/automatically with no human involvement based on a script/code running on the client and/or server. Thus, in the automated process, no human keystrokes would be present in the SSH data traffic. In the human involved process, a human being may type commands or data thus causing human keystroke data to be part of the SSH connection sub-protocol 206. Most/all SSH sessions in a computer network are automated processes with no human involvement. As a result, these automated SSH sessions do not have any keystrokes found in the SSH session traffic data. When a SSH session has the presence of human keystrokes, it is very possible that that SSH session involves a nefarious action who is not supposed to be establishing an SSH session on the computer network. Thus, the ability to detect the presence of human keystrokes in the SSH session traffic data is an important technique to quickly identify an intrusion into the computer network that is likely not authorized and can be resolved. Furthermore, being able to detect the presence of the human keystrokes using the disclosed method eliminates the need to rely of logs which are unreliable and could be tampered with and does not require breaking the encryption of the SSH session.
[0019]
[0020] For the embodiment in which the SSH keystroke detector is within the sensor appliance 102 and executed by the processor of the sensor appliance 102, the sensor appliance 102 may include a SSH packet detector 302 that can capture the SSH data traffic as is well known. The sensor appliance 102 may also have an SSH inference module 304 that receives the SSH data traffic and identifies the presence of human keystrokes for each SSH session based on inferences from the SSH data traffic as described in more detail below. The SSH inference module 304 further has a SSH packet vector generator 305 that generates a vector (shown and described in more detail with respect to
[0021]
[0022] As shown in
[0023] In the SSH sub-protocols shown in
[0024]
[0025] During the scanning of the vector(s) of the current SSH session, the method may identify the SSH connection portion of the SSH data traffic as shown above and generate the communication pattern(s) that characterize the presence of human keystrokes in the SSH data traffic. Using the vector that has been generated, one or more vector operations may be used to generate the communication pattern(s) and thus infer the authentication method for the current SSH session. For example, the method use index slicing (heads and tails), summary statistics, such as maximum, minimum, mean, range, etc.), runs and a predetermined number of occurrences (first, second, third, etc.) of a positive integer, a negative integer or a run of integers. The runs may include runs of increasing integers, runs of decreasing integers and/or runs of repeating integers.
[0026] The method may have, for prior SSH sessions that have human keystrokes, generated one or more communication pattern(s) that identify the presence of human keystrokes in each prior SSH session. These known communication pattern(s) that identify the presence of human keystrokes for each prior SSH session may be stored. Furthermore, as a new communication pattern or communication patterns are found to indicate the presence of human keystrokes, those may also be stored in the system.
[0027] Using the communication pattern(s) for the current SSH session and the store of known communication pattern(s) that identify the presence of keystrokes for each prior SSH session, the method may compare (506) the current session (and its communication patterns) to the prior SSH sessions (and their communication pattern(s) that identify the presence of keystrokes in the current session. The method may then determine if there is a match between the communication pattern(s) of the current SSH session and the communication pattern(s) of a particular prior SSH session (508). If there is a match, then the method can infer (510) the presence of keystrokes in the current SSH session. Thus, the method is able to infer the presence of keystrokes from the communication patterns of the SSH data traffic. This technical solution solves the technical problems of the known systems and does not require trying to brute force crack the encryption which is time consuming.
[0028]
[0029]
[0030] It is noted that the keystroke determiner has to distinguish between data that has the presence of human keystrokes and known keepalive messages. Thus, the method may use timing of the packets in the vector (a further communication pattern) to distinguish between the keystrokes and these keepalive messages. In one embodiment, this may be done using a timing heuristic. Specifically, the inter-arrival deltas (one type of communication pattern) of keep-alive messages will be consistent throughout an SSH connection and are often 60 time periods, such as microseconds, by default. For human driven keystrokes, inter-arrival deltas will typically be much smaller than keep-alive messages. This is because humans often type multiple keystrokes per second. Thus, inter-arrival deltas of keystrokes will vary as the human types, pauses to think, and resumes typing. Keep-alive messages will not vary through a session. Thus, using this timing heuristic, keep-alive messages can be distinguished from human keystrokes
[0031] The foregoing description, for purpose of explanation, has been with reference to specific embodiments. However, the illustrative discussions above are not intended to be exhaustive or to limit the disclosure to the precise forms disclosed. Many modifications and variations are possible in view of the above teachings. The embodiments were chosen and described in order to best explain the principles of the disclosure and its practical applications, to thereby enable others skilled in the art to best utilize the disclosure and various embodiments with various modifications as are suited to the particular use contemplated.
[0032] The system and method disclosed herein may be implemented via one or more components, systems, servers, appliances, other subcomponents, or distributed between such elements. When implemented as a system, such systems may include and/or involve, inter alia, components such as software modules, general-purpose CPU, RAM, etc. found in general-purpose computers. In implementations where the innovations reside on a server, such a server may include or involve components such as CPU, RAM, etc., such as those found in general-purpose computers.
[0033] Additionally, the system and method herein may be achieved via implementations with disparate or entirely different software, hardware and/or firmware components, beyond that set forth above. With regard to such other components (e.g., software, processing components, etc.) and/or computer-readable media associated with or embodying the present inventions, for example, aspects of the innovations herein may be implemented consistent with numerous general purpose or special purpose computing systems or configurations. Various exemplary computing systems, environments, and/or configurations that may be suitable for use with the innovations herein may include, but are not limited to: software or other components within or embodied on personal computers, servers or server computing devices such as routing/connectivity components, hand-held or laptop devices, multiprocessor systems, microprocessor-based systems, set top boxes, consumer electronic devices, network PCs, other existing computer platforms, distributed computing environments that include one or more of the above systems or devices, etc.
[0034] In some instances, aspects of the system and method may be achieved via or performed by logic and/or logic instructions including program modules, executed in association with such components or circuitry, for example. In general, program modules may include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular instructions herein. The inventions may also be practiced in the context of distributed software, computer, or circuit settings where circuitry is connected via communication buses, circuitry or links. In distributed settings, control/instructions may occur from both local and remote computer storage media including memory storage devices.
[0035] The software, circuitry and components herein may also include and/or utilize one or more type of computer readable media. Computer readable media can be any available media that is resident on, associable with, or can be accessed by such circuits and/or computing components. By way of example, and not limitation, computer readable media may comprise computer storage media and communication media. Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and can accessed by computing component. Communication media may comprise computer readable instructions, data structures, program modules and/or other components. Further, communication media may include wired media such as a wired network or direct-wired connection, however no media of any such type herein includes transitory media. Combinations of the any of the above are also included within the scope of computer readable media.
[0036] In the present description, the terms component, module, device, etc. may refer to any type of logical or functional software elements, circuits, blocks and/or processes that may be implemented in a variety of ways. For example, the functions of various circuits and/or blocks can be combined with one another into any other number of modules. Each module may even be implemented as a software program stored on a tangible memory (e.g., random access memory, read only memory, CD-ROM memory, hard disk drive, etc.) to be read by a central processing unit to implement the functions of the innovations herein. Or, the modules can comprise programming instructions transmitted to a general-purpose computer or to processing/graphics hardware via a transmission carrier wave. Also, the modules can be implemented as hardware logic circuitry implementing the functions encompassed by the innovations herein. Finally, the modules can be implemented using special purpose instructions (SIMD instructions), field programmable logic arrays or any mix thereof which provides the desired level performance and cost.
[0037] As disclosed herein, features consistent with the disclosure may be implemented via computer-hardware, software, and/or firmware. For example, the systems and methods disclosed herein may be embodied in various forms including, for example, a data processor, such as a computer that also includes a database, digital electronic circuitry, firmware, software, or in combinations of them. Further, while some of the disclosed implementations describe specific hardware components, systems and methods consistent with the innovations herein may be implemented with any combination of hardware, software and/or firmware. Moreover, the above-noted features and other aspects and principles of the innovations herein may be implemented in various environments. Such environments and related applications may be specially constructed for performing the various routines, processes and/or operations according to the disclosure or they may include a general-purpose computer or computing platform selectively activated or reconfigured by code to provide the necessary functionality. The processes disclosed herein are not inherently related to any particular computer, network, architecture, environment, or other apparatus, and may be implemented by a suitable combination of hardware, software, and/or firmware. For example, various general-purpose machines may be used with programs written in accordance with teachings of the disclosure, or it may be more convenient to construct a specialized apparatus or system to perform the required methods and techniques.
[0038] Aspects of the method and system described herein, such as the logic, may also be implemented as functionality programmed into any of a variety of circuitry, including programmable logic devices (“PLDs”), such as field programmable gate arrays (“FPGAs”), programmable array logic (“PAL”) devices, electrically programmable logic and memory devices and standard cell-based devices, as well as application specific integrated circuits. Some other possibilities for implementing aspects include: memory devices, microcontrollers with memory (such as EEPROM), embedded microprocessors, firmware, software, etc. Furthermore, aspects may be embodied in microprocessors having software-based circuit emulation, discrete logic (sequential and combinatorial), custom devices, fuzzy (neural) logic, quantum devices, and hybrids of any of the above device types. The underlying device technologies may be provided in a variety of component types, e.g., metal-oxide semiconductor field-effect transistor (“MOSFET”) technologies like complementary metal-oxide semiconductor (“CMOS”), bipolar technologies like emitter-coupled logic (“ECL”), polymer technologies (e.g., silicon-conjugated polymer and metal-conjugated polymer-metal structures), mixed analog and digital, and so on.
[0039] It should also be noted that the various logic and/or functions disclosed herein may be enabled using any number of combinations of hardware, firmware, and/or as data and/or instructions embodied in various machine-readable or computer-readable media, in terms of their behavioral, register transfer, logic component, and/or other characteristics. Computer-readable media in which such formatted data and/or instructions may be embodied include, but are not limited to, non-volatile storage media in various forms (e.g., optical, magnetic or semiconductor storage media) though again does not include transitory media. Unless the context clearly requires otherwise, throughout the description, the words “comprise,” “comprising,” and the like are to be construed in an inclusive sense as opposed to an exclusive or exhaustive sense; that is to say, in a sense of “including, but not limited to.” Words using the singular or plural number also include the plural or singular number respectively. Additionally, the words “herein,” “hereunder,” “above,” “below,” and words of similar import refer to this application as a whole and not to any particular portions of this application. When the word “or” is used in reference to a list of two or more items, that word covers all of the following interpretations of the word: any of the items in the list, all of the items in the list and any combination of the items in the list.
[0040] Although certain presently preferred implementations of the system and method have been specifically described herein, it will be apparent to those skilled in the art to which the system and method pertains that variations and modifications of the various implementations shown and described herein may be made without departing from the spirit and scope of the system and method. Accordingly, it is intended that the disclosure be limited only to the extent required by the applicable rules of law.
[0041] While the foregoing has been with reference to a particular embodiment of the disclosure, it will be appreciated by those skilled in the art that changes in this embodiment may be made without departing from the principles and spirit of the disclosure, the scope of which is defined by the appended claims.