For an undocumented immigrant to become legal through marriage to an international student, the following steps would generally need to be taken:
1. The international student must be in valid immigration status in the United States.
2. The undocumented immigrant and the international student must get legally married.
3. The international student must file a Form I-130, Petition for Alien Relative, with the United States Citizenship and Immigration Services (USCIS) on behalf of the undocumented immigrant.
4. After the Form I-130 is approved, the undocumented immigrant will need to apply for a Waiver of Inadmissibility, Form I-601, if they entered the United States illegally or overstayed their visa.
5. The undocumented immigrant will need to go through an interview with an immigration officer.
6. If the interview is successful, the undocumented immigrant will receive a green card, which will grant them permanent residency in the United States.
It is important to note that the undocumented immigrant must be eligible to receive an immigrant visa and that the international student must be able to sponsor them. Additionally, the undocumented immigrant may need to depart the United States and apply for the green card from their home country.
It is recommended to consult with an immigration attorney to discuss the specific circumstances and options for an undocumented immigrant who is seeking to become legal through marriage to an international student.