Accessing PLC code from PLCnext Linux terminal

Dear PLCnext Network,
I am currently conducting research on cybersecurity in industrial control systems, focusing on PLCnext AXC F 2152 with firmware version 2023.0.0 LTS (23.0.0.65).
I have a question regarding the accessibility of the PLC code from a PLCnext Linux terminal. Specifically, I have identified a .pcwex file located in /opt/plcnext/projects/PCWE/Src.
Could you confirm if this .pcwex file contains the PLC program used by the PLCnext PLC?
If not, is there an alternative method to access the PLC code?
I appreciate your assistance in providing clarity on this matter.
With regards,
fkatulic

Hello fkatulic,
downloading the Source Code to target is optional and usually done for backup purposes.
This is however NOT! the compiled application that is actually beeing executed.
Just the sources that were downloaded.
When online debugging you will be able to notice project changes between the currently running project and the project you have opened in the IDE “PLCnext Engineer”.

So to do a check you would have to download the Sources (*.pcweax) from PLC open it in IDE on your Desktop PC.
Compile code → Connect and debug → Compare application.
There are additional mechanisms to check binary validity during runtime.

kind regards,
Oliver

Dear Oliver,
Thank you for your response.
Could you please elaborate what are additional mechanisms to check binary validity during runtime? Is it possible to check it from the PLCnext Linux?
With regards,
fkatulic

Hello fkatulic,
there is no possibility to trigger that mechanism on shell. Other then starting the runtime and letting it check the project binaries.
To achieve this from the Shell you could create a checksum of file of all the currently installed files.
And compare that to the files that are generated during compile by the PLCnext Engineer or the other way around.
You can find those files here:
C:\Users\Public\Documents\PLCnext Engineer\Binaries\Project@binary\RES\Configuration\Projects\PCWE
Kind regards,
Oliver

Dear Oliver,
thank you for your response.
Goodbye,
fkatulic

Dear ,

I found this thread trying to accomplish a similar goal, though slightly different.

Is there a way to check that the binaries inside of:
C:\Users\Public\Documents\PLCnext Engineer\Binaries\Project@binary\RES\Configuration\Projects\PCWE
are from a given PCWEX file?

In other words, if I have a PCWEX file, I want to be able to preform a check that I have compiled the project, and that it is currently in:
C:\Users\Public\Documents\PLCnext Engineer\Binaries\Project@binary\RES\Configuration\Projects\PCWE

Best,

Ethan

Is this actually a thing?

https://engineer.plcnext.help/2023.6_en/_index.htm?iframe=https://engineer.plcnext.help/2023.6_en/AboutThisDoc.htm