• This repository has been archived on 20/Mar/2022
  • Stars
    star
    206
  • Rank 190,504 (Top 4 %)
  • Language
    Python
  • License
    MIT License
  • Created over 9 years ago
  • Updated almost 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

VirtuaPlant is a Industrial Control Systems simulator which adds a “similar to real-world control logic” to the basic “read/write tags” feature of most PLC simulators.

** VIRTUAPLANT IS NO LONGER MAINTAINED. THERE ARE SECURITY VULNERABILITIES IN THE twisted AND pycrypto VERSIONS ON THIS PROJECT. ALSO, THE CODE SEEMS TO BE BROKEN SINCE pymodbus WAS UPDATED**

VirtuaPlant

VirtuaPlant is a Industrial Control Systems simulator which adds a “similar to real-world control logic” to the basic “read/write tags” feature of most PLC simulators. Paired with a game library and 2d physics engine, VirtuaPlant is able to present a GUI simulating the “world view” behind the control system allowing the user to have a vision of the would-be actions behind the control systems.

All the software is written in (guess what?) Python. The idea is for VirtuaPlant to be a collection of different plant types using different protocols in order to be a learning platform and testbed.

The first release introduces a as-simple-as-it-can-get one-process “bottle-filling factory” running Modbus as its protocol.

Components

World View

World View

World View consits on the game and 2d physics engine, simulating the effects of the control systems’ action on virtual (cyberz!) assets.

It uses python’s pygame and pymunk (Chipmunk engine for python — intended to be replaced by pybox2d due the lack of swept collision handling which currently limits us a little).

PLC controller

The soft-plc is implemented over the pymodbus library which runs on a separate thread in the World View component and shares its context (i.e. Registers/Inputs/Tags) with the World View functions in order to simulate assets being “plugged in” to the controller.

HMI

HMI

The HMI is written using GTK3 and is quite dead simple. Also runs pymodbus client on a separate thread and connects over TCP/IP to the server (so it could be technically on a separate machine), constantly polling (i.e. reading) the server’s (soft PLC in World View) tags. Control is also possible by writing in the soft-PLC tags.

Attack scripts

Attack all the things

You didn’t thought I was leaving this behind, did you? The phun on having a World View is to see the results when you start messing around with the soft-PLCs tags! Some pre-built scripts for determined actions are available so you can unleash the script-kiddie on yourself and make the plant go nuts! YAY!

Check the demo on YouTube

Installation requirements

The following packages are required:

  • PyGame
  • PyMunk
  • PyModbus (requires pycrypto, pyasn1)
  • PyGObject / GTK

On debian-based systems (like Ubuntu) you can apt-get the packages which are not provided over pip:

apt-get install python-pygame python-gobject python-pip python-dev

Then install the pip ones:

pip install pymunk
pip install pymodbus
pip install pyasn1
pip install pycrypto

or install all of the pip packages by using our provided requirement.txt file:

pip install < requirements.txt

Running

Enter the /plants directory, select the plant you want (currently only one available) and start both the world simulator and the HMI with the start.sh script. Parts can be ran individually by running world.py and hmi.py (self-explanatory). All the attack scripts are under the /attacks subdirectory.

Future

The following plant scenarios are being considered:

  • Oil Refinery Boiler
  • Nuclear Power Plant Reactor
  • Steel Plant Furnace

The following protocols are being considered:

  • DNP3 (based on OpenDNP3)
  • S7

More Repositories

1

GoldenEye

GoldenEye Layer 7 (KeepAlive+NoCache) DoS Test Tool
Python
1,324
star
2

Babadook

Connection-less Powershell Persistent and Resilient Backdoor
PowerShell
231
star
3

hass-magic_areas

Areas with batteries included for Home Assistant
Python
191
star
4

Multi-TOR

Shellscript opens multiple TOR instances
Shell
108
star
5

torblock

TORBlock is a BASH script to automatically download the list of TOR exit-nodes and add them to your IPTables ruleset.
Shell
49
star
6

GoldenEye-Mobile

GoldenEye Mobile Android Layer 7 HTTP DoS Test Tool
Java
33
star
7

usernamer

Pentest Tool to generate usernames/logins based on supplied names.
Python
32
star
8

peach-pit

Peach Fuzzer PIT Files
22
star
9

ha-room

Room presence custom_component for Home Assistant
Python
10
star
10

bifrost

bifröst - Intelligent Self-Learning Whitelist-based Web Application Firewall
Python
9
star
11

liboutplus

C library for structured output in many formats as text, csv, json, xml, html etc
C
9
star
12

etter.filter.hrf

The HRF (HTTP Request/Response Filter) is an ettercap filter that virtually downgrades HTML pathes on-the-fly replacing 'https' strings to 'http' forcing data to be sent over plaintext
7
star
13

nsrlex

Computer forensics tool to extract from NSRL signature files the known-good and known-bad hashsets.
Python
6
star
14

iDRACula

iDRACula uses the Shodan API (www.shodanhq.com) to search for Dell iDRAC boards exposed to the internet with default credentials
Python
5
star
15

whitespace

Whitespace Programming Language Tools
PHP
4
star
16

debian-bootstrap

Script for bootstrapping a debian-based distro
Shell
3
star
17

envmgr

Safely and easily manage service API keys to be used as environment variables
Python
2
star
18

Talks

Materials from talks on conferences
2
star
19

prick

The PHP Resource Information Conformity checKer will scan through all your PHP file's variable's and function's names to check for consistency of the used character set in order to detect obfuscated (and potentially malicious) values for those entities.
Python
2
star
20

pi-weather-station

Weather Station for Raspberry Pi
Python
1
star
21

mita

Man-in-the-App Proof-of-concept code
PHP
1
star
22

Wordpress-Do

Apple's Quicksilver / Gnome Do-like quick action manager for Wordpress
PHP
1
star
23

cpft

Copy-and-Paste File Transfer is a simple proof-of-concept VBS script that encodes and decodes base64-encoded binaries thus allowing to transfer files via text-only interfaces.
Visual Basic
1
star
24

esphome-packages

Handy packages for ESPHome
1
star