homepage
Menu
Open menu
  • Training
    Go one level top Back

    Training

    • Courses

      Build cyber prowess with training from renowned experts

    • Hands-On Simulations

      Hands-on learning exercises keep you at the top of your cyber game

    • Certifications

      Demonstrate cybersecurity expertise with GIAC certifications

    • Ways to Train

      Multiple training options to best fit your schedule and preferred learning style

    • Training Events & Summits

      Expert-led training at locations around the world

    • Free Training Events

      Upcoming workshops, webinars and local events

    • Security Awareness

      Harden enterprise security with end-user and role-based training

    Featured: Solutions for Emerging Risks

    Discover tailored resources that translate emerging threats into actionable strategies

    Risk-Based Solutions

    Can't find what you are looking for?

    Let us help.
    Contact us
  • Learning Paths
    Go one level top Back

    Learning Paths

    • By Focus Area

      Chart your path to job-specific training courses

    • By NICE Framework

      Navigate cybersecurity training through NICE framework roles

    • DoDD 8140 Work Roles

      US DoD 8140 Directive Frameworks

    • By European Skills Framework

      Align your enterprise cyber skills with ECSF profiles

    • By Skills Roadmap

      Find the right training path based on critical skills

    • New to Cyber

      Give your cybersecurity career the right foundation for success

    • Leadership

      Training designed to help security leaders reduce organizational risk

    • Degree and Certificate Programs

      Gain the skills, certifications, and confidence to launch or advance your cybersecurity career.

    Featured

    New to Cyber resources

    Start your career
  • Community Resources
    Go one level top Back

    Community Resources

    Watch & Listen

    • Webinars
    • Live Streams
    • Podcasts

    Read

    • Blog
    • Newsletters
    • White Papers
    • Internet Storm Center

    Download

    • Open Source Tools
    • Posters & Cheat Sheets
    • Policy Templates
    • Summit Presentations
    • SANS Community Benefits

      Connect, learn, and share with other cybersecurity professionals

    • CISO Network

      Engage, challenge, and network with fellow CISOs in this exclusive community of security leaders

  • For Organizations
    Go one level top Back

    For Organizations

    Team Development

    • Why Partner with SANS
    • Group Purchasing
    • Skills & Talent Assessments
    • Private & Custom Training

    Leadership Development

    • Leadership Courses & Accreditation
    • Executive Cybersecurity Exercises
    • CISO Network

    Security Awareness

    • End-User Training
    • Phishing Simulation
    • Specialized Role-Based Training
    • Risk Assessments
    • Public Sector Partnerships

      Explore industry-specific programming and customized training solutions

    • Sponsorship Opportunities

      Sponsor a SANS event or research paper

    Interested in developing a training plan to fit your organization’s needs?

    We're here to help.
    Contact us
  • Talk with an expert
  • Log In
  • Join - it's free
  • Account
    • Account Dashboard
    • Log Out
  1. Home >
  2. Blog >
  3. Collecting Serial Data for ICS Network Security Monitoring
370x370_Mark-Bristow.jpg
Mark Bristow

Collecting Serial Data for ICS Network Security Monitoring

March 29, 2016

Adversaries across the capability spectrum are increasingly targeting Industrial Control System (ICS) environments. Malware such as BlackEnergy2, Havex, and Stuxnet have been developed with specific capabilities against different control system targets. As exemplified by BlackEnergy2 and Havex even today's advanced adversaries typically target the commodity IT hardware, software, and communications protocols in use as part of our ICS systems. While this is the common tactic today, as the ICS community improves its cybersecurity posture adversaries will have to change their tactics and may turn to harder to access but more insecure communications mechanisms such as serial communications.

Why does serial data matter?

Serial data is critical to the functionality of most ICS environments. Even more modern installations rely heavily in serial data communications for critical operational communications. While technologies built on IP protocol stacks are becoming more common, even in these environments serial is the prevalent communication mechanism for the "last mile" to field devices. The criticality of the operational data sent via serial makes it an opportune target for an adversary who is interested in having physical consequences.

What is the issue?

