"For from the top of the rocks I see him" (Numbers 23:9). This is to make known to you the hatred of that wicked man, for from within his blessings you come to know his thoughts. To what is he comparable? To a man who came to chop down a tree. One who is not skilled chops off the branches, each and every branch, and grows weary; but the clever one uncovers the roots and chops. So too did that wicked man say: Why should I curse each and every tribe? Rather, I will go to their roots. He came to touch them and found them hard. Therefore it is said, "For from the top of the rocks."
Balaam Aims at Israel's Roots and Finds the Tribes Unbreakable
Midrash Tanchuma Buber, Balak 19:1
כי מראש צורים אראנו (במדבר כג ט). להודיעך שנאתו של אותו רשע, שמתוך ברכותיו אתה יודע מחשבותיו, למה הוא דומה לאדם שבא לקוץ את האילן, מי שאינו בקי קוצץ את הענפים כל ענף וענף ומתייגע, והפקח מגלה את השרשים וקוצץ, כך אמר אותו רשע מה אני מקלל לכל שבט ושבט, הרי אני הולך לשורשיהם, בא ליגע ומצאן קשים, לכך נאמר כי מראש צורים.