Replies: 8 comments
-
While this is a great idea, I think it already exists.. |
Beta Was this translation helpful? Give feedback.
-
True story, but not everyone is deploying via Git. Git would add a significant overhead in resource utilization in some cloud systems as it can grow quite big over time. Plus I feel it would be useful only for developers. It can't be extended to present this data to the eshop admin conveniently in the future. Can it? 😮😳 I've seen lots of installations on environments without SSH access even |
Beta Was this translation helpful? Give feedback.
-
Git is an incredibly efficient tool and can be installed anywhere.. Even if it wasn't used in development, a fresh repo could be created as the last step of deployment:
Then use a cron job to detect changed files with I hope I'm not coming across as snarky, but honestly git can easily do this so unless there is already some other purpose built tool to do what you are describing I wouldn't try to do it any other way. |
Beta Was this translation helpful? Give feedback.
-
That's ok don't worry it's why we're discussing it here. Assuming we use git
So for a codebase of 100mb we should calculate 2gb of extra data in disk space needed which will probably increase over time. That's additional cost for the eshop which is a con in my opinion.
On the other hand an integrity check based on an official hashlist and a php script
|
Beta Was this translation helpful? Give feedback.
-
One of the expert solutions would probably be something like https://osquery.readthedocs.io/en/stable/deployment/file-integrity-monitoring/ For a simpler variant in the chat was initially this mentioned: Git is not as reliable here, as the .git part is prone to manipulations and it may even be used to persist a manipulation over some of the git hooks and by changing references/remotes so the check does not show any differences. |
Beta Was this translation helpful? Give feedback.
-
I think we just have vastly different deployment strategies. :) Perhaps a strategy or two for file integrity monitoring would make for a good blog post? |
Beta Was this translation helpful? Give feedback.
-
We have custom built the extension to keep track of all Files in Magento and along with Core Config tables this helps us to avoid a lot of attacks since the custom alerting system is throwing us the file path along with db changes and it's helping our clients extensively. |
Beta Was this translation helpful? Give feedback.
-
We have a Cron job that emails us every hour with git status. While it isn't bulletproof, it does provide me with a list of any file changes every hour and has allowed me in the past to spot early on some malicious code. cPanels config server also has a similar feature called file watch. |
Beta Was this translation helpful? Give feedback.
-
Description (*)
I'd like to discuss the possibility of adding a security related feature for OpenMage. Generally it's very good to have a log of file modifications to backtrace malicious activity and detect hacks early.
Expected behavior (*)
The idea is that with each release of OpenMage, a hashlist of all the core files is created. Then we also provide a shell tool to verify the current installation against the core hashes. This would effectively list all unauthorized modifications of the core.
The script can run on a daily basis via cron job and should any discrepancies be found, we can choose a course of action. For example we can add a notification to the dashboard or email the results to the administrator. Even the raw output of the script could be used by any control panel to send the email to the admins.
Benefits
The benefit is that in a case of malicious code injection we can quickly check the core and see if it has been tampered with and maintain a log of when it happened and in what sequence.
Additional information
In the future we could even provide an interface in the backend to take snapshots of the current installation to check third party code and use this hashlist for the verification. Similar to what wordfence does in wordpress.
Beta Was this translation helpful? Give feedback.
All reactions