O'Reilly logo

IoT Penetration Testing Cookbook by Aditya Gupta, Aaron Guzman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required