Password Cracking, Sniffing and Man-in-the Middle

Slides:



Advertisements
Similar presentations
Module X Session Hijacking
Advertisements

Ethical Hacking Module VII Sniffers.
Password Cracking, Network Sniffing, Man-in-the-Middle attacks, and Virtual Private Networks Lab 2 – Class Discussion Group 3 Ruhull Alam Bhuiyan Keon.
Man in the Middle Attack
Password Cracking Lesson 10. Why crack passwords?
1 Address Resolution Protocol (ARP) Relates to Lab 2. This module is about the address resolution protocol.
SYSTEM ADMINISTRATION Chapter 19
Packet Analyzers, a Threat to Network Security. Agenda Introduction The background of packet analyzers LAN technologies & network protocols Communication.
Password CrackingSECURITY INNOVATION © Sidebar – Password Cracking We have discussed authentication mechanisms including authenticators. We also.
1 MD5 Cracking One way hash. Used in online passwords and file verification.
Network Attacks Mark Shtern.
CSCE 515: Computer Network Programming Chin-Tser Huang University of South Carolina.
Linux+ Guide to Linux Certification, Second Edition Chapter 14 Network Configuration.
Sanjay Goel, School of Business/Center for Information Forensics and Assurance University at Albany Proprietary Information 1 Unit Outline Information.
ITIS 6167/8167: Network and Information Security Weichao Wang.
COEN 252: Computer Forensics Router Investigation.
CN2668 Routers and Switches Kemtis Kunanuraksapong MSIS with Distinction MCTS, MCDST, MCP, A+
TELE202 Lecture 10 Internet Protocols (2) 1 Lecturer Dr Z. Huang Overview ¥Last Lecture »Internet Protocols (1) »Source: chapter 15 ¥This Lecture »Internet.
Windows This presentation is an amalgam of presentations by Mark Michael, Randy Marchany and Ed Skoudis. I have edited and added material. Dr. Stephen.
Switch Concepts and Configuration and Configuration Part II Advanced Computer Networks.
Karlstad University Introduction to Vulnerability Assessment Labs Ge Zhang Dvg-C03.
The Truth About Protecting Passwords COEN 150: Intro to Information Security Mary Le Carol Reiley.
ECE Internetwork Security 1 Password Cracking, Sniffing and Man-in-the Middle Agenda  Storing Passwords on the system  Password Cracking on Windows.
ECE4112 Lab 7: Honeypots and Network Monitoring and Forensics Group 13 + Group 14 Allen Brewer Jiayue (Simon) Chen Daniel Chu Chinmay Patel.
Linux+ Guide to Linux Certification, Second Edition Chapter 14 Network Configuration.
1 The Internet and Networked Multimedia. 2 Layering  Internet protocols are designed to work in layers, with each layer building on the facilities provided.
Chapter 6-2 the TCP/IP Layers. The four layers of the TCP/IP model are listed in Table 6-2. The layers are The four layers of the TCP/IP model are listed.
System Hacking Active System Intrusion. Aspects of System Hacking System password guessing Password cracking Key loggers Eavesdropping Sniffers Man in.
Application Layer Khondaker Abdullah-Al-Mamun Lecturer, CSE Instructor, CNAP AUST.
Computer Networking From LANs to WANs: Hardware, Software, and Security Chapter 13 FTP and Telnet.
CHAPTER 9 Sniffing.
Topics Network topology Virtual LAN Port scanners and utilities Packet sniffers Weak protocols Practical exercise.
Networking in Linux. ♦ Introduction A computer network is defined as a number of systems that are connected to each other and exchange information across.
1 The Main Event Battle Of the Sniffers. ● The Champion – Ethereal: Network Analyzer ● The Challenger – Ettercap: Network Security Suite.
ITGS Network Architecture. ITGS Network architecture –The way computers are logically organized on a network, and the role each takes. Client/server network.
By Collin Donaldson Man in the Middle Attack: Password Sniffing and Cracking.
Chapter 7: Using Network Clients The Complete Guide To Linux System Administration.
SESSION HIJACKING It is a method of taking over a secure/unsecure Web user session by secretly obtaining the session ID and masquerading as an authorized.
Fall  Computer Crimes  Operating System Identification  Firewalking 2.
Introduction to Vulnerability Assessment Labs Ge Zhang Dvg-C03.
TCP Sliding Windows For each TCP connection each hosts keep two Sliding Windows, send sliding window, and receive sliding window to make sure the correct.
1 Address Resolution Protocol (ARP). 2 Overview 3 Need for Address Translation Note: –The Internet is based on IP addresses –Local area networks use.
Web and Proxy Server.
An Introduction To ARP Spoofing & Other Attacks
Chapter Objectives In this chapter, you will learn:
Networks Fall 2009.
Instructor Materials Chapter 5 Providing Network Services
Lab 2: Packet Capture & Traffic Analysis with Wireshark
I have edited and added material.
Man in the middle attacks Demos
Address Resolution Protocol (ARP)
CS4470 Computer Networking Protocols
LAN Vulnerabilities.
ARP and RARP Objectives Chapter 7 Upon completion you will be able to:
Password Cracking Lesson 10.
Packet Sniffers Lecture 10 - NETW4006 NETW4006-Lecture09.
Switch Concepts and Configuration Part II
Net 323: NETWORK Protocols
CS4622: Computer Networking
Network Security: IP Spoofing and Firewall
SSH: SECURE LOGIN CONNECTIONS OVER THE INTERNET
Lesson 16-Windows NT Security Issues
– Chapter 3 – Device Security (B)
Address Resolution Protocol (ARP)
ARP Spoofing.
1 ADDRESS RESOLUTION PROTOCOL (ARP) & REVERSE ADDRESS RESOLUTION PROTOCOL ( RARP) K. PALANIVEL Systems Analyst, Computer Centre Pondicherry University,
Chapter 7 Network Applications
Firewall Installation
Crisis and Aftermath Morris worm.
Computer Networks ARP and RARP
Presentation transcript:

