1) Download and install Towelroot app (you can get it HERE). Don't use it yet.
2) Download Odin 3.07 or Odin 3.09. If you don't have drivers, you can get them HERE.
3) Download the GNF1 100% stock kernel for I9505 from HERE.
4) Reboot your phone into download mode, put the tar.md5 kernel file in PDA/AP and click on Start.
5) After this step, your Wi-Fi will not work. Don't worry, it will work again when you will flash the kernel matched to your ROM version.
6) Run Towelroot app and tap "let it ra1n" (after that you can uninstall Towelroot app).
7) Reboot your phone into download mode and flash via Odin your original kernel, matched to the ROM version you are using. You can find HERE a kernel stock collection.
8) Download and install SuperSU app from Play Store. IMPORTANT: Don't run it yet.
9) Download and install Mobile Odin from Play Store.
10) Reboot your device.
11) Download the Knox Removal Script from HERE.
12) In Mobile Odin, press on OTA/Update ZIP and choose the Knox Removal Script.
13) Put the tick on: Enable EverRoot and Inject Superuser.
14) Press on "Flash firmware" to start the flash.
15) Enjoy your rooted ROM 100% Knox free and Knox counter 0x0. All data, applications and settings will remain untouched