Re:Stripe CTF Writeup
by brown9-2 on Thursday August 30, 2012 @07:23AM
(#4454024)
I learned another interesting way to create strings in JavaScript without using a quote character:
[ Parent
| on HN ]
Another way is to use the technique described at http://patriciopalladino.com/blog/2012/08/09/non-alphanumeri...
It transforms javascript into a sequence of ()[]{}!+
Wow, it seems like there is no limit to what you can accomplish by abusing type coercion.
unfortunately i ended up with String.fromCharCode, would of made the final code a lot more readable! https://gist.github.com/3527252
Re:Stripe CTF Writeup
by DropkickM16 on Thursday August 30, 2012 @06:12PM
(#4457146)
I figured out how to insert strings with quotes on level 6 - if you use a param list like username[]={string"with'quotes'"}, it bypasses the safety check but still gets coerced to a string by the ORM. Unfortunately, I wasn't clever enough to actually do anything with that...
This works well if for some reason they block fromCharCode:
eval(unescape(/your escaped code goes here/.source))
Use Javascript's escape() to generate the code
Re:Stripe CTF Writeup
by reader_1000 on Thursday August 30, 2012 @08:39AM
(#4454286)
I used DOM api to avoid quote character: document.links[0].href