Giter VIP home page Giter VIP logo

note-for-malware-19's Introduction

note-for-malware-19

No matter how sophisticated a packer may evolve, malware payload always interacts with Windows OS to perform malicious behavior(eg., code remote injection and ransomware's file encryption)

packer usually removes the payload's import address table to impede reverse engineering. Afterwards, the unpacking routine will obtain each API's address and rebuild the IAT at run time. In this way, the restored payload can invoke Windows APIs properly.

When a packed binary starts running, the original code is written in memory pages sometime and then get executed.(written-then-executed)

If an API is invoked through looking up a rebuilt IAT, it indicates that the original code has been restored, and the control flow has reached OEP already.(rebuilt-then-called)

The end of unpacking:

  1. the reconstruction of payload IAT happens ahead of the jump to OEP
  2. at run time, if an API is called through a rebuilt IAT rather than the unpacking routine IAT, it indicates that malware payload has been restored.

The advantages of stolen code: As many user-level API hooking techniques identify their target API calls by matching the virtual addresses where these APIs are expected to locate, stolen code will make such API hooking tools miss the target.

The advantages of child process and process hollowing: These two evasions are used to hide the presence of a malicious process. https://www.anquanke.com/post/id/145003

The concepts of crash hooking module: The packer tries to create an access violation exception by arbitrarily calling APIs with invalid arguments. In a non-hooking environment, Windows OS default exception handlers can handle such errors, so packed ransomware can run properly.

The advantages of DLL hijacking: Dll hijacking is immune to crash hooking module attack as it can naturally deliver runtime errors to Windows OS's exception handlers.

There are two types of evasion techniques used in current malware: hook evasion and target evasion Hook evasion is a technique to evade hooks set on the entry of APIs for monitoring. Target evasion is used for obfuscating the caller instruction of APIs. T How to set taint tags in a program: Pre-boot disk tainting and code taint propagation

Address Space Layout Randomisation (ASLR) is a technology used to help prevent shellcode from being successful. It does this by randomly offsetting the location of modules and certain in-memory structures. Data Execution Prevention (DEP) prevents certain memory sectors, e.g. the stack, from being executed.

note-for-malware-19's People

Contributors

squarekyzhong avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.