Password Cracking, Sniffing and Man-in-the Middle Agenda Storing Passwords on the system Password Cracking on Windows and Linux Defenses against Password cracking Address Resolution Protocol (ARP) Sniffing Defenses against Sniffing Man in the Middle ECE 4112 - Internetwork Security

ECE 4112 - Internetwork Security Cracking Passwords Passwords that can be guessed easily are a problem Lots of tools available to figure out passwords L0phtcrack windows password cracker “John the Ripper” Unix password cracker Default passwords remaining on a system are a typical vulnerability ECE 4112 - Internetwork Security

ECE 4112 - Internetwork Security Password storage Password files have passwords stored in a hashed or encrypted form Hash algorithm example is message digest 4 (MD4) Encrypted algorithm example is Data Encryption Standard (DES) When you use your password, it is hashed or encrypted and then compared to the stored value Crackers use a downloaded local copy of password file on their own machine ECE 4112 - Internetwork Security

ECE 4112 - Internetwork Security Storing Passwords Systems have a file with all hashed/encrypted passwords Windows – SAM (Security Accounts Manager) database UNIX - /etc/passwd or /etc/shadow Access to these files can make it easy for a hacker to break in ECE 4112 - Internetwork Security

ECE 4112 - Internetwork Security Windows Passwords Security Accounts Manager (SAM) has two versions for each password LanMan (LM) password version for backward compatibility with windows workgroups NT Hash – cryptographic hash for windows NT/2000 (Uses MD4) SAM file is in \WINNT\system32\config\ directory which is a binary file that is hard to read Back up copy stored in \WINNT\repair ECE 4112 - Internetwork Security

ECE 4112 - Internetwork Security Using Passwords System has a hashed/encrypted version of the password stored in a file On login attempt– system hashes/encrypts the password typed in by using for example crypt() function in linux Compares hashed/encrypted value to stored hashed/encrypted value Idea behind password cracking is to get a copy of the hashed/encrypted passwords and then make guesses, hash/encrypt the guess and compare ECE 4112 - Internetwork Security

