The Web Application Hacker’s Handbook Discovering and Exploiting Security Flaws


Chapter 12  ■ Attacking Other Users



Download 5,76 Mb.
Pdf ko'rish
bet732/875
Sana01.01.2022
Hajmi5,76 Mb.
#293004
1   ...   728   729   730   731   732   733   734   735   ...   875
Bog'liq
3794 1008 4334

Chapter 12 



Attacking Other Users



427

70779c12.qxd:WileyRed  9/14/07  3:14 PM  Page 427




Validate Output

As with reflected XSS flaws, applications can perform HTML-encoding of

user-controllable DOM data before this is inserted into the document. This will

enable all kinds of potentially dangerous characters and expressions to be dis-

played within the page in a safe way. HTML encoding can be implemented in

client-side JavaScript with a function like the following:

function sanitize(str)

{

var d = document.createElement(‘div’);



d.appendChild(document.createTextNode(str));

return d.innerHTML;

}

Preventing XST

The XST technique depends upon finding some XSS flaw that allows the

attacker to insert arbitrary JavaScript into a page viewed by another user.

Hence, eliminating all XSS vulnerabilities ought to remove any opportunities

for an attacker to use the technique. Nevertheless, it is recommended both that

all cookies are flagged as 

HttpOnly

and that the 

TRACE

method is disabled on



the web server hosting the application.


Download 5,76 Mb.

Do'stlaringiz bilan baham:
1   ...   728   729   730   731   732   733   734   735   ...   875




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish