Asif bagged 4-41 and leg-spinner Kaneria 3-44 as Sri Lanka struggled after being put in to bat in overcast conditions. The first day's play was washed out.
Asif tormented the home side with three scalps in the first session while Kaneria found success in the second to seize the initiative for Pakistan.
Sri Lanka looked set for even worse but a determined century stand between Tillakaratne Dilshan (69) and Farveez Maharoof (46) pulled them out of deep trouble.
Dilshan and Maharoof added 111 for the sixth wicket after seamers Asif and Umar Gul struck telling early blows. Dilshan continued his fine form as he struck 10 boundaries during his seventh half-century.
Dilshan, who scored 48 not out and 46 in his only two innings of a preceding three-match One-day series that Pakistan won 2-0, found good company in Maharoof who struck six fours.
Both batsmen were caught by Younis Khan in the slips.
Maharoof slashed at a ball from Asif and was caught at second slip. Dilshan followed him soon after when he edged a ball from Kaneria, who was bowling round the stumps.
Earlier, Asif and Umar Gul struck early blows in overcast conditions.
Asif struck in the first over of the match when he trapped opener Upul Tharanga (zero) leg-before with his fourth delivery and then bowled other left-hander Kumar Sangakkara (eight) with a ball that came in sharply.
Thilan Samaraweera (four) was bowled shouldering arms to Asif and with Gul striking twice, Sri Lanka were reduced to 32-5.
Gul bowled veteran opener Sanath Jayasuriya (six) and then Mahela Jayawardene fished outside the off stump to give him his second wicket.
Sri Lanka have lost captain Marvan Atapattu and Chaminda Vaas to injuries and Jayawardene is leading the side.
Pakistan are without middle-order batsman Mohammad Yousuf, who has a hamstring injury.
The second and final Test will be played in Kandy from April 3.