There is no syslog in /var/log but I can read the log with journalctl command.
I don’t see anything that can explain the restart of the flows (see the screenshot in my initial request).
Actually I suspect node-red-contrib-googlehome to be the root cause. I have just deleted all the nodes relying on this palette and wait if the problem comes again
That is the result of a Deploy. If it wasn't you then, if your system is open to the internet, then you have been hacked. Disconnect the system from the internet and stop node-red.
This looks to me like evidence of malicious cron jobs.
Unless you intend to fetch and execute bash scripts from that site, I too think you have been hacked.
Yes, you are right. I missed that. Unless @sebamelo is doing something rather unusual then his machine has been well and truly hacked. Not just messing with node-red but also adding cron jobs.
@sebamelo I think you need to recreate the SD card on the pi and start again. Hopefully you have got a backup of your flows from before the hack. Also you need to consider the possibility that other machines on your network may have been infiltrated from the pi.
See this FAQ post for advice on how to safely access node-red over the internet.
@sebamelo will you please tell us if your Node-red machine has ever been accessible from the internet (by you or anyone)?
If it has been, how did you set it up?
Does the user raspberrypi have the right to run sudo, with or without a password?
The hacker has made multiple changes to your computer, not confined to Node-red. You will have to reinstall the entire operating system from scratch.
The download site seems (in chatgpt's opinion) to be on Cloudflare. Perhaps they would be interested to know they are serving cryptomining code for hackers.