Great finds on the Lorex and Flir firmwares!
It can be tricky trying to match OEM to stock Dahua firmware. What I did was a combination of things.
1) I had found a couple of videos or pictures of someone installing a hard drive in a Dahua model that I figured was the same and carefully compared those main boards inside to mine for one. That is only but so helpful and only if you happen to be able to find a picture or video that shows the internal details close enough.
2) I downloaded and compared pdf manuals. Those can sometimes also give you clues but its usually more generalized in that it might at least help you confirm for sure that the subject is indeed a Dahua OEM device.
3) Using the serial console you might be able to find certain bits of info like a model/part number that matches a Dahua one or confirming that the individual parts of the firmware names match what you extract from a Dahua firmware file.
4) This is the trickier but most important bit and takes some detective work and know how of using some software. This is really how one gets started in firmware hacking... An important note up front. Dahua (and Lorex) sign their firmware now and create a sign.img file that is in the firmware. That includes a checksum that is encrypted with a 2048 bit key. You are not going to get the key from Dahua. As such you are not going to be hacking or modifying their newer signed firmware and be able to install it so forget that idea.
First get the Lorex firmware file either from that link exarkun found or possibly contact Lorex support and tell them you need it for a safety backup just in case (that is what I did and they emailed me a link to get it). One you have the Lorex firmware file you will need a couple of utilities to poke around a bit. Most file compression utilities will be able to extract the .bin firmware file into its individual parts. I use 7zip - it will give an error extracting but it still extracts most of it. You will also want a text editor a bit more capable than notepad but notepad will also work as you are not going to be modifying anything, you are just looking around for clues is all. When the main firmware image is extracted you will get several folders. What you are doing is you will then start looking for files and opening them with a text editor and looking at the raw code and hoping to find some in plain text that will give you some clues. You also want to get the Dahua firmware that you think is the right match and extract it as well. Also direct from Dahua, they generally include the firmware in multiple formats including already extracted into individual bin files as well as one big bin file... Anyways on my NVR a big clue was the presence of a file named 575S_PMX.bin.img. That does not extract any further but it was present in both the Lorex firmware and the Dahua firmware I thought was the right one. Opening that file in a text editor shows a ton of machine code but on that one, right near the top was a big clue..... A Dahua NVR part number... NVR5XXX-4K. So there you go... A little more poking on the Dahua firmware
wiki Index of /images/Firmware confirmed to me that Dahua uses the same firmware on multiple models in a series like NVR5208, NVR5216, NVR5416, etc.... So based on finding that in the Lorex firmware in addition to seeing all the other clues that match up gave me the confidence to go ahead and try cross flashing the Lorex to the Dahua firmware. There are also a TON of other files in the fully extracted firmware files. The vast majority are not going to be helpful and are really not device specific as many devices use the same core Linux system and whatnot.
On the cameras there are some other files present that can make positive identification that the NVR's do not have as well but I've not had any luck trying to cross-flash any of the Lorex cameras I have though. That being said - I only have 2 pretty basic model Lorex cameras. Some of their other and/or newer cameras might be easier but getting at the serial console on the cameras is also much more difficult and requires a low level TTL serial connection and tying directly into points on the board inside the camera instead of a standard serial connection.
So there you have a bit more explanation on how I poked around to find more out to give me enough info and confidence to try it. Good luck and be sure to post results on here to help others in the future!
Oh and another clue I discovered on that Lorexwiki site is that it would appear as though the non-Dahual OEM products that Lorex carries are OEM Raysharp products. So anyone not finding that their Lorex device matched to anything from Dahua might want to look at Raysharp to see if it matches something from them...