While many ICS facilities have begun to adopt Network Security Monitoring (NSM) techniques on their corporate and control networks, few facilities are monitoring serial communications. Part of the challenge is that there are few open source or commercially available options that will allow for basic serial communication logging or forwarding. The tools that are available typically convert serial to IP and vice versa permitting two-way communications (not ideal for NSM). These tools are often protocol or vendor specific and centered around attempting to allow serial communications over an IP infrastructure and are not engineered to be a monitoring solution. Monitoring tools that allow passive tapping of serial communications with one-way forwarding into security analysis tools are needed.

How can you tap it?

When planning to physically intercept, or tap, serial communications it is important to keep in mind any impacts the tap may have to the primary communications path. When selecting a tap, it is preferable to use a physical tap that isolates the monitoring port from the main communications line and that "fails open" allowing communications even if the device has a failure. You want to ensure that a malfunction or compromise of your monitoring will not have an impact to your operations. There are a number of products on the market such as the B+B SmartWorx's serial data taps or the Frontline ComProbe II that will allow you to duplicate serial communications in this manner.

Should an isolated solution not be practical in your environment, a serial Y-Cable (an example can be seen here) tap can be purchased for relatively low cost to create a monitoring port. Serial Y-Cables can even be manufactured with relatively basic soldering skills however unreliable connections or interference from serial Y-Cables could have adverse impacts operations and should only be used when an isolated solution is not available. Additionally, since serial Y-Cables are generally wired as straight through you can only practically monitor the RX side of the serial communications without constructing an external circuit and adding complexity to your solution that is built into the professional data taps.

Setting taps in an production environment can become incredibly complex depending on the configuration of the serial communications network you are attempting to tap. In my example implementation below I will demonstrate a very basic setup for monitoring a simplex connection suitable for monitoring a single endpoint device that can be helpful in an incident response or detection context. When adding in multiple protocols, multiplexers, and other serial communications equipment monitoring serial communications becomes significantly more complex. While the principles outlined here apply to more complex environments, significant planning and coordination with communications engineers at the facility will be required to implement monitoring at scale.

How can you integrate with existing tools?

Traditional IT network security monitoring has significantly matured over the last decade. There are now a variety of open source and commercial tools that can process and analyze IP based network data for security monitoring. In order to integrate with these existing tools, serial data could be "wrapped" with an IP packet structure so this data can be ingested. Below is a simple python tool I made called Serial IP Forwarder that leverages pySerial to forward serial data from a serial tap and forward it via UDP to an IP based NSM sensor for processing.

Serial IP Forwarder

The tool does not attempt to process the data or convert it to a IP equivalent ICS protocols (such as Modbus to ModbusTCP) but it does represent a starting point for forwarding serial captured data into more common IT NSM tools. This tool can be deployed on a simple laptop or a Raspberry Pi (RPi) with a serial interface to forward traffic for processing.

Example Raspberry Pi Implementation

Example-Pi-Implementation-1024x768.jpg
Figure 1: Example Raspberry Pi Serial Capture Setup

To demonstrate the concept, I set up a Raspberry Pi in my lab using a Modbus serial simulation. If you've taken SANS ICS515: ICS Active Defense and Incident Response, you can use the Raspberry Pi you are provided as part of the class to build your own serial data forwarder. While a stock RPi does not have a DB9 or other serial connector, the header pins are automatically configured for a serial interface. You can access the device as ?/dev/ttyAMA0', this is the RPi's Linux operating system name for the default serial port similar to a COM port you may be familiar with in Windows. You can acquire a serial port connector as I did above, or wire one yourself as it only requires four connections.

If you install the default version of Rasbian, you will need to make two modifications to your RPi before you can reliably use the built in serial port. By default the RPi initializes the serial port as system console access for applications without monitors or keyboards. To disable this function, you will need to edit your /boot/cmdline.txt and /etc/initab to remove any references to "ttyAMA0". Elinux.org has a helpful description of the RPi serial port that outlines the processes for making these modifications. Once complete, restart the RPi and connect it to your serial tap or Y-Cable.

In this example I have a Modbus Master station in RTU mode polling a Modbus slave with slave ID 10 for 10 registers. The resulting request should present in hexadecimal as "0A 03 00 00 00 0A C4 B6" and be assembled as shown below.

Modbus-Request.png
Figure 2: Modbus Request

