Sahih Muslim Book 18, Hadith Number 4284.

Chapter : It is forbidden to milk an animal without the permission of its owner.

Ibn ‘Umar reported Allah’s Messenger (may peace be upon him) having said this: None (of you) should milk the animal of another, but with his permission. Does any one of you like that his chamber be raided, and his vaults be broken, and his foodstuff be removed? Verily the treasures for them (those who keep animals) are the udders of the animals which feed them. So none of you should milk the animal of another but with his permission.