Git Product home page Git Product logo

genetic-x86's Introduction

Genetic memcpy

What does it do?

  • Generate X86 Assembly code for memcpy

How?

  • Using genetic algorithm

    • k-tournament selection
    • 2 points crossover
    • Bit and Byte mutations
  • Using Unicorn CPU emulator

Output examples

By default the input address is in ESI, the output address in EDI and its length in ECX.

Here are some outputs of this script

Format : ADDRESS CODE
30000 repne movsd dword ptr es:[edi], dword ptr [esi]
30002 jb 0x2fff7
30004 lds edi, ptr [eax]
30006 loope 0x2ffe7
...
30000 push edi
30001 movsb byte ptr es:[edi], byte ptr [esi]
30002 inc eax
30003 pop esp
30004 inc eax
30005 jmp 0x30001
...
...
3003a arpl di, dx
3003c movsd dword ptr es:[edi], dword ptr [esi]
3003d push esi
3003e jno 0x3003a
...

Not that beautiful, but it does a memcpy.

Requirements

  • Python >= 3
  • Unicorn >= 1.0.0

Tested on both windows 10 and Ubuntu 16.04

Inspired by https://github.com/gynvael, who produces great content on Youtube !

genetic-x86's People

Contributors

aghilesazzoug 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.