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


Oracle: ‘serv’||’ices’ Chapter 9



Download 5,76 Mb.
Pdf ko'rish
bet463/875
Sana01.01.2022
Hajmi5,76 Mb.
#293004
1   ...   459   460   461   462   463   464   465   466   ...   875
Bog'liq
3794 1008 4334

Oracle:

‘serv’||’ices’

Chapter 9 



Injecting Code



255

70779c09.qxd:WileyRed  9/14/07  3:13 PM  Page 255




■■

MS-SQL:

‘serv’+’ices’

■■

MySQL:

‘serv’ ‘ices’

[note the space]

If you are injecting into numeric data, then the following attack strings can

be used to fingerprint the database. Each of these items will evaluate to 0 on

the target database and generate an error on the other databases:

■■

Oracle:

BITAND(1,1)-BITAND(1,1)

■■

MS-SQL:

@@PACK_RECEIVED-@@PACK_RECEIVED

■■

MySQL:

CONNECTION_ID()-CONNECTION_ID()



N OT E

The MS-SQL and Sybase databases share a common origin, so many

similarities exist in relation to table structure, global variables, and stored

procedures. In practice, the majority of the attack techniques against MS-SQL

described in later sections will work in an identical way against Sybase.

A further point of interest when fingerprinting databases is the way in

which MySQL handles certain types of inline comments. If a comment begins

with the exclamation point character followed by a database version string,

then the contents of the comment are interpreted as actual SQL, provided that

the version of the actual database is equal to or later than that string; other-

wise, the contents are ignored and treated as a comment. This facility can be

used by programmers in a similar way to preprocessor directives in C,

enabling them to write different code that will be processed conditionally

upon the database version being used. It can also be used by an attacker to fin-

gerprint the exact version of the database. For example, injecting the following

string will cause the 

WHERE

clause of a 



SELECT

statement to be false if the

MySQL version in use is greater than or equal to 3.23.02:

/*!32302 and 1=0*/




Download 5,76 Mb.

Do'stlaringiz bilan baham:
1   ...   459   460   461   462   463   464   465   466   ...   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