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



Download 5,76 Mb.
Pdf ko'rish
bet723/875
Sana01.01.2022
Hajmi5,76 Mb.
#293004
1   ...   719   720   721   722   723   724   725   726   ...   875
Bog'liq
3794 1008 4334

420

Chapter 12 



Attacking Other Users

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



C O M M O N   M Y T H

“We’re safe. Our web application scanner didn’t find any

XSS bugs.”

As you will see in Chapter 19, some web applications scanners do a reasonable

job of finding common flaws, including XSS. However, it should be evident at

this point that many XSS vulnerabilities are subtle to detect, and creating a

working exploit can require extensive probing and experimentation. At the

present time, no automated tools are capable of reliably identifying all of 

these bugs.

HttpOnly Cookies and Cross-Site Tracing

As you have seen, one of the various payloads for attacking XSS vulnerabili-

ties is to capture a victim’s session token by using injected JavaScript to access

the 


document.cookie

property. 

HttpOnly

cookies are a defense mechanism

supported by some browsers and employed by some applications in an

attempt to prevent this attack payload from succeeding.

When an application sets a cookie, it can be flagged as 

HttpOnly


in the 

Set-Cookie

header:

Set-Cookie: SessId=12d1a1f856ef224ab424c2454208ff; HttpOnly;

When a cookie is flagged in this way, supporting browsers will prevent

client-side JavaScript from directly accessing the cookie. Although the browser

will still submit the cookie in the HTTP headers of requests, it will not be

included in the string returned by 

document.cookie

. Hence, using 

HttpOnly

cookies can help to prevent an attacker from using XSS flaws to perform ses-

sion hijacking attacks.

N OT E

HttpOnly



Download 5,76 Mb.

Do'stlaringiz bilan baham:
1   ...   719   720   721   722   723   724   725   726   ...   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