Hydra. Advanced x86 polymorphic engine. Incorporates existing techniques and introduces new ones in one package. All but one feature OS-independent



Similar documents
Software Vulnerabilities

Where s the FEEB? The Effectiveness of Instruction Set Randomization

Bypassing Anti- Virus Scanners

Analyzing Network Traffic To Detect Self-Decrypting Exploit Code

Stack Overflows. Mitchell Adair

Bypassing Memory Protections: The Future of Exploitation

Introduction to Reverse Engineering

Network Intrusion Detection Signatures, Part One by Karen Kent Frederick last updated December 19, 2001

Network Intrusion Detection with Semantics-Aware Capability

風 水. Heap Feng Shui in JavaScript. Alexander Sotirov.

Data Structure Reverse Engineering

Attacking Obfuscated Code with IDA Pro. Chris Eagle

CS 356 Lecture 27 Internet Security Protocols. Spring 2013

Mohammad Masud, Latifur Khan, Bhavani Thuraisingham, Xinran Wang, Peng Liu and Sencun Zhu

Exploiting nginx chunked overflow bug, the undisclosed attack vector

Stack machines The MIPS assembly language A simple source language Stack-machine implementation of the simple language Readings:

Improving Signature Testing Through Dynamic Data Flow Analysis

How To Protect Your Network From Attack From A Virus And Attack From Your Network (D-Link)

Hotpatching and the Rise of Third-Party Patches

Chapter 6 CDMA/802.11i

Lecture 26: Obfuscation

1. Define: (a) Variable, (b) Constant, (c) Type, (d) Enumerated Type, (e) Identifier.

An overview of FAT12

NetDefend Firewall UTM Services

Identification and Removal of

Return-oriented programming without returns

For a 64-bit system. I - Presentation Of The Shellcode

Bypassing Browser Memory Protections in Windows Vista

Custom Penetration Testing

Firewalls and Intrusion Detection

Linux Network Security

Diving into a Silverlight Exploit and Shellcode - Analysis and Techniques

Binary Code Extraction and Interface Identification for Security Applications

Intrusion Detection Systems and Supporting Tools. Ian Welch NWEN 405 Week 12

From Georgia, with Love Win32/Georbot. Is someone trying to spy on Georgians?

Post-Access Cyber Defense

Hacking Techniques & Intrusion Detection. Ali Al-Shemery arabnix [at] gmail

Automatic Network Protocol Analysis

Attacking Host Intrusion Prevention Systems. Eugene Tsyrklevich

Heap-based Buffer Overflow Vulnerability in Adobe Flash Player

How Lastline Has Better Breach Detection Capabilities. By David Strom December 2014

TitanMist: Your First Step to Reversing Nirvana TitanMist. mist.reversinglabs.com

CS412/CS413. Introduction to Compilers Tim Teitelbaum. Lecture 20: Stack Frames 7 March 08

Midterm. Name: Andrew user id:

Stitching the Gadgets On the Ineffectiveness of Coarse-Grained Control-Flow Integrity Protection

International Journal of Computer Science and Network (IJCSN) Volume 1, Issue 5, October ISSN Bhopal, M.P.

What Is Recursion? Recursion. Binary search example postponed to end of lecture

A DATA MINING TECHNIQUE TO DETECT REMOTE EXPLOITS

13 Virtual Private Networks 13.1 Point-to-Point Protocol (PPP) 13.2 Layer 2/3/4 VPNs 13.3 Multi-Protocol Label Switching 13.4 IPsec Transport Mode

Last Class: OS and Computer Architecture. Last Class: OS and Computer Architecture

1 Step 1: Select... Files to Encrypt 2 Step 2: Confirm... Name of Archive 3 Step 3: Define... Pass Phrase

Detailed Specifications

NetDefend Firewall UTM Services

Polymorphic Worm Detection Using Structural Information of Executables

SMPP protocol analysis using Wireshark (SMS)

Introduction. Application Security. Reasons For Reverse Engineering. This lecture. Java Byte Code

X86-64 Architecture Guide

Computer Virus Strategies and Detection Methods

RIA SECURITY TECHNOLOGY

Streamlined Malware Incident Response with EnCase

