Security issues with Swedish news sites

http://www.codeodyssey.se/upload/resource/blog/DN-achtung.png

Some time ago I wrote about a German site that provides a list of web sites vulnerable to XSS-attacks. The owner of the site found the link and asked me to translate it into English so he could understand.

During our discussion I told him that it would be interesting to see how secure Swedish web sites are. The security expert who calles himself "beNi" asked my to make a list of some well known sites. I choosed some that were in my current memory and has been in focus lately.

News sites:

Aftonbladet.se
DN.se
SvD.se

Blog portals:

Bloggportalen.se
Twingly.se
Knuff.se

A great disappointment

I got reply from beNi and he tells me he has done some research. He only investigated DN, SvD and Twingly. The other three sites on the list loaded to slowly for him to works with (even though he has an 6MBit-connection).

He found a whole bunch of insecure pages within a few minutes. Both DN and SvD contains some holes as you can read on his blog. There are also five examples of urls showing how this issues can be abused.

Examples of XSS-vulnerabilities

This is the examples. I have also uploaded some screenshots of how the pages looks when you visit them at the moment. These links are not dangerous to visit. But if you see something similar anywhere else I would strongly suggest not to try them.

Security problem 1 - DN.se (issue secured) (sceendump)

Security problem 2 - DN.se (issue secured) (sceendump)

Security problem 3 - Koll.se (issue secured) (sceendump)

Security problem 4 - SvD.se (issue secured) (sceendump)

Security problem 5 - SvD.se (issue secured) (sceendump)

Twingly was safe from sequrity issues. The site uses ASP.NET which has a lot of build in protection. Microsoft has realised the importance of protecting against XSS and has also released special API's for protection. I will write about these at a later time.

DN that uses Java and SvD that are running on classic ASP was not so succesful in the test.

Developers must wake up

Is is quite embarrasing to see that news sites of this size doen't has complete control of their web app sequrity. Web masters must wake up and realise. You are not only risking the sequrity of your own sites. The main thing about cross-site-scripting is that it can be used to target other sites than the domain they are found on.

Update: There has been some responses to the Swedish version of this post where I have documented the developments more in depth. In short the following has happended.

Two of the links above were indexed by Twingly which is a ping service connected to the news sites. That meant that this post were linked to from both of the news sites in connection to some articles, and received quite a lot of visitors.

I would like to thank Martin working on Twingly for pointing out that the urls were normalized before they entered there system. If these links should have been indexed at all by the blog portal is still questionable.

I also temporarily removed the links since I felt a bit guilty of publishing them without giving the site owners a warning first. I did email both of the news sites rather quickly after I wrote the blog-post. SvD replied and thanked me for letting them know. They have now secured the issues and I congratulate them for their swift action.

The issues on DN.se still remains unfixed and I have not heard anything from them. I will give them some time to fix the problems before I publish the links on my site again.

I want to keep these XXS-links on my site as a reference to other developers. The might be useful for web masters to realise what kind of threat they are up against. The other reason I would like to keep the links on my site is because I would like to study how the search engines will respond to them. Will they for example be indexed by Google? Will they still work in the cached versions? It will be interesting to find out.

Update 2: We are happy to notice that DN also has fixed their security problems. Both sites managed to shut down their XSS-flaws in only 1-2 days which is really good.

Comments

