presented by: akbar saidov authors: m. polychronakis, k. g. anagnostakis, e. p. markatos

21
Presented by: Akbar Saidov Authors: M. Polychronakis, K. G. Anagnostakis, E. P. Markatos

Upload: monica-banks

Post on 13-Jan-2016

218 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Presented by: Akbar Saidov Authors: M. Polychronakis, K. G. Anagnostakis, E. P. Markatos

Presented by: Akbar Saidov

Authors: M. Polychronakis, K. G. Anagnostakis,

E. P. Markatos

Page 2: Presented by: Akbar Saidov Authors: M. Polychronakis, K. G. Anagnostakis, E. P. Markatos

Motivation: • Design and implementation of polymorphic shellcode has been

covered extensively in the literature• However, the actual characteristics and prevalence of real-

world polymorphic attacks have not been studied to the same extent.

Present an analysis of more than 1.2 million polymorphic code injection attacks against real internet hosts detected over the course of 20 months.

Use network -level emulation, Nemu, to monitor the traffic of thousands of production systems in research and education and capture the attacks.

Page 3: Presented by: Akbar Saidov Authors: M. Polychronakis, K. G. Anagnostakis, E. P. Markatos

The attack activity in relation to the targeted network services

The structure of the polymorphic shellcode used

The different operations performed by its actual payload

Page 4: Presented by: Akbar Saidov Authors: M. Polychronakis, K. G. Anagnostakis, E. P. Markatos

Witnessed sporadic attacks against a large number of less widely used services and third-party applications

Fewer attacks employed more sophisticated obfuscation schemes

Bulk of the attacks used naive encryption or polymorphism

Extensive sharing of code components was prevalent among different shellcode types

Page 5: Presented by: Akbar Saidov Authors: M. Polychronakis, K. G. Anagnostakis, E. P. Markatos

Nemu. Detector used for capturing attacks

Prototype implementation. Uses a CPU emulator to dynamically analyze every potential instruction sequence in the inspected traffic and identify the execution behavior of self-decrypting shellcode

Nemu was able to successfully decrypt the original shellcode, and so far has not resulted to any false positives

Page 6: Presented by: Akbar Saidov Authors: M. Polychronakis, K. G. Anagnostakis, E. P. Markatos

Inspects the client-initiated data of each network flow• The flow may contain malicious requests towards vulnerable services

Each input is mapped to a random memory location in the virtual address space of an IA-32 emulator

The execution of self-decrypting shellcode is identified by two key runtime behavioral characteristics1.The execution of some form of GetPC code2.The occurrence of several self references

i.e., read operations from the memory addresses of the input stream itself

Page 7: Presented by: Akbar Saidov Authors: M. Polychronakis, K. G. Anagnostakis, E. P. Markatos

The GetPC code is used by the shellcode for finding the absolute address of the injected code• Mandatory for subsequently decrypting the encrypted payload

Involves the execution of an instruction from the call or fstenv instruction groups

Page 8: Presented by: Akbar Saidov Authors: M. Polychronakis, K. G. Anagnostakis, E. P. Markatos

Analysis is based on the attacks captured in three deployments in European National Research Network (NRN1-3), and one deployment in a public Educational Network in Greece (EDU).

In each installation, nemu runs on a passive monitoring sensor that inspects all the traffic of the access link that connects the organization to the Internet

Nemu collectively captured more than 1.2 million attacks targeting real production systems in the monitored network.

External vs. Internal attacks

Page 9: Presented by: Akbar Saidov Authors: M. Polychronakis, K. G. Anagnostakis, E. P. Markatos

From the 1240716 attacks, about one third were launched from 10014 external IP addresses and targeted 769 hosts within the organization

The bulk of the attacks originated from 143 different internal hosts, targeting 331572 different active hosts across the Internet

Page 10: Presented by: Akbar Saidov Authors: M. Polychronakis, K. G. Anagnostakis, E. P. Markatos
Page 11: Presented by: Akbar Saidov Authors: M. Polychronakis, K. G. Anagnostakis, E. P. Markatos

Nemu scans the traffic towards any port and does not rely on exploit or vulnerability specific signatures• It is capable to detect polymorphic attacks destined to even less

widely used or “forgotten” services.

Page 12: Presented by: Akbar Saidov Authors: M. Polychronakis, K. G. Anagnostakis, E. P. Markatos

