Thanks to visit codestin.com
Credit goes to github.com

Skip to content

This repository demonstrates an exploit where mismatched addressing between GX and GT (octal vs hexadecimal) lets an attacker craft an “undetectable” HMI/GT project that hides malicious PLC behavior and can bypass reviews—potentially disabling emergency-stop controls.

Notifications You must be signed in to change notification settings

MartinxMax/GOT3-exploit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Potential Security Issue in GOT3

The deployment page on the touchscreen links the upper lamp to Y22, and the lower lamp to Y12.

alt text

In GX3, a simple control screen is drawn:

alt text

So, which lamp do you think will light up?

alt text


If you think the Y22 lamp will light up — you've fallen into the trap!

alt text

Why does this happen???

This issue involves how data is read/written between GX and GT.

In GX, Y output uses octal (base-8) addressing.

alt text

But in GT, Y data is processed in hexadecimal (base-16). An attacker can exploit this discrepancy to wrap malicious code in an "undetectable shell."

alt text

Calculation verification confirms this.

alt text

Using GOT3 Traits to Modify the Original Project Drawing and Bypass Admin Review

Simulated Scenario: An internal, confidential-level sewage treatment facility. Only the programming department is connected to the internet. However, the internal network is isolated, making lateral movement impossible from programming machines.

  • Event 1: The internal programming team finalizes the PLC program, then sends it to technical reviewers for manual inspection. Once deemed secure, it's burned into the PLC.
  • Event 2: You’ve infiltrated a machine in the programming department and obtained the source program.
  • Event 3: You're only allowed to modify the GOT3 project.
Functional Area Device/Signal Type Address (Octal) Description
Water Inlet Low Water Level DI Input X000 Level switch, low water level alarm
High Water Level DI Input X001 Level switch, starts pump when high
Inlet Pump DO Output Y000 Start/Stop control of pump
Grating Tank Grating Motor Start Btn DI Input X002 Manual start of grating motor
Grating Motor Status DI Input X003 Feedback signal
Grating Motor Output DO Output Y001 Start/Stop control
Sand Settler Scraper Start Button DI Input X004 Manual control
Scraper Status Feedback DI Input X005 Status feedback
Scraper Output DO Output Y002 Start/Stop control
Primary Tank Inlet/Outlet Valve DO Output Y003 Electric valve control
Level Detection DI Input X006 Level switch
Bio Tank DO Sensor AI Input D100 DO level detection (analog)
Aerator Blower DO Output Y004 Start/Stop control
Mixer Control DO Output Y005 Mixer control
Mixer Status Feedback DI Input X007 Status feedback
Secondary Tank Sludge Pump Start Btn DI Input X010 Manual start
Sludge Pump DO Output Y006 Start/Stop control
Mud Pump Start Btn DI Input X011 Manual start
Mud Pump DO Output Y007 Start/Stop control
Dosing System pH Sensor AI Input D101 pH value detection
Flocculant Pump DO Output Y010 Flocculant dosing
pH Regulator Pump DO Output Y011 pH dosing pump
Disinfectant Pump DO Output Y012 Disinfectant dosing
Disinfection Disinfectant Level Det. DI Input X012 Level alarm
Disinfection Start Btn DI Input X013 Manual start
Disinfection Pump DO Output Y013 Start/Stop control
Alarm System Fault Alarm Input DI Input X014 Equipment fault alarm
Alarm Output DO Output Y014 Sound/Light alarm

Original File

Alarm function works properly. Chemical activation: XB ⇒ X13 Alarm: XC ⇒ X14

alt text alt text


Chemical Function Added

Chemical Output: YA ⇒ Y12 Alarm Output: YC ⇒ Y14

alt text alt text


"Undetectable" Malicious Project & Obfuscation to Bypass Admin Review

Hijacking the Emergency Stop Button

Completely disabling the emergency stop function.

  1. Confirm the logic of chemical output Y12 in the program:

alt text

  1. Confirm the logic of alarm/emergency stop output Y14 in the program:

alt text

  1. Since we cannot modify ladder logic, modify the GOT screen.

Bind the emergency stop button to 0x14.

alt text

  1. Send the malicious Main.GTX project to the engineering team.

Disinfection starts normally:

alt text

Emergency stop fails:

alt text


Destructive Intrusion

If Main.gx3 is modifiable, pressing the emergency stop will continue disinfection/dosing instead of stopping it.

Since we already bound the alarm control to 0x14, it corresponds to Y24 in ladder logic.

So we OR X24 into the chemical output logic:

alt text

alt text

During admin review, seeing control X14 may mislead them into thinking it's still legitimate logic:

alt text

P.S.: In reality, this does not point to the true emergency stop target.

Disinfection starts as usual:

alt text

Emergency stop replaced — dosing continues:

alt text

About

This repository demonstrates an exploit where mismatched addressing between GX and GT (octal vs hexadecimal) lets an attacker craft an “undetectable” HMI/GT project that hides malicious PLC behavior and can bypass reviews—potentially disabling emergency-stop controls.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors