This could be due to excessive trauma , friction, bacterial infection, fungal infection or dermatitis.
Also, the skin
in the regions you mention is normally dark as compared to skin
Do you have any other associated symptoms of itching, rash , etc.
It would not be advisable to scrub the area too hard as this would irritate the skin. You should try to avoid sweat collection in the areas, keep the areas clean, maintain good personal hygiene, wear lose comfortable clothes.