Hi,
it's time to anounce that the JavaScript library with en-, decoding,
crypting, hashing and conversion functions now can be used with ZAP's
Script Console. At least Simon engaged me to do it here ;-)
First a little introduction for those who don't know what this library
is about. The library is from OWASP's EnDe project which can be found
here:
https://www.owasp.org/index.php/Category:OWASP_EnDe
Links to usage, documentation, download, github and online version can
be found there.
Enough with biased texts, let's talk about EnDe within ZAP.
First we need the library, use
https://github.com/EnDe/EnDe and build
EnDe.lib.zap from sources (or mail me and I can provide a prebuild
version).
Load it in ZAP's Script Console and ready we go.
Instead of reading boring texts, here're some example to catch your
interest:
me=EnDe.B64.EN.b64("€uro",72); print(me);
print(EnDe.IP.num2ip('','','','2130706474','','','.'));
alert() and print() are wrapper functions part of EnDe.lib.zap to make
usage as simple as possible,
There's also help() for those who want dig deeper ;-)
So far, this is just a cumbersome way to do codings and conversions.
But wait, how about:
alert(EnDe.Check.CC.get("3743-8899-4242-8007"));
print(EnDe.IP.ip2num('','','',EnDe.IP.num2ip('','','','2130706433','','','.').replace(/
0/,'42'),'','','.')):
I'd like to see more useful examples within ZAP. I can think of
passive scanners which for example check cookies and parameters,
wether in request or response, and analyze them.
Therefore the script console needs to be improved 'cause it's a bit a
performance penulty now.
EnDe.lib.zap is not perfect yet. Even with compressed code it's about
500k. However, it can be stripped by another 20% if needed. Would be
nice if the script console can load the library once and provide it
for further usage.
You may ask why using JavaScript inside ZAP which already has a good
module integration. The answer is that with JavaScript you can rapidly
type new higly customized functionality while ZAP is already running.
Please tell me your opinions and ideas.
Cheers
Achim