How can the US immigration officials know one has visited Iraq, Syria, Iran, or Sudan?

//ads -- adsterra.com -- native banner
?>
Now that H.R. 2029 is in effect, people who have visited Iraq, Syria, Iran, or Sudan since 2011 are banned from entering the US under the Visa Waiver Program. However it's unclear to me how could the US officials prove one has set foot in those countries, unless:
- There's a stamp in one's passport indicating so, which can be side-stepped by getting a fresh passport
- One mentions the fact on the ESTA application form, which is obviously easy to avoid
Is there any other way the US might be able to identify such individuals?
NB: I'm not eligible for the VWP myself and don't plan to travel to the four countries above, so it's a purely theorethical question
Pictures about "How can the US immigration officials know one has visited Iraq, Syria, Iran, or Sudan?"



Can I visit USA if I have been to Iraq?
Travelers who want to study or work in America or want to live in America must also apply for a visa. If you have visited in the past (after 1 March 2011) one of the following countries you also must apply for a visa. These countries are: Iran, Iraq, Libya, Syria, Sudan, Yemen or Somalia.Does Iran stamp your passport?
Iran no longer affixes visas to passports nor stamps them on entry as a response to the US sanctions on persons who have visited Iran after 2011.How many countries do you think a person from the United States can visit without obtaining a visa?
US citizens are continuously looking for new places to travel and the US passport is quite powerful. In May 2018, US citizens could travel to 186 visa free countries. This means that there are very few visa requirements for US citizens.US defends strikes in Iraq, Syria as ‘necessary’
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Matthias Groeneveld, Matthias Groeneveld, Karolina Grabowska, Lara Jameson