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



Download 5,76 Mb.
Pdf ko'rish
bet376/875
Sana01.01.2022
Hajmi5,76 Mb.
#293004
1   ...   372   373   374   375   376   377   378   379   ...   875
Bog'liq
3794 1008 4334

208

Chapter 7 



Attacking Session Management

70779c07.qxd:WileyRed  9/14/07  3:13 PM  Page 208



and an HTTP service is still implemented, the application should redi-

rect any requests for sensitive content (including the login page) back to

the HTTPS service. Static resources such as help pages are not usually

sensitive and may be accessed without any authenticated session;

hence, the use of secure cookies can be backed up using cookie scope

instructions to prevent tokens being submitted in requests for these

resources.

■■

Session tokens should never be transmitted in the URL, as this provides



a trivial vehicle for session fixation attacks and results in tokens appear-

ing in numerous logging mechanisms. In some cases, developers use

this technique to implement sessions in browsers that have cookies dis-

abled. However, a better means of achieving this is to use 

POST

requests


for all navigation and store tokens in a hidden field of an HTML form.

■■

Logout functionality should be implemented. This should dispose of all



session resources held on the server and invalidate the session token.

■■

Session expiration should be implemented after a suitable period of



inactivity (e.g., 10 minutes). This should result in the same behavior as

if the user had explicitly logged out.

■■

Concurrent logins should be prevented. Each time a user logs in, a dif-



ferent session token should be issued, and any existing session belong-

ing to the user should be disposed of as if she had logged out from it.

When this occurs, the old token may be stored for a period and any

subsequent requests received using the token should return a security

alert to the user stating that the session has been terminated because

she has logged in from a different location.

■■

If the application contains any administrative or diagnostic functional-



ity that enables session tokens to be viewed, this functionality should

be robustly defended against unauthorized access. In most cases, there

is no necessity for this functionality to display the actual session token

at all — rather, it should contain sufficient details about the owner of

the session for any support and diagnostic tasks to be performed, with-

out divulging the session token being submitted by the user to identify

her session.

■■

The domain and path scope of an application’s session cookies should



be set as restrictively as possible. Cookies with overly liberal scope are

often generated by poorly configured web application platforms or web

servers, rather than by the application developers themselves. There

should be no other web applications or untrusted functionality accessi-

ble via domain names or URL paths that are included within the scope

of the application’s cookies. Particular attention should be paid to any




Download 5,76 Mb.

Do'stlaringiz bilan baham:
1   ...   372   373   374   375   376   377   378   379   ...   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