box-js
box-js copied to clipboard
Write regression tests
trafficstars
Some ideas:
- Testing on a blank file to make sure that everything works
- Testing for frequent mistakes, like simplifying
"foo" + "bar".decode()to"foobar".decode() - Testing that XML tags and
@cc_onare stripped correctly - Testing for rewrites inside
eval - Use various pieces of existing malware (that for some reason at one point or another were not emulated correctly by box-js), deactivate it (eg. replace the payload URLs with
https://google.com/robots.txt), and test that they are analysed correctly - Test for samples based on codepage-437 encoding, downloading the samples from a local webserver, and verifying that the result is decoded correctly (requires one to study one such sample and "craft" a payload correctly, i.e. so that it can be decoded - obviously can't use real-life payloads)
- Test for individual components - WScriptShell, XMLHTTP, etc.
The testing platform - be it Mocha, Jasmine, Should or whatever - will be called by Travis, to automate regression testing.