Impeding Automated Malware Analysis with Environment-sensitive - - PowerPoint PPT Presentation

impeding automated malware analysis with environment
SMART_READER_LITE
LIVE PREVIEW

Impeding Automated Malware Analysis with Environment-sensitive - - PowerPoint PPT Presentation

Impeding Automated Malware Analysis with Environment-sensitive Malware Chengyu Song , Paul Royal and Wenke Lee College of Computing Georgia Institute of Technology Agenda l Background l Defeating Automated Malware Analysis Host


slide-1
SLIDE 1

Impeding Automated Malware Analysis with Environment-sensitive Malware

Chengyu Song, Paul Royal and Wenke Lee College of Computing Georgia Institute of Technology

slide-2
SLIDE 2

Agenda

l Background l Defeating Automated Malware Analysis

– Host Identity-based Encryption (HIE) – Instruction Set Localization (ISL) – Flashback

l Discussion

– Potential Countermeasures

l Conclusion

slide-3
SLIDE 3

Background

slide-4
SLIDE 4

Malware & Analysis

l The centerpiece of current threats

  • n the Internet

l There is a pronounced need to understand malware behavior

– Threat Discovery and Analysis – Compromise Detection – Forensics and Asset Remediation – Infrastructure Dismantlement

slide-5
SLIDE 5

The Arms Race

l Anti-analysis techniques

– Code Obfuscation

  • Packing, instruction set virtualization

– Analysis environments detection

  • Debugger, emulator, virtual machine

l New analysis techniques

– Automated unpacking – Automated emulator reverse engineering – New analysis environment

  • Cobra, Ether, Bare-metal based
slide-6
SLIDE 6

Challenges & Goal

l Two challenges for obfuscation techniques

– Analysis environment detection is not reliable – Hiding high level behavior is impossible

l Goal

– Make automated malware analysis ineffective and unscalable

slide-7
SLIDE 7

Defeating Automate Malware Analysis

slide-8
SLIDE 8

Reverting the Detection

l “Analysis environment oblivious”

– Exploit observation that malware is

  • verwhelmingly collected in one

environment and analyzed in another – Cryptographically bind a malware instance to the originally infected host

l Techniques

– Host Identity-based Encryption (HIE) – Instruction Set Localization (ISL)

slide-9
SLIDE 9

Host Identity-based Encryption

l Replace random encryption key with a key derived from host identity

l Host ID: Information that can uniquely identify a host

Push EBP MOV EBP, ESP SUB ESP, 8 CALL 00401170 …

Program A

Encrypt/ Compress/ Transform

Obfuscation Tool

<Unpack Code> Paulroy Phillip Robert eijadd3 …

Program A’

Collect Host ID Encryption Key

slide-10
SLIDE 10

HIE Cont’d

l Requirements for Host ID

– Unique – Invariant (to avoid false positives)

  • Can be as short as lifecycle of the

malware campaign (e.g., days or weeks)

– Can be gathered without privileges – No special hardware support

slide-11
SLIDE 11

HIE Cont’d

l Prototype Host ID (Windows)

– Subset of Process Environment Block

  • Username, Computer Name, CPU

Identifier

– MAC Address – GPU Information

  • GetAdapterIdentifier

– User Security Identifier (SID)

  • Randomly generated by the OS
  • Unique across a Windows domain
slide-12
SLIDE 12

HIE Cont’d

l Deployment Logistics

– Host ID must be determined before malware instance is installed

  • Use intermediate downloader agent

– Intermediate agent could be used by researchers to obtain instance bound to analysis environment

  • Use short-lived, one-time URLs similar to

password reset procedures

slide-13
SLIDE 13

HIE Cont’d

l Advantages

– Protections of Modern Cryptography

  • Knowledge of how key is derived does not

affect the integrity of the protection

– Sample Independence

  • Intelligence collected from one malware

instance provides no advantage in analyzing another

slide-14
SLIDE 14

Instruction Set Localization

l Why ISL?

– Pure host-based protection is not sufficiently resistant to forgery

