I'm far from a mastering engineer (I'm far from an engineer at anything to be fair) but I mastered my recent album in Sonar and it is absolutely capable of decent results. It is probably capable of GREAT results if you have the knowledge.
Mastering has always been seen as a bit of a dark art but from my basic understanding and experimentation I usually end up with Compression, Multi-Band Compression, 'Character' or tone shaping EQ, Mid-Side EQ (for increasing width and centralizing kick drum etc) and limiting.
Real mastering engineers will do the same but usually (again in my experience) they will run lots of processors or hardware but only make very subtle adjustments on each rather than drastic adjustments on just one or two pieces.