Small XSS Paper : Dangerous HREF Attributes which don't have quotes
Okuyucu : 14.613
Günlük Okuyucu : 10,5
Some web application doesn't care about web standards. Using quotes in "href" attributes in links is important for standards and also it's important for security.
Most of websites move SessionId's and other queries over URL. It means what you write URL will be appeared in page within href attributes. For avoiding XSS attacks developers Encode HTML characters from queries. Most filtered strings are [;],["],[javascript],[<],[>].
Developer can fix XSS attacks by filtering these strings but if they don't use quotes in their links they still vulnerable.
POC & Details;
Sample URL;
http://[victim]/action.asp?session=123567890
HTML Code;
Possible Attack URL;
- This will not work because we already filtered HTML.
But this works;
I injected XSS via style::expression() method because we still can not use quotes and brackets.
Hijacking onclick action; If you hijack onclick it will be executed when victim clicks to link.
Some Realword Examples;
Stealth hijacking;
Inject an image to page which send cookie to attacker server (ie : http://attacker/ )
Page Redirection;
Redirect Page to http://attacker/?[cookies] URL with active user cookie.
This code will execute this JS when browser renders link;
- I use String.fromCharCode() in these samples because of our victim filtered out HTML so I still can not use brackets and some other special chars. Go http://ferruh.mavituna.com/stringfromcharcode.asp for online String.fromCharCode() generator.
How to protect ?;
Use quotes to fix this problem.
Secure HTML Code;
Author;
Ferruh Mavituna http://ferruh.mavituna.comferruh{at}mavituna{dot}com
Date :5/9/2004

Yorumlar
Yorum Ekle
Diğer Yazılar
Sobig Virüsünün yazarı üzerine analizler
Social Bookmarking Arayışı
Someone should post some ?@*~ to some ?@*~' social ?@*~ to attract some ?@*~ people
Son Eklenen Yorumlari Görün
Son olarak, Vista Sucks!
Son Winamp Açığı ve Eski Konu IE İlişkileri
Son Zaman Görsel Atraksiyonlar
Son Zamanlarda Okuduklarım
Sonunda Inter-Protocol Exploitation
Sosyal Hoppalar ve Hackerlar
Sosyal Hoppalık
Sosyal Saçmalık 2.0
Sosyal Zehirleme
Soultip Dreamweaver Extension !
SoulTip v.08 {Türkçe}
SoulTip v1.1, Basit Javascript Tabanlı tooltip Sistemi {Türkçe}
Space Adventure Cobra
Spam & Phising Kokteyli
Spam dozajları
Neredeyim ?
Ferruh.Mavituna » Güvenlik (Security) » Small XSS Paper : Dangerous HREF Attributes which don't have quotes