Python Arsenal for Reverse Engineering. Dmitriy D1g1 Evdokimov Head of research center Digital Security

Similar documents
Custom Penetration Testing

Mobile Application Hacking for Android and iphone. 4-Day Hands-On Course. Syllabus

ASL IT SECURITY XTREME XPLOIT DEVELOPMENT

Light and Dark side of Code Instrumentation. Dmitriy D1g1 Evdokimov DSecRG, Security Researcher

A Dozen Years of Shellphish From DEFCON to the Cyber Grand Challenge

Dongwoo Kim : Hyeon-jeong Lee s Husband

Hotpatching and the Rise of Third-Party Patches

Security & Exploitation

Compilers and Tools for Software Stack Optimisation

Cyber Security Challenge Australia.

Fine-grained covert debugging using hypervisors and analysis via visualization

ios applications reverse engineering Julien Bachmann

Mobile Application Hacking for ios. 3-Day Hands-On Course. Syllabus

Testing for Security

Attacking Obfuscated Code with IDA Pro. Chris Eagle

BARF: A multiplatform open source Binary Analysis and Reverse engineering Framework

Modern Binary Exploitation Course Syllabus

Reverse Engineering and Computer Security

Bug hunting. Vulnerability finding methods in Windows 32 environments compared. FX of Phenoelit

Ivan Medvedev Principal Security Development Lead Microsoft Corporation

Real-time Debugging using GDB Tracepoints and other Eclipse features

Multi-/Many-core Modeling at Freescale

Intel Tunnel Mountain Software Development Platform Overview, IHV Tools Update

WINDOWS PHONE 8 APPLICATION SECURITY

Reverse Engineering by Crayon: Game Changing Hypervisor and Visualization Analysis

Exploiting nginx chunked overflow bug, the undisclosed attack vector

AGENDA. Background. The Attack Surface. Case Studies. Binary Protections. Bypasses. Conclusions

SYLLABUS MOBILE APPLICATION SECURITY AND PENETRATION TESTING. MASPT at a glance: v1.0 (28/01/2014) 10 highly practical modules

When Security Gets in the Way. PenTesting Mobile Apps That Use Certificate Pinning

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

High Performance or Cycle Accuracy?

Pentesting client/server API. Sergey Belov

Advanced ANDROID & ios Hands-on Exploitation

Mobile Payment Security

ABSTRACT' INTRODUCTION' COMMON'SECURITY'MISTAKES'' Reverse Engineering ios Applications

Virtualization System Vulnerability Discovery Framework. Speaker: Qinghao Tang Title:360 Marvel Team Leader

GPU Profiling with AMD CodeXL

Example of Standard API

Threat Intelligence Pty Ltd Specialist Security Training Catalogue

Application-Level Debugging and Profiling: Gaps in the Tool Ecosystem. Dr Rosemary Francis, Ellexus

Reversing in OS X - what s different

Web Application Security Payloads. Andrés Riancho Director of Web Security OWASP AppSec USA Minneapolis

How to hack VMware vcenter server in 60 seconds

RISC-V Software Ecosystem. Andrew Waterman UC Berkeley

IRON-HID: Create your own bad USB. Seunghun Han

From SQL Injection to MIPS Overflows

Lecture 26: Obfuscation

Red Hat Developer Toolset 1.1

CompTIA Mobile App Security+ Certification Exam (ios Edition) Live exam IOS-001 Beta Exam IO1-001

Embedded Software development Process and Tools:

Bypassing Memory Protections: The Future of Exploitation

Please Complete Speaker Feedback Surveys. SecurityTube.net

The Hacker Strategy. Dave Aitel Security Research

Easing embedded Linux software development for SBCs

ANTI-HACKER TOOL KIT. ourth Edition

Fighting Advanced Persistent Threats (APT) with Open Source Tools

Chapter 12. Development Tools for Microcontroller Applications

Melde- und Analysestelle Informationssicherung MELANI Torpig/Mebroot Reverse Code Engineering (RCE)

DsPIC HOW-TO GUIDE Creating & Debugging a Project in MPLAB

Advanced Metering Infrastructure Security

Persist It Using and Abusing Microsoft s Fix It Patches

Format string exploitation on windows Using Immunity Debugger / Python. By Abysssec Inc

ios Testing Tools David Lindner Director of Mobile and IoT Security

What Happens In Windows 7 Stays In Windows 7

STLinux Software development environment

The OWASP Foundation

Hacking your Droid ADITYA GUPTA

Instruction Set Design

Game Design From Concepts To Implementation

All Your Code Belongs To Us Dismantling Android Secrets With CodeInspect. Steven Arzt Secure Software Engineering Group Steven Arzt 1

Reversing Android Malware

HOW I MET YOUR MODEM EXPLOIT & TROJAN DEV FOR CONSUMER DSL DEVICES HACK IN THE BOX 2013 AMSTERDAM - PETER GEISSLER & STEVEN KETELAAR

Bypassing Browser Memory Protections in Windows Vista

Security Intelligence Services. Cybersecurity training.

Fighting Advanced Persistent Threats (APT) with Open Source Tools

Eddy Integrated Development Environment, LemonIDE for Embedded Software System Development

Exploitation of Windows 8 Metro Style Apps. The Subway Line 8. Ming-chieh Pan (Nanika) Sung-ting Tsai (TT)