Application-Specific Attacks: Leveraging the ActionScript Virtual Machine

Abysssec Research. 1) Advisory information. 2) Vulnerable version

CORPORATE AV / EPP COMPARATIVE ANALYSIS

telnetd exploit FreeBSD Telnetd Remote Exploit Für Compass Security AG Öffentliche Version 1.0 Januar 2012

Intel Hexadecimal Object File Format Specification Revision A, 1/6/88

Fighting malware on your own

INTRODUCTION TO MALWARE & MALWARE ANALYSIS

CVE Adobe Flash Player Integer Overflow Vulnerability Analysis

Advanced Computer Architecture-CS501. Computer Systems Design and Architecture 2.1, 2.2, 3.2

How To Make An Attack Unnoticed By A Network Security System (Ipo) Or A Network (Ngfw) Without Being Detected (Ngw)

A Tiny Guide to Programming in 32-bit x86 Assembly Language

1) The postfix expression for the infix expression A+B*(C+D)/F+D*E is ABCD+*F/DE*++

Secure Web Application Coding Team Introductory Meeting December 1, :00 2:00PM Bits & Pieces Room, Sansom West Room 306 Agenda

Bypassing Windows Hardware-enforced Data Execution Prevention

Return-oriented Programming: Exploitation without Code Injection

ASSEMBLY PROGRAMMING ON A VIRTUAL COMPUTER

HASH CODE BASED SECURITY IN CLOUD COMPUTING

Chapter 17. Transport-Level Security

Identifying and Exploiting Padding Oracles. Brian Holyfield Gotham Digital Science

Quick Reference Guide. Online Courier: FTP. Signing On. Using FTP Pickup. To Access Online Courier.

Overview/Questions. What is Cryptography? The Caesar Shift Cipher. CS101 Lecture 21: Overview of Cryptography

A Link Layer Discovery Protocol Fuzzer

How the Great Firewall discovers hidden circumvention servers. Roya Ensafi David Fifield Philipp Winter Nick Weaver Nick Feamster Vern Paxson

EU FP6 LOBSTER. personal view on the future of ero-day Worm Containment. European Infrastructure for accurate network monitoring

TEST METHODOLOGY. Endpoint Protection Evasion and Exploit. v4.0

From SQL Injection to MIPS Overflows

Defense in Depth: Protecting Against Zero-Day Attacks

Krishna Institute of Engineering & Technology, Ghaziabad Department of Computer Application MCA-213 : DATA STRUCTURES USING C

Hacking your perimeter. Social-Engineering. Not everyone needs to use zero. David Kennedy (ReL1K) Twitter: Dave_ReL1K

Internet Firewall CSIS Internet Firewall. Spring 2012 CSIS net13 1. Firewalls. Stateless Packet Filtering

Architecture Flaws Internet Security Systems. All rights reserved. Contents are property of Internet Security Systems.

TCP Session Management (SesM) Protocol Specification

The Beast is Resting in Your Memory On Return-Oriented Programming Attacks and Mitigation Techniques To appear at USENIX Security & BlackHat USA, 2014

IPsec Details 1 / 43. IPsec Details

Harnessing Intelligence from Malware Repositories

Lecture Outline. Stack machines The MIPS assembly language. Code Generation (I)

Removing Sentinel SuperPro dongle from Applications and details on dongle way of cracking Shub-Nigurrath of ARTeam Version 1.

I Control Your Code Attack Vectors Through the Eyes of Software-based Fault Isolation. Mathias Payer, ETH Zurich

Betriebssysteme KU Security

Automating Mimicry Attacks Using Static Binary Analysis

Transcription:

Hydra Advanced x86 polymorphic engine Incorporates existing techniques and introduces new ones in one package All but one feature OS-independent

Random register operations Different synonymous instructions per invocation. Hydra provides a large library of such instructions and a platform to add more. For some operations, the key used is randomly generated to further obfuscate the payload. Two ways to clear a register Method 1: mov reg, <key> sub reg, <key> Method 2: push dword <key> pop reg sub reg, <key>

