I would just buy some cheap acrilic paint from the craft store. Make sure you use acrlic or the foam will melt on you.
They also sell black guesso paint in most craft stores which is what they use to paint a canvis with for a base color before they start to paint and its a good cheap base primer for your foam.
I would just buy a large bottle of black and white paint and first paint your foam piece all black and then start mixing white into the black to get various shades of grey.
After the black has dried dry brush the piece with a dry grey color then let that dry and dry brush again with a lighter shade of grey. Just keep repeating this letting the darker shades stay in the cracks and the lighter shades stay on the higher parts and you,ll get a nice natural rock looking finnish with just the two colors(black and white). You may only need about 2 or 3 shades of grey to get a good look. I just get a piece of cardboard to mix the paint on and just keep adding more white to the black and more white to the grey to lighten it up and just use the same paint but just keep adding more white to lighten it further. This helps to keep me from wasting to much paint also.