Simulating the environment to prevent packers from being unpacked

Number of pages: 125 File Format: word File Code: 31075
Year: 2013 University Degree: Master's degree Category: Computer Engineering
  • Part of the Content
  • Contents & Resources
  • Summary of Simulating the environment to prevent packers from being unpacked

    Dissertation for Master Degree (M.Sc)

    Field: Computer Engineering Major: Software

    Abstract

    The usual way to deal with packers includes the following steps:

    1.  Identify a packer. To identify a packer, it must be assigned to a packer group. Doing this is not as easy as it seems. There are many packers whose code is static, and which can be identified using simple strings. But many packers use polymorphic code to change their appearance, and some packers deliberately use fake strings from other packers or standard compiler code, to fool the detection program.

    2. Identify a packer. This stage is beyond identification. To identify a packer, you must classify it into an existing version or assign it to a new version. The ability to identify a packer is essential for successful unpacking, because there may be enough different members in a group that an unpacker specific to one group member cannot be used for another member of the same group.

    3. Create an identifier program. The previous two steps were usually performed by a human, or by programs such as neural network programs trained in conjunction with packers assigned to known groups. This step, in contrast, is to write a program whose function is only to identify that group, and possibly that particular member.

    4. Create an unlock app. Unlike the detection program, whose purpose is only to identify the packer, the unpacker program actually performs the actions of the corresponding photo packer, and recovers the packed binary as much as possible in its original form, including its metadata such as the PE header for Win32 binaries.

    In this research, based on a new idea, we want to be able to prevent packers from being packed without the presence of debuggers without using the usual methods mentioned. to invent In this case, with the help of identifying the types of footprints that a debugger leaves in the environment where it is present, we can prevent packages from opening by changing the environment to show the signs of the presence of malware.

    Introduction

    An increasing percentage of malware programs that are released uncontrollably are packed by packers. Packers are programs that change the form of an input binary without changing its executable meaning to create new types of malware that can evade signature-based malware detection tools.

    Today, malware authors rely more on packers than directly obfuscating malware code. Packers are programs that change the form of an executable binary into another form so that it can escape signature-based antivirus scanners by shrinking or looking different from its original form. In many cases, malware authors frequently use different combinations of multiple packers for the same malware to quickly create a large number of binaries of various forms for uncontrolled release. The fact that more and more binaries are packed seriously reduces the effectiveness of signature-based antivirus scanners; It also leads to an exponential increase in the size of the anti-virus signature, because when the anti-virus program cannot effectively unpack a packaged threat, it has no choice but to create a separate signature for that threat. Gunacon companies report different numbers, but it is generally accepted that more than 80% of malware is packaged. These malware samples are often "packaged" rather than packed, as many packers modify the original form of the input binaries in a way that does not necessarily involve compression.

    The first computer viruses appeared in the early 80s and were mostly simple self-replicating files created for fun and laughs. In 1986, the report of the first virus that targeted Microsoft's MS-DOS operating system on personal computers was published.In fact, the Brain virus is known as the first virus of this type. Also, in early 1986, we saw the first file virus named Virdem and the first Trojan (a program that looks useful or harmless but is actually designed to steal information or damage the host computer) named PC-Write. The mentioned Trojan had positioned itself as a popular Word Processor application. As more people became aware of virus technology, the number of viruses, the number of target platforms [1] for attacks, the complexity of viruses and their diversity increased. In a period of time, viruses focused on boot sectors[2] and after that they started infecting executable files. In 1988, the first Internet worm (a type of malware that uses malicious code to automatically spread from one computer to another over a network) appeared. The Morris worm has led to significant slowdowns in Internet communications, and in response to this attack and a number of similar attacks, the Computer Incident Response Group was established to maintain Internet stability through coordinated incident response. The mentioned group is supported by Carnegie Mellon University, USA. It was launched in 1990 as a place for virus writers to exchange and share their knowledge. The first book on writing viruses was also published, and the first polymorphic virus (commonly referred to as chameleon or Cas, r portable executable file) was developed. A polymorphic virus is a type of malware that uses an unlimited number of cryptographic algorithms to counter detection. Polymorphic viruses have the ability to change themselves every time they replicate. This ability hides them from signature-based antivirus programs designed to detect viruses. In this way, in the early 90s, the news of the first multiform virus attack called Tequila was published, and then in 1992, the first multiform virus engine and virus writing tool emerged. After that, the viruses became more perfect day by day. Some viruses started accessing the email address book and sending themselves to those addresses; Macro viruses attach themselves to the files of applications such as Office and attack them; and viruses written specifically to exploit vulnerabilities in operating systems and applications. Emails, file sharing (P2P) networks, websites, shared drives, and product vulnerabilities are all exploited to spread and attack viruses. (infiltration paths or serial network entry points created by malware) were created on infected systems to open the way for virus writers and hackers to return to run arbitrary software. In this article, we mean a hacker is a computer programmer or its user who intends to access a computer or network illegally. Some viruses have a built-in email engine that forces the infected computer to spread the virus directly by sending an email. Virus writers have also begun to carefully design their attack architectures using social engineering. Along with this evolution of malware, antiviruses have also evolved well. Currently, most of the anti-viruses in the market operate on the basis of virus signature, that is, identifying the characteristics of a malware to detect harmful codes. For this reason, in the time interval between the release of a new virus and the identification of its signature and its distribution among different antiviruses, a sudden growth in the rate of virus infection is observed. But as soon as its signature is detected, the process of infection will decrease.

    1-2- Packaged malware [3]

    Today, malware authors rely more on packaged instead of directly complexing the malware code. Packaged are programs that change the form of an executable binary into another form to evade signature-based anti-virus scanners by shrinking or looking different from its original form. In many cases, malware authors repeatedly use different combinations of multiple packages for the same malware to quickly create a large number of binaries of various forms for uncontrolled release.

  • Contents & References of Simulating the environment to prevent packers from being unpacked

    List:

    Abstract 1

    Introduction. 2

    Chapter 1: Beginning of speech

    1-1-Introduction. 4

    1-2- Packaged malware 6

    1-3- The destructive effect of package malware. 6

    1-4- Types of packaged malware 7

    1-4- Defense method. 8

    1-5-How the packages work 9

    1-6-Types of anti-packets 10

    1-6-1-Inactive anti-packets. 11

    1-6-2- active anti-packet. 11

    Chapters 1-7 of this research. 12

    1-8-Conclusion. 12

    Chapter 2: Basic Concepts

    2-1- Introduction. 14

    2-2- Application programming interface. 14

    2-2-1- But the role of the application programming interface in programming. 15

    2-2-2- The reason for using the functions of the application programming interface in programming. 15

    2-2-3 DLL files. 16

    2-2-4 specifications of functions of the application programming interface. 18

    2-2-5 providing some codes of some functions of the application programming interface. 19

    2-3 peripheral block of the process. 29

    2-4- Import address table. 32

    2-5- portable executive file. 32

    2-5-1 - The process of running portable executable files. 34

    Chapter 3: Pack and Unpack

    3-1-Introduction. 37

    3-2-The picture of the packaged programs 37

    3-3-Subject of the package opener. 38

    3-4- Load executable program 39

    3-5- Analysis of input data 40

    3-6- talijamp. 41

    3-7 Calculation of irregularities 42

    3-8 Depackaging. 43

    3-8-1 Automatic. 43

    3-8-2-non-automatic 44

    3-9- Finding the main entry point. 46

    3-9-1-Using an automatic tool in finding the main entry point. 46

    3-9-2- Finding the main entry point manually. 47

    3-10- Editing the input table manually. 51

    3-11- Ways and methods for common packaging. 53

    3-11-1-UPX1. 53

    3-11-2- PE Compact 54

    3-11-3- ASPack. 54

    3-11-4- Petit 55

    3-11-5-WinUppack. 56

    3-11-6Themida- 58

    3-12 Analysis without complete opening. 59

    3-13- Closed DLL 60

    Conclusion. 61

    Chapter 4: Anti-debugging

    4-1- Introduction. 63

    4-2- Debugging disclosure. 63

    4-2-1- by means of Windows application programming interface. 63

    4-3- manual checking of structures 66

    4-3-1- checking the BeingDebugged token. 66

    4-3-2- Checking the ProcessHeap token. 68

    4-3-3- Check NTGlobalFlag. 69

    4-4- Checking the rest of the system. 70

    4-5- Diagnosing debugger behavior 71

    4-5-1- Scan INT. 71

    4-5-2-execution of code control sum. 72

    4-6- Time checks. 73

    4-6-1- Using the rdtsc command. 73

    4-6-2- Using Qurey PErformance counter and Get tikcount 74

    4-7- Dealing with debugger capabilities 75

    4-7-1- Using local warehouse calls. 76

    4-8-Using exceptions 79

    4-9- Importing interrupts 80

    4-9-1- Importing INT3. 81

    4-9-2- Entering INT2D. 81

    4-9-3- Enter ICE. 82

    4-10- Debugger damage 82

    4-10-1- Head damage. 82

    4-10-2-damage output debug string. 85

    4-11- Conclusion. 85

    Chapter 5: Scarecrow

    5-1- Introduction. 88

    5-2- What is a scarecrow? 88

    5-3- The general diagram of the work. 90

    5-4- Using the application programming interface. 91

    5-3- Using the manual path of structures 91

    5-3-1- Scarecrow algorithm with the help of signs 92

    5-3-2- Diagram of the previous algorithm. 93

    5-4- Practical implementation of scarecrow. 94

    5-4-2- Get tick count function 94

    5-4-3- Scarecrow construction algorithm using Get tick count function 95

    5-4-3- Scarecrow construction diagram using Get tick count function 95

    5-4-4- Scarecrow construction algorithm diagram using Get tick count function 96

    5-4-5-Create files 98

    5-4-3- Create scarecrow with NtGlobalFlag function. 101

    Chapter 6: Conclusion

    6-1- Introduction. 104

    6-2-Malware analysis 105

    6-2-1- Dynamic 105

    6-2-2- Static 106

    6-2-3- Study of anti-analysis methods. 107

    6-3- Proposed methods107

    6-3- The methods mentioned in this research. 108

    6-4- The final result. 109

    Sources and source

    Sources and source. 111

    English abstract. 114

     

     

    Source:

     

    31-Proceedings of ACM symposium on operating systems principles (SOSP); 2007.

    ASPACK SOFTWARE. ASPack for Windows, 2007. bart. FSG: [F]ast [S]mall [G]ood exe packer, 2005.

    Avijit K., Gupta D., “Binary rewriting and call interception for efficient runtime protection against buffer overflow.pdf”, Software :

    Blinkinc. Shrinker 3.4, 2008.

    Das M. Uni?cation-based pointer analysis with directional assignments. In: Proceedings of the 2000 ACM SIGPLAN conference on programming language design and implementation (PLDI); 2000. p. 35e46.

    Decker A, Sancho D, Kharouni L, Goncharov M, McArdle R. Pushdo/Cutwail: a study of the Pushdo/Cutwail botnet. Trend Micro Technical Report. TechRepublic; May 2009.

    Dwing. WinUpack 0.39?nal, 2006.

    Gar?nkel T, Rosenblum M. A virtual machine introspection based architecture for intrusion detection. In: Proceedings of the 10th annual network and distributed system security symposium (NDSS '03); 2003.

    Hind M. Pointer analysis: haven't we solved this problem yet? In: Proceedings of the 2001 ACM SIGPLAN-SIGSOFT workshop on Program analysis for software tools and engineering; 2001. p. 54e61.

    Hund R, Holz T, Freiling FC. Return-oriented rootkits: bypassing kernel code integrity protection mechanisms. In: Proceedings of the 18th USENIX security symposium; 2009.

    Jiang X, Wang X, Xu D. Stealthy malware detection through VMM-based "Out-Of-the-Box" semantic view reconstruction. In: Proceedings of ACM conference on computer and communications security (CCS'07); 2007.

    Jinpeng Wei received a PhD in Computer Science from Georgia Institute of Technology, Atlanta, GA in 2009.\

    Joe Stewart. OllyBonE v0.1, Break-on-Execute for OllyDbg, 2006.

    Kiriansky V, Bruening D, Amarasinghe S. Secure execution via program shepherding. In: Proceedings of the 11th USENIX security symposium; August 2002.

    Kwiatek L, Litawa S. Yet another Rustock analysis. Virus Bulletin; August 2008.

    Lanzi A, Sharif M, Lee W. K-Tracer: a system for extracting kernel malware behavior. In: Proceedings of the 16th annual network and distributed system security symposium (NDSS'09); 2009.

    Litty L, Lagar-Cavilla HA, Lie D. Hypervisor support for identifying covertly executing binaries. In: Proceedings of the 17th USENIX security symposium; 2008.

    Lorenzo Martignoni, Mihai Christodorescu, and Somesh Jha. OmniUnpack: Fast, Generic, and Safe Unpacking of Malware. In 23rd Annual Computer Security Applications Conference (ACSAC), 2007.

    Markus F.X.J. Oberhumer, Lszl Molnr, and John F. Reiser. UPX: the Ultimate Packer for eExecutables, 2007.

    Microsoft. Using timer objects, http://msdn.microsoft.com/en-us/library/ff565561.aspx.

    Necula GC, McPeak S, Rahul SP. Weimer W. CIL: intermediate language and tools for analysis and transformation of C programs. In: Proceedings of Conference on Compiler Construction (CC), Grenoble, France; April 2002.

    Orean Technology. Themida: Advanced Windows Software Protection System, 2008.

    Peter Ferrie. Attacks on Virtual Machines. In Proceedings of AVAR Conference, 2006.

    Petroni N, Fraser T, Molina J, Arbaugh WA. Copilotda coprocessor-based kernel runtime integrity monitor. In: Proceedings of USENIX security symposium'04; August 2004.

    Petroni N, Hicks M. Automated detection of persistent kernel control-flow attacks. In: Proceedings of ACM conference on computer and communications security (CCS'07); 2007.

    PRACTICALMALWARE ANALYSIS The Hands-On Guide to Dissecting Malicious Software 2012

    Prakash C.

Simulating the environment to prevent packers from being unpacked