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



Download 5,76 Mb.
Pdf ko'rish
bet808/875
Sana01.01.2022
Hajmi5,76 Mb.
#293004
1   ...   804   805   806   807   808   809   810   811   ...   875
Bog'liq
3794 1008 4334

HTTP Status Code

Many applications return different status codes in a systematic way depend-

ing on the values of submitted parameters. The values that are most com-

monly encountered during an attack to enumerate identifiers are:

■■

200

– The default response code, meaning “ok.”

■■

301 or 302

– A redirection to a different URL.

■■

401 or 403

– The request was not authorized or allowed.

■■

404

– The requested resource was not found.

■■

500

– The server encountered an error when processing the request.



474

Chapter 13 



Automating Bespoke Attacks

70779c13.qxd:WileyRed  9/14/07  3:14 PM  Page 474



Response Length

It is common for dynamic application pages to construct responses using a

page template (which has a fixed length), and insert per-response content into

this template. If the per-response content does not exist or is invalid (e.g., an

incorrect document ID was requested), the application might simply return an

empty template. In this situation, the response length is a reliable indicator of

whether a valid document ID has been identified.

In other situations, different response lengths may point towards the occur-

rence of an error or the existence of additional functionality. In the authors’

experience, the HTTP status code and response length indicators have been

found to provide a highly reliable means of identifying anomalous responses

in the majority of cases.



Response Body

It is very common for the data actually returned by the application to contain

literal strings or patterns that can be used to detect hits. For example, when an

invalid document ID is requested, the response might contain the string

Invalid document ID

. In some cases, where the HTTP response code does not

vary, and the overall response length is changeable due to the inclusion of

dynamic content, searching responses for a specific string or pattern may be

the most reliable means of identifying hits.

Location Header

In some cases, the application will respond to every request for a particular

URL with an HTTP redirect (a 302 status code), where the target of the redirec-

tion depends upon the parameters submitted in the request. For example, a

request to view a report might result in a redirect to 

/download.jsp

if the sup-

plied report name is correct, or to 

/error.jsp

if it is incorrect. The target of an

HTTP redirect is specified in the 

Location


header, and can often be used as a

way of identifying hits.




Download 5,76 Mb.

Do'stlaringiz bilan baham:
1   ...   804   805   806   807   808   809   810   811   ...   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