Yeah, never open the webgui up for public access via http.
If you have to access it remotely you should only ever use https and you should restrict the source IPs that can connect in the firewall rules.
Using a VPN to access it s a much better solution.
If, for whatever reason, you have unknown scripts running on the firewall then you need to reinstall clean and examine your config before restoring it.
You might also pull the full system logs from it first and review those.
Steve