Code Monkey home page Code Monkey logo

deser-node's Introduction

deser-node

Deser-node is a script to automatically generate serialized payloads for NodeJS driven applications, which deserialize data from user input using one of the following vulnerable module:

  • node-serialize
  • funcster
  • cryo

The generated payloads are designed to operate in standard RCE mode, that allows to execute system commands on the target, and in reverse-shell (rshell) mode, which is designed to obtain shell access using a non-blocking reverse TCP connection from the target to an attacker controlled machine.

Usage

Using deser-node is very straightforward::

$ node deser-node.js --help
Usage: node deser-node.js -s [serializer] [options]

Options:
  --version            Show version number                             [boolean]
  -f, --file           Input file
  -m, --mode           Operational mode, may be serialize or deserialize
                    [choices: "serialize", "deserialize"] [default: "serialize"]
  -s, --serializer     The serializer module to use
                                      [required] [choices: "ns", "fstr", "cryo"]
  -v, --vector         The vector is command exe or reverse shell
                                                      [choices: "rce", "rshell"]
  -c, --command        The command to execute (-v rce must be used)
  -e, --encode         Charencode the payload (not implemented yet)
                                                    [choices: "charcode", "b64"]
  -H, --lhost          Local listener IP (-v rshell must be used)
  -P, --lport          Local listener PORT (-v rshell must be used)
  -t, --target         Target machine OS, may be Win or Linux
                              [choices: "linux", "windows"] [default: "windows"]
  -h, --help           Show help                                       [boolean]
  -p, --cryoprototype                                      [default: "toString"]

Attention: Using -m deserialize, the serialized payload will be executed on your system!

Note: Cryo, by default, doesn't allow for direct RCE upon deserialization, but can give an attacker RCE capabilities if a prototype method (toString, valueOf, ...) of the deserialized object is then called. For further information, consider reading the following article:

Requirements

In order to use deser-node, the following node modules must be installed:

npm install yargs
npm install node-serialize
npm install funcster
npm install cryo

TODO:

  • Implement encoding schemes:
    • base64
    • charcode encoding
    • others

References

deser-node's People

Contributors

klezvirus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.