Hej Jesper, tack för en bra artikel, det är viktigt att lyfta fram säkerhetsluckor inte minst för sajtägarna själva. För att vara tydlig gentemot andra läsare vill jag klargöra att det inte är Twingly som skapar säkerhetsluckorna på DN och SvD. Twingly normaliserar urlar innan de skickas vidare, det går därmed inte att genomföra liknande XSS-attacker (XSS står för "cross site scripting") genom att tidningarna publicerar blogglänkar. Att "Twingly indexerar XSS-länkar" stämmer alltså bara delvis, det är sant att de indexeras men den delen som skapar XSS-sårbarheten försvinner. Återstoden blir en helt vanlig webbadress. Mvh Martin Källström
Martin, Tack så mycket för den informationen. Jag hoppades på att ni hade en spärr mot detta och är glad att det visade sig vara fallet. Jag har strukit över det felaktiga påståendet och skrivit en till uppdatering om din kommentar. Kan för övrigt gratulera att er egna sida Twingly var säker mot XSS. Killen som genomförde testet sa att han bara fick ASP.NET-error när han försökte. Han lyckades inte exekvera något Javascript på er sida. Det måste väl också ses som en komplimang att sidan laddade tillräckligt snabbt för att han skulle orka försöka. Är också glad att du tyckte att den här artikeln var positiv. Jag var lite nervös att de sajter som jag tagit upp som exempel skulle visa ogillande till att jag publiserade länkarna. Men eftersom den tyska sajten redan hade gjort det, såg jag inte det som någon större fara. Jag hoppas att utvecklar-teamen på DN och SvD har överseende med att jag har skrivit detta inlägg. Nyhetssajterna utför ju ofta egen granskning och det är väl inte alltid de meddelar dem de skriver om innan kan jag tänka. Jag borde eventuellt ha kontaktat sajtägarna innan jag skrev detta inlägg men det är lätt att vara efterklok. Jag ville skapa lite uppståndelse runt det så att fler utvecklare får upp ögonen. Riktiga "live"-exempel är oftast den bästa undervisningen.
Nu har jag kontaktat både DN och SvD angående detta. Jag önskar dem all lycka till för att säkra sina webbplatser mot cross site scripting. Detta blogg-inlägg borde vara en bra referens till felsökning.
Man blir trots allt lite nyfiken på vad han hade kunnat åstadkomma på Aftonbladets sida - den framstår ju inte direkt som modern och genomtänkt, åtminstone från utsidan. Å andra sidan är det ju ganska talande att han inte ens orkade testa den för att den laddade för långsamt...
Tyvärr är ju många större webbplatser öppna idag, är de "stängda" för XSS så är de öppna för SQL Injections istället. Det finns ett ypperligt exempel på en kommunal webbplats som är helt öppen för både det ena och det andra. Det konstiga är att webbplatsen utsattes för "hacking" för några månader sedan, men säkerhetsluckorna är fortfarande öppna, speciellt SQL Injection. Känns dumt att länka dit så jag hoppar över det. /Johan
Hej Jesper, tack för dina uppdateringar och förtydliganden. Angående publicering av den här typen av uppgifter förstår jag din nervositet. Man kan överväga att först kontakta sajtägarna och ge dem skälig tid (några dagar) att reagera innan man gör informationen publik. Nu var det här inga hemligheter, verktyg för att testa sådana sårbarheter finns sedan länge tillgängliga för de som har intresse av det. Mvh Martin Källström
Martin, det är givetvis som du säger att jag borde ha kontaktat sajtägarna först. Det kändes dock som att XSS-sårbarheter inte är så farliga att lägga ut publikt. Det handlade ju mest om att visa att man kunde köra egna Javascript på sajterna foga in eget innehåll på domänerna. Inga försök till att modifiera data eller få fram känsliga uppgifter gjordes. Dessa brister finns ju på de flesta webbplatser om man letar. Och de som vill ställa till skada hittar dem lätt. Detta var tänkt som ett realt exempel så att utvecklare lätt kan se vad det handlar om. Jag ska fundera på att göra lite egna exempel på min webbplats i framtiden. Jag har nu tagit bort länkarna tills vidare, se uppdatering 4.
z0idberg, jo det undrar man hur säker Aftonbladet är och även Bloggportalen. Johan, håller med dig att det är skrämmande hur många webbplatser som är öppna för SQL-injektion och XSS. Använder man tjänster själv på en sådan webbplats tycker jag det är viktigt att veta hur säkra ens egna uppgifter är. Ska precis åka ut på resa idag. Men fortsätter gärna att diskutera webbsäkerhet. Tack alla som har kommenterat artikeln.
Please fill out all the fields.

*
*