https://en.wikipedia.org/wiki/File:U.S._Marines_humping_in_A...
That thing is called AN/PEQ-2, and it is an near infrared (NIR) laser/illuminator. The reason why it's infrared, is because the enemy can't see it unless they have night vision (which works in near infrared). The illuminator is then used as a flashlight, essentially, and the laser is used to designate targets.
Now, recently, groups like ISIS have been acquiring night vision devices in more substantial numbers. So now there's an arms race of sorts, where there are new devices like this that push the frequencies further down, such that most existing NIR devices cannot see it, but new and more expensive ones can. Presumably the same would apply to Trackpoint-like technology.
Give me a cheap-ass webcam, a rapsberry pi 3 and a day or two to cobble together an OpenCV beam-detecting program in Python. A day or two more —perhaps with better hardware— and I'll give you GIS-aided positioning. That seems like it would be enough to defend a position.
Even at other wavelengths, the sensor equipment is out there. I'm not sure what the SNR would be like on a varied focus 0.4μm (~bluray) sensor though.
CMOS sensors pick up all sorts.
For example, there's a popular firearm (and other things, technically, but it's mostly used for firearms) coating called Cerakote. Comes in a bunch of colors, including those commonly used for camouflage - indeed, you can mix and match to create some very impressive patterns. Example:
http://i64.tinypic.com/21bw5lc.jpg
This is available to civilians, and pretty popular - mostly for aesthetics, but it does work well as a camouflage. The catch is that, being an epoxy polymer coating, it reflects NIR really well - so for someone observing through a night vision device, these things basically glow, especially if an infrared illuminator is also used.
But Cerakote also does have a version that was specifically designed to reduce the near-infrared signature to the point where it works just as well as camo in NIR, as it does in visual spectrum. Except it's only available to military and police - and I believe this is, in fact, because of some law that restricts them from offering it on civilian market.
http://www.thefirearmblog.com/blog/2017/10/12/swir-mawl-clad...
That's not to say this sort of technology couldn't be useful, but putting active broadcasting equipment on your gun is going to backfire in next generation warfare.