ECE 4112 - Internetwork Security Password Cracking Dictionary Attack Hackers steal a copy of the stored password file Guess a password (may use a dictionary) Find hash/encrypted value of the guess Compare hash to entries from stored file Continue this until success or out of options for password guesses. Brute Force – Guess every possible combination of characters Hybrid – Use dictionary but add characters to dictionary entries ECE 4112 - Internetwork Security

Password retrieval on Windows Sniff the network for passwords being transmitted From Administrator’s emergency repair disk From back-up directory ECE 4112 - Internetwork Security

Password Cracking on Windows L0phtCrack – lc4 (Windows) Available at www.@stake.com/research/lc/ Password Auditing and Recovery Application Default English dictionary 50,000 words Does “hybrid” attacks Our free trial version does not allow brute force (for $350 can purchase with that capability) Works on weaker LanMan (LM) as well as NT hashes Can sniff a network for LanMan hashed passwords Can download from a local machine or remote computer the hashed password file ECE 4112 - Internetwork Security

ECE 4112 - Internetwork Security L0phtCrack (lc4) Some statistics (from the website) L0phtCrack obtained 18% of the passwords in 10 minutes 90% of the passwords were recovered within 48 hours on a Pentium II/300 The Administrator and most Domain Admin passwords were cracked ECE 4112 - Internetwork Security

ECE 4112 - Internetwork Security

Password Cracking on UNIX John the Ripper Available at http://www.openwall.com/john/ Supports six hashing schemes including XP Old Unix used /etc/passwd to store passwords Password is stored after cryptographically altered Various algorithms (hash/encrypted) used by various Unix platforms /etc/password is readable by everyone Some Unix store in a shadow password file thus /etc/passwd does not contain the passwords since they are instead in /etc/shadow or /etc/secure, only root can access these files If shadow file used, must have root to copy ECE 4112 - Internetwork Security

Password retrieval on Linux List of login names and usernames in /etc/passwd List of encrypted passwords in /etc/shadow Only /etc/shadow is enough to crack the passwords. Having both files makes it easier ECE 4112 - Internetwork Security

ECE 4112 - Internetwork Security John the Ripper Combine information from /etc/passwd and /etc/shadow into one file Use this file as input for John the Ripper John can create guesses by Using built-in dictionary Using account information Using brute-force guessing algorithm ECE 4112 - Internetwork Security

ECE 4112 - Internetwork Security John the Ripper Scrambling used for each guess When a password is cracked, result displayed on screen During execution of this tool, hitting any key will give current guess and status Password complexity determines time needed for cracking them ECE 4112 - Internetwork Security

Defenses against Password Cracking Select good passwords (not dictionary based) Change regularly Use tools to prevent easy passwords Use password cracking tests against own systems Protect system back ups that have password files Unix: activate password shadowing Windows: disable weaker LM authentication if no windows 95/98 machines on network ECE 4112 - Internetwork Security

ECE 4112 - Internetwork Security Agenda Storing Passwords on the system Password Cracking on Windows and Linux Defenses against Password cracking Address Resolution Protocol (ARP) Sniffing Defenses against Sniffing Man in the Middle ECE 4112 - Internetwork Security

ECE 4112 - Internetwork Security What is ARP? Address Resolution Protocol Used to convert IP addresses to MAC addresses Low-Level Protocol Essential for inter-network communication Used in networks with broadcast capabilities; usually Ethernet ECE 4112 - Internetwork Security

ECE 4112 - Internetwork Security How does ARP work? Internetwork Example A forwards packet to Gateway Gateway checks to see if it has the IP address in the cache If so, change the MAC address and format packet appropriately and forward on the network Otherwise broadcast a request on the network. B will respond with MAC address. Format packet and forward to B. ECE 4112 - Internetwork Security

ECE 4112 - Internetwork Security How does ARP work? LAN Example A sends ARP request packet on LAN Only the machine with matching IP responds with MAC B caches the IP & MAC pair Forwards all packets for same IP to the cached MAC ECE 4112 - Internetwork Security

