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


Chapter 2  ■ Core Defense Mechanisms



Download 5,76 Mb.
Pdf ko'rish
bet62/875
Sana01.01.2022
Hajmi5,76 Mb.
#293004
1   ...   58   59   60   61   62   63   64   65   ...   875
Bog'liq
3794 1008 4334

Chapter 2 



Core Defense Mechanisms



23

70779c02.qxd:WileyRed  9/14/07  3:12 PM  Page 23




employ a diverse set of crafted data. It would be very difficult to devise

a single mechanism at the external boundary to defend against all of

these attacks.

■■

Many application functions involve chaining together a series of 



different types of processing. A single piece of user-supplied input

might result in a number of operations in different components, with

the output of each being used as the input for the next. As the data is

transformed, it might come to bear no resemblance to the original

input, and a skilled attacker may be able to manipulate the application

to cause malicious input to be generated at a key stage of the process-

ing, attacking the component which receives this data. It would be

extremely difficult to implement a validation mechanism at the external

boundary to foresee all of the possible results of processing each piece

of user input.

■■

Defending against different categories of input-based attack may entail



performing different validation checks on user input that are incompat-

ible with one another. For example, preventing cross-site scripting

attacks may require HTML-encoding the 

>

character as 



>

while pre-

venting command injection attacks may require blocking input contain-

ing the 


&

and 


;

characters. Attempting to prevent all categories of attack

simultaneously at the application’s external boundary may sometimes

be impossible.

A more effective model uses the concept of boundary validation. Here, each

individual component or functional unit of the server-side application treats

its inputs as coming from a potentially malicious source. Data validation is

performed at each of these trust boundaries, in addition to the external frontier

between the client and server. This model provides a solution to the problems

described in the previous list. Each component can defend itself against the

specific types of crafted input to which it may be vulnerable. As data passes

through different components, validation checks can be performed against

whatever value the data has as a result of previous transformations. And

because the various validation checks are implemented at different stages of

processing, they are unlikely to come into conflict with one another.

Figure 2-5 illustrates a typical situation where boundary validation is the

most effective approach to defending against malicious input. The user login

results in several steps of processing being performed on user-supplied input,

and suitable validation is performed at each step:

1. The application receives the user’s login details. The form handler vali-

dates that each item of input contains only permitted characters, is

within a specific length limit, and does not contain any known attack

signatures.


Download 5,76 Mb.

Do'stlaringiz bilan baham:
1   ...   58   59   60   61   62   63   64   65   ...   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