A simple and fast simulator for remote network pen-testing
Project description
Status: Stable release. No extra development is planned, but still being maintained (bug fixes, etc).
Network Attack Simulator
Network Attack Simulator (NASim) is a simulated computer network complete with vulnerabilities, scans and exploits designed to be used as a testing environment for AI agents and planning techniques applied to network penetration testing.
Installation
The easiest way to install the latest version of NASim hosted on PyPi is via pip:
$ pip install nasim
To install dependencies for running the DQN test agent (this is needed to run the demo) run:
$ pip install nasim[dqn]
To get the latest bleeding edge version and install in development mode see the Install docs
Demo
To see NASim in action, you can run the provided demo to interact with an environment directly or see a pre-trained AI agent in action.
To run the tiny benchmark scenario demo in interactive mode run:
$ python -m nasim.demo tiny
This will then run an interactive console where the user can see the current state and choose the next action to take. The goal of the scenario is to compromise every host with a non-zero value.
See here for the full list of scenarios.
To run the tiny benchmark scenario demo using the pre-trained AI agent, first ensure the DQN dependencies are installed (see Installation section above), then run:
$ python -m nasim.demo tiny -ai
Note: Currently you can only run the AI demo for the tiny scenario.
Documentation
The documentation is available at: https://networkattacksimulator.readthedocs.io/
Using with OpenAI gym
NASim implements the Open AI Gym environment interface and so can be used with any algorithm that is developed for that interface.
License
MIT © 2020, Jonathon Schwartz
What’s new
2020-09-20 (v 0.7.2) (MICRO release)
Fixed bug with ‘re-registering’ Gym environments when reloading modules
Added example implementations of Tabular Q-Learning: agents/ql_agent.py and agents/ql_replay.py
Added Agents section to docs, along with other minor doc updates
2020-09-20 (v 0.7.1) (MICRO release)
Added some scripts for running random benchmarks and describing benchmark scenarios
Added some more docs (including for creating custom scenarios) and updated other docs
2020-09-20 (v 0.7.0) (MINOR release)
Implemented host based firewalls
Added priviledge escalation
Added a demo script, including a pre-trained agent for the ‘tiny’ scenario
Fix to upper bound calculation (factored in reward for discovering a host)
2020-08-02 (v 0.6.0) (MINOR release)
Implemented compatibility with gym.make()
Updated docs for loading and interactive with NASimEnv
Added extra functions to nasim.scenarios to make it easier to load scenarios seperately to a NASimEnv
Fixed bug to do with class attributes and creating different scenarios in same python session
Fixed up bruteforce agent and tests
2020-07-31 (v 0.5.0) (MINOR release)
First official release on PyPi
Cleaned up dependencies, setup.py, etc and some small fixes
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file nasim-0.7.2.tar.gz
.
File metadata
- Download URL: nasim-0.7.2.tar.gz
- Upload date:
- Size: 53.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb1857c3657479c6c3ecf3fd9a808fe3cab97c967d031f5afcb711d0ed24dd5b |
|
MD5 | ea077857c21904e92e8f6b8cc8494627 |
|
BLAKE2b-256 | 5eb343ffbe19fb1f6c6538276abe25f31e59b2702384d8aafd06444e99285747 |
File details
Details for the file nasim-0.7.2-py3-none-any.whl
.
File metadata
- Download URL: nasim-0.7.2-py3-none-any.whl
- Upload date:
- Size: 89.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fdbbdff066e5e75a11cdd65c0b29960fe130e16cb568c97f9e0a67841849e62c |
|
MD5 | eaf75acb61619a83b63c0a5f1a9ae511 |
|
BLAKE2b-256 | b546a6017e196782252286f791f71406d739e30db8858d0e2f666e06cb8785a7 |