Recursive NOP generator Traditional shellcode engines use static array of possible NOPs to generate NOP sleds not very random! Hydra uses a built-in NOP generator that dynamically builds a library of possible NOP instructions. Find all 1-byte NOP by brute-force. Brute-force two-byte NOPs where 2 nd byte is another NOP. Repeat. Larger NOP instructions recursively contain smaller NOPs irrelevant where control flow lands. More than 1.9M NOP instructions found!

Recursive NOP generator The NOP instructions can also be used in between the decoder instructions; adds variability to size and content of the decoder Two types of NOPs normal NOPs and state-safe NOPs State-safe NOP library does not contain instructions which modify the environment (stack, registers, flow control) Only these have to be used in between instructions, else state is destroyed!

Multi-Layer Ciphering Hydra uses randomly select ciphers on the payload. Random cipher operations: ror, rol, xor, add, sub, etc Cipher order is random each time. No signature! Random 32-bit keys chosen for each operation. Six rounds of ciphering by default can specify arbitrary any rounds.

ASCII Encoder Need to send ASCII payload to text based protocols (HTTP) to evade anomaly sensors. Hydra picks ASCII NOPs from the NOP-generator to construct the NOP section. Choice of more than 4000 instructions. The ASCII NOPs are also inserted in between decoder instructions and shellcode to further obfuscate both content and size. Modular nature of the engine allows the ASCII encoding to combine with any/all of the other options.

Bi-partite Decoding Signatures for payloads = Pwned! But most IDS systems can look for a decoder. Cipher loop: xor, ror, shr, shl, etc. Static decoders = fail. Hydra uses dynamically generated non-contiguous decoders! Different instructions each time, different keys, different positions. Currently bi-partite decoding: decoders wrap around payload. Ultimate goal: tighter integration within payload.

Spectrum Shaping Signatures fail so bust out the math. The frequency of bytes which correspond to x86 instructions should look different from those of normal traffic, right? Wrong! Hydra does alphanumeric encoding No binary! Hydra pads your shellcode with bytes to make it look statistically similar to normal traffic. Just give it sample files, it does the training automatically.

Spectrum Shaping Hydra learns a 1-byte distribution for the target, then uses Monte Carlos simulation to make your shellcode mimic this distribution. Padding at the end is too simple; Hydra automatically spaces out your shellcode instructions inserts the blending bytes in between these instructions. Spacing is adjustable. Higher-byte mimicry also possible, under development.

Randomized Address Zone Sequence of repeated target addresses. Overwrites %esp on stack to point to payload. Simple IDS signature: NOPs and repeated numbers = sled + return zone. Break signatures by adding random offsets to each address in the return zone. Aim for the middle of the NOP sled.

Forking Shellcode Successful exploit = target process hangs! NOT GOOD Solution: fork() ing shellcode. Child executes payload, parent tries to recover the exploited process. Recovery is hard correct %eip is normally lost during overflow. Need to know target process address space relative offset. Hydra fork()s your shellcode for you automatically!

Time-Cipher Shellcode So can t use signatures, can t use statistics, now what? Emulators! Build stripped down x86 emulator. Dynamically execute ALL network traffic and look for self-decryption. Sounds nuts but people have done it! Polychronakis citation Kruegal dynamic disassembly Solution? Syscall-based ciphering! Exploit the fact that emulators can t handle full OS features.

Time-Cipher Shellcode Cipher your shellcode with special key that can only be recovered when executing with a real OS. Can t carry the key, that defeats the purpose. Need the key to be recoverable from the target. Can t be static. Solution: the time() syscall! Use the most significant bytes of result as the key: time-locked shellcode.

Time-Cipher Shellcode The key is used to decipher the primary cipher instructions in the main loop body. If proper key isn t recovered then main cipher loop doesn t execute correctly illegal instructions. Payload remains encrypted and undetected by the emulator. Cipher chaining with time as the initialization vector. Can set a shell-life for the code: good for only a short period of time.

Conclusion Hydra is a new shellcode polymorphism engine designed to foil an array of known IDS methods. Why? Because understanding the problem is half the solution. Still under development mostly. For future updates check: Pratap Prahbu: pvp2105@columbia.edu Yingbo Song: yingbo@cs.columbia.edu Columbia University Intrusion Detection Systems Lab: http://www.cs.columbia.edu/ids