Mobile Application Security Testing ASSESSMENT & CODE REVIEW

ددم یلع اي PROFILE Name: Date of Birth: Marriage: Job experience: WORKING EXPERIENCE December 2014 Present MCI and April 2013 December 2014

10 STEPS TO YOUR FIRST QNX PROGRAM. QUICKSTART GUIDE Second Edition

CS 40 Computing for the Web

Introduction. Figure 1 Schema of DarunGrim2

Application Security Testing

Frysk The Systems Monitoring and Debugging Tool. Andrew Cagney

Linux. Reverse Debugging. Target Communication Framework. Nexus. Intel Trace Hub GDB. PIL Simulation CONTENTS

Chapter 3.2 C++, Java, and Scripting Languages. The major programming languages used in game development.

(State of) The Art of War: Offensive Techniques in Binary Analysis

FFRI, Inc.

AQA GCSE in Computer Science Computer Science Microsoft IT Academy Mapping

Development_Setting. Step I: Create an Android Project

Paul Sabanal IBM X-Force Advanced Research. State Of The ART. Exploring The New Android KitKat Runtime IBM Corporation

Transcription:

Dmitriy D1g1 Evdokimov Head of research center Digital Security

#whoami Security researcher from Digital Security Section editor in the Xakep magazine Co-organizer of DEFCON Russia & ZeroNights Author of Python Arsenal for Reverse I specialize in finding vulnerabilities in binary applications without source code. I perform analysis of mobile applications designed for Android OS, ios, and WindowsPhone OS. Speaker at ZeroNights, Confidense, HackInParis, BlackHat, and SAS conferenсes. 2

Real life tasks vs. CTF tasks Same goal but different conditions Time Environment Code size Code complexity Instruments are common 3

Fuzzing/RE RE Python Arsenal for Reverse Vuln finding Find vuln Exploitable? Write exploit RE Fuzzing RE Shellcode ROP - Recovery data format - Increase code coverage input Suspicious code - Decompilation - Emulation - Programmable debugging - DBI - Timeless debugging - Symbolic execution - Concolical Execution + - Intermediate languages - SMT solvers - 4

Tools Edgar Barbosa Program Analysis Tools, SyScan360, 2015 5

History ~ 2010 Internal usage 5 October, 2011 Public PDF document 21 November, 2012 Site Thx to Anton Astafiev Slides Python Arsenal for Reverse from ZeroNights 2012 20 October, 2014 Twitter account @PythonArsenal 6

Site 143 libraries Advanced search Examples, articles and etc. 7

Bindings\Interface\Wrapper\API\... IDA Pro WinDbg gdb OllyDbg Radare ImmunityDbg BAP BinNavi Capstone ptrace Hopper LLVM Pin Medusa Bochs Libemu OpenREIL Frida Valgrind Unicorn Z3 LibVMI Different engines but same language. It allows us to easily integrate them into each other. 8

Example Programmable debugging in WinDBG with pykd WinDBG commands execution dbgcommand(commandstr) Debugger control commands go() trace() step() Conditional breakpoints setbp(addr, callback) Debugging events monitor class eventhandler onbreakpoint/onexception/onloadmodule/onunloadmodule 9

Python everywhere ~130 libraries Kplugs, LLA, pykd, PyVMI, ramooflax CHIPSEC, BITS, UEFI Firmware Parser UEFI Firmware Parser 10

Demo Easy access to hardware resources with CHIPSEC 11

File formats PE ELF DWARF Mach-O BIOS/ME/. 12

Example Check security compilation flags (ASLR, DEP, SafeSEH) with pefile 13

DEMO Work with exec file like OS loader with cle A part of anrg framework 14

Architectures X86/x86_64 ARM/ARM64 PPC MIPS AVR. 15

Example Semantic analysis with Capstone 16

Example How to add new arch in miasm DEFCON Russia talk by snk 17

Analysis Static Disassembler Assembler Decompiler Emulation SAE Dynamic Debuggers DBI DAE Intermediation languages SMT solvers 18

Example IDAPython for Hex-Rays decompiler 19

Example Instrumentation Android app with Frida Python + JavaScript =) 20

Demo Emulation (based on IL) exotic architectures with radare2 21

Demo IDAPython + ipython + Unicorn 22

Demo angr See "Angr - a powerful binary analysis platform for CTFs. The Cyber Grand Challenge" talk from Nick Stephens и Chris Salls (UCSB) ;) 23

Useful links and additional materials "Python in a hacker's toolbox" from Gynvael Coldwind (Captain of Dragon Sector) Must see for all CTF commands! "Python & Reverse Software from Alexander Hanel Gray Hat Python and Black Hat Python from Justin Seitz Python tools for penetration testers 24

Conclusion Python is great language for reverse engineering tasks There are a lot of cool libraries Do not reinvent the wheel Use and contribute Create new tools! Thanks to my team members for getting it done today! Roman Bazhin, Georgy Nosenko, Maxim Malyutin and Boris Ryutin. 25

Internship in Digital Security http://dsec.ru/about/traineeship/ Thank you for your attention! Any questions? Digital Security, Moscow: (495) 223-07-86 Digital Security, Saint Petersburg: (812) 703-15-47 d.evdokimov@dsec.ru @evdokimovds 26