On the RPi, simply navigate to the directory where you saved the python script and run the script as root being sure to specify at least the IP address or HOSTNAME you'd like the data to be forwarded to and the serial interface name. There are a variety of other options you can set, including the UDP port to forward to (default is 7777) that are displayed by running ?serial_forwarder.py -help?.

In my lab setup the my NSM sensor is located at 10.10.10.100 and the RPi serial port is named ?/dev/ttyAMA0'?so the command would be ?sudo python serial_forwarder.py 10.10.10.100 /dev/ttyAMA0'. The script will start up and wait for serial data to be transmitted. Once serial data is detected on the bus, the hexadecimal representation of the serial data will be displayed in the terminal window.

Successful-Capture-of-Serial-Communication.png
Figure 3 Successful Capture of Serial Communication

To verify that the data was actually transmitted to the NSM monitor for ingest, I had Wireshark running to verify.

Wireshark-Verification.png
Figure 4: Wireshark Verification

Since I was using a serial Y-Cable in the configuration above, I was only able to monitor the master station's transmissions. Additionally the Raspberry Pi could be active on the serial bus and could interfere with the regular communications between the master and slaves. This limitation can be overcome by using a purpose built isolated serial tap that merges both the TX and RX lines into the RX line of the tap port or by building a tap that ties the TX and RX lines together and adding diodes and other circuitry to ensure the tap remains completely passive. The configuration used here was to demonstrate the method and is not recommended for production environments.

Mark Bristow is an instructor for the SANS ICS515: Active Defense and Incident Response course. Mark currently serves as the Chief of Incident Response for the ICS-CERT and has a background in ICS assessments, incident response, and penetration testing.

Share:
TwitterLinkedInFacebook
Copy url Url was copied to clipboard
Subscribe to SANS Newsletters
Receive curated news, vulnerabilities, & security awareness tips
United States
Canada
United Kingdom
Spain
Belgium
Denmark
Norway
Netherlands
Australia
India
Japan
Singapore
Afghanistan
Aland Islands
Albania
Algeria
American Samoa
Andorra
Angola
Anguilla
Antarctica
Antigua and Barbuda
Argentina
Armenia
Aruba
Austria
Azerbaijan
Bahamas
Bahrain
Bangladesh
Barbados
Belarus
Belize
Benin
Bermuda
Bhutan
Bolivia
Bonaire, Sint Eustatius, and Saba
Bosnia And Herzegovina
Botswana
Bouvet Island
Brazil
British Indian Ocean Territory
Brunei Darussalam
Bulgaria
Burkina Faso
Burundi
Cambodia
Cameroon
Cape Verde
Cayman Islands
Central African Republic
Chad
Chile
China
Christmas Island
Cocos (Keeling) Islands
Colombia
Comoros
Cook Islands
Costa Rica
Cote D'ivoire
Croatia (Local Name: Hrvatska)
Curacao
Cyprus
Czech Republic
Democratic Republic of the Congo
Djibouti
Dominica
Dominican Republic
East Timor
Ecuador
Egypt
El Salvador
Equatorial Guinea
Eritrea
Estonia
Eswatini
Ethiopia
Falkland Islands (Malvinas)
Faroe Islands
Fiji
Finland
France
French Guiana
French Polynesia
French Southern Territories
Gabon
Gambia
Georgia
Germany
Ghana
Gibraltar
Greece
Greenland
Grenada
Guadeloupe
Guam
Guatemala
Guernsey
Guinea
Guinea-Bissau
Guyana
Haiti
Heard And McDonald Islands
Honduras
Hong Kong
Hungary
Iceland
Indonesia
Iraq
Ireland
Isle of Man
Israel
Italy
Jamaica
Jersey
Jordan
Kazakhstan
Kenya
Kiribati
Korea, Republic Of
Kosovo
Kuwait
Kyrgyzstan
Lao People's Democratic Republic
Latvia
Lebanon
Lesotho
Liberia
Liechtenstein
Lithuania
Luxembourg
Macau
Madagascar
Malawi
Malaysia
Maldives
Mali
Malta
Marshall Islands
Martinique
Mauritania
Mauritius
Mayotte
Mexico
Micronesia, Federated States Of
Moldova, Republic Of
Monaco
Mongolia
Montenegro
Montserrat
Morocco
Mozambique
Myanmar
Namibia
Nauru
Nepal
Netherlands Antilles
New Caledonia
New Zealand
Nicaragua
Niger
Nigeria
Niue
Norfolk Island
North Macedonia
Northern Mariana Islands
Oman
Pakistan
Palau
Palestine
Panama
Papua New Guinea
Paraguay
Peru
Philippines
Pitcairn
Poland
Portugal
Puerto Rico
Qatar
Reunion
Romania
Russian Federation
Rwanda
Saint Bartholemy
Saint Kitts And Nevis
Saint Lucia
Saint Martin
Saint Vincent And The Grenadines
Samoa
San Marino
Sao Tome And Principe
Saudi Arabia
Senegal
Serbia
Seychelles
Sierra Leone
Sint Maarten
Slovakia
Slovenia
Solomon Islands
South Africa
South Georgia and the South Sandwich Islands
South Sudan
Sri Lanka
St. Helena
St. Pierre And Miquelon
Suriname
Svalbard And Jan Mayen Islands
Sweden
Switzerland
Taiwan
Tajikistan
Tanzania, United Republic Of
Thailand
Togo
Tokelau
Tonga
Trinidad And Tobago
Tunisia
Turkey
Turkmenistan
Turks And Caicos Islands
Tuvalu
Uganda
Ukraine
United Arab Emirates
United States Minor Outlying Islands
Uruguay
Uzbekistan
Vanuatu
Vatican City State
Venezuela
Vietnam
Virgin Islands (British)
Virgin Islands (U.S.)
Wallis And Futuna Islands
Western Sahara
Yemen
Zambia
Zimbabwe

