Coder Social home page Coder Social logo

stained-glass's Introduction

Introduction

Stained glass is a Windows testlab deployment tool configures to run directly on the hypervisor. It is a project build by UvA students for research in close colebaration with outflank.nl. It is meant to be a tool for software testing, penetration testing and malware research. It deploys disks directly from the hypervisor instead of traditional testlab tools like SCCM, WDS or puppet. Currently it ONLY works with Hyper-v.

So what does Stained-Glas do? It deploys a realistic testlab in one click and go, all it takes is a defined lab in a XML file. This includes:

  • User files
  • Working AD
  • AD users
  • Software on clients
  • Software on servers
  • Any number of servers
  • Any number of Clients

How does it work?

Stained-Glass is based on a new deployment model specified in [research paper here]. It directly deploys disks to the VM by using differencing disks and sysprep. It is completely build using powershell and a bit of BAT magic. All scripts are invoked from the init_server.ps1 file in the scripts/hyper-v/ folder. If you want to add your own installation script somewhere in the process there then you should place it there.

Exchange installation is done seperately and can be removed from the script by the invocation line in init_servers.ps1. Exchange installation as is is incredably dodgy and not stable since it tends to fail every now and then for fun. Every lab should have its own subnet in the 10.0.x.0/24 subnet. This allows for a total of 255 labs defined.

How do i make it work?

The tool requires 2 things to function:

  1. A lab defined in configs/labs_config.xml. A example can be found there. It expects a labname, IP range and domain names
  2. A image to deploy from. The images are build by using sysprep. If you want to add a clean windows image take the following steps:
  3. install windows on a VM using the .vhdx disk format
  4. Enable Powershell remoting
  5. Add a unnattend.xml
  6. Sysprep the image by using the following command: C:/Windows/System32/Sysprep/Sysprep.exe /generalize /oobe /shutdown /unattend:path-to-your-unattend.xml
  7. Move the .VHDX file after the system is shutdown to the disks/raw_disks folder and give it a identifyiable name ex. windows7

You can deploy the images to the lab by putting their name in the OS attribute of the machine in the labs.xml file. Once the lab is configured and the images are ready you can deploy away. You can start labdeployment by calling scripts\hyper-v\init_server.ps1 -labname [labname] -password [some password]

What else can it do in the future?

We are planning some sweet features for the future, including:

  • Log file generation on windows
  • Mounting of department folders
  • Content generation on local client machines (think desktop, downloads etc)
  • Automated image library
  • Domain forest configuration in a more dynamic manner
  • Increasing speed and performance

Contact

You can email me at fons.mijnen[at]os3.nl

Licensing

Copyright 2017 Outflank.nl, Fons Mijnen, Vincent van Dongen

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

stained-glass's People

Contributors

alfuananzo avatar xychix avatar

Watchers

 avatar

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.