syntribos api security test automation

29
Syntribos – Security Test Automation for APIs Matthew Valdes

Upload: matthew-valdes

Post on 13-Feb-2017

363 views

Category:

Software


27 download

TRANSCRIPT

Page 1: Syntribos API Security Test Automation

Syntribos – Security Test Automation for APIs

Matthew Valdes

Page 2: Syntribos API Security Test Automation

Background

• Matt Valdes – Security Developer– Application Security Testing

Page 3: Syntribos API Security Test Automation

Rackspace Security Engineering

• Security within Quality Engineering

Page 4: Syntribos API Security Test Automation

Infrastructure Testing

Page 5: Syntribos API Security Test Automation

Web App Testing

Page 6: Syntribos API Security Test Automation

Code Security Review

Page 7: Syntribos API Security Test Automation

API Testing

Page 8: Syntribos API Security Test Automation

Security Test Automation

Page 9: Syntribos API Security Test Automation

API Test Automation?

Page 10: Syntribos API Security Test Automation

OpenStack

• Open source cloud platform• Started in 2010 by NASA and Rackspace• Today: > 2.5 million LoC + 1800 contributors• ~77% Python

Page 11: Syntribos API Security Test Automation

API Test Scope

Page 12: Syntribos API Security Test Automation

JSON Body

Page 13: Syntribos API Security Test Automation

JSON Body

Page 14: Syntribos API Security Test Automation

Enter Syntribos

• THE DAIMONES KERAMIKOI were five malevolent spirits which plagued the craftsman potter– Syntribos (the Shatterer)– Smaragos (the Smasher)– Asbetos (Charrer)– Sabaktes (Destroyer) – Omodamos (Crudebake).

Page 15: Syntribos API Security Test Automation

API Test Automation!

• Automatic fuzzer for HTTP requests– Currently Based on FuzzDB Test Strings

• Fully customizable• Open source!

Page 16: Syntribos API Security Test Automation

Syntribos Framework

• OpenCafe– Code: https://github.com/openstack/opencafe.git– Docs: http://opencafe.readthedocs.org/en/latest/– Automation Framework Engine– Unittest Framework

Page 17: Syntribos API Security Test Automation

Syntribos Architecture

Page 18: Syntribos API Security Test Automation

Syntribos Configuration

[syntribos]endpoint=https://cloud.api.example.com

[user]username=user123password=password123

Page 19: Syntribos API Security Test Automation

Syntribos RequestPOST /tokens HTTP/1.1Accept: application/jsonContent-type: application/json

{"auth": {"passwordCredentials": {"username": "USER_NAME", "password":"PASSWORD"} }}

Page 20: Syntribos API Security Test Automation

Syntribos Payload

• Data can be generated based on the test• Data generation supports HTTP protocol• Automated replacement– URL Path– URL Parameters– HTTP Headers– Body JSON, XML

Page 21: Syntribos API Security Test Automation

Syntribos Validation

• Extensible per test scenario• Default for fuzzing:– Response Length Comparison – HTTP Status Code

Page 22: Syntribos API Security Test Automation

Syntribos Extensions

• Used to supply supplementary data• Any data source can be referenced• Can be stored external to Syntribos• Returns a string or generator of strings

Page 23: Syntribos API Security Test Automation

Syntribos Demo

Page 24: Syntribos API Security Test Automation

Advantages

• Test validation• Unlimited data sources• Command-line driven• Open source

Page 25: Syntribos API Security Test Automation

Syntribos Future State

• More security tests• Better reporting– Output formatting– Result aggregation

• unittest creation to reproduce failures

Page 26: Syntribos API Security Test Automation

OpenStack Security Project

• Syntribos is an OpenStack Security Project• Other OSSG Security Projects:– Bandit (static code analysis)– Anchor (ephemeral PKI)– Security Guide (best practices)

Page 27: Syntribos API Security Test Automation

27

Join Us

#openstack-security on Freenode#openstack-meeting-alt @ 1700 UTC Thur

[email protected]• Use [Security] tag

Page 28: Syntribos API Security Test Automation

28

Q&A

https://github.com/openstack/syntribos

[email protected]

Page 29: Syntribos API Security Test Automation

29

Thanks