SlideShare a Scribd company logo
Node Security Experiments
NODEVEMBER 2015
adam_baldwin
evilpacket
Nodevember 2015
Node Security Project
Node Security Project
ONCE UPON A
TIME
MALICIOUS CODE
HOSTED ON NPM
Nodevember 2015
ZOMG INSTALL
SCRIPTS
https://docs.npmjs.com/misc/scripts
npm i totallynotavirustrustmeimadolphin
JERKS DEVS
Distribution
SHA HASH EXPOSURE
5834be28bb632cd49ab3bbf78cef8b1983601f11
Nodevember 2015
TYPOS
PUNCTUATION
CAUSES ERROR
ಠ_ಠ
SOCKET.IO
SOCKETIO
or
COFFEESCRIPT
COFFEE-SCRIPT
or
Nodevember 2015
PASSWORDS
DEMO HERE?
AUDIT ALL THE THINGS
AUDIT ALL THE THINGS
12,000
AUDIT ALL THE THINGS
205,596
Nodevember 2015
AUDIT ALL THE THINGS
FOR ALL THE THINGS
STATIC ANALYSIS
IDENTIFY
A PATTERN
SEARCH FOR
THAT PATTERN
CHALLENGES
• Storage & compute requirements
• node_modules & test directories
• modules like 'yourmom'
• /usr/bin/grep: Argument list too long
• keeping up with the massive # of packages
VALIDATE
REPEAT
detect-unsafe-regex
detect-buffer-noassert
detect-child-process
detect-disable-mustache-escape
detect-eval-with-expression
detect-no-csrf-before-method-override
https://github.com/nodesecurity/eslint-plugin-security
detect-non-literal-fs-filename
detect-non-literal-regexp
detect-non-literal-require
detect-object-injection
detect-possible-timing-attacks
detect-pseudoRandomBytes
github.com/evilpacket/cuddly-spork
nodesecurity.io/advisories
npm i nsp -g
cd your-fantastic-app
nsp check
RETIREJS
npm i retire -g
184217 Modules
2890 Vulnerable
22659 Modules
1675 Vulnerable
github.com/evilpacket/bower-retire.js-scan
BOWER
STATIC ANALYSIS
github.com/evilpacket/bower-burp-static-analysis
3949 Open redirection (DOM-based)
1950 Cross-site scripting (DOM-based)
956 DOM data manipulation (DOM-based)
818 Link manipulation (DOM-based)
103 HTML5 storage manipulation (DOM-based)
64 Client-side JSON injection (DOM-based)
BOTS?
Who else might be out there doing stuffs?
NOPE, NOT REALLY
BOT TRACKER
1 {
2 "name": "botbait",
3 "version": "1.0.1",
4 "description": "Not for human consumption.",
5 "main": "index.js",
6 "scripts": {
7 "test": "node index.js test;exit 0",
8 "start": "node index.js start;exit 0",
9 "preinstall": "node index.js preinstall;exit 0"
10 },
11 "keywords": [
12 "botbait"
13 ],
14 "author": "",
15 "license": "MIT"
16 }
CREATED 6-17-2015
193.137.5.49npm test06-23-2015
WHAT NOW?
DETECTING MALICIOUS
MODULES
nodevember.evilpacket.net
BINARY MODULES & NODE CORE
1 var fs = require('fs');
2 var msg = require('msgpack');
3 //dddd 407d 7a
4 var data = fs.readFileSync('./crash')
5 msg.unpack(data);
$ node index.js
Segmentation fault
THANK YOU
nodesecurity.io/report

More Related Content

