-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
369 additions
and
250 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
(test | ||
(name instrumentation2)) | ||
(cram | ||
(deps | ||
%{bin:instrumentation2} | ||
(source_tree toy) | ||
(source_tree unit))) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
Test toy examples: | ||
$ instrumentation2 toy/vfunexported.js toy/vfunexported.json -o - | ||
Genrating - | ||
let exec = require('child_process').exec; | ||
|
||
moduke.exports = function f(x) { | ||
return exec(x); | ||
}; | ||
|
||
let esl_symbolic = require("esl_symbolic"); | ||
esl_symbolic.sealProperties(Object.prototype); | ||
// Vuln: command-injection | ||
let x = esl_symbolic.string("x"); | ||
module.exports(x); | ||
$ instrumentation2 toy/vfunretbyexport.js toy/vfunretbyexport.json -o - | ||
Genrating - | ||
function f1(a) { | ||
return function f2(b) { | ||
if (b > 0) { | ||
eval(a); | ||
} | ||
}; | ||
}; | ||
|
||
let esl_symbolic = require("esl_symbolic"); | ||
esl_symbolic.sealProperties(Object.prototype); | ||
// Vuln: code-injection | ||
let a = esl_symbolic.string("a"); | ||
var ret_f1 = f1(a); | ||
let b = esl_symbolic.number("b"); | ||
ret_f1(b); | ||
$ instrumentation2 toy/vfunpropofexportedobj.js toy/vfunpropofexportedobj.json -o - | ||
Genrating - | ||
let Obj = (function () { | ||
function Obj(source) { this.source = source; } | ||
|
||
Obj.prototype.f = function (obj) { | ||
if (obj.cond > 0) { | ||
eval(this.source); | ||
} | ||
} | ||
|
||
return Obj; | ||
})(); | ||
|
||
module.exports.Obj = Obj; | ||
|
||
let esl_symbolic = require("esl_symbolic"); | ||
esl_symbolic.sealProperties(Object.prototype); | ||
// Vuln: code-injection | ||
let source = esl_symbolic.string("source"); | ||
var ret_module_exports_Obj = module.exports.Obj(source); | ||
let obj = { cond: esl_symbolic.number("cond") }; | ||
ret_module_exports_Obj.f(obj); |
Oops, something went wrong.