SlideShare a Scribd company logo
Node.js
deserialization
Khushal Suthar
7/5/2020
About me
Security Analyst at Net-Square
Khushal Suthar
Twitter: @Khus369
Linkedin: /khus369
Objectives
What is node.js.
What is deserialization.
Exploitation example
1. Exploit - 1 unprotected api
2. Exploit - 2 nodejs
Remediation
In Simple words Node js is “Server-side JavaScript”
What is deserialization
Serialization is a mechanism
of converting the state of an
object into a byte stream.
Deserialization is the reverse
process where the byte
stream is used to recreate
the actual object in memory
Exploit - 1
Unprotected API
Show data
Send GET request for retrieved save serialized data
Create data
Send POST request with json data for serialization.
Payload Create
● arbitrary code execution should occur when untrusted input is
passed into unserialize() function. The best way to create a
payload is to use the serialize() function of the same module.
Payload Create
I created the following JavaScript object and passed it to serialize() function.
Which gives the following output.
Send normal API request, intercept the
request.
Replace the payload
Add the command
And get the response
Example - 2
Node.js deserialization
Payload Create
Load the website
Intercept the request
Decode cookie
Encode payload in base64
Cookie replaced by payload
Get the nc connection
Remediation
● Properly sanitize the input data
○ Use block and replace method
Vulnerable Code
References
● https://opsecx.com/index.php/2017/02/08/exploiting-node-js-deserialization-bug-for-r
emote-code-execution/
● https://hd7exploit.wordpress.com/2017/05/29/exploiting-node-js-deserialization-bug-for-remote-code-ex
ecution-cve-2017-5941/
● https://github.com/hoainam1989/training-application-security/blob/master/shell/node_shell.py
Questions
Thank You!

More Related Content

PPTX
OWASP TOP 10 VULNERABILITIS
PPTX
A Forgotten HTTP Invisibility Cloak
PDF
New PHP Exploitation Techniques
PPTX
Waf bypassing Techniques
PDF
Pwning mobile apps without root or jailbreak
PDF
とある診断員と色々厄介な脆弱性達
PDF
Pentesting like a grandmaster BSides London 2013
PDF
nginx 입문 공부자료
OWASP TOP 10 VULNERABILITIS
A Forgotten HTTP Invisibility Cloak
New PHP Exploitation Techniques
Waf bypassing Techniques
Pwning mobile apps without root or jailbreak
とある診断員と色々厄介な脆弱性達
Pentesting like a grandmaster BSides London 2013
nginx 입문 공부자료

What's hot (20)

PDF
Modern Kernel Pool Exploitation: Attacks and Techniques
PDF
점진적인 레거시 웹 애플리케이션 개선 과정
PDF
XXE Exposed: SQLi, XSS, XXE and XEE against Web Services
PPTX
OWASP AppSecCali 2015 - Marshalling Pickles
PDF
WebSocketでリアルタイム処理をする
PDF
OWASP AppSecEU 2018 – Attacking "Modern" Web Technologies
PPTX
Workshop Spring - Session 1 - L'offre Spring et les bases
PDF
카카오톡으로 여친 만들기 2013.06.29
PDF
Garage4Hackers Ranchoddas Webcast Series - Bypassing Modern WAF's Exemplified...
PPTX
WAF Bypass Techniques - Using HTTP Standard and Web Servers’ Behaviour
PPT
Bypass file upload restrictions
PDF
코틀린 멀티플랫폼, 미지와의 조우
PPTX
PDF
ORM2Pwn: Exploiting injections in Hibernate ORM
PPTX
Laravel Tutorial PPT
PDF
ニコニコ生放送の配信基盤改善
PDF
HTTP Request Smuggling via higher HTTP versions
PDF
Docker + Kubernetes를 이용한 빌드 서버 가상화 사례
PDF
Bug Bounty Hunter Methodology - Nullcon 2016
PDF
Python Deserialization Attacks
Modern Kernel Pool Exploitation: Attacks and Techniques
점진적인 레거시 웹 애플리케이션 개선 과정
XXE Exposed: SQLi, XSS, XXE and XEE against Web Services
OWASP AppSecCali 2015 - Marshalling Pickles
WebSocketでリアルタイム処理をする
OWASP AppSecEU 2018 – Attacking "Modern" Web Technologies
Workshop Spring - Session 1 - L'offre Spring et les bases
카카오톡으로 여친 만들기 2013.06.29
Garage4Hackers Ranchoddas Webcast Series - Bypassing Modern WAF's Exemplified...
WAF Bypass Techniques - Using HTTP Standard and Web Servers’ Behaviour
Bypass file upload restrictions
코틀린 멀티플랫폼, 미지와의 조우
ORM2Pwn: Exploiting injections in Hibernate ORM
Laravel Tutorial PPT
ニコニコ生放送の配信基盤改善
HTTP Request Smuggling via higher HTTP versions
Docker + Kubernetes를 이용한 빌드 서버 가상화 사례
Bug Bounty Hunter Methodology - Nullcon 2016
Python Deserialization Attacks
Ad

