Samsung Galaxy S5 owners (including AT&T and Verizon S5 users) can now enjoy root access on their phone with Towelroot one-click root tool. It is very simple, you just need to sideload the Towelroot APK file and click “make it ra1n” button; the rest will do the tool. No ADB or computer needed for rooting your phone.
The towelroot APK is not just meant for the Samsung Galaxy S5, it works on all Android phones released before June 3, 2014 (as of this writing) including Nexus 5, Note 3, etc. however, please note that Motorola and HTC devices will not currently work, because the system is write protected.
1. To install towelroot tool, download the APK file from developer’s website (download link given at the end of this post) and install it.
2. Before you install it, make sure you have enabled the option “Unknown Sources” by going to phone Settings -> Security.
3. Once installed, run it, click “make it ra1n” button. The app will do the rest.
And about Samsung KNOX security system, according to the developer, Samsung owners will not need to worry about KNOX switch, because it stays intact, your warranty will not be void. Enjoy the freedom of your newly rooted device! (source)
Download towelroot tool from here.