npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

novahot

v1.1.0

Published

A webshell framework for penetration testers.

Downloads

22

Readme

Build Status npm npm

novahot

novahot is a webshell framework for penetration testers. It implements a JSON-based API that can communicate with trojans written in any language. By default, it ships with trojans written in PHP, ruby, and python.

Beyond executing system commands, novahot is able to emulate interactive terminals, including mysql, sqlite3, and psql. It additionally implements "virtual commands" that make it possible to upload, download, edit, and view remote files locallly using your preferred applications.

Installation

Install the executable directly from npm:

[sudo] npm install -g novahot

Then seed a config file:

novahot config > ~/.novahotrc

Usage

  1. View the available trojans with novahot trojan list.

  2. Select a trojan in a language that is appropriate for your target, then copy its source to a new file. (Ex: novahot trojan view basic.php > ~/my-trojan.php)

  3. Change the control password in the newly-created trojan.

  4. Upload the trojan to a web-accessible location on the target.

  5. Configure target information in the targets property in ~/.novahotrc.

  6. Run novahot shell <target> to open a shell.

Shell Modes

Internally, novahot uses "modes" and "adapters" to emulate various interactive clients, currently including the mysql, psql (postgres), and sqlite3 clients.

To change novahot's mode, issue the appropriate "dot command":

.mysql { "username" : "mysql-user", "password" : "the-password", "database" : "the-database" }

(Connection parameters may be specified as JSON while changing modes, or alternatively saved as target configuration data in ~/.novahotrc.)

For example, the mysql mode makes it possible to directly run queries like the following:

mysql> SELECT ID, user_login, user_email, user_pass FROM wp_users;

There additionally exists a payload mode that can be used to POST arbitrary data to the trojan. See the wiki for more information.

Virtual Commands

novahot implements four "virtual commands" that utilize payloads built in to the trojans to extend the functionality of the shell:

download

download <remote-filename> [<local-filename>]

Downloads <remote-filename> to --download-dir, and optionally renames it to <local-filename> if specified.

upload

upload <local-filename> [<remote-filename>]

Uploads <local-filename> to the shell's cwd, and optionally renames <local-filename> to <remote-filename> if specified.

view

view <remote-filename> [<local-filename>]

Downloads <remote-filename> to --download-dir, and optionally renames it to <local-filename> After downloading, the file will be opened by the "viewer" application specified in the configs.

edit

edit <remote-filename>

Downloads <remote-filename> to a temporary file, and then opens that file for editing using the "editor" specified in the configs. Afterward, if changes to the file are saved locally, the file will be re-uploaded to the server automatically.

Provisioning a Test Environment

This repository contains a laboratory environment built on Vagrant, Docker, and the Damn Vulnerable Web Application ("DVWA"). Steps for provisioning the environment vary depending on the capabilities of your physical host.

Using docker-compose

If you have docker and docker-compose installed on your physical host, you may simply do the following:

  1. Clone and cd to this repository
  2. Run: docker-compose up

After the docker container starts, the DVWA will be accessible at http://localhost:8000.

Using vagrant

If docker is not installed on your physical host, you may use Vagrant/Virtualbox to access a docker-capable virtual-machine:

  1. Clone and cd to this repository
  2. Provision a virtual machine: vagrant up
  3. SSH into the virtual machine: vagrant ssh
  4. Start the docker container: sudo su; cd /vagrant; docker-compose up

The DVWA will likewise be accessible at http://localhost:8000.

Configuring novahot against the laboratory environment

Specify the following connection strings in your ~/.novahotrc file to connect the novahot client to the PHP trojan embedded in the DVWA container:

{

  "targets": {
    "dvwa" : {
      "uri"      : "http://localhost:8000/novahot.php",
      "password" : "the-password",

      "mysql" : {
        "username": "root",
        "password": "vulnerables",
        "database": "dvwa"
      }
    }
  }

}

You may then establish a webshell via:

novahot shell dvwa

Additional Information

Additional information can be found in the wiki: