Commit Graph

111 Commits

Author SHA1 Message Date
Andreas Jaeger 8c881bcbe5 Retire repository
See
http://lists.openstack.org/pipermail/openstack-discuss/2019-July/007708.html

Change-Id: If97f10290c16903d550c66163b082bd23357fca2
2020-05-08 13:51:25 +02:00
Michael Dong 6cf7bdab87 Bug fixes and error message updates
Fixes:
1) Crashes in runner and file_utils
2) Binary strings being read in as payloads

Updates:
1) Clarified error messages in parser
2) Confusing variable names in test cases vs issues

Adds:
1) A `syntribos root` CLI sub command to display the current syntribos root dir

Change-Id: I22edf7a1f3d39724522aee88d08b00d299b67248
2018-11-28 12:32:24 -06:00
Michael Dong a6db29dc7c Bug fixes related to python 3 changes
Change-Id: I048bb19cf456281521883eb1500832343d72fb97
2018-10-18 14:39:59 -05:00
Michael Dong feb3a59c95 YAML support, basicauth extension, bugfixes
1) Allows for YAML body in request templates. If a content-type
    is specified for a request template, Syntribos will validate the
    body against the header. This is to prevent templates from silently
    failing to parse and sending unintended data to the target.
 2) Added extension to support basicauth
 3) Lowered confidence ratings for various tests

Change-Id: I672b0e0aa3da1aa6dd7e9a8456da73f0a15759b7
2018-10-09 15:55:53 -05:00
Michael Dong c4586a374b Improve performance by multithreading test calls
This change:
1) rewrites the runner to spawn a thread pool for each template
   and assigns a worker for each test case
2) makes the output colorized by default
3) makes minor changes to the output

Change-Id: I49906f5daaa339ca9429913680203c762a0ad9fe
2017-09-18 13:23:00 -05:00
Michael Dong 6ded748d09 Added meta var support to datagen
The datagen will now respect the limits defined in the meta
variable file when fuzzing a template

Change-Id: If1e7b2d86b8b2ac45d64d37562e0b7d776c54742
2017-03-13 12:03:34 -05:00
Rahul Nair 38eb9f2a77 Adding i18n support to Syntribos
Adding i18n support to syntribos log messages and prompts.

Change-Id: If9914447ccbf3ac2f9c88c3460756f4b682630ec
2017-03-13 01:51:50 -05:00
Michael Dong c5a4dd083d Added support for meta variable JSON files
Syntribos now allows the user to specify variables in their request
templates by reading from a meta.json file. This is part 1 of 3 of
the full effort, dealing primarily with the template parser itself.

Change-Id: Id41d331f595cd3bc32f085ef49cb5d1b16779a5c
2017-01-27 11:03:39 -06:00
Vinay Potluri 5664f99a4b Improving readibility of code
Changing six.iteritems(kwargs) to kwargs.items() to improve
readability of code and reduce the use of python package six

Change-Id: I7460c0274b790efcd53ee9d1c0bc538effb950dd
2017-01-25 14:25:54 -06:00
Rahul Nair 7ec6d7450f Bug fix for user defined tests
A bug was introduced in the user defined test, this change attempts
to fix it.

Change-Id: I29d4af97e89bab3245f3a3b1c75519023f0ca43e
2016-12-06 11:49:53 -06:00
Rahul Nair 94d0205b8e Pylint changes update
Updated the enabled tests and edited set of files to pass present
enabled tests.

Change-Id: I369166bacbd816b4d85732d476158468ed271d49
2016-11-22 16:10:50 -06:00
Rahul Nair ef67b47345 Adding ReDoS test to syntribos
Adding ReDoS test to syntribos. ReDos was earlier merged with
string_validation test, as ReDoS is a pure test in itself, adding
the same.

Change-Id: I04b2c80486d897eef2764223e2ba0f4433bc9144
2016-11-17 14:45:43 -06:00
Jenkins d1912c278c Merge "Adding ability to do User defined fuzz test" 2016-11-16 00:09:23 +00:00
Rahul Nair efaaaa70c5 Adding new test to syntribos
There is a possibility for the json parser to reach depth limit
and crash. This test checks for that and raises an issue if the
parser crashes.

Change-Id: I2ecb77e2e9aef2379321142d608eb714b33d970a
2016-11-15 15:12:03 -06:00
Rahul Nair f5d039f765 Adding ability to do User defined fuzz test
During the first set of tests we did, it became clear that we
would need a way to test specific user provided string and check
them against user defined failure keys.

This test adds that functionality to the suite.

