I love the concept of CTFs but as a web developer (JS/PHP) this is like Greek to me. I presume you need to be a hardcore low-level security hacker to even consider doing CTFs.
I don't know if I would have been able to derive this solution on my own though, that's where the creativity comes in. However, I'm guessing these CTF challenges are usually kind of "similar" in the same way that ACM programming challenges are. If you do these sort or challenges often enough it should become easier.
Also, the best way to learn this stuff is to do it. Even if this seems out of your league, I'd suggest to just join a team and start playing - if that kind of thing seems interesting to you.