Paid Advertising is
ha.ckers sla.cking
Q and A for any cross site scripting information. Feel free to ask away. 
Go to Topic: PreviousNext
Go to: Forum ListMessage ListNew TopicSearchLog In
[help]JSON-Hijacking: JSON object without a callback function
Posted by: joel
Date: August 10, 2010 10:33PM

Hi, all
By the page 213 of the book "Cross Site Scripting Attacks Xss Exploits and Defense", I know how to overwrite the Array JavaScript object and as such simulate a callback.

I just found a site return some JSON data like this:
{"ok":{"list":[{"sex":"male", "birth":"12.04", "nick":"tommy"}, {"sex":"male", "birth":"2.24", "nick":"joel"}]}}

Can I simulate a callback in that case?

Options: ReplyQuote
Re: [help]JSON-Hijacking: JSON object without a callback function
Posted by: theharmonyguy
Date: September 14, 2010 02:05PM

It's been a while since I looked at this sort of JSON hijacking, but I know you can't override the Object constructor like you can the Array constructor, so that method of attack would not work.

I recall there still being some possible issues with this format, though, which is why (for instance) Facebook includes a bit of dummy code at the start of any JSON responses.

Options: ReplyQuote

Sorry, only registered users may post in this forum.