Jammer, I'm far from being an expert on this. But I can tell you, that there are "analyzers" and other things that will analyze frequencies.
But....and here comes the statement that will cause world war 3.........you have to use your ears for that kind of thing.
Mastering is so much more than just getting rid of "nasty frequencies". In fact, that's something that should be taken care of in the tracking stage, and then in the mixing stage. I'm going to leave it at that, because I know someone's going to come in with something about "with-holding secrets that only the pros know and don't want to share" or some stupid shit like that.
Someone like Massive Master, Southside Glen, or MasteringHouse is way more qualified to answer this than I am. I do "pseudo-mastering" for my own tunes, which basically just involves slapping a limiter on my mix and hoping it doesn't fall apart.
Wish I could help you more, but I'm really not qualified.