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


Chapter 12  ■ Attacking Other Users



Download 5,76 Mb.
Pdf ko'rish
bet741/875
Sana01.01.2022
Hajmi5,76 Mb.
#293004
1   ...   737   738   739   740   741   742   743   744   ...   875
Bog'liq
3794 1008 4334

Chapter 12 



Attacking Other Users



433

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




As with DOM-based XSS vulnerabilities, it is recommended that applica-

tions do not perform redirects via client-side scripts on the basis of DOM data,

as this data is outside of the server’s direct control. 

HTTP Header Injection

HTTP header injection vulnerabilities arise when user-controllable data is

inserted in an unsafe manner into an HTTP header returned by the applica-

tion. If an attacker can inject newline characters into the header he controls, he

can insert additional HTTP headers into the response and can write arbitrary

content into the body of the response.

This vulnerability arises most commonly in relation to the 

Location


and

Set-Cookie

headers, but it may conceivably occur for any HTTP header. You

saw previously how an application may take user-supplied input and insert

this into the 

Location


header of a 3xx response. In a similar way, some appli-

cations take user-supplied input and insert this into the value of a cookie. For

example:

GET /home.php?uid=123 HTTP/1.1

Host: wahh-app.com

HTTP/1.1 200 OK

Set-Cookie: UserId=123

...


In either of these cases, it may be possible for an attacker to construct a

crafted request using the carriage-return (

0x0d

) and/or line-feed (



0x0a

) char-


acters to inject a newline into the header they control, and so insert further

data on the following line. For example:

GET /home.php?uid=123%0d%0aFoo:+bar HTTP/1.1

Host: myapp.com

HTTP/1.1 200 OK

Set-Cookie: UserId=123

Foo: bar

...



Download 5,76 Mb.

Do'stlaringiz bilan baham:
1   ...   737   738   739   740   741   742   743   744   ...   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