Change-Id: I53833c2ab11813d746d9fc97355adaf51eb6096e
2016-11-15 15:05:43 -06:00
michael.dong@rackspace.com 46d5ba400b Introduced payload and template downloading
Syntribos now downloads payloads as part of the initialization process, and
also can download payloads and templates as part of the 'syntribos download'
command.

Change-Id: I17501535e5fd341c2705e07e3797643dc2d4a7df
2016-10-28 14:42:12 -05:00
Rahul Nair 8faed09ebe Fixing unicode error
When syntribos attempts to download templates, it fails with
unicode error. This patch fixes it.

Closes-Bug: #1636609

Change-Id: Id62e9ed70d1b4501fe531587947c1f6d88bf034a
2016-10-26 17:33:27 -05:00
Vinay Potluri 34091d3599 Changing payloads_dir to payloads
Changing the payloads_dir variable to payloads

Change-Id: I55ae283d1b4b92d397c1cd85acd7c88f9bbe87fd
2016-10-26 02:04:28 +00:00
Rahul Nair b7b925cf4d Loading payload from remote URI
POC on loading payloads using remote URI. This is part of a larger
effort in packaging syntribos to ensure that the project would
work without much configuration post install from pypi.

Change-Id: Id61e840d4f49d5b6deb72bce2e8bcc0e1096fa52
2016-10-25 10:28:25 -05:00
Rahul Nair 5911450992 Adding python 3 compatibility and some minor styling changes
As we are moving to the next iteration of the project for Ocata,
I think it would be helpul to makesure that the codebase is
fully compatible in py27 and in py35. Also, some minor styling
changes, removing uncessary spaces etc.

Change-Id: I9aac07dc180cd3a7c7885661bdad985c183ae0a9
2016-10-14 17:39:29 -05:00
Jenkins f562a9ec3d Merge "Revamped results schema" 2016-08-29 20:51:52 +00:00
michael.dong@rackspace.com adca69a272 Revamped results schema
Results are now formatted in the schema as defined here:
https://gist.github.com/cneill/a511451284a0c5f33295477150bd94d4

Furthermore, the json formatter is no longer responsible for the aggregation
of issues. Instead, this logic has been moved to the IssueTestResult class

Change-Id: Id39e122b2b4c1c9cafab09fdbc5d172dec012d22
2016-08-29 15:40:02 -05:00
Aastha Dixit 57e6a82993 Buffer Overflow data file dependency is removed
The data file buffer-overflow.txt is never used, instead the string
generated in buffer_overflow.py is used for testing buffer overflow,
so the text file dependency is removed.

Change-Id: I4928926aa42b568502bd0b99b15b06d0667968ca
2016-08-26 17:56:13 -05:00
Rahul Nair d3123057c3 Adding sub commands to Syntribos
This change adds some commands to syntribos

sub commands:

- list_tests
- run
- dry_run

Also, refactoring runner.py and added utils/cli.py
to add all utility methods used for cli output.
Change-Id: Ieed2e06e0fb6eec34be640ae1db86785403546df
2016-08-16 16:15:14 -05:00
Rahul Nair 0009bf49ce Adding unique_id to tests
Adding a simple counter based id to tests to track them in debug
log and results log. Also, this patch improves the result output
like adding a progress bar and uniform test names..

Change-Id: Ib83181b25a0c18c7993f491cde98d73555b01404
2016-08-04 20:22:17 +00:00
Charles Neill 95ed57ca94 Removes FuzzRequest from Syntribos
- This removes FuzzRequest as a type of RequestObject. All requests are
  now RequestObjects, and are parsed by the
  syntribos.clients.http.parser
- Fuzzing a request is now done via
  syntribos.tests.fuzz.datagen.fuzz_request()
- Moved _remove_attr_names and _remove_braces to the RequestObject
- Added unittests for fuzz datagen, http client models

Change-Id: Ib589c34ad80da58daab875d7383210d22d82d764
2016-08-03 01:15:38 +00:00
Charles Neill 879a76a488 Renaming BaseTestCase/BaseFuzzTestCase methods
This updates the BTC/BFTC class methods based on the changes we agreed
on in our 7/13 meeting.

Details here: https://etherpad.openstack.org/p/syntribos-planning

Change-Id: I05e426ee1832385ec42d64ba930caea9ddd5374f
2016-07-29 14:55:27 -05:00
Jenkins a42cf2895b Merge "Added string presence check" 2016-07-29 01:33:50 +00:00
Vinay Potluri cf9ab6ebe7 Added string presence check
Removed data driven pass case and refactored data driven failure case
with a string presence check

Change-Id: I1abce36296676e2c7d4a3eacaf16c619b80199f1
2016-07-28 16:52:57 -05:00
michael.dong@rackspace.com 58d3db7bf4 Added signals to results output
Currently, no signals are printed with the output, so now, the slugs of signals
associated with each issue are now printed in the results output. We may
revisit this to add strengths and tags should they be needed in the future.

