camka14
I have tried rebasing and reinstalling OpenPLC Runtime but that didn't work. I still get an error when using openplc for the username and password. I'm not sure what else to do at this point. I'm on Windows.
Reply 0 0
thiagoralves
Use Chrome browser
Reply 0 0
camka14
I am using Google Chrome
Reply 0 0
thiagoralves
If you reinstall the runtime then it should work with the default credentials. I’ve noticed in the past that some browsers failed to login even if the credentials are correct. Chrome is a browser that works every time. Make sure you’re typing the default credentials (openplc openplc) all lowercase.
Reply 0 0
camka14
Thanks for the response, sorry for getting back to you so late. I've been using chrome and am using the default credentials, but still no luck. Is there a way to check what the username and password are? Maybe they're being stored somewhere that rebasing and reinstalling isn't touching?
Reply 0 0
thiagoralves
Thanks for the response, sorry for getting back to you so late. I've been using chrome and am using the default credentials, but still no luck. Is there a way to check what the username and password are? Maybe they're being stored somewhere that rebasing and reinstalling isn't touching?
Rebase / reinstall should delete all the files in the OpenPLC_v3 folder and create everything from scratch, including default credentials. The credentials are stored in the openplc.db file (mySQL database). You can open it up with a database editor program and check the tables for the correct credentials. Hopefully this will work and you will have access again.
Reply 1 0
fg71
In command-line in Linux you could do:
  1. sqlite3 openplc.db
  2. .tables
  3. .headers on
  4. .mode column
  5. SELECT * FROM Users;
Ps. The step 2 is only used to get the table names, if you already know it you could skip.
Now you could get the user name and the password
 
In other words the login/password in OpenPLC is kind of pointless when the sqlite3 database is not encrypted.
Reply 0 0
thiagoralves
In other words the login/password in OpenPLC is kind of pointless when the sqlite3 database is not encrypted.
 
Not pointless because the openplc.db file is not available outside the application. Users that are interfacing the runtime from the browser cannot open the .db file to view its contents. If you have access to the openplc.db, then you have access to the machine that is running the runtime, which means you have access to everything, including modifying the runtime code if you want. If the database was encrypted, the decryption key would have to be somewhere, either in the runtime code or in another file, otherwise the runtime wouldn't be able to decrypt the database to access its contents. In that scenario, someone that has access to the machine would have access to the decryption key the same way, which would make the database encryption pointless in this case.
 
In that regard, the main vulnerability of the webserver is that the connection is not encrypted (https), so external users can capture user credentials during a login operation by monitoring network packets.
Reply 0 0
fg71
It doesn't matter if the decrypted key is stored in local computer there is always a master key and that is user input.
The only way I know to get access to master key is to listen to keyboard inputs from a user to get access to it.
Reply 0 0
Write a reply...
Reply