How to do it...

Many IoT devices run variations of JavaScript code to help alleviate hardware resource consumption. Sometimes, this code is also running on the device when it needs to act as a server for certain use cases. There are great tools that scan project directories for known vulnerable JavaScript versions used in the project. First, we will have a look at RetireJS.

  1. To run RetireJS, simply run the retire command and specify the JavaScript directory as follows:
$ retire path/to/js/
Loading from cache: https://raw.githubusercontent.com/RetireJS/retire.js/master/repository/jsrepository.json
    Loading from cache: https://raw.githubusercontent.com/RetireJS/retire.js/master/repository/npmrepository.json
    /static/js/lib/jquery-ui.js
     jquery-ui-dialog ...

Get IoT Penetration Testing Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.