for any kvm set up you have to have it pre-installed and set up with user credentials to be able to ‘log in’ and use kvm from a remote host, you can’t ‘just hack’ any network with kvm remotely…
and your still not ‘getting it’ from tiny pilots own website, on the first page!
TinyPilot plugs directly into your bare-metal server, giving you a virtual console during BIOS and boot.
i.e. it is a physical device (usually a USB) plugged in directly to the system you wan to control, that then allows a connection to your remote host via a web page, do you have such a thing connected physically to your router?
You are assuming your LAN was hacked, why do you think this?
If you use a weak WiFi password, that is a more likely avenue to gain access, but if your using WPA2 or WPA3 then its unlikely.
WEP easily crackable, WPA version 1 crackable, later versions, possible in theory yes, but even with basic passwords can still take too long to be practical.
Shouldn’t these devices have a hard reset button or something in case you want to break the glass? Many routers have a pin-hole or a reset button. Have you seen the Opensense documentation?
Opnsense allows GUI access through LAN with the anti lockout rule. If another device with access to the GUI is hacked, that can be used hack Opnsense especially if your password is weak. The GUI can then be used to start ssh, gain persistent access via WAN and remove any logs of the event. You can use a combination of netstat, nmap, and wireshark to find if your system has been compromised unless you are dealing with more than the average hacker. If you are dealing with an expert or a gov agency, good luck.
Hardware based hacks without internet access would require the password, large dictionaries, and/or automation via scripting unless they use a vulnerability of the hardware or software. These vulnerabilities are patched pretty quickly by opnsense and identified vulns can be viewed using the security audit feature under system>firmware>status. Unidentified vulns are used by experts and gov agencies and cant be identified.
Fully reformat the device if you suspect it is compromised and reinstall opnsense, though i dont see details on how you know. Make sure to confirm the OS is legitimate by using the checksum prior to installation from a reformatted device. Then replace the anti lockout rule with one that allows only a single source. Use 2 factor auth on an app to to secure your root password. Create a non-root account (with 2 factor) and give it privileges you need and only use that. You can also remove the root account from the UI as long as your new account has all privledges. Make sure to disable ssh. Use a device that has been reformated with a fresh os where you have verified the download using the provided checksum to create your install media. Format the install media, like a usb, with zeros prior to creating the install media.
Additionally, never click links from anyone. Copy and paste them and verify the domain matches and is trusted.
On Opnsense, use dns over tls to protect your dns queries. You can verify it works on cloudflare if you use their DNS servers. Create a certificate for opensense gui using a domain you own with letsencrypt and only use https for the gui; never log in if the cert does not match.
This should get you in a position where the adversary has to put in a ton of effort. I am not an expert, but this would be pretty safe. Maybe someone can add something I missed. Welcome to paranoia 101. Good luck and stay safe.
BTW, gateway unavailable does not indicate a hack. It could be anything from bad setup, to removed anti lockout rule, to bad hardware and more.
If your opnsense hardware has a hdmi and usb, you can get shell using option 8 or revert changes one at a time from one of the other options. You can also view the lan ip for the gui. If you are using Windows over ethernet, make sure to set your subnet correctly. If devices connect and you cant see the gui, try to revert changes and confirm your subnet for lan through the hdmi or serial connection.