Change-Id: Ib58127a9d6bb296b9731668e957c15e5c2ef71f4
2016-07-28 12:16:49 -05:00
Rahul Nair dcdcda3dde Modifying checks to use test objects
Check modified to use test objects.

Change-Id: I110a7609fc172f03998a201ca6975af26f1003c3
2016-07-18 15:48:56 -05:00
Charles Neill a8a9ac6e37 Converting to oslo.config for configuration
- Merges arguments.py and and existing config.py files into one file
- Removes dependencies on cafe.* config file / CLI parsing
- Adds "register_opts" to BTC to allow Tests to specify config options
- Moves us completely from cclogging to Python logging

Change-Id: I0d4a84563d54307c94c0064be429919f9d91d67b
2016-07-11 11:52:51 -05:00
Charles Neill 70c62a0c0b Refactoring BaseTestCase/BaseFuzzTestCase
- Removed unnecessary code from BTC
- Moved some components from BFTC to BTC
- Start using signals for all tests
- Renamed several variables in BTC for clarity
- Cleaned up BaseAuthTestCase somewhat

Change-Id: I3efc44b33aa4416e1f9853910485a8c5703a9057
2016-07-05 15:42:01 -05:00
michael.dong@rackspace.com 445e12362e Simplified imports and added constants
Issues, Constants, and Results are now imported in the __init__.py of
the module

Change-Id: I805c9df4f8b838d63e2a7d04f5998718a7bf4ecb
2016-06-21 13:34:39 -05:00
Jenkins 08a84a78dd Merge "Moved SSL test out of BaseFuzzTestCase" 2016-06-20 19:49:57 +00:00
michael.dong@rackspace.com d1ca60c5f2 Moved SSL test out of BaseFuzzTestCase
Change-Id: I8cd5d7c651a324faaa9ceb9b4a79740b4b8b99bc
2016-06-20 11:26:03 -05:00
Jenkins 4a22bd1201 Merge "modified command injection timeout to read from config" 2016-06-07 20:43:32 +00:00
michael.dong@rackspace.com 6594991252 modified command injection timeout to read from config
Change-Id: Ida624918b34180bf02bb88c75769687fd343d1d9
2016-06-01 12:25:35 -05:00
Jenkins c1499d1802 Merge "Added SSL test case" 2016-05-25 00:44:28 +00:00
Vinay Potluri 0d323355d3 Added SSL test case
Added SSL test case to check the returned response for http urls
over https urls

Implements blueprint test-transport-layer-security

Change-Id: I87eb6b075e5b528f0634500bc0ed2b52ff19e241
2016-05-24 14:54:12 -05:00
michael.dong@rackspace.com cc89c7da39 Validate_length now checks status code
Change-Id: I99d43ef1a07191abe9a9adb8d8606c2518433da3
2016-05-24 11:22:03 -05:00
Jenkins c26d914992 Merge "Removed all_attacks" 2016-05-19 22:07:40 +00:00
michael.dong@rackspace.com 383b7a306e Removed all_attacks
The all_attack test payload is extraordinarily long and serves little purpose.
Therefore it's now removed.

Change-Id: Ifd3ccdd9cb5d4b05f365dba45b61ea4d6875a64a
2016-05-19 16:13:57 -05:00
Jenkins c8f39cc3ae Merge "Modified buffer overflow attack" 2016-05-19 21:13:11 +00:00
Jenkins e098a81d03 Merge "Modified integer overflow tests" 2016-05-19 21:13:03 +00:00
Jenkins 04ec5dfe05 Merge "Moved extend_class() function" 2016-05-18 23:00:09 +00:00
michael.dong@rackspace.com 3477b2f7be Moved extend_class() function
Extended the extend_class() method from BaseTestCase in BaseFuzzTestCase, as
only BaseFuzzTestCase should have fuzz_string and param_path as parameters to
the method.

Change-Id: If39629caed9d9659bb4c7c39eb8199b25610b5b1
2016-05-18 17:32:13 -05:00
michael.dong@rackspace.com fa17e5c1da Modified integer overflow tests
Change-Id: I7042daa3920f132680160e3f107cdd45747e8526
2016-05-18 15:06:15 -05:00
Jenkins 3c0959ee94 Merge "Fixed payload truncating" 2016-05-18 18:55:20 +00:00
michael.dong@rackspace.com becdff1e07 Modified buffer overflow attack
Change-Id: If70ce417bd6bcf33b78e40c315737dfdf23b6979
2016-05-18 12:01:26 -05:00