By providing this information, you agree to the processing of your personal data by SANS as described in our Privacy Policy.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Tags:
  • Industrial Control Systems Security

Related Content

Blog
Industrial Control Systems Security
May 19, 2025
Culture Over Checklists: How NextEra Is Rethinking NERC CIP with People at the Center
When people ask me what makes a successful NERC CIP program, my answer is always the same: it’s not just about compliance, it’s about culture. You can meet every regulatory requirement and still be vulnerable. You can pass every audit and still lack resilience. The organizations that stand out—the...
370x370_Jason-D-Christopher.jpg
Jason D. Christopher
read more
Blog
emerging threats summit 340x340.png
Digital Forensics, Incident Response & Threat Hunting, Offensive Operations, Pen Testing, and Red Teaming, Cyber Defense, Industrial Control Systems Security, Cybersecurity Leadership
May 14, 2025
Visual Summary of SANS Emerging Threats Summit 2025
Check out these graphic recordings created in real-time throughout the event for SANS Emerging Threats Summit 2025
No Headshot Available
Alison Kim
read more
Blog
Blog - Cloudy with a Chance of_340 x 340.jpg
Industrial Control Systems Security
May 13, 2025
Cloudy with a Chance of Industrial Cyber Threats, Part 1
Cloud in ICS/OT can enable scalable data storage, remote monitoring, analytics, disaster recovery, & industrial process control capabilities.
DeanParsons_340x340.png
Dean Parsons
read more
  • Company
  • Mission
  • Instructors
  • About
  • FAQ
  • Press
  • Contact Us
  • Careers
  • Policies
  • Training Programs
  • Work Study
  • Academies & Scholarships
  • Public Sector Partnerships
  • Law Enforcement
  • SkillsFuture Singapore
  • Degree Programs
  • Get Involved
  • Join the Community
  • Become an Instructor
  • Become a Sponsor
  • Speak at a Summit
  • Join the CISO Network
  • Award Programs
  • Partner Portal
