Git Product home page Git Product logo

frida-sigaction-seccomp's Introduction

Frida-Sigaction-Seccomp

Frida-Sigaction-Seccomp实现对Android APP系统调用的拦截

思路和代码来源

[原创]基于seccomp+sigaction的Android通用svc hook方案

[原创]SVC的TraceHook沙箱的实现&无痕Hook实现思路

[原创]分享一个Android通用svc跟踪以及hook方案——Frida-Seccomp

原文

使用说明

直接将js注入即可实现对openat的监控,需要在logcat过滤native查看结果

在实战时根据自己需求修改CModule中的define,其中target_nr 是目标系统调用号。

在拦截到系统调用后会再次进行系统调用,防止再次被拦截,就需要一个寄存器来放一个标识符SECMAGIC ,避免反复调用crashSECMAGIC_POS 即为对应系统调用所不需要的第一个寄存器,比如openat需要三个参数,那么SECMAGIC_POS 填3即可,因为寄存器从x0开始,args[3]即为第四个寄存器。

然后就是在sig_handler 中写劫持逻辑。如果想拦截更多的系统调用,就需要重写seccomp filter

除此之外调用栈等信息,可以参考[原创]分享一个Android通用svc跟踪以及hook方案——Frida-Seccomp 阿碧大佬的思路自己添加。 image

同理也可以实现对mincore的拦截 image

frida-sigaction-seccomp's People

Contributors

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