Earnings are usually manipulated with various accounting tricks like delaying expenses and registering sales early. A recent technique to detect such manipulations is the statistical model known as the Beneish M-Score: when backtested, it identifies 75% of those companies that had manipulated earnings, with 17% of false positives.
On one side, the company enters key data from the income statement, balance sheet and cash flow statement to obtain 5-8 key financial ratios (eg. MSFT):
On the other side, the auditor inputs the threshold value: a M-Score greater then -2,22 indicates a high probability of earnings manipulation, according to original Beneish M-Score:
Jointly, they securely compute the Beneish M-score to determine if the financial statements have been manipulated.
The preceding is just a simplified example for illustrative purposes. In the real world, you will have to provide parameters for your specific situation