Giter Club home page Giter Club logo

honeyplc's Introduction

HoneyPLC

Overview

HoneyPLC is a high interaction PLC honeypot designed to simulate multiple PLC models from different vendors. It can log S7comm interactions and can store Ladder Logic programs injected by an attacker. It can also log SNMP get requests and HTTP login attempts.

It is brought to you by the cybersecurity lab SEFCOM at Arizona State University and Efrén López.

The S7comm portion of HoneyPLC is built on top of Snap7

overview image

Research Paper

HoneyPLC: A Next-Generation Honeypot for Industrial Control Systems [PDF]
Efrén López-Morales, Carlos Rubio-Medrano, Adam Doupé, Yan Shoshitaishvili, Ruoyu (Fish) Wang, Tifanny Bao, Gail-Joon Ahn
In Proceedings of the 2020 ACM SIGSAC Conference on Computer and Communications Security (CCS ’20)

If you use HoneyPLC in a scientific publication, we would appreciate citations using this BibTex entry:

@inproceedings{lopez-morales_honeyplc_20,
 author    = {Efr\'en L\'opez-Morales and Carlos Rubio-Medrano and Adam Doup\'e and Yan Shoshitaishvili and Ruoyu Wang and Tifanny Bao and Gail-Joon Ahn},
 booktitle = {In Proceedings of the 2020 ACM SIGSAC Conference on Computer and Communications Security (CCS ’20)},
 month     = {Nov},
 title     = {HoneyPLC: A Next-Generation Honeypot for Industrial Control Systems},
 year      = {2020}
}

Features

S7comm features:

  • Fake PLC memory blocks with the ability to upload and download ladder logic programs.
  • Possibility to read PLC hardware information, e.g., firmware, name, model.
  • Interaction logs that include source IP address, S7comm function commands, blocks accessed, blocks downloaded/uploaded.
  • Possibility to capture Ladder logic programs and save them to filesystem for future analysis.

Requirements

Software required:

How to install it?

Install Honeyd and all its dependencies.

  • Append the necessary nmap fingerprints to the Honeyd fingerprint database:

/usr/share/honeyd/nmap-os-db

Install S7comm Server and library.

/usr/lib/libsnap7.so

/usr/share/honeyd/s7commServer

chmod 777 s7commServer

How to run it?

Edit the honeyd template file with the correct IP address and subsystems paths.

Example:

create base
add base subsystem "/usr/share/honeyd/s7commServer" shared restart

clone host1 base
set host1 personality "Siemens Simatic 300 programmable logic controller"


bind 192.168.0.100 host1

Run Honeyd with the corresponding PLC Profile honeyd teamplate:

Example

sudo honeyd -d -f config.s7-300 192.168.0.0/24

You can also run the S7comm Server separately passing the IP address argument:

Example

sudo s7commServer 127.0.0.1

The S7comm Server will save all interactions in s7comm.log

The captured ladder logic programs will be saved in the same directory where the applicacion is.

How to modify source code and recompile?

To rebuild the libsnap7.so library follow the steps in the Snap7 Reference Manual.

The libsnap7.so file library contains the ladder logic capture code and the different Siemens PLCs hardware information.

To rebuild the s7commServer navigate to the correct architecture, for example:

snap7/examples/cpp/x86_64-linux/

make and look for the server file.

Profiler Tool

The Profiler tool creates a PLC Profile that can later be simulated by HoneyPLC.

usage: profiler.py <address> <profile>

Run profiler.py to create a new HoneyPLC profile. Write the IP address of the PLC host. Write the name of the profile to be created. A new directory with the profile data will be created.

Example python profiler.py 192.168.0.100 NewProfile

Experimental Data

I have some questions!

I am might be reachable via e-mail: edlopezm at asu dot edu.

honeyplc's People

Contributors

adamdoupe avatar efrenlopezm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

honeyplc's Issues

s7commServer install issues

Hi!

I am having problems while running Honeyd because of a missing Srv_SetSZL symbol; that led me to believe i hadn't really installed s7commServer and/or snap7 (correctly).

Issue:

root@plc:/honey# honeyd -d -f honeyd/myconfigs/config.s7-300 10.0.0.0/24
Honeyd V1.6d Copyright (c) 2002-2007 Niels Provos
honeyd[133]: started with -d -f honeyd/myconfigs/config.s7-300 10.0.0.0/24
honeyd[133]: listening promiscuously on eth0: (arp or ip proto 47 or (udp and src port 67 and dst port 68) or (ip and (net 10.0.0.0/24))) and not ether src 42:00:aa:00:00:03
honeyd[133]: Demoting process privileges to uid 65534, gid 65534
/usr/share/honeyd/s7commServer: symbol lookup error: /usr/share/honeyd/s7commServer: undefined symbol: Srv_SetSZL
honeyd[133]: Subsystem "/usr/share/honeyd/s7commServer" died
honeyd[133]: Restarting subsystem "/usr/share/honeyd/s7commServer"
/usr/share/honeyd/s7commServer: symbol lookup error: /usr/share/honeyd/s7commServer: undefined symbol: Srv_SetSZL
honeyd[133]: Subsystem "/usr/share/honeyd/s7commServer" died

All I did install-wise was (part of my docker setup script for the PLC node):

sudo apt update && sudo apt install software-properties-common -y
sudo add-apt-repository ppa:gijzelaar/snap7
sudo apt-get update
sudo apt-get install libsnap7-1 libsnap7-dev -y

echo "# ====== S300 fingerprint =======" >> /usr/share/honeyd/nmap-os-db
cat honeyplc-source/plc-profiles/Siemens\ S7-300/s7-300-nmap-fingerprint.txt >> /usr/share/honeyd/nmap-os-db

cp honeyplc-source/snap7/build/bin/x86_64-linux/libsnap7.so-300 /usr/lib/
cp honeyplc-source/snap7/examples/cpp/x86_64-linux/server /usr/share/honeyd/s7commServer
chmod 777 /usr/share/honeyd/s7commServer

The main issue and question is how to fix the issue of the unknown symbol, and how to do the setup step from your readme:

Install S7comm Server and library.

/usr/lib/libsnap7.so

/usr/share/honeyd/s7commServer

chmod 777 s7commServer

Any help would be appreciated and thanks in advance!

Broken research paper link

Hello!

I would just like to notify you that the link to the research paper is broken. I am bringing this to your attention in case that is unintentional. I was able to find the paper on ACM's Digital Library.

Kind regards,
Luka Sever

I don't understand how to use this programe

Install S7Comm Server and Library.What does that mean? mv/cp/or what? I can't run this program.
it just told me:
/home/rooting/honeyplc/honeyplc-master/s7-1500-Profile/honeyd-template:6: syntax error
and I don't understand how to use the other two fils figerprint and public.snmpwalk,I really want someone to help me

segmentation fault with honeyd

I followed the instructions in the README to run honeyplc but when I execute the command:
$ sudo honeyd -d -f config.s7-300 192.168.0.0/24

I receive as output:

Honeyd V1.6d Copyright (c) 2002-2007 Niels Provos
honeyd[12109]: started with -d -f config.s7-300 192.168.0.0/24
honeyd[12109]: listening promiscuously on enp0s3: (arp or ip proto 47 or (udp and src port 67 and dst port 68) or (ip and (net 192.168.0.0/24))) and not ether src 08:00:27:84:8a:1d
honeyd[12109]: Demoting process privileges to uid 65534, gid 65534
Segmentation fault (core dumped)
honeyd[12109]: Subsystem "/usr/share/honeyd/s7commServer" died

I wonder how to install s7commServer

I don’t understand how to install s7commServer.
In addition, do libsnap7.so-300, etc. need to be copied with the cp command?When I execute the "make -f x86_64_linux.mk install" command, I only get a libsnap7.so in "/usr/lib" path.

Segmentation fault (core dumped)

use CMD:

sudo honeyd -d -f myConfig/config.s7-300

config.s7-300:

#config.s7-300
create base
add base subsystem "/usr/share/honeyd/s7commServer" shared restart

clone s7-300 base

set s7-300 personality "Siemens Simatic 300 programmable logic controller"
set s7-300 ethernet "dell" 

bind 192.168.153.223 s7-300

error info:

Honeyd V1.6d Copyright (c) 2002-2007 Niels Provos
honeyd[58126]: started with -d -f myConfig/config.s7-300
honeyd[58126]: listening promiscuously on ens33: (arp or ip proto 47 or (udp and src port 67 and dst port 68) or (ip )) and not ether src 00:0c:29:6d:90:29
honeyd[58126]: Demoting process privileges to uid 65534, gid 65534
Segmentation fault (core dumped)
honeyd[58126]: Subsystem "/usr/share/honeyd/s7commServer" died
honeyd[58126]: Restarting subsystem "/usr/share/honeyd/s7commServer"

I can use ./s7commServer IP to start honeyplc, but i want to change my config.s7-300 to easily test the fingerprint .....

I have no idea how to use these nmap profles

I copied the codes from honeyplc/plc-profiles/Siemens S7-300/s7-300-nmap-fingerprint.txt and pasted them into nmap.prints. After this I created a template file and ran it with sudo honeyd -d -f config.s7-300 192.168.0.0/24 and kept getting parse errors with the fingerprints which I have just added.
I wonder if I made a wrong use of these plc profiles and how to use it correctly thx

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.