Chronic infections with hepatitis B (HBV) and hepatitis C viruses (HCV) are the leading cause of cirrhosis and hepatocellular carcinoma (HCC) worldwide. Both viruses encode multifunctional regulatory proteins activating several oncogenic pathways, which induce accumulation of multiple genetic alterations in the infected hepatocytes. Gene mutations in HBV- and HCV-induced HCCs frequently impair the TP53, Wnt/b-catenin, RAS/RAF/MAPK kinase and AKT/mTOR pathways, which represent important anti-cancer targets. In this review, we highlight the molecular mechanisms underlying the pathogenesis of primary liver cancer, with particular emphasis on the host genetic variations identified by high-throughput technologies. In addition, we discuss the importance of genetic alterations, such as mutations in the telomerase reverse transcriptase (TERT) promoter, for the diagnosis, prognosis, and tumor stratification for development of more effective treatment approaches.