PDF
Node Day - Node.js Security in the Enterprise
PPTX
Nodejs Security
PPT
Node.JS security
PDF
Перевірка роботи McAfee ENS. MVISION Insights SUNBURST.
PDF
Web Application Firewall - Friend of your DevOps Pipeline?
PPTX
Software Supply Chain Security та компоненти з відомими вразливостями
PDF
Tools & techniques, building a dev secops culture at mozilla sba live a...
PDF
SSL Pinning and Bypasses: Android and iOS
Node Day - Node.js Security in the Enterprise
Nodejs Security
Node.JS security
Перевірка роботи McAfee ENS. MVISION Insights SUNBURST.
Web Application Firewall - Friend of your DevOps Pipeline?
Software Supply Chain Security та компоненти з відомими вразливостями
Tools & techniques, building a dev secops culture at mozilla sba live a...
SSL Pinning and Bypasses: Android and iOS

What's hot (20)

PPT
5 Bare Minimum Things A Web Startup CTO Must Worry About
PDF
DevOps Security - Is It Really So Difficult? - Reuven Harrison - DevOpsDays T...
DOCX
Bypassing cisco’s sourcefire amp endpoint solution – full demo
PDF
Web Intrusion Detection
PPTX
Ruby and Framework Security
PDF
Wordpress security
PPTX
Javascript Security - Three main methods of defending your MEAN stack
PPTX
Code Europe PL - Securing the JVM: Neither for fun nor for profit, but do you...
PPTX
Voxxed Days Athens - Securing the JVM - Neither for fun nor for profit, but d...
PPTX
Dont run with scissors
PPTX
BlueHat v17 || “_____ Is Not a Security Boundary." Things I Have Learned and...
PDF
Avoiding damage, shame and regrets data protection for mobile client-server a...
PDF
Microservices in Your Datacenter
PPTX
Pxosys Webinar Amplify your Security
PDF
Threat Hunting with Cyber Kill Chain
PDF
Slides null puliya linux basics
PDF
Tale of Forgotten Disclosure and Lesson learned
PPTX
BlueHat v17 || You Are Making Application Whitelisting Difficult
PDF
Advanced mainframe hacking
PDF
WordPress security 101 - WP Jyväskylä Meetup 21.3.2017
5 Bare Minimum Things A Web Startup CTO Must Worry About
DevOps Security - Is It Really So Difficult? - Reuven Harrison - DevOpsDays T...
Bypassing cisco’s sourcefire amp endpoint solution – full demo
Web Intrusion Detection
Ruby and Framework Security
Wordpress security
Javascript Security - Three main methods of defending your MEAN stack
Code Europe PL - Securing the JVM: Neither for fun nor for profit, but do you...
Voxxed Days Athens - Securing the JVM - Neither for fun nor for profit, but d...
Dont run with scissors
BlueHat v17 || “_____ Is Not a Security Boundary." Things I Have Learned and...
Avoiding damage, shame and regrets data protection for mobile client-server a...
Microservices in Your Datacenter
Pxosys Webinar Amplify your Security
Threat Hunting with Cyber Kill Chain
Slides null puliya linux basics
Tale of Forgotten Disclosure and Lesson learned
BlueHat v17 || You Are Making Application Whitelisting Difficult
Advanced mainframe hacking
WordPress security 101 - WP Jyväskylä Meetup 21.3.2017
Ad

Similar to Nodevember 2015 (17)

PPTX
Real World Lessons on the Pain Points of Node.JS Application
PDF
Node JS reverse shell
PDF
Node.js security - JS Day Italy 2018
PDF
Node.js Security - XSS, Vulnerable Dependencies, Snyk, OWASP
PDF
Server-Side JavaScript Developement - Node.JS Quick Tour
PDF
Node.js security tour
PPTX
Node js introduction
PDF
NodeJS security - still unsafe at most speeds - v1.0
PDF
Node in Real Time - The Beginning
PDF
Surrogate dependencies (in node js) v1.0
PDF
Intro to Node.js (for .NET Developers)
PPTX
Real World Lessons on the Pain Points of Node.js Applications
PDF
SWT Tech Sharing: Node.js + Redis
PDF
Node.js Security Done Right - Tips and Tricks They Won't Teach You In School
PDF
Making 'npm install' Safe
PDF
All aboard the NodeJS Express
PPTX
Using Node.js to Build for the Enterprise
Real World Lessons on the Pain Points of Node.JS Application
Node JS reverse shell
Node.js security - JS Day Italy 2018
Node.js Security - XSS, Vulnerable Dependencies, Snyk, OWASP
Server-Side JavaScript Developement - Node.JS Quick Tour
Node.js security tour
Node js introduction
NodeJS security - still unsafe at most speeds - v1.0
Node in Real Time - The Beginning
Surrogate dependencies (in node js) v1.0
Intro to Node.js (for .NET Developers)
Real World Lessons on the Pain Points of Node.js Applications
SWT Tech Sharing: Node.js + Redis
Node.js Security Done Right - Tips and Tricks They Won't Teach You In School
Making 'npm install' Safe
All aboard the NodeJS Express
Using Node.js to Build for the Enterprise
Ad

