You can tell a fraudulent cashier's check only after it has been deposited into your bank account. Your bank determines if the check was fake after it gets returned unpaid by the depositing bank.
To avoid cashier's check fraud, be aware of possible scams and avoid accepting cashier's checks from people you do not know.
In the most common scam, a person writes a fraudulent check for more than the amount of the product, and then asks the payee to return the extra money. The payee ends up not only receiving a bounced check with no ability to trace the source but also has paid an additional cost.
One way to ensure a legitimate cashier's check is to ask the payer to write a check drawn from a bank in your area, which gives you the ability to check on it.