Giter Club home page Giter Club logo

bytes-of-swiss's Introduction

Bytes of Swiss

Master Master Build status
Build Build Build status

Bytes of Swiss is a library of no frills Ansible roles that can be combined to make a vulnerable virtual machine. This can be used for cybersecurity King of the Hill competitions, penetration testing practice, or to test both offensive and defense tools.

Vulnerabities are located in roles/vuln and pull in services like an FTP server or database from roles/service as needed. The roles/misc directory contains helper roles like adding a new user.

All roles are tested with Molecule and Vagrant.

Example

This makes an existing machine vulnerable by making a new bind shell every minute, creating a PHP shell, and running telnet.

---
- hosts: vulnerable
  roles:
    - vuln/bind-shell
    - vuln/web-shell
    - service/telnet

Try It Out

Download the repository.

git clone https://github.com/becksteadn/Bytes-Of-Swiss.git

Start the example VM with Vagrant

vagrant up

Run the example playbook.

ansible-playbook -i vagrant.ini example.yml

Exploit the machine.

  • Web shell
    • curl localhost:8080/cmd.php?cmd=cat%20/etc/passwd
  • Telnet
    • telnet localhost 2323
    • Log in with vagrant:vagrant
  • Bind shell
    • vagrant ssh
    • sudo netstat -tunlp
    • Observe the processes listening on high ports. Connect to one with nc and run some bash commands.

Contributing

Any help or suggestions are greatly appreciated! Check out CONTRIBUTING.md for details.

bytes-of-swiss's People

Contributors

scriptingislife avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

exploitprotocol

bytes-of-swiss's Issues

Create SQL injection app

Make a web app that is vulnerable to SQL injection

  • Create sql-injection role
  • Create tables in database
  • Create web app
  • Test

[VULN] Overprivileged users

Description
Create a user that has extra privileges.

What does the vulnerability require?
Creating a system user with access special files or applications.

What weaknesses does this create in a machine?
A compromised user that might be able to create additional vulnerabilities or persistence.

TODO

  • Update add_user role
  • Write tests
  • Update README.md

Create vulnerabilities at random

  • Let user pick what vulns to include
    • Y/N choice on complete list
    • Easy/Med/Hard
    • Category (web, insecure config, scenarios)
  • Include roles randomly
    • 50/50 pick

[VULN] ๐Ÿ”“ SQL Injection Web App

Description
A web app that has SQL injection.

What does the vulnerability require?
A web server, PHP, and database.

What weaknesses does this create in a machine?
User information can be disclosed. Plaintext passwords?

Additional context
https://www.w3schools.com/sql/sql_injection.asp

http://www.tizag.com/mysqlTutorial/mysql-php-sql-injection.php

TODO

  • Create role from cookiecutter
  • Modify molecule.yml
    • Forward ports
    • Change/add instances
  • Add dependencies to meta/main.yml
    • Create dependency roles if they don't already exist
  • Write role
  • Write tests
  • Update README.md

[VULN] ๐Ÿ”“ OSINT from web app

Description
A social media-esque web app where users give away personal information.

What does the vulnerability require?
Requires a web server and maybe PHP if posts aren't hard coded.

What weaknesses does this create in a machine?
Users create weak passwords based on things they like. fidoMarlins1965

Additional context
None.

TODO

  • Create scenario
  • Create web page
  • Test

[SERV] ๐Ÿงฐ SMB Server

Description
Create a Sambda server to host file shares.

What kind of vulnerabilities can use this service?
Shares can be made to have anonymous or write access.

What other services are needed?
None.

Additional context
https://tutorials.ubuntu.com/tutorial/install-and-configure-samba

https://www.howtoforge.com/samba-server-installation-and-configuration-on-centos-7

TODO

  • Create role from cookiecutter
  • Modify molecule.yml
    • Forward ports
    • Change/add instances
  • Add dependencies to meta/main.yml
    • Create dependency roles if they don't already exist
  • Write role
  • Write tests
  • Update README.md

[VULN] ๐Ÿ”“ Drupalgeddon2

Description
A vulnerable Drupal site that allows RCE.

What does the vulnerability require?
A specially crafted request.
Web server.
PHP.

What weaknesses does this create in a machine?
RCE as an anonymous visitor.

Additional context
https://www.rapid7.com/db/modules/exploit/unix/webapp/drupal_drupalgeddon2

TODO

  • Create role from cookiecutter
  • Modify molecule.yml
    • Forward ports
    • Change/add instances
  • Add dependencies to meta/main.yml
    • Create dependency roles if they don't already exist
  • Write role
  • Write tests
  • Update README.md

Create AWS scenario for molecule testing

Test roles on AWS to mimic installing on a real system.

  • Create AWS scenario in cookiecutter template
  • Add AWS scenario to existing roles
  • Configure API keys
  • Integrate with CI testing

Update README for all working roles

  • Add variables in standard format
  • Add dependencies
  • Service
    • database
    • docker
    • ftp
    • mail
    • php
    • redis
    • ssh
    • telnet
    • tomcat
    • web
  • Vulnerability
    • bind-shell
    • insecure-ssh-config
    • web-shell

[VULN] ๐Ÿ”“ Shellshock

Description
Shellshock takes advantage of a vulnerability in older version of the Bash shell to execute commands remotely.

What does the vulnerability require?
Shellshock is most often found in cgi-bin capabilities of web servers but can also be used in mail servers.

What weaknesses does this create in a machine?
Allows remote command execution.

Additional context

https://blog.cloudflare.com/inside-shellshock/

https://www.surevine.com/shellshocked-a-quick-demo-of-how-easy-it-is-to-exploit/

https://code-maven.com/set-up-cgi-with-apache

TODO

  • Create role from cookiecutter
  • Modify molecule.yml
    • Forward ports
    • Change/add instances
  • Add dependencies to meta/main.yml
    • Create dependency roles if they don't already exist
  • Write role
  • Write tests
  • Update README.md

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.