Subscribe to SANS Newsletters
Receive curated news, vulnerabilities, & security awareness tips
United States
Canada
United Kingdom
Spain
Belgium
Denmark
Norway
Netherlands
Australia
India
Japan
Singapore
Afghanistan
Aland Islands
Albania
Algeria
American Samoa
Andorra
Angola
Anguilla
Antarctica
Antigua and Barbuda
Argentina
Armenia
Aruba
Austria
Azerbaijan
Bahamas
Bahrain
Bangladesh
Barbados
Belarus
Belize
Benin
Bermuda
Bhutan
Bolivia
Bonaire, Sint Eustatius, and Saba
Bosnia And Herzegovina
Botswana
Bouvet Island
Brazil
British Indian Ocean Territory
Brunei Darussalam
Bulgaria
Burkina Faso
Burundi
Cambodia
Cameroon
Cape Verde
Cayman Islands
Central African Republic
Chad
Chile
China
Christmas Island
Cocos (Keeling) Islands
Colombia
Comoros
Cook Islands
Costa Rica
Cote D'ivoire
Croatia (Local Name: Hrvatska)
Curacao
Cyprus
Czech Republic
Democratic Republic of the Congo
Djibouti
Dominica
Dominican Republic
East Timor
Ecuador
Egypt
El Salvador
Equatorial Guinea
Eritrea
Estonia
Eswatini
Ethiopia
Falkland Islands (Malvinas)
Faroe Islands
Fiji
Finland
France
French Guiana
French Polynesia
French Southern Territories
Gabon
Gambia
Georgia
Germany
Ghana
Gibraltar
Greece
Greenland
Grenada
Guadeloupe
Guam
Guatemala
Guernsey
Guinea
Guinea-Bissau
Guyana
Haiti
Heard And McDonald Islands
Honduras
Hong Kong
Hungary
Iceland
Indonesia
Iraq
Ireland
Isle of Man
Israel
Italy
Jamaica
Jersey
Jordan
Kazakhstan
Kenya
Kiribati
Korea, Republic Of
Kosovo
Kuwait
Kyrgyzstan
Lao People's Democratic Republic
Latvia
Lebanon
Lesotho
Liberia
Liechtenstein
Lithuania
Luxembourg
Macau
Madagascar
Malawi
Malaysia
Maldives
Mali
Malta
Marshall Islands
Martinique
Mauritania
Mauritius
Mayotte
Mexico
Micronesia, Federated States Of
Moldova, Republic Of
Monaco
Mongolia
Montenegro
Montserrat
Morocco
Mozambique
Myanmar
Namibia
Nauru
Nepal
Netherlands Antilles
New Caledonia
New Zealand
Nicaragua
Niger
Nigeria
Niue
Norfolk Island
North Macedonia
Northern Mariana Islands
Oman
Pakistan
Palau
Palestine
Panama
Papua New Guinea
Paraguay
Peru
Philippines
Pitcairn
Poland
Portugal
Puerto Rico
Qatar
Reunion
Romania
Russian Federation
Rwanda
Saint Bartholemy
Saint Kitts And Nevis
Saint Lucia
Saint Martin
Saint Vincent And The Grenadines
Samoa
San Marino
Sao Tome And Principe
Saudi Arabia
Senegal
Serbia
Seychelles
Sierra Leone
Sint Maarten
Slovakia
Slovenia
Solomon Islands
South Africa
South Georgia and the South Sandwich Islands
South Sudan
Sri Lanka
St. Helena
St. Pierre And Miquelon
Suriname
Svalbard And Jan Mayen Islands
Sweden
Switzerland
Taiwan
Tajikistan
Tanzania, United Republic Of
Thailand
Togo
Tokelau
Tonga
Trinidad And Tobago
Tunisia
Turkey
Turkmenistan
Turks And Caicos Islands
Tuvalu
Uganda
Ukraine
United Arab Emirates
United States Minor Outlying Islands
Uruguay
Uzbekistan
Vanuatu
Vatican City State
Venezuela
Vietnam
Virgin Islands (British)
Virgin Islands (U.S.)
Wallis And Futuna Islands
Western Sahara
Yemen
Zambia
Zimbabwe

By providing this information, you agree to the processing of your personal data by SANS as described in our Privacy Policy.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.
  • Privacy Policy
  • Terms and Conditions
  • Do Not Sell/Share My Personal Information
  • Contact
  • Careers
© 2025 The Escal Institute of Advanced Technologies, Inc. d/b/a SANS Institute. Our Terms and Conditions detail our trademark and copyright rights. Any unauthorized use is expressly prohibited.
  • Twitter
  • Facebook
  • Youtube
  • LinkedIn