security research and development framework · security research and development framework by amr...

43
LOGO Security Research and Development Framework By Amr Thabet Malware Researcher @Q-CERT

Upload: others

Post on 23-Mar-2020

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Security Research and Development Framework · Security Research and Development Framework By Amr Thabet Malware Researcher @Q-CERT . About The Author Malware Researcher at Q-CERT

LOGO

Security Research and Development

Framework

By Amr Thabet

Malware Researcher

@Q-CERT

Page 2: Security Research and Development Framework · Security Research and Development Framework By Amr Thabet Malware Researcher @Q-CERT . About The Author Malware Researcher at Q-CERT

About The Author

Malware Researcher at Q-CERT

Wrote a Stuxnet Malware Analysis Paper

Author of Pokas x86 Emulator

Author of SRDF (what we will talk about)

Page 3: Security Research and Development Framework · Security Research and Development Framework By Amr Thabet Malware Researcher @Q-CERT . About The Author Malware Researcher at Q-CERT

Introduction

Development Framework (Library)

Contains many security classes/tools

Created For:

Malware Analysis

Packet Analysis

Antivirus and Firewall Tools

Free and Open Source

Page 4: Security Research and Development Framework · Security Research and Development Framework By Amr Thabet Malware Researcher @Q-CERT . About The Author Malware Researcher at Q-CERT

Why SRDF?

For This Guy !!

Page 5: Security Research and Development Framework · Security Research and Development Framework By Amr Thabet Malware Researcher @Q-CERT . About The Author Malware Researcher at Q-CERT

Why SRDF?

Implement your Inovative Idea

Don’t re-invent The Wheel

Don’t waste your time

Flexible Design

Production Quality

Community Based Development and Beta-testing

Page 6: Security Research and Development Framework · Security Research and Development Framework By Amr Thabet Malware Researcher @Q-CERT . About The Author Malware Researcher at Q-CERT

Contents

Design

• User-Mode

• Kernel-Mode

• Features

Major Projects

• Packetyzer

• x86 Emulator

Projects Based on SRDF

• Inspector’s Gadget

• Exploitation Detection System (EDS)

Page 7: Security Research and Development Framework · Security Research and Development Framework By Amr Thabet Malware Researcher @Q-CERT . About The Author Malware Researcher at Q-CERT

User-Mode Design

Page 8: Security Research and Development Framework · Security Research and Development Framework By Amr Thabet Malware Researcher @Q-CERT . About The Author Malware Researcher at Q-CERT

User-Mode Design

Infrastructure:

The Common Part at any Framework … not related to

security

Targets:

What you will secure or secure from

Libraries:

The Security Tools are here … it’s divided into Malware

and Network

Core:

The interface and the managment

Page 9: Security Research and Development Framework · Security Research and Development Framework By Amr Thabet Malware Researcher @Q-CERT . About The Author Malware Researcher at Q-CERT

Features

Full OOP

PE, ELF, PDF and Andorid File Parsers

x86 Disassembler, Debugger and Emulator

API Hooking

Packet, Protocol and Network Flow Analysis

Production Quality

FREE and Open Source

Page 10: Security Research and Development Framework · Security Research and Development Framework By Amr Thabet Malware Researcher @Q-CERT . About The Author Malware Researcher at Q-CERT

Kernel-Mode

Support x32 Bits until now

Little bit old

Should be extended to x64

Under Construction

Page 11: Security Research and Development Framework · Security Research and Development Framework By Amr Thabet Malware Researcher @Q-CERT . About The Author Malware Researcher at Q-CERT

Kernel- Mode Design

Page 12: Security Research and Development Framework · Security Research and Development Framework By Amr Thabet Malware Researcher @Q-CERT . About The Author Malware Researcher at Q-CERT

Major Projects

• Packetyzer

• x86 Emulator

Page 13: Security Research and Development Framework · Security Research and Development Framework By Amr Thabet Malware Researcher @Q-CERT . About The Author Malware Researcher at Q-CERT

