Please give us a complete sentence for context, as well as a summary of what is being discussed. It will help us understand how the words are being used, and what kind of distinction is being made, if any.
If you want to find an example sentence of your own to ask about, you can do an internet search for legitimate but illegal (or any other words that may be used to express the idea). You may find the answer to your question by looking through the results, but if you don't you can select a sentence from the results to ask about. (Be sure to include relevant context and name your source.)