conpot icon indicating copy to clipboard operation
conpot copied to clipboard

AWL/STL/PLC simulator support

Open creolis opened this issue 12 years ago • 8 comments

Skills required: Python, programming PLCs (AWL, STL), network programming Short Description: Add support for a AWL/STL/PLC simulator. Goals is to run AWL/STL programs in Conpot and allow communication with the PLC emulator. Description: Conpot supports the protocols a common PLC is providing but not the functionality of a PLC. This means besides some randomized values and linear incrementing values like uptime the data in the honeypot is static. In order to appear more realistic and handle input values properly, we would like to support a PLC simulator. A good candidate is Awlsim (http://bues.ch/cms/hacking/awlsim.html): Awlsim is a free Step 7 compatible AWL/STL Soft-PLC written in Python. Awlsim provides an interface for virtual hardware connection modules (currently available are PROFIBUS-DP and LINUX-CNC). This interface could be used to connect Awlsim to Conpot. Maybe we could add an I/O interface to it in order to retrieve and even inject data to a running simulation.

creolis avatar Jul 21 '13 17:07 creolis

This looks very powerful. Did you had a look at his network emulation? I just skimmed through the tests and it seems like he emulates network interfaces.

glaslos avatar Jul 23 '13 07:07 glaslos

To be honest, I could not find any hint on network emulation yet, but this is great news.

creolis avatar Jul 23 '13 08:07 creolis

I think I was mistaken. It actually seems like there is no intended interaction...

glaslos avatar Jul 23 '13 08:07 glaslos

Note to myself: glaslos found awlsim profibus support: https://github.com/mbuesch/awlsim/blob/master/awlsimhw_pyprofibus/main.py

creolis avatar Aug 09 '13 22:08 creolis

pyprofibus: https://github.com/mbuesch/raspi-profibus

glaslos avatar Aug 12 '13 10:08 glaslos

Seems like the easiest way to interact with awlsim is by writing our own hardware extension: https://github.com/mbuesch/awlsim/blob/master/awlsimhw_dummy/main.py

glaslos avatar Aug 13 '13 10:08 glaslos

@creolis Did you got a quote on how relevant this is? I remember you mentioning that this might not be state of the art anymore (not sure if you can ever say something like that in the ICS domain...)

glaslos avatar Sep 24 '13 10:09 glaslos

Some initial work on the AWLSim TCP module: https://github.com/glastopf/awlsim/blob/hw_tcp/awlsimhw_tcp/main.py

glaslos avatar Aug 14 '14 20:08 glaslos