Sri Lanka were 79-3 at lunch after being put in to bat by Inzamam-ul Haq. Kumar Sangakkara, who scored 185 in the first Test, was batting on 41 and Thilan Samaraweera was on six.
Asif ensured a fine start for the visiting side after the first match in Colombo ended in a draw, generating steep bounce in overcast conditions.
He got the outside edge of opener Upul Tharanga (ten) who was caught at second slip by Younis Khan for 10, and then bowled Sanath Jayasuriya (14) between bat and pad after the batsman had hooked paceman Umar Gul for a six.
Jayasuriya, playing his last Test, was dropped by Imran Farhat off Gul when on seven.
Asif bagged his third wicket when stand-in captain Mahela Jayawardene (four) nicked one to Farhat at second slip.
Earlier, Pakistani opener Shoaib Malik was ruled out of the match due to high fever.