Giter Site home page Giter Site logo

ff-patch's Introduction

ff-patch

Patch Firefox (XUL) in-memory with Frida to remove restrictions on HTMLElement's captureStream.

Written for macOS 10.14 / Firefox 76 as an educational experiment, now non-functional and For Your Reference Only.

Want to fix this? Figure out how to change sandbox rules at runtime or something, idk. Maybe breakpoint Firefox at some specific state before content processes launch, then append to the sandbox profile string? Here's some interesting logs:

error	04:54:59.972604-0500	kernel	Sandbox: plugin-container(4964) deny(1) mach-lookup re.frida.piped.4989
default	04:55:03.800789-0500	kernel	Sandbox: 10 duplicate reports for plugin-container deny(1) mach-lookup re.frida.piped.4989

Interestingly enough, the main process is privileged enough for the Frida agent to do its IPC without being explicitly sandbox allowlisted. Unfortunately, the interesting codepath that we target does not run in the main process.

On recent macOS builds, it's also necessary to reconfigure SIP to allow debugging, as Firefox is notarized and thus doesn't have the entitlement com.apple.security.get-task-allow.

csrutil enable --without debug

You didn't want to turn SIP all the way off, did you? :P

Once you do that, there's a handy demo that you can paste into devtools. By the way, MediaStream captures on Firefox are very low-res and basically useless.

Happy debugging!

ff-patch's People

Contributors

knownunown avatar

Stargazers

Nabih avatar

Watchers

Andrew Pan 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.