ECE 4112 - Internetwork Security Example of ARP in Use The figure shows the use of ARP when a computer is trying to contact another computer on the same LAN using ping: ECE 4112 - Internetwork Security

Four Types of ARP Messages ARP request ARP reply RARP request RARP reply ECE 4112 - Internetwork Security

Reverse Address Resolution Protocol (RARP) Physical address of host machine is able to request its IP from a gateway server’s ARP table A router maps the MAC address to corresponding Internet Protocol addresses RARP client program requests from the RARP server on the router to be sent its IP address RARP then returns the IP address to the machine which can store it for future use ECE 4112 - Internetwork Security

ECE 4112 - Internetwork Security Format of ARP Message The ARP request includes: -target machine (TARGET IP) -IP address of the sender machine (SENDER IP) -physical address of the sender (SENDER HA) -physical address of target machine (TARGET HA) ECE 4112 - Internetwork Security

ECE 4112 - Internetwork Security ARP Poisoning Note: ARP is stateless The malicious computer (Machine C) can send an ARP Reply to A and cause A to associate B’s IP with C’s MAC address. This will cause all messages from A to B to go to C Do the same to B ECE 4112 - Internetwork Security

ECE 4112 - Internetwork Security ARP Poisoning C can now act as middle man for all communications between A and B. C can decide which packets are forwarded and which are discarded. C can also alter communications packets between A and B. ECE 4112 - Internetwork Security

ECE 4112 - Internetwork Security Agenda Storing Passwords on the system Password Cracking on Windows and Linux Defenses against Password cracking Address Resolution Protocol (ARP) Sniffing Defenses against Sniffing Man in the Middle ECE 4112 - Internetwork Security

ECE 4112 - Internetwork Security Sniffing Collect information being transmitted on the network Attacker must be either on source, destination or intermediate network Sniffed information can be stored/logged ECE 4112 - Internetwork Security

Sniffing traditional LANS Traditional networks Broadcast medium – easy to sniff attacker Data A Data A HUB Data A Data A ECE 4112 - Internetwork Security

Sniffing Switched LANS Difficult to do, but possible Address Resolution Protocol Cache Poisoning - Attacker must inject packets into the network to redirect traffic Attacker lies about the MAC address intercepts traffic ARP tells which MAC address corresponds to which IP address ECE 4112 - Internetwork Security

Sniffing Switched LANS attacker Data A ECE 4112 - Internetwork Security

ECE 4112 - Internetwork Security Sniffit Easy to use sniffer Available at: http://reptile.rug.ac.be/~coder/sniffit/sniffit.html Can be run in interactive mode Can be used to sniff traditional LANS For Switched LANS, must be used with ARP Cache Poisoning tools ECE 4112 - Internetwork Security

ECE 4112 - Internetwork Security Sniffit Conditions (from the Sniffit web page): You should be ROOT on your machine The machine has to be connected to a network You have to be allowed to sniff (ethical condition) ECE 4112 - Internetwork Security

Sniffit – Interactive mode All TCP traffic can be viewed in main screen Traffic from each system and port to each system and port can be seen Has option to see data in a particular stream flow ECE 4112 - Internetwork Security

ECE 4112 - Internetwork Security ethereal From http://www.ethereal.com/ Ethereal is a free network protocol analyzer for Unix and Windows. It allows you to examine data from a live network or from a capture file on disk. You can interactively browse the capture data, viewing summary and detail information for each packet. Ethereal has several powerful features, including a rich display filter language and the ability to view the reconstructed stream of a TCP session. ECE 4112 - Internetwork Security Source: www.ethereal.com

ECE 4112 - Internetwork Security Source: www.ethereal.com ECE 4112 - Internetwork Security

Defense against Sniffing Transmit encrypted data across a network Don’t use telnet, rsh,rlogin Use Secure Shell Use VPNs to encrypt data between systems Use switches instead of hubs – makes sniffing more difficult ECE 4112 - Internetwork Security

Defense against Sniffing For critical systems MAC address filtering on switches Restrict MAC addresses that can send and receive data on specific switch connectors (plugs) Hard code ARP tables on critical systems ECE 4112 - Internetwork Security