More from Adam Baldwin (13)

PDF
Attacking open source using abandoned resources
PDF
JavaScript Supply Chain Security
PDF
Building a Threat Model & How npm Fits Into It
PDF
Hunting for malicious modules in npm - NodeSummit
PDF
Continuous Security - Thunderplains 2016
PDF
Continuous Security
PDF
The Art of Identifying Vulnerabilities - CascadiaFest 2015
PDF
Node Security Project - LXJS 2013
PDF
Security First - Adam Baldwin
PDF
JSConf 2013 Builders vs Breakers
KEY
EV1LSHA - Misadventures in the land of Lua
KEY
Writing an (in)secure webapp in 3 easy steps
PDF
Pony Pwning Djangocon 2010
Attacking open source using abandoned resources
JavaScript Supply Chain Security
Building a Threat Model & How npm Fits Into It
Hunting for malicious modules in npm - NodeSummit
Continuous Security - Thunderplains 2016
Continuous Security
The Art of Identifying Vulnerabilities - CascadiaFest 2015
Node Security Project - LXJS 2013
Security First - Adam Baldwin
JSConf 2013 Builders vs Breakers
EV1LSHA - Misadventures in the land of Lua
Writing an (in)secure webapp in 3 easy steps
Pony Pwning Djangocon 2010

Recently uploaded (20)

PDF
Hybrid model detection and classification of lung cancer
PPTX
TLE Review Electricity (Electricity).pptx
PDF
Architecture types and enterprise applications.pdf
PDF
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
PPTX
Programs and apps: productivity, graphics, security and other tools
PPT
What is a Computer? Input Devices /output devices
PPTX
Tartificialntelligence_presentation.pptx
PPT
Module 1.ppt Iot fundamentals and Architecture
PDF
Enhancing emotion recognition model for a student engagement use case through...
PDF
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
PDF
August Patch Tuesday
PDF
Developing a website for English-speaking practice to English as a foreign la...
PDF
Getting Started with Data Integration: FME Form 101
PDF
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
PDF
Getting started with AI Agents and Multi-Agent Systems
PDF
STKI Israel Market Study 2025 version august
PPTX
OMC Textile Division Presentation 2021.pptx
PPTX
cloud_computing_Infrastucture_as_cloud_p
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
DP Operators-handbook-extract for the Mautical Institute
Hybrid model detection and classification of lung cancer
TLE Review Electricity (Electricity).pptx
Architecture types and enterprise applications.pdf
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
Programs and apps: productivity, graphics, security and other tools
What is a Computer? Input Devices /output devices
Tartificialntelligence_presentation.pptx
Module 1.ppt Iot fundamentals and Architecture
Enhancing emotion recognition model for a student engagement use case through...
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
August Patch Tuesday
Developing a website for English-speaking practice to English as a foreign la...
Getting Started with Data Integration: FME Form 101
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
Getting started with AI Agents and Multi-Agent Systems
STKI Israel Market Study 2025 version august
OMC Textile Division Presentation 2021.pptx
cloud_computing_Infrastucture_as_cloud_p
Group 1 Presentation -Planning and Decision Making .pptx
DP Operators-handbook-extract for the Mautical Institute

Nodevember 2015