Question [Q] How to develop rooting app

I have found some apps like Universal Android root, 1-Click rooting. etc. on net that are being used for rooting android.

But, I could not find any information about , how android rooting software can be built?

Could anybody please help me in this , I wanna know about how rooting software can be built.

Thanks in Advanced to the Experts.