I have heard some say that it is simply KNOWING that the Church teaches that something is wrong.
I have also heard that it is both KNOWING and BELIEVING that something is wrong.
If it is the first instance, then anyone who has ever heard the teachings of the Catholic Church (even Muslims) would be obligated to follow those teachings under the pain of damnation.
The second definition seems more accurate because for true mortal sin, doesn’t one have to BELIEVE that one is offending God and CHOOSE to do it anyway when GRAVE MATTER is involved? This seems to be the only way one would truly separate themselves from God forever, by doing this and not repenting. If one doesn’t believe that what they are doing is offensive to God, then how could it be a mortal sin?