Packetyzer

Created By Anwar Mohamed

Packet Analysis Tool

Session Separation

Generating Packets and Send (Winpcap)

Decodes:

ARP,ICMP,TCP,UDP

HTTP, DNS

Parse PCAP Files

Reassemble Packets

Page 14: Security Research and Development Framework · Security Research and Development Framework By Amr Thabet Malware Researcher @Q-CERT . About The Author Malware Researcher at Q-CERT

Design

Page 15: Security Research and Development Framework · Security Research and Development Framework By Amr Thabet Malware Researcher @Q-CERT . About The Author Malware Researcher at Q-CERT

Simple Demo – Read Pcap File

Page 16: Security Research and Development Framework · Security Research and Development Framework By Amr Thabet Malware Researcher @Q-CERT . About The Author Malware Researcher at Q-CERT

Simple Demo – DNS Streams

Page 17: Security Research and Development Framework · Security Research and Development Framework By Amr Thabet Malware Researcher @Q-CERT . About The Author Malware Researcher at Q-CERT

Simple Demo – HTTP Streams

Page 18: Security Research and Development Framework · Security Research and Development Framework By Amr Thabet Malware Researcher @Q-CERT . About The Author Malware Researcher at Q-CERT

Simple Demo – HTTP Output

Page 19: Security Research and Development Framework · Security Research and Development Framework By Amr Thabet Malware Researcher @Q-CERT . About The Author Malware Researcher at Q-CERT

Packetyzer

Reach it at:

https://github.com/AnwarMohamed/Packetyzer

It’s also a Part of SRDF

Page 20: Security Research and Development Framework · Security Research and Development Framework By Amr Thabet Malware Researcher @Q-CERT . About The Author Malware Researcher at Q-CERT

Pokas Emulator

For win32 Applications

very powerful debugger

Monitor Memory Writes

Emulate PE Files and Shellcode

Dump The Process

Reconstruct Import Table

SRDF has a Wrapper Class for it

Page 21: Security Research and Development Framework · Security Research and Development Framework By Amr Thabet Malware Researcher @Q-CERT . About The Author Malware Researcher at Q-CERT

Design

Page 22: Security Research and Development Framework · Security Research and Development Framework By Amr Thabet Malware Researcher @Q-CERT . About The Author Malware Researcher at Q-CERT

The Emulator’s Debugger

Take String Condition

Convert it into Native Code

Very Fast

Easy to Customize

Have Predefined Functions

Allow to Add Function

Page 23: Security Research and Development Framework · Security Research and Development Framework By Amr Thabet Malware Researcher @Q-CERT . About The Author Malware Researcher at Q-CERT

Examples

“__isdirty(eip)“

"__disp() >=0x00401000 &&ecx>10“

"(eax& 0xff)> 5*(edx& 0xff) || __read(0x401000)==0x500“

"__isapiequal('getprocaddress') || __isapiequal('loadlibraryA')“

Page 24: Security Research and Development Framework · Security Research and Development Framework By Amr Thabet Malware Researcher @Q-CERT . About The Author Malware Researcher at Q-CERT

Demo: Unpack UPX - PEid

Page 25: Security Research and Development Framework · Security Research and Development Framework By Amr Thabet Malware Researcher @Q-CERT . About The Author Malware Researcher at Q-CERT

Demo: Unpack UPX – ImportTable

Page 26: Security Research and Development Framework · Security Research and Development Framework By Amr Thabet Malware Researcher @Q-CERT . About The Author Malware Researcher at Q-CERT

Demo: Unpack UPX - Code

Page 27: Security Research and Development Framework · Security Research and Development Framework By Amr Thabet Malware Researcher @Q-CERT . About The Author Malware Researcher at Q-CERT

Demo: Unpack UPX – Run Code