l Goal of ISL

– Use C&C server to “authenticate” malware client based on both host and network identity – Decouple malicious functionality to prevent offline analysis

slide-15
SLIDE 15

Malware

ISL Cont’d

l Replace random instruction set with instruction set bound to the host

Client C&C Server

Host-ID Network ID PL Malicious Functionality (PX86 ) Translation Bytecode (PL ) Host-ID Generation Module Emulator (EMx86 )

slide-16
SLIDE 16

ISL Cont’d

l Prototype Network ID

– Geo-location

  • Granularity of state/province level (IP

address is not stable)

– Permits certain level of mobility

– Autonomous System Number (ASN)

  • Geo-location may be outdated or incorrect

– Collected at C&C

  • Considered intractably difficult to forge
slide-17
SLIDE 17

ISL Cont’d

l Alternative to Unique Instruction Sets

– Instruction set derivation is not trivial – Use task decryption key

  • Assigned when the malware instance is

delivered to the host

  • Encrypt bytecode tasks using the unique

ID (the key derived from host ID and network ID)

– KDF = HMAC(unique ID), or keyed hash, with the secret key kept at C&C server

slide-18
SLIDE 18

ISL Cont’d

l Advantages

– More extensible

  • Malware Platform-as-a-Service

– Behavior identification is complicated

  • The HIE protected binary contains no

malicious behaviors

– Resistant to analysis and tracing

  • Offline analysis is impossible
  • Unless the analyst can correctly mimic the

host and network environment, tasks will not decrypt/execute

slide-19
SLIDE 19

Flashback

l Propagated in part by drive-by downloads l Payload is only intermediate agent

– Agent gathers hardware UUID, submits request to C&C for full version – Hardware UUID hashed (MD5), hash used as decryption key to RC4 stream cipher – Full version will only run on host with same hardware UUID

slide-20
SLIDE 20

Discussion

slide-21
SLIDE 21

Operational Security

l Both HIE and ISL use modern cryptography

– Same environment must be provided for successful analysis – Without access to original environment, entire key space must be searched

  • Key space can be of arbitrary size

– Some configurations may be impossible to duplicate

slide-22
SLIDE 22

Operational Security Cont’d

l HIE and ISL are insensitive to analysis techniques

– General knowledge of these techniques does not compromise protections offered – Granularity of analysis used does not affect protections – Protections can be broken only if the configuration parameters of the

  • riginal execution environment are

matched

slide-23
SLIDE 23

Potential Countermeasures

l Analyze malware on the original infected host

– Approach would require allowing otherwise blocked suspicious/known malware to execute on a legitimate system

  • Could impact business operations and continuity
  • Would have complex legal and privacy

implications

l Use high-interaction honeypot

– Bind malware to analysis environment by replicating compromise circumstances

  • Inefficient
  • Bound samples will comprise only a small portion
  • f all collected samples
slide-24
SLIDE 24

Countermeasures Cont’d

l Collect and duplicate host and network environment information

– Depending on the information, may have privacy and policy problems – Duplicating network identifier requires analysis system deployment on an unprecedented and globally cooperative scale

slide-25
SLIDE 25

Countermeasures Cont’d

l Collect and duplicate only host identifier, record and replay the network interaction in separate environment

– Without small additional protection, could bypass ISL – Mitigated by using SSL/TLS to encrypt the C&C channel

slide-26
SLIDE 26

Countermeasures Cont’d

l Employ allergy attack

– Make the information used by HIE and ISL unstable

  • For example, change MAC address,

username, SID for every program invocation

  • Malware would not execute correctly

successfully on the infected host

– Would affect a variety of legitimate software – Success would depend on the willingness of users to accept security

  • ver usability
slide-27
SLIDE 27

Conclusion

l Historically, malware has been “analysis environment aware” l Malware can be “analysis environment oblivious”, and very likely to be

– Flashback Malware

l Future work must mitigate these protections or more importantly, examine alternatives to threat detection and analysis

slide-28
SLIDE 28

Thanks