ECE 4112 - Internetwork Security Agenda Storing Passwords on the system Password Cracking on Windows and Linux Defenses against Password cracking Address Resolution Protocol (ARP) Sniffing Defenses against Sniffing Man in the Middle ECE 4112 - Internetwork Security

Man in the Middle:Sniffing It is the easiest attack to launch since all the packets transit through the attacker. All the “plain text” protocols are compromised (the attacker can sniff user and password of many widely used protocol such as telnet, ftp, http) ECE 4112 - Internetwork Security

Man in the Middle: Hijacking Easy to launch It isn’t blind (the attacker knows exactly the sequence numbers of the TCP connection) ECE 4112 - Internetwork Security

Man in the Middle: Injecting Possibility to add packets to an already established connection (only possible in full-duplex MITM) The attacker can modify the sequence numbers and keep the connection synchronized while injecting packets. If the MITM attack is a “proxy attack” it is even easier to inject (there are two distinct connections) ECE 4112 - Internetwork Security

Attacks examples (1) Command injection Useful in scenarios where a one time authentication is used (e.g. RSA token). In such scenarios sniffing the password is useless, but hijacking an already authenticated session is possible Injection of commands to the server Emulation of fake replies to the client ECE 4112 - Internetwork Security

Attacks examples (2) Malicious code injection Insertion of malicious code into web pages or mail (javascript, trojans, virus, etc) Modification on the fly of binary files during the download phase (virus, backdoor, etc) ECE 4112 - Internetwork Security

Attacks examples (3) Payload modification The attacker can modify the payload of the packets by recalculating the checksum The length of the payload can also be changed but only in full-duplex (in this case the seq number has to be adjusted) ECE 4112 - Internetwork Security

The Lab Exercise – Set up Red Hat WS 4.0 Host 57.35.6.x Point out sense amps. Find out exactly how they work. Mention this makes accesses much faster. Note: I'll be basing this discussion off of a 256/288Mbit (32MB) Direct RDRAM organized as 512k x 16/18 x 32s.  We'll talk about what those last few numbers mean shortly. Red Hat WS 4.0 ECE 4112 - Internetwork Security

ECE 4112 - Internetwork Security The Exercise - Tools Address Resolution Protocol Ettercap to passively sniff a connection Ettercap to actively disrupt a connection Hunt to hijack a connection Explain how the speed up is achieved with the extra open banks Note the banks that only have one sense amp. ECE 4112 - Internetwork Security

Exercise – Investigating ARP Check ARP Table on all machines Observe changes to the ARP table using Ethereal as unknown IP addresses are pinged Get a better feel for ARP by making manual changes to the ARP table Observe effects of making incorrect entries into the ARP table Explain how the speed up is achieved with the extra open banks Note the banks that only have one sense amp. ECE 4112 - Internetwork Security

Exercise – Using Ettercap ECE 4112 - Internetwork Security

The Lab - Introduce Ettercap ECE 4112 - Internetwork Security

Exercise – Using Ettercap Use Ettercap passively for sniffing Use Redhat WS 4.0 machine to ARP poison both 7.2 machines Start an FTP communication between the two 7.2 machines Observe traffic between the two 7.2 machines Use Ettercap actively for disruption Start a telnet connection between the two 7.2 machines Use filters to disrupt the connection between the two machines Explain how the speed up is achieved with the extra open banks Note the banks that only have one sense amp. ECE 4112 - Internetwork Security

ECE 4112 - Internetwork Security Exercise – Using Hunt Hijack a connection between the two 7.2 machines ARP poison the 7.2 machines Start an active connection between the two 7.2 machines Use Hunt to hijack the connections Explain how the speed up is achieved with the extra open banks Note the banks that only have one sense amp. ECE 4112 - Internetwork Security

ECE 4112 - Internetwork Security References http://alor.antifork.org/talks/MITM-BHeu03.ppt http://www.csc.vill.edu/~fsalandr/netclass/cassel.ppt http://staff.washington.edu/dittrich/talks/qsm-sec/script.html ECE 4112 - Internetwork Security