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


Create an HTML page that will issue the desired request without any user



Download 5,76 Mb.
Pdf ko'rish
bet760/875
Sana01.01.2022
Hajmi5,76 Mb.
#293004
1   ...   756   757   758   759   760   761   762   763   ...   875
Bog'liq
3794 1008 4334

Create an HTML page that will issue the desired request without any user

interaction. For 

GET


requests, you can place an 



tag with the 

src


parameter set to the vulnerable URL. For 

POST


requests, you can create a

form that contains hidden fields for all of the relevant parameters

required for the attack and has its target set to the vulnerable URL. You

can use JavaScript to auto-submit the form as soon as the page loads. 



While logged in to the application, use the same browser to load your



crafted HTML page. Verify that the desired action is carried out within the

application.

Preventing XSRF Flaws

XSRF vulnerabilities arise because of the way browsers automatically submit

cookies back to the issuing web server with each subsequent request. If a web

application relies solely upon HTTP cookies as its mechanism for transmitting

session tokens, then it is inherently at risk from this type of attack.

XSRF attacks can be prevented by not relying only upon cookies in this way.

In the most security-critical applications, such as online banks, it is usual to see

some session tokens being transmitted via hidden fields in HTML forms.

When each request is submitted, in addition to validating session cookies, the

application verifies that the correct tokens were received in the form submis-

sion. If an application behaves in this way, then an attacker will not be able to

mount a XSRF attack without already knowing the value of the tokens being

transmitted in hidden fields. To be successful, the attacker will already need to

have hijacked the user’s session, making any XSRF attack unnecessary. 

Do not make the mistake of relying upon the HTTP 

Referer


header to indi-

cate whether a request originated on-site or off-site. The 

Referer

header can be

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



spoofed using older versions of Flash or masked altogether using a meta

refresh tag. In general, the 

Referer

header is not a reliable foundation on

which to build any security defenses within web applications.

An anti-XSRF safeguard employed in some applications is to require that

users complete multiple steps in order to carry out sensitive actions such as

funds transfers. If this is done, then to be effective the application must employ

some kind of token or nonce within the multistep process. Typically, at the first

stage, the application places a token into a hidden form field, and at the second

stage, it verifies that the same token has been submitted. Because XSRF attacks

are one-way, the attacking web site cannot retrieve the token from the first

stage in order to submit it at the second. If the application uses two steps with-

out the safeguard of a token, then the defense achieves nothing because an

XSRF attack can simply issue the two required requests in turn, or (very often)

proceed directly to the second request.




Download 5,76 Mb.

Do'stlaringiz bilan baham:
1   ...   756   757   758   759   760   761   762   763   ...   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