Page 28: Security Research and Development Framework · Security Research and Development Framework By Amr Thabet Malware Researcher @Q-CERT . About The Author Malware Researcher at Q-CERT

Demo: Unpack UPX - Unpacked

Page 29: Security Research and Development Framework · Security Research and Development Framework By Amr Thabet Malware Researcher @Q-CERT . About The Author Malware Researcher at Q-CERT

Demo: Unpack UPX - ImportTable

Page 30: Security Research and Development Framework · Security Research and Development Framework By Amr Thabet Malware Researcher @Q-CERT . About The Author Malware Researcher at Q-CERT

x86 Emulator

Reach it at:

https://github.com/AmrThabet/x86Emulator

Page 31: Security Research and Development Framework · Security Research and Development Framework By Amr Thabet Malware Researcher @Q-CERT . About The Author Malware Researcher at Q-CERT

Projects Based on SRDF

• Inspector’s Gadget

• Exploitation Detection System

Page 32: Security Research and Development Framework · Security Research and Development Framework By Amr Thabet Malware Researcher @Q-CERT . About The Author Malware Researcher at Q-CERT

Inspector’s Gadget

Created by Jonas lykkegaard

ROP gadget indexing and searching tool.

Emulating Gadgets

Scoring and Categorizing

Flexible Search

Page 33: Security Research and Development Framework · Security Research and Development Framework By Amr Thabet Malware Researcher @Q-CERT . About The Author Malware Researcher at Q-CERT

Design

Page 34: Security Research and Development Framework · Security Research and Development Framework By Amr Thabet Malware Researcher @Q-CERT . About The Author Malware Researcher at Q-CERT

Features

Categorizing by Behavior

Scoring Gadgets

Allow ret, pop/jmp, iret and ret far

Depends on SQLite

SQL Searching

Predefined SQL Queries

GUI Based

Page 35: Security Research and Development Framework · Security Research and Development Framework By Amr Thabet Malware Researcher @Q-CERT . About The Author Malware Researcher at Q-CERT

GUI

Page 36: Security Research and Development Framework · Security Research and Development Framework By Amr Thabet Malware Researcher @Q-CERT . About The Author Malware Researcher at Q-CERT
Page 37: Security Research and Development Framework · Security Research and Development Framework By Amr Thabet Malware Researcher @Q-CERT . About The Author Malware Researcher at Q-CERT

Exploitation Detection System

Security Mitigation Tool

Detect memory corruption exploits

Based on SRDF

Talked about it in

Reach it at:Defcon 21 archive

Page 38: Security Research and Development Framework · Security Research and Development Framework By Amr Thabet Malware Researcher @Q-CERT . About The Author Malware Researcher at Q-CERT

Normal API call check

Page 39: Security Research and Development Framework · Security Research and Development Framework By Amr Thabet Malware Researcher @Q-CERT . About The Author Malware Researcher at Q-CERT

API call with Ret

Page 40: Security Research and Development Framework · Security Research and Development Framework By Amr Thabet Malware Researcher @Q-CERT . About The Author Malware Researcher at Q-CERT

Reach Us

SRDF Links:

https://github.com/AmrThabet/winSRDF

FB: http://www.facebook.com/SecDevelop

Twitter: https://twitter.com/winSRDF

Website: http://security-framework.com/

Page 41: Security Research and Development Framework · Security Research and Development Framework By Amr Thabet Malware Researcher @Q-CERT . About The Author Malware Researcher at Q-CERT

Conclusion

Development Framework for security

Contains many tools in Malware and Network

Flexible expandable Design

Kernel-Mode and User-Mode

Free and Open Source

Join Us

Page 42: Security Research and Development Framework · Security Research and Development Framework By Amr Thabet Malware Researcher @Q-CERT . About The Author Malware Researcher at Q-CERT

Any Question?

Page 43: Security Research and Development Framework · Security Research and Development Framework By Amr Thabet Malware Researcher @Q-CERT . About The Author Malware Researcher at Q-CERT

LOGO