I have seen such marks pretty often in my time - the culprit in most cases was one of those old, highly toxic paint strippers. The stripper literally split iron residue from the nails and had it bleed into the surrounding wood. Those stains are not real 'rust' (iron oxide, FeO) but 'iron stains' (Fe) which is sometimes incorrectly called 'black iron oxide' (misleading, as the OXIDE part is missing). Very hard to remove as they often reach deep below the wood surface.
Note: those stains are the reason for the old general rule to NEVER use metal tools when working with those high toxic paint strippers. Not only the old nails, but also hinges and of course the tools all ruined the woodwork. Many people therefore took the water approach: slap the stripper on the item, let it work, then remove the stripper and old paint with water and a course scrubbing brush (of course wearing gloves during the process). That procedure works like a dream with real oak, etc. (done enough of it while restoring 300 year old doors and wall panels, I can tell you!).
Either you slap some covering paint over the whole thing or you really have to invest MUCH manual work, as each stain would have to be treated independently. First, all nails would have to be removed, reason being that if you sand the areas down, you once again transport iron residue into the wood. Same goes for chemically bleaching the stains - the bleach once again attacks the nails. Hence they have to be removed before you start treating the stains. Slapping the nails deeper in the wood will not really help as they are the reason for the discoloration and are bound to create the same affect again (over time) when or after the surface is/was re-treated.
Next to sanding the wood down with either sanding paper or non-corrosive wool (stainless steel, brass, etc.), most people forget the typical restorer trick: glass. Regular window panes of thin sheet glass do not break in straight lines, but always in curved shards. These can be easily utilized as scraping tools (as you wear gloves anyway) and work miracles when actually having to clean up wooden ornaments normally too complex to allow the use of prefabricated (out of the box) tools. The sharp edges of glass shards can also be used to carefully scrape off the top layer of the discoloration; I sometimes even managed to remove some of these stains completely (one of course has to increase the working area around each stain to avoid creating 'pits' in the wood), however I always sanded down the whole surface afterwards and thus created a flat surface once again. My rule of thumb was to treat flat wood like that, while applications were removed and bleached (pretty often, I had to come up with a 'drying rack' contraption to keep the removed applications from warping under the influence of water, stripper or bleach).
Just my two coppers, seven Yen, whatever