Git Product home page Git Product logo

androidelf_enc's Introduction

简单介绍

elf 加密项目,功能有:1)字符串加密(.rodata),2)函数加密

加密算法PRESENT(分组密码算法,速度快,实现简单。但可以通过差分分析破解,折中考虑),密钥由blake244生成(单向哈希,SHA-3备选,速度快)

目前支持Linux x86与ARM(由于elf解析使用的32位结构体)

使用

encrypt 是加密器,payload 是测试demo,首先在main函数中解密.rodata,亦可放到init_array中实现,loader 负责运行时函数加解密操作的具体实现

其中 payload 的编写要符合以下规范:

  • 需要加密的函数,以 _encrypt_ 前缀声明,如 void _encrypt_helloworld(void)

  • 使用 decrypt_and_call(func_name) 调用加密的函数(注意多线程问题)

  • 加密函数页对齐__attribute__((aligned(PAGE_SIZE))

  • 使用 -fpie 编译

编译

  • Linux: make.

  • Android: make android

androidelf_enc's People

Watchers

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