Summary
Photon Lockdown is a very easy HTB Challenge. It is a hardware based small obstacel you have to overcome with a few tricks.
We used file and squashfs commands for the solution.
After unzipping, it seems we have 3 files.
┌──(kali㉿kali)-[~/Downloads/ONT]
└─$ ls
total 10688
-rw-r--r-- 1 kali kali 6 Oct 11 2023 fwu_ver
-rw-r--r-- 1 kali kali 3 Oct 11 2023 hw_ver
-rw-r--r-- 1 kali kali 10936320 Oct 1 2023 rootfs
The only important file is the rootfs, and I checked the file type with the command:
file rootfs
And it seems like a Squashfs filesystem. so i googled for something for squash and i found this tool/command
unsquashfs -d extracted_rootfs rootfs
We saw a full file system with usr, var, etc.
It took a while of research to find a command that can search through all files for the string HTB, which is the start of the flag.
grep -r --include=\*.{xml,txt,conf,php} "HTB" </direct/path>
Here is the output:
┌──(kali㉿kali)-[~]
└─$ grep -r --include=\*.{xml,txt,conf,php} "HTB" /home/kali/Downloads/ONT/ext_rootfs/
/home/kali/Downloads/ONT/ext_rootfs/etc/config_default.xml:<Value Name="SUSER_PASSWORD" Value="HTB{N0w_Y0u_C4n_L0g1n}"/>