Computed the MD5 hash of the initial shellcode. Plotted the number of unique shellcodes per port

Purple vs. Blue. The number of unique shellcodes is quite smaller than the number of attacks

Page 13: Presented by: Akbar Saidov Authors: M. Polychronakis, K. G. Anagnostakis, E. P. Markatos

Performed an analysis of the decryption routines of the captured shellcodes in order to gain a better understanding of whether the captured attacks are truly polymorphic or not

Extracted the decryption code from the execution trace produced by nemu

The beginning of the decryption routine is identified by the seeding instruction of the GetPC code that stores the PC in a memory location

The end is identified by the branch instruction of the loop that iterates through the encrypted payload

Page 14: Presented by: Akbar Saidov Authors: M. Polychronakis, K. G. Anagnostakis, E. P. Markatos

The heuristic identifies the highlighted instructions as the decryption routine

After processing all captured attacks, the analysis resulted in 41 unique decryption routines

Page 15: Presented by: Akbar Saidov Authors: M. Polychronakis, K. G. Anagnostakis, E. P. Markatos

Three of the attacks employed doubly encrypted shellcode

Page 16: Presented by: Akbar Saidov Authors: M. Polychronakis, K. G. Anagnostakis, E. P. Markatos

Identifying the different types of payload used in the attacks provided some insight about the diversity and functionality of the shellcode used by malware

Binary code clustering method was used to group the unique payloads with similar code from all captured attacks into corresponding payload types

Further, each payload type was analyzed to understand its behavior and intended purpose• That is, researchers statically analyzed the code of each payload

group, looking for patterns of known library call prologues, library function strings, library function hashes, and shell commands

• Classified each payload type according to its generic functionality

Page 17: Presented by: Akbar Saidov Authors: M. Polychronakis, K. G. Anagnostakis, E. P. Markatos

Payload clustering and categorization resulted in 41 payload types, categorized in seven payload classes

Page 18: Presented by: Akbar Saidov Authors: M. Polychronakis, K. G. Anagnostakis, E. P. Markatos

Examples:

One of the two FTPExec payload types uses a command similar to the following as an argument to the WinExec function of kernel32.dll:

The AddUser payloads use a command like the following to create a user with administrative privileges:

Page 19: Presented by: Akbar Saidov Authors: M. Polychronakis, K. G. Anagnostakis, E. P. Markatos

J. Ma, J. Dunagan, H. J. Wang, S. Savage, and G. M. Voelker. Finding diversity in remote code injection exploits. In Proceedings of the 6th Internet Measurement Conference (IMC), pages 53–64, 2006.

J. Goebel, T. Holz, and C.Willems. Measurement and analysis of autonomous spreading malware in a university environment. In Proceedings of the 4th international conference on Detection of Intrusions and Malware, & Vulnerability Assessment (DIMVA), pages 109–128, 2007.

Y. Song, M. E. Locasto, A. Stavrou, A. D. Keromytis, and S. J. Stolfo. On the infeasibility of modeling polymorphic shellcode. In Proceedings of the 14th ACM conference on Computer and communications security (CCS), pages 541–551, 2007.

K. Borders, A. Prakash, andM. Zielinski. Spector: Automatically analyzing shell code. In Proceedings of the Annual Computer Security Applications Conference (ACSAC), pages 501–514, 2007.

V. Yegneswaran, P. Barford, and J. Ullrich. Internet intrusions: global characteristics and prevalence. In Proceedings of the 2003 ACM SIGMETRICS international conference on Measurement and modeling of computer systems, 2003.

Page 20: Presented by: Akbar Saidov Authors: M. Polychronakis, K. G. Anagnostakis, E. P. Markatos

Paper presented a study of the polymorphic code injection attacks captured using network-level emulation in four deployments in research and education networks

Study focused on:1. Overall attack activity and the targeted network services2. Analysis of the different decryption routines3. Analysis of the different payload types used

Observed attack activity shows wide use of polymorphic attacks, although polymorphism is mostly employed in its more naive form

Attackers have also turned to the exploitation of less widely used services and third-party applications

It was also observed that some attacks employed more sophisticated encryption schemes, such as doubly-encrypted shellcode

Page 21: Presented by: Akbar Saidov Authors: M. Polychronakis, K. G. Anagnostakis, E. P. Markatos

Questions?