"This study is one of the first to estimate the total impact of illegal immigration on the federal budget. Most previous studies have focused on the state and local level and have examined only costs or tax payments, but not both. Based on Census Bureau data, this study finds that, when all taxes paid (direct and indirect) and all costs are considered, illegal households created a net fiscal deficit at the federal level of more than $10 billion in 2002. We also estimate that, if there was an amnesty for illegal aliens, the net fiscal deficit would grow to nearly $29 billion...."
Source: Center for Immigration Studies
http://www.cis.org/articles/2004/fiscalexec.html#Complex
Here is a link on the enforcement side of the question.
"In July 2005, the Center for American Progress published a report
assessing the costs of arresting, detaining, prosecuting, and
deporting illegal aliens. The study, Deporting the Undocumented: A
Cost Assessment, estimated that the total cost of mass deportation
would be between $206 and $230 billion over five years or an
average cost of between $41 and $46 billion annually over a five
year period. The following paper reviews the data on mass
deportation. In reassessing the cost, the following analysis
compares and contrasts what an amnesty would cost taxpayers in
terms of social services, lost wages, health care subsidies, and
educational expenditures. The author concludes that comparative
estimates demonstrate “no matter how high the costs of
deporting illegal aliens may seem, the costs of not deporting them
are larger still.”
http://www.nationalpolicyinstitute.org/pdf/deportation.pdf