Similar to Node.js Deserialization (10)

PDF
Breakfast cereal for advanced beginners
PPTX
Deserialization vulnerabilities
PPTX
BlueHat v17 || Dangerous Contents - Securing .Net Deserialization
PDF
(De)serial Killers - BSides Las Vegas & AppSec IL 2018
PPTX
(De)serial Killers - BSides Las Vegas & AppSec IL 2018
PPTX
Insecure Java Deserialization
PDF
Deserialization with the JavaScript for the lulz
PPTX
module node jsbhgnbgtyuikmnbvcfyum2.pptx
PDF
Exploiting Deserialization Vulnerabilities in Java
PPTX
OWASP Poland Day 2018 - Pedro Fortuna - Are your Java Script based protection...
Breakfast cereal for advanced beginners
Deserialization vulnerabilities
BlueHat v17 || Dangerous Contents - Securing .Net Deserialization
(De)serial Killers - BSides Las Vegas & AppSec IL 2018
(De)serial Killers - BSides Las Vegas & AppSec IL 2018
Insecure Java Deserialization
Deserialization with the JavaScript for the lulz
module node jsbhgnbgtyuikmnbvcfyum2.pptx
Exploiting Deserialization Vulnerabilities in Java
OWASP Poland Day 2018 - Pedro Fortuna - Are your Java Script based protection...
Ad

More from NSConclave (20)

PDF
RED-TEAM_Conclave
PPTX
Create a Custom Plugin in Burp Suite using the Extension
PPTX
IOT SECURITY ASSESSMENT Pentester's Approach
PPTX
Debugging Android Native Library
PPTX
Burp Suite Extension Development
PDF
Log Analysis
PDF
Regular Expression Injection
PDF
HTML5 Messaging (Post Message)
PDF
RIA Cross Domain Policy
PDF
LDAP Injection
PDF
Sandboxing
PDF
NoSql Injection
PDF
Thick Client Testing Advanced
PDF
Thick Client Testing Basics
PDF
Markdown
PDF
Docker 101
PDF
Security Architecture Consulting - Hiren Shah
PDF
OSINT: Open Source Intelligence - Rohan Braganza
PDF
Lets get started with car hacking - Ankit Joshi
PDF
Advanced Wireless Reconnaissance And Testing - Rohit Jadav
RED-TEAM_Conclave
Create a Custom Plugin in Burp Suite using the Extension
IOT SECURITY ASSESSMENT Pentester's Approach
Debugging Android Native Library
Burp Suite Extension Development
Log Analysis
Regular Expression Injection
HTML5 Messaging (Post Message)
RIA Cross Domain Policy
LDAP Injection
Sandboxing
NoSql Injection
Thick Client Testing Advanced
Thick Client Testing Basics
Markdown
Docker 101
Security Architecture Consulting - Hiren Shah
OSINT: Open Source Intelligence - Rohan Braganza
Lets get started with car hacking - Ankit Joshi
Advanced Wireless Reconnaissance And Testing - Rohit Jadav

Recently uploaded (20)

PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PPTX
history of c programming in notes for students .pptx
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
System and Network Administration Chapter 2
PPTX
Reimagine Home Health with the Power of Agentic AI​
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PPTX
Introduction to Artificial Intelligence
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PPTX
Transform Your Business with a Software ERP System
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
medical staffing services at VALiNTRY
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PPTX
Odoo POS Development Services by CandidRoot Solutions
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
How Creative Agencies Leverage Project Management Software.pdf
How to Migrate SBCGlobal Email to Yahoo Easily
history of c programming in notes for students .pptx
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
System and Network Administration Chapter 2
Reimagine Home Health with the Power of Agentic AI​
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
How to Choose the Right IT Partner for Your Business in Malaysia
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Introduction to Artificial Intelligence
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
VVF-Customer-Presentation2025-Ver1.9.pptx
Transform Your Business with a Software ERP System
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
medical staffing services at VALiNTRY
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
Odoo POS Development Services by CandidRoot Solutions
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
How Creative Agencies Leverage Project Management Software.pdf

Node.js Deserialization