- Hands-On Bug Hunting for Penetration Testers
- Joseph Marshall
- 214字
- 2021-07-16 17:53:12
Putting It All Together
So what does it look like when we put it all together? It's simple – we can construct a one-liner to scan the JavaScript of a target site just by passing the right directory references:
grabjs https://www.target.site sourcejs; scanjs sourcejs output.json | formatjs
Keep in mind we've already symlinked these scripts to our /usr/local/bin and changed their permissions using chmod u+x to make them executable and accessible from our path. With this command, we're telling our CL to download the JavaScript from http://target.site to the sourcejs directory, then scan that directory, create an output.json representation of the data, and finally format everything as a plain-text report.
As a means of testing the command, I recently read a blog decrying the fact that jQuery, responsible for a large chunk of the web's client-side code, was running an out-of-date WordPress version on http://jquery.com/, so I decided to see whether their JavaScript had any issues:
grabjs https://jquery.com sourcejs; scanjs sourcejs output.json | formatjs

The fact that http://jquery.com/ has a few issues is nothing huge, but still surprising! Known component vulnerabilities in JavaScript are a widespread issue, affecting a sizable portion of sites (different methodologies put the number of affected sites at between one-third and three-quarters of the entire web).
- 信息系統安全檢測與風險評估
- 等級保護測評理論及應用
- 深入淺出隱私計算:技術解析與應用實踐
- 諸神之眼:Nmap網絡安全審計技術揭秘
- 網絡安全三十六計:人人該懂的防黑客技巧
- 硬黑客:智能硬件生死之戰
- 解密彩虹團隊非凡實戰能力:企業安全體系建設(共5冊)
- 信息安全導論(第2版)
- Learning Pentesting for Android Devices
- INSTANT Apple Configurator How-to
- CTF特訓營:技術詳解、解題方法與競賽技巧
- Hands-On Artificial Intelligence for Cybersecurity
- 交換機·路由器·防火墻(第2版)
- 物聯網信息安全技術
- 信息系統安全等級化保護原理與實踐