Possible to get b without calling `test`?

I am currently thinking about implementing a virtual machine inside of node.js that wraps up other apps. For that I am going to override some basics but there is one point I am not sure of.

var A = (function() {
    var b = 1;

    var A = function() {};
    A.prototype.test = function() { // Can't touch this
        return b;
    };
    A.prototype.foo = function(callback) {
        callback();
    };
    return A;
})();

// Objective: Get b without touching `test` in any way

Is this possible in any way? By injecting prototypes or using call(), apply(), bind() or similar? Any other sort of reflection?

Without using test? Use a different function:

var A = (function() {
    var b = 1;

    // ...    

    A.prototype.foo = function () {
        return b;
    };
    return A;
})();

console.log(new A().foo());

Otherwise, no. The snippet is of a closure and only being able to reach local variables through functions defined in the same scope is how they work.