This is where you could do with a microscope

It might be the case that it's not dirt or dye at all, merely tiny fibres of sock material that have become entangled in the carpet fibres. Not a chemical answer to that, so may be worth getting as close a look as you can to see if you can confirm this either way, before you blast it needlessly weith oodles of high pH products

I've had reasonable results on sock fibre patches using a rotary and bonnet, and also more recently with a minitex. Microscopically, the fibres of the bonnet are more "jaggedy" than the fibres of the carpet, a bit like pulling fluff off your jumper with a bit of velcro.
You'll also find this problem more on 100% polypropylene, as the fibres shear into a much more spiky shape than wool or nylon, a bit like lots of tiny bramble branches all ripping bits of softer cotton/nylon out of the socks.
I advise customers to wear slippers, pipe is optional!
