Giter VIP home page Giter VIP logo

stratospheretestingframework's Introduction

Stratosphere Windows IPS

Stratosphere Windows IPS is the Microsoft version of the Stratosphere IPS project. The tool runs in the same way as the Stratosphere Linux IPS, but using windows libraries. This tool is provided for being used by personal users in their computers. The tool can provide a reliable detection of malicious connections based on the download models. Please note that this tool is still Beta. See the oficial web page of the Stratosphere Project

How to Use it

There are three ways of using the Stratosphere Windows IPS. By giving the binetflow file as parameter, by reading the binetflow file from Stdin, or by reading the flows from an Argus tool by Stdin. If you want to analyze your own traffic to make detections, you need to install an Argus program in some computer that has access to the traffic. The Argus program can run under the same Windows computer (see [Installation of Argus under Windows](#installation of argus under windows)) or can be run in any other computer. If the Argus server is running in other computer, you still need to have the ra program (from Argus client tools) running in the Windows computer with Stratosphere Windows IPS.

Running it by giving the binetflows file as parameter:

To give the binetflow file as a parameter, just put the name of the file after the StratosphereWatcher program

    python your_path\StratosphereWatcher.py test7.binetflow

The test7.binetflow file is provided as an example. The StratosphereWatcher.py program will first download some necessary files from the Internet and then it will run the detection on the binetflow file. See the following sections to know exactly what StratosphereWatcher.py is doing.

Running it by reading the flows from Stdin

This method can be used to read the flows using Stdin from a file or to read the flows from a ra program (Argus client suite).

From a file

To read the flows from a file do

cat test7.binetflow | python StratosphereFlow.py

Note that we are using now StratosphereFlow.py directly. This is because the StratosphereWatcher takes care of the download of models and that the service is running continually. In this case, StratosphereFlow.py read the flows directly without any update. To be able to use this way of reading a file from Stdin, Stratosphere still needs to create its configuration file, that is way at first is better to run it at least once with the file as a parameter.

From an Argus installation

If you have Argus running in Windows you can start the Argus server in your network like this

argus -i <name of your windows network device>

And then you can run Startosphere like this

ra -n -Z b -S localhost | python StratosphereFlow.py

In case the Argus program is running in other computer, you can connect to it and analyze the flows in your Windows like this

ra -n -Z b -S remote-host:remote-port | python StratosphereFlow.py

Configuration

Stratosphere Windows IPS uses a configuration file to tune its behavior. This file is automatically created when you run StratosphereWatcher.py. After the configuration file is created, you can manually edit it and the program will notice and honor the changes.

What each files does in Stratosphere Windows IPS

StratosphereWatcher.py

  • Downloads updates, models files and modules files.
  • Creating the main detection process
  • In the future it should start windows service.

StratosphereFlow.py

  • It can read flows from Stdin.
  • It decides when the time window of the detection starts and ends.
  • It stores the flows in a queue.
  • It manages the tuple objects.

StratosphereTuple.py

  • It creates the tuple objects.
  • It computes the state of the current tuple.

StratosphereDetector.py

  • It calls the modules for detecting.
  • The modules are downloaded from the Internet and may be updated.

StratosphereConfig.py

  • It creates the config file with implicit settings if there is no config file.

StratosphereOutput.py

  • For printing a logging.

Installation of Argus under Windows

Coming soon.

TODO

  • Create install app.
  • Windows service

stratospheretestingframework's People

Contributors

eldraco avatar harpomaxx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

stratospheretestingframework's Issues

Times of binetflow files sometimes are wrongly readed

The function get_state() in stf/core/models_constructors.py sometimes gets the timedate of the flows wrong. Not sure why. And it prints dates that are not in the file.
This sometimes results in the believe that the file is wrongly sorted, when it is not true.

where is the file StratosphereTestingFramework/stf/core/experiments.py ?

Hi :
i run ./stf.py get some error:


[!] Something wrong happened while importing the module modules.distances_1: No module named experiment
[!] Something wrong happened while importing the module modules.experiments_1: No module named experiment
[!] Something wrong happened while importing the module modules.markov_models_1: No module named

experiment
[!] Something wrong happened while importing the module modules.markov_models_2: No module named

experiment
[!] Something wrong happened while importing the module modules.template_module: No module named

experiment
[!] Something wrong happened while importing the module modules.visualize_1: No module named experiment
Traceback (most recent call last):
File "./stf.py", line 29, in
c = console.Console()
File "/myslips/StratosphereTestingFramework/stf/core/ui/console.py", line 40, in init
from stf.core.ui.commands import Commands
File "/myslips/StratosphereTestingFramework/stf/core/ui/commands.py", line 16, in
from stf.core.database import database
File "/myslips/StratosphereTestingFramework/stf/core/database.py", line 9, in
from stf.core.experiment import experiments
ImportError: No module named experiment


this is see the module ./stf/core/experiment.py not present.
How can i resolve this error?
thanks

stfm create

dear eldraco,
I do all instructions in github page of stf.py and slips.py,then I have a problem.
my problem is that I can't create stfm file from models that generated with stf.py
how can create .stfm file from models generated?

best regards

Dependencies error

running sudo pip install -r dependencies.txt shows this error

Collecting python-prettytable (from -r dependencies.txt (line 1))
Could not install packages due to an EnvironmentError: 404 Client Error: Not Found for url: https://pypi.org/simple/python-prettytable/

Markov chain algorithm

The markov chain algorithm in the project introduces the link jump to the specific description file, which can jump to relevant details before.I don't know if this is a problem after the homepage of the website changed?

Getting error while running slips.py when new model is added

I have added a new model, generated by STF, in mymodels directory under IPS
stfm file

While running following command under IPS,
argus -F argus.conf -r -w - | ra -n -r - -F ra.conf -Z b | ./slips.py -f mymodels | less -R

I'm getting an error.

Stratosphere Linux IPS. Version 0.3alpha

Traceback (most recent call last):
File "./slips.py", line 633, in
if args.folder and not markov_models.set_models_folder(args.folder):
File "/home/udevani/StratosphereLinuxIPS-master/modules/markov_models_1.py", line 153, in set_models_folder
self.set_model_to_detect(join(folder, file))
File "/home/udevani/StratosphereLinuxIPS-master/modules/markov_models_1.py", line 169, in set_model_to_detect
model.set_init_vector(cPickle.load(input))
File "/usr/local/lib/python2.7/dist-packages/pykov.py", line 120, in init
self.update([item for item in six.iteritems(data)
File "/usr/lib/python2.7/dist-packages/six.py", line 484, in iteritems
return iter(getattr(d, _iteritems)(**kw))
AttributeError: ("'list' object has no attribute 'iteritems'", <class 'pykov.Vector'>, ([['a', 0.00904977375565611], ['A', 0.01583710407239819], ['B', 0.0022624434389140274], ['d', 0.13574660633484162], ['g', 0.0022624434389140274], ['.', 0.4977375565610859], ['1', 0.004524886877828055], ['S', 0.0022624434389140274], ['r', 0.02262443438914027], ['u', 0.03619909502262444], ['X', 0.0022624434389140274], ['V', 0.0022624434389140274], ['x', 0.004524886877828055], ['R', 0.006787330316742082], ['U', 0.038461538461538464], ['D', 0.2171945701357466]],))

Am I missing something?
IPS runs fine with existing models in /models directory.

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.