sans sec504 – day two module 1 ethics of hacking and cracking

253
SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

Upload: gervase-fields

Post on 02-Jan-2016

217 views

Category:

Documents


7 download

TRANSCRIPT

Page 1: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

SANS SEC504 – Day Two

Module 1Ethics of Hacking and Cracking

Page 2: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

Objectives

• Understand how the act of unethical computer hacking is a crime

• Classify and identify groups and classes of hackers

• Distinguish the rationale for various types of hackers

2

Page 3: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

Objectives (continued)

• Understand and determine differences in information warfare

• Understand how computer hacking originated and its evolution

• Recognize the importance of ethical hacking and the issues involved in hacker ethics

3

Page 4: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

The Impact of Unethical Hacking

• Computer cracking– Term for illegally hacking into a computer system

without the permission of the system’s owner

• Despite the motivations of computer crackers– Cracking a system is a crime

4

Page 5: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

Hacker Communities

• Two ways commonly used to categorize hackers– White Hat good hackers vs. Black Hat bad hackers– Based loosely on psychological profiling

5

Page 6: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

Hat Categories

• White Hat/Black Hat model– White hats represent the “good guys”– Black hats represent the “bad guys”

• Everything the good guys do is right, legal, and justified

• “Gray Hat” hackers– Evidence that the dichotomy of good and evil is NOT a

very good fit to the real world

6

Page 7: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

Hat Categories (continued)

Figure 1-1 White Hat/Black Hat model

7

Page 8: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

Hacker Profiling

• Hacking requires that the practitioner be intimately familiar with the techniques of the perpetrator– Or opponent

• Reading and techniques used by both ethical and malicious hackers are identical

• Profile of a hacker is multifaceted

• Black Hat Briefings convention– Highlights breaking security research submitted by

leading corporate professionals, government experts, and members of the underground hacking community

8

Page 9: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

9

Figure 1-2 Hacker profiles

Page 10: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

Hacker Motivations

• Curiosity

• Love of puzzles

• Desire for recognition or fame

• Revenge

• Financial gain

• Patriotism or politics

10

Page 11: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

Ethical Hacking

• Ethics are the principles of conduct that govern individuals, groups, and professions

• Without a published code of ethics, it is difficult to gain public trust for a profession

• Network security is emerging from a chaotic set of conflicting ethics

• Separating the ethical hacker from the unethical cracker– Will allow security professionals to present the

benefits of their profession

11

Page 12: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

Evolution of Hacking

• The modern concept of hacking began in the late 1950s– Students at the Massachusetts Institute of Technology

started using their access to the MIT mainframe• To work on new languages

• First password hacks were a response to the Compatible Time Sharing System (CTSS)– Developed in the early 1960s

12

Page 13: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

Evolution of Hacking (continued)

• In the 1970s phone phreaks used phreaking to access telephone networks– To make free calls from payphones

• In the 1980s– War dialers were developed to search for open

modems– Personal computer prices dropped and users became

more common– Hacker communities also grew– Viruses, worms, and Trojans started appearing in 1988

13

Page 14: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

Evolution of Hacking (continued)

• Antisocial actions of crackers and script kiddies made it difficult to defend the original concept of hacking– “Computer hacker” describes computer experts with

malicious intent

14

Page 15: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

Vendor-Neutral Security Certifications

• Security certificates and issuing bodies– CompTIA Security+™ Certification– Global Information Assurance Certification (GIAC),

Security Administration Certifications– ISC2 Certifications– Associate of (ISC)2

– SSCP Examination

15

Page 16: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

Vendor-Neutral Security Certifications (continued)

• Security certificates and issuing bodies (continued)– CAP Examination– CISSP Examination– CISSP Concentrations– EC-Council Certifications

16

Page 17: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

Vendor-Specific Security Certificates

• There are almost as many vendor-specific certificates as there are network vendors

• Cisco’s CCNA, and Microsoft’s MSCE– Useful to newcomers to the network security industry

17

Page 18: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

What Needs to Be Secured

• Protection of data provided to organizations or stored on personal computers is a high priority

• Some crackers break into systems to utilize what they consider wasted computer energy

• Using bandwidth without permission may seem harmless– But it is a crime, in addition to being unethical

• Many hackers find it tempting to copy, download, and use proprietary software and other copyrighted works

18

Page 19: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

What Needs to Be Secured (continued)

• Ethical Issues of Hacking– Professional hackers have a responsibility to society

• Their activities should help to build and improve upon existing technology

• They should use their skills and interests as opportunities to learn and to teach

– Ethical hacker• A security professional who applies his or her hacking

skills for defensive purposes

19

Page 20: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

What Needs to Be Secured (continued)

• Ethical Hacking and System Security– Some companies prefer to pay an ethical hacker to

discover their systems’ weaknesses and security gaps– Ethical hackers work to protect all areas of information

technology– Hackers must have experience in software engineering,

network engineering, and system security

20

Page 21: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

Summary

• Computer cracking is illegally hacking into a computer system without the permission of the system’s owner

• Hackers are commonly thought of in two groups: White Hat and Black Hat

• Nine major profiles of hackers

• The techniques used by ethical and malicious hackers are similar

• Hackers may be motivated by curiosity, puzzles, fame, revenge, money, or patriotism

21

Page 22: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

Summary (continued)

• The modern concept of hacking began in the late 1950s

• While there are several vendor-neutral and vendor-specific certifications available to computer security professionals, there is no national certification standard

• Professional security experts, technologists, and hackers must develop a public code of ethics

• An ethical hacker is a security professional who applies hacking skills for defensive purposes

22

Page 23: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

SANS SEC504 – Day Two

Module 2Reconnaissance

Page 24: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

24

Objectives

• Identify various techniques for performing reconnaissance

• Distinguish and discuss the methods used in social engineering

• Discuss the importance of dumpster diving in reconnaissance

• Identify a variety of phases of Internet footprinting

Page 25: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

25

Reconnaissance

• Reconnaissance– Act of locating targets and developing the methods

necessary to attack those targets successfully– May be extremely flexible and creative

• Reconnaissance is not by definition illegal– Many reconnaissance techniques are completely

legal

Page 26: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

26

Figure 2-1 Abridged organization chart

Page 27: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

27

Some Legal Reconnaissance

• Legal activities– Looking up all of the information about a company

available on the Internet– Calling with a problem requiring customer service

assistance– Interviewing a member of the staff for a school project– Physical entry of a facility, including attending a tour of

the facility– Making friends with somebody who works there or

used to work there

Page 28: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

28

Some Questionable Reconnaissance

• Questionable activities– Performing a passive port scan– Reading the names on the mail sitting on a mail cart– Scanning the document lying loose on a desk– Picking up trash in the parking lot– Picking up a copy of the employee newsletter– Asking for a phone list, business card or product specs– Looking through a garbage can– War driving

Page 29: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

29

Some Illegal Reconnaissance

• Illegal activities– Developing a “front” company for the purpose of

robbing or defrauding– Stealing garbage– Entering a home or office to look for information– Dropping a keylogger– Leaving a sniffer

Page 30: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

30

Social Engineering

• Social engineering works, for the most part, because people are trusting and helpful

• The weakest link in any security scheme is the user

• The success or failure of social engineering– Depends on the ability of hackers to manipulate

human psychology, contacts, and physical workstations

Page 31: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

31

Social Engineering Techniques

• Impersonation– Could be at an instance level (impersonating

someone)– Could be on a role or function level (dressing like a

service person)

• Bribery– Hacker can pit a person’s greed and ignorance

against his loyalty to the organization– Blackmail is a common tactic to keep a target

employee fruitful

Page 32: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

32

Social Engineering Techniques (continued)

• Deception– Achieve access to information by joining the company

• As an employee or a consultant

• Conformity– Hacker convinces the victim that they have a lot in

common and that they share the same values– Hacker becomes the victim’s good friend

• Reverse social engineering– Hacker projects herself as an authority vested with the

power to solve peoples’ problems

Page 33: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

33

Physical Intrusion

• Foremost traditional technique of social engineering

• Requires– Learning the schedules of the organization– Knowing the floor plan of the building or buildings– “Baselining” the security procedures

• Hacker can develop fake identification cards

• Last step is to acquire useful or valuable information

Page 34: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

34

Physical Intrusion (continued)

• Avoiding suspicion– Never collect all the required information from a single

user or source– Never hold a position after the value of the position

has ended

• The more valuable the information is, the more likely hackers are working with a team

• When physical intrusion is not a possibility, hackers use communication media

Page 35: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

35

Communication Media

• Postal Mail– Powerful tool for social engineers– Typical attack

• Victim receives a letter announcing that he or she has won a prize

• Mailer asks for tax information, phone numbers, e-mail addresses, and other information

• Greed leads the victim to happily surrender all sorts of information

• E-mail– Used in a variety of scams and false offerings

Page 36: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

36

Communication Media (continued)

• E-mail– Attacks

• Hacker sends an e-mail purported to be from a legitimate IT e-mail account

– Asks for user’s password to help solve a problem

• Hacker sends e-mail message invitations to join online competitions for receiving prizes

– Joining requires sending sensitive information

• Phishing

– User is tricked into giving private information about his or her account with a known large organization

Page 37: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

37

Figure 2-2 Typical phishing form

Page 38: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

38

Communication Media (continued)

• Instant Messaging– Social engineer attempts to befriend the victim

• To gather information or send the victim to a Web link she might be likely to visit

• Telephone Communication– Social engineers may manipulate background sounds

and their own voice to produce a required effect– Help desk personnel are vulnerable targets– Social engineers often impersonate technicians

Page 39: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

39

Countering Social Engineering

• Steps to counter social engineering attempts:– Do not provide any information to unknown people– Do not disclose any confidential information to

anyone over the telephone– Do not type passwords or other confidential

information in front of unknown people– Do not submit information to any insecure Web site– Do not use same username/password for all

accounts– Verify credentials of persons asking for passwords

Page 40: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

40

Countering Social Engineering (continued)

• Steps to counter social engineering attempts:– Keep confidential documents locked– Lock or shut down computers when away from the

workstation– Instruct help desk employees to provide information

only after they have gained proper authentication

Page 41: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

41

Dumpster Diving

• Dumpster diving– Often the mother lode of sensitive information as well

as actual hardware and software

• Hackers look specifically for sales receipts and paperwork– That contain personal data or credit card information

• Shredded documents can lead to data leaks

• Drafts of letters are routinely left whole in the trash

• Company directory sheets, catalog lists, unused or misprinted labels, and policy manuals

Page 42: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

42

Importance of Proper Discarding of Refuse

• Security policy must carefully address what is sensitive information– And decide how to treat refuse

• Best solution to theft of trash paper– Crosscut-shred it and keep it in locked trash

receptacles

• Hackers search for outdated hardware– There are tools that can restore data from damaged

data-storage devices

Page 43: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

43

Prevention of Dumpster Diving

• Guidelines that help preventing dumpster diving– Develop a written recycling and trash-handling policy– Use the policy to develop a consistent, systematic

method for handling trash– The trash-handling policy should state that all papers

be shredded– Erase all data from tapes, floppies, and hard disks– Simply breaking CD-ROMs is not sufficient, place them

in a microwave and heat them

Page 44: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

44

Internet Footprinting

• A technical method of reconnaissance

• Hackers like this method because it is clean, legal, and safe

• Four methods used in Internet footprinting– Web searching– Network enumeration– Domain Name System (DNS)–based reconnaissance– Network-based reconnaissance

Page 45: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

45

Web Searching

• Search Engines– Can be used to collect information about any subject or

organization– Companies’ basic information are available through

search engines– Any company or organization is vulnerable to innocent

searches

• HTML Source Code– You can view the source code of any Web page– Area of interest in an HTML source code is its comment

entries and the hints of the organization of the site

Page 46: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

46

Web Searching (continued)

• HTML Source Code (continued)– Knowing the format of usernames or passwords can be

useful– You should have a default or an index page in every

subdirectory

• Newsgroups– Text-based online groups in which users discuss

subjects that interest them– Part of an online bulletin board system called USENET– Hackers read postings in newsgroups to discover

information and documents relating to targeted systems

Page 47: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

47

Web Searching (continued)

• Security-Related Web Sites– Hackers study these Web sites to learn about new

developments in information security• Especially about new exploits

• Newsletters– Provide cutting-edge developments to hackers– Most of the time are available free of charge– Automatically e-mailed to individuals

Page 48: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

48

Network Enumeration

• Process of identifying domain names as well as other resources on the target network

• WHOIS Search– WHOIS

• Internet tool that aids in retrieving domain name–specific information from the NSI Registrar database

• Allows the InterNIC database to be queried

– Displays the information about the searched item

– Hackers use the WHOIS tool first to extract critical data about their target system

• And then to conduct hacking activities

Page 49: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

49

Source: www.dnsstuff.com

Page 50: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

50

Network Enumeration (continued)

• whois CLI Command– WHOIS Web application is also available at the

command-line interface (CLI)• Of POSIX systems like UNIX, Solaris, and Linux

Page 51: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

51

Figure 2-4 CLI view of the whois command (on Ubuntu Linux)

Page 52: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

52

Domain Name System (DNS)–Based Reconnaissance

• DNS Lookup– Tools help Internet users discover the DNS names of

target computers– Web sites that provide DNS lookup tools

• www.dnsstuff.com

• www.network-tools.com

• www.networksolutions.com

• DNS Zone Transfer– Every DNS server has a name space, known as a zone– A zone stores data about domain names

Page 53: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

53

Domain Name System (DNS)–Based Reconnaissance (continued)

• DNS Zone Transfer (continued)– Zone transfer is a DNS feature that lets a DNS server

update its database• With the list of domain names in another DNS server

– An incorrectly configured DNS server may allow any Internet user to perform a zone transfer

– Commands to perform a DNS zone transfer• nslookup

– Allows anyone to query a DNS server for information

• host

– Program that permits you to perform DNS lookup

Page 54: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

54

Domain Name System (DNS)–Based Reconnaissance (continued)

Figure 2-5 Nslookup command output for NetworkSolutions.com’s NS1 nameserver

Page 55: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

55

Source: Microsoft Paint

Page 56: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

56

Source: Microsoft Paint

Page 57: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

57

Domain Name System (DNS)–Based Reconnaissance (continued)

• DNS Zone Transfer (continued)– Commands to perform a DNS zone transfer

• dig

– Domain information groper (dig)

– Used to collect DNS-related data

Page 58: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

58

Network-Based Reconnaissance

• ping– Part of the Internet Control Message Protocol (ICMP)– Helps to verify whether a host is active– Command is available for all platforms– There are two ping utilities available for a Linux or Unix

machine: ping and ping6

• traceroute– A request for a Web page that resides on a remote

server must pass through several servers on its way– Command can track all of the intermediate servers

Page 59: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

59

Source: Microsoft Paint

Page 60: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

60

Source: Microsoft Paint

Page 61: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

61

Network-Based Reconnaissance (continued)

• traceroute– In UNIX-based operating systems use traceroute

command– In Windows operating systems use tracert command

Page 62: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

62

Source: Microsoft Paint

Page 63: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

63

Network-Based Reconnaissance (continued)

• netstat– Allows all the transmission Control Protocol (TCP),

User Datagram Protocol (UDP), and IP connections on a computer to be viewed

– Also helps to locate• IP address of computers

• IP addresses of the hosts connected to the computers

• Port of the host to which a computer is connected

Page 64: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

64

Source: Microsoft Paint

Page 65: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

65

Summary

• Reconnaissance is the act of locating targets and developing the methods necessary to attack those targets successfully

• Social engineering works because people are, for the most part, trusting and helpful

• To counter social engineering, organizations must establish known security policies and conduct mandatory security training

• Dumpster diving can provide hackers with sensitive information, as well as hardware and software

Page 66: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

66

Summary (continued)

• Four methods of Internet footprinting: Web searching, network enumeration, Domain Name System (DNS)-based reconnaissance, and network-based reconnaissance

• During Web searching, hackers collect information about a target organization by reading Web pages produced by that organization

• Network enumeration is the process of identifying domain names and other resources on the target network

Page 67: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

67

Summary (continued)

• DNS-based reconnaissance uses information available from DNS servers about the IP addresses of target network domain names

• Network-based reconnaissance is the process of identifying active computers and services on a target network via tools such as ping, traceroute, and netstat

Page 68: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

SANS SEC504 – Day Two

Module 3Scanning Tools

Page 69: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

69

Objectives

• Comprehend the functioning of scanners

• Trace the development of scanners

• Identify various types of scanning

• Identify different scanners

Page 70: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

70

Scanning Tools

• Scanners– Find and fix vulnerabilities in remote machines on a

network– Software tool that examines and reports about

vulnerabilities on local and remote hosts

• Port scanner– Examines and reports the condition (open or closed)

of a port• And the application listening on that port, if possible

Page 71: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

71

Evolution of Scanners

• Scanners first appeared even before ARPANET– To monitor connections between mainframes and

dumb terminals

• The Internet was launched in the 1970s

• The early UNIX-like languages had no security at all

• Legitimate network users would connect to remote UNIX servers– By having their modem dial specific telephone

numbers– Led to the invention of a new tool, the war dialer

Page 72: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

72

Evolution of Scanners (continued)

• War dialer– Script that tells the modem to dial a range of phone

numbers defined by the user• And then identifies those numbers that connect to remote

computers

– A form of automated scanner

• In the early 1980s, the majority of servers ran on UNIX platforms– System administrators created shell scripts that let them

check security weaknesses of their networks• And avoid hacking activities

Page 73: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

73

Evolution of Scanners (continued)

• As the Internet increased in availability and popularity– More computers and networks became connected

• Today, scanners are available for several popular platforms

Page 74: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

74

How Scanners Work

• Scanners automate the process of examining network weaknesses

• Scanners are not heuristic

• Functions– Connects to a target host(s)– Examines the target host for the services running on it– Examines each service for any known vulnerability

Page 75: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

75

Types of Scanning

• TCP Connect Scanning– Attempts to make TCP connections with all of the ports

on a remote system– Target host transmits connection-succeeded messages

for active ports– User does not need root privileges to perform TCP

connect scanning– Almost all IDSs recognize the scanning

• Half-Open Scanning– A TCP connection scanning that does not complete the

connections

Page 76: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

76

Types of Scanning (continued)

• Half-Open Scanning (continued)– Only the SYN message is sent from the scanner– Reply signal may be a SYN/ACK, indicating the port is

open• Attacker replies with an RST flag to avoid detection

– Some IDSs can be configured to log all network activities

– Root or system administrator privileges are required to perform half-open scanning

Page 77: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

77

Types of Scanning (continued)

• UDP Scanning– Examines the status of UDP ports on a target system– Scanner sends a 0-byte UDP packet to all the ports on

a target host• If port is closed, the target host replies with an ICMP

unreachable message

– Most operating systems generate UDP messages very slowly

• Makes UDP scanning impractical

Page 78: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

78

Types of Scanning (continued)

• IP Protocol Scanning– Examines a target host for supported IP protocols– Scanner transmits IP packets to each protocol on the

target host– If target host replies with an ICMP unreachable

message to the scanner• Then the target host does not use that protocol

Page 79: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

79

Types of Scanning (continued)

• Ping scanning– Demonstrates whether a remote host is active by

sending ICMP echo request packets to that host

Page 80: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

80

Types of Scanning (continued)

• Stealth Scanning– Lets you examine hosts behind firewalls and packet

filters– Most stealth scanners do not allow target hosts to log

the scanning activities

Page 81: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

Review of Scanner Technology

81

Table 3-1 Scanning phases and tools

Page 82: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

Review of Scanner Technology (continued)

• Discovery

- Nmap:

82

Table 3-2 Important scanning options of the nmap command

Page 83: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

Review of Scanner Technology (continued)

Figure 3-1 Zenmap scan example

83

Page 84: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

Review of Scanner Technology (continued)

- Unicornscan: An open-source tool designed to identify information related TCP flags and banners.

Figure 3-2 Unicorn TCP scan example

84

Page 85: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

Review of Scanner Technology (continued)

• Reconnaissance

- Fierce: Perl-based tool that focuses on particular targets using pattern matching.

- Maltego: Java based tool, offered in both community and commercial versions and is marketed as a forensic tool.

- PassiveRecon: A Firefox add-on that allows users to visit a target Web site and gather a variety of publically available information useful in the enumeration or reconnaissance phase of a penetration test.

85

Page 86: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

Review of Scanner Technology (continued)

86

Source: Fierce

Page 87: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

Review of Scanner Technology (continued)

87

Source: Maltego

Page 88: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

Review of Scanner Technology (continued)

Figure 3-5 PassiveRecon installation site

88

Page 89: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

Review of Scanner Technology (continued)

• Reconnaissane

- Tcpdump: An open-source command-line packet analyzer.

- Wireshark: Similar to tcpdump but contains a GUI interface.

89

Page 90: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

Review of Scanner Technology (continued)

90

Source: tcpdump output results examples

Page 91: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

Review of Scanner Technology (continued)

91

Source: Wireshark

Page 92: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

Review of Scanner Technology (continued)

• Vulnerability Identification

- Nessus: A remote security scanner designed to be run on linux, BSD, Solaris, and other versions of Unix.

- NeXpose: A commercial enterprise Vulnerability testing tool.

- Nipper: A commercial software using C++ that is both open source and sold by license by Titania.

- OpenVAS: Open-source version of Nessus.

92

Page 93: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

Review of Scanner Technology (continued)

93

Source: Nessus

Page 94: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

Review of Scanner Technology (continued)

94

Source: NeXpose

Page 95: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

Review of Scanner Technology (continued)

95

Source: Nipper

Page 96: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

Review of Scanner Technology (continued)

96

Source: OpenVAS

Page 97: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

Review of Scanner Technology (continued)

• Vulnerability Identification

- QualysGuard (SaaS): vulnerability tool that is designed to support penetration testing and includes features for discovery and enforcement of policies.

- SAINT: Security Administrator’s Integrated Network Tool

97

Page 98: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

Review of Scanner Technology (continued)

98

Source: Qualys

Page 99: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

Review of Scanner Technology (continued)

99

Source: SAINT

Page 100: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

Review of Scanner Technology (continued)

• Exploitation

- CORE Impact: full-service commercial vulnerability testing and penetration tool.

- MetaSploit: network vulnerability tool that, like CORE Impact, offers a wide range of functions.

- Live Linux Distros: BackTrack Linux

100

Page 101: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

Review of Scanner Technology (continued)

101

Source: CORE Impact

Page 102: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

Review of Scanner Technology (continued)

102

Source: Metasploit

Page 103: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

Review of Scanner Technology (continued)

103

Figure 3-16 BackTrack interface example

Page 104: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

104

Summary

• Scanning permits hackers to learn the vulnerabilities of the target system

• The most popular scanners are open source or freeware, made freely available across the Internet

• In the early days of computing, security vulnerabilities, while abundant, were not well known

• When hackers wanted to crack a system in the 1970s, they would examine the target system for all known vulnerabilities

Page 105: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

105

Summary (continued)

• As students and hobbyists started playing with scanning applications, new vulnerabilities were discovered

• In the early 1980s, most servers ran on UNIX platforms– System administrators created shell scripts that let

them check security weaknesses

• Scanners automate the process of examining network weaknesses, and check only for known vulnerabilities and open ports

Page 106: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

106

Summary (continued)

• Scanners can be set to target a single IP address or a range of addresses

• Scanners are available on UNIX, Windows, and Macintosh platforms

Page 107: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

SANS SEC504 – Day Two

Module 4Sniffers

Page 108: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

108

Objectives

• Identify sniffers

• Recognize types of sniffers

• Discover the workings of sniffers

• Appreciate the functions that sniffers use on a network

Page 109: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

109

Objectives (continued)

• List types of sniffer programs

• Implement methods used in spotting sniffers

• List the techniques used to protect networks from sniffers

Page 110: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

110

Sniffers

• Sniffer, or packet sniffer– Application that monitors, filters, and captures data

packets transferred over a network

• Sniffers are nearly impossible to detect in operation – And can be implemented from nearly any computer

• Types of sniffer– Bundled– Commercial– Free

Page 111: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

111

Bundled Sniffers

• Come bundled with specific operating systems

• Examples– Network Monitor comes bundled with Windows– Tcpdump comes with many open source UNIX-like

operating systems, like Linux– Snoop is bundled with the Solaris operating systems– nettl and netfmt packet-sniffing utilities are bundled

with the HP-UX operating system

Page 112: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

Bundled Sniffers (continued)

Table 4-1 tcpdump command examples

112

Page 113: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

113

Commercial Sniffers

• Observe, monitor, and maintain information on a network

• Some companies use sniffer programs to detect network problems

• Can be used for both– Fault analysis, which detects network problems– Performance analysis, which detects bottlenecks

Page 114: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

114

Free Sniffers

• Used to observe, monitor, and maintain information on a network

• Can also be used for both fault analysis and performance analysis

• Differences between commercial and free sniffers– Commercial sniffers generally cost money, but

typically come with support– Support on free sniffers is minimal

Page 115: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

115

Sniffer Operation

• Sniffer must work with the type of network interface– Supported by your operating system

• Sniffers look only at the traffic passing through the network interface adapter– On the machine where the application is resident

• You can read the traffic on the network segment upon which your computer resides

Page 116: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

116

Components of a Sniffer

• Hardware– NIC is the hardware most needed

• Capture Driver– Captures the network traffic from the Ethernet

connection– Filters out the information that you don’t want

• And then stores the filtered traffic information in a buffer

• Buffer– Dynamic area of RAM that holds specified data

Page 117: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

117

Figure 4-1 Sniffer components

Page 118: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

118

Components of a Sniffer (continued)

• Buffer (continued)– Methods of storing captured data

• Stored until the buffer is full with information

• Round-robin method

• Decoder– Interprets binary information and then displays it in a

readable format

• Packet Analysis– Sniffers usually provide real-time analysis of captured

packets

Page 119: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

119

Components of a Sniffer (continued)

Figure 4-2 tcpdump traffic

Page 120: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

120

Placement of a Sniffer

• A sniffer can be implemented anywhere in a network

• Sniffer is best strategically placed in a location where only the required data will be captured

• Sniffers are normally placed on:– Computers– Cable connections– Routers– Network segments connected to the Internet– Network segments connected to servers that receive

passwords

Page 121: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

121

Placement of a Sniffer (continued)

Figure 4-3 Sniffer placements

Page 122: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

122

MAC Addresses

• Media Access Control (MAC) address– A unique identifier assigned to a computer– Associated with the NIC attached to most networking

equipment– Distinguishes a computer from the other computers on

the network

Page 123: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

123

MAC Addresses (continued)

Figure 4-4 ARP table

Page 124: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

124

Data Transfer over a Network

• If a data packet is sent from Alice to Bob– It must pass through many routers

• Routers first examine the destination Internet Protocol (IP) address– To direct the data packet to Bob

• Alice has the information about the first router and the IP address of Bob’s PC

• Alice’s computer employs an Ethernet frame to communicate with that router

Page 125: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

125

Data Transfer over a Network (continued)

Figure 4-5 Message from Alice to Bob

Page 126: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

126

Data Transfer over a Network (continued)

Figure 4-6 Packet traveling from Alice to Bob

Page 127: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

127

Data Transfer over a Network (continued)

Figure 4-7 Ethernet frame

Page 128: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

128

Data Transfer over a Network (continued)

• Transmission Control Protocol/Internet Protocol (TCP/IP) stack in Alice’s computer– Generates a frame to transmit the data packet to Bob

in Houston

• TCP/IP stack then transfers it to the Ethernet module– Ethernet information is added

• Data is sent so that the TCP/IP stack at the opposite end is able to process the frame

• CRC checks to verify that the Ethernet frame reaches the destination without being corrupted

Page 129: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

129

Data Transfer over a Network (continued)

• Frame is sent to the Ethernet cabling within the network or the private LAN

• All hardware adapters on the LAN can view the frame

• Every adapter then compares the destination MAC address in the frame with its own MAC address

Page 130: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

130

The Role of a Sniffer on a Network

• Promiscuous mode– A NIC can retrieve any data packet being transferred

throughout the Ethernet network segment

• A sniffer on any node on the network can record all the traffic that travels– By using the NIC’s built-in ability to examine packets

• A sniffer puts a network card into the promiscuous mode by using a programmatic interface

• Interface can bypass the TCP/IP stack operating systems

Page 131: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

131

The Role of a Sniffer on a Network (continued)

Figure 4-8 MACs in a frame

Page 132: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

132

Sniffer Programs

• Some sniffer programs are used for monitoring purposes– Others are written specifically for capturing

authentication information

• Partially functioned sniffers have fallen out of favor

Page 133: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

133

Wireshark (Ethereal)

• Probably the best-known and most powerful free network protocol analyzer– For UNIX/Linux and Windows

• Allows you to capture packets from a live network and save them to a capture file on disk

• Data can be captured off the wire from a network connection– And can be read from Ethernet, FDDI, PPP, token-

ring, or X.25 interfaces

Page 134: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

134

Figure 4-9 Wireshark (Ethereal) capture options dialog box

Page 135: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

135

Figure 4-10 Wireshark (Ethereal) packet capture data

Page 136: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

136

Tcpdump/Windump

• Most commonly bundled sniffer with Linux distros

• Widely used as a free network diagnostic and analytic tool

• Configurable to allow for packet data collection based on specific strings or regular expressions

• Can decode and monitor the header data of– Internet Protocol (IP)– Transmission Control Protocol (TCP)– User Datagram Protocol (UDP)– Internet Control Message Protocol (ICMP)

Page 137: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

137

Tcpdump/Windump (continued)

• Monitors and decodes application-layer data

• Can be used for– Tracking network problems, detecting ping attacks, or

monitoring network activities

• Commands– tcpdump (for Linux)– windump (for Windows)

Page 138: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

138

Tcpdump/Windump (continued)

Figure 4-11 Tcpdump options

Page 139: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

139

Tcpdump/Windump (continued)

Figure 4-12 Tcpdump packet data flow

Page 140: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

140

Snort

• Can be used as a packet sniffer, packet logger, or network intrusion detection system

• Logs packets into either binary or ASCII format

• Functions include– Performing real-time traffic analysis– Performing packet logging on IP networks– Debugging network traffic– Analyzing protocol– Searching and matching content– Detecting attacks, such as buffer overflows

Page 141: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

141

Snort (continued)

• Snort works on the following platforms:– Linux– Solaris– Windows NT– Windows 2000– Sun– IRIX

Page 142: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

142

Figure 4-13 Snort CLI output and summary

Page 143: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

143

Network Monitor

• Part of the Microsoft Windows NT, Windows 2000 Server, and Windows 2003 Server

• Functions– Captures network traffic and translates it into a

readable format– Supports a wide range of protocols– Maintains the history of each network connection– Supports high-speed as well as wireless networks– Provides advanced filtering capabilities

Page 144: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

Cain and Abel

• Cracking encrypted passwords using brute force, dictionary, and cryptanalysis techniques.

• Recording VoIP conversations

• Recording network keys

• Uncovering cached passwords

• Analyzing network protocols

144

Page 145: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

Cain and Abel

145

Figure 4-14 Cain and Abel interface

Page 146: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

Kismet

•Kismet is a wireless sniffer that detects networks through passive sniffing.

146

Page 147: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

147

Fluke Networks Protocol Analyzers

• Fluke Networks is a provider of network tools– Its focus is on selling physical tools for network analysis

rather than selling only software

• Advantage of using an appliance– Impossible to mishandle the installation of the software

if it is on a dedicated appliance• With only one purpose or user

• Disadvantage of using an appliance– Locks you into the appliance designer’s architecture

and vision

Page 148: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

148

Detecting a Sniffer

• Since sniffer technology is passive– It is difficult to detect sniffers

• You can only detect whether or not the suspect is running his or her NIC in promiscuous mode

• Tools available to check for sniffers– AntiSniff– SniffDet– Check Promiscuous Mode (cpm)– Neped.c– Ifstatus

Page 149: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

149

DNS Test

• Some sniffers perform DNS lookups– In order to replace IP addresses in their logs with fully

qualified host names

• Many tools exist to detect sniffers using this method

Page 150: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

150

Network Latency Tests

• Several methods use the delay in network latency to determine a host’s likely sniffer activity

• It is possible to “measure” which of the machines are working harder– “Hard workers” are potential sniffer hosts

Page 151: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

151

Ping Test

• Use AntiSniff to perform this test

• Antisniff can send a packet that contains a legitimate IP address, but a fake MAC address– If a host responds to a ping with a fake MAC address, it

must mean that that host is in promiscuous mode

Page 152: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

152

ARP Test

• When in promiscuous mode, the Windows driver for the network card– Examines only the first octet of the MAC address to

determine whether it is a broadcast packet

• Antisniff can send a packet with a MAC address of ff:00:00:00:00:00 and the correct destination IP address of the host– Causing the Microsoft OS to respond while in

promiscuous mode

Page 153: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

153

Source-Route Method

• Uses a technique known as the loose-source route– To locate sniffers on nearby network segments

• Adds the source-route information inside the IP header of packets– Routers ignore the destination IP address

• And forward the packet to the next IP address in the source-route option

Page 154: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

154

Decoy Method

• Involves setting up a client and a server on either side of a network

• Server is configured with accounts that do not have rights or privileges– Or the server is virtual

• Client runs a script to log on to the server by using the Telnet, POP, or IMAP protocol

• Hackers can grab the usernames and passwords from the Ethernet– And attempt to log on to the server

Page 155: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

155

Commands

• Check if you are running in promiscuous mode– ifconfig -a

• Check if you are running a sniffer on your own computer– ps aux

Page 156: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

156

Commands (continued)

Figure 4-16 Output of the ps aux command

Page 157: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

157

Time Domain Reflectometers (TDR) Method

• Sends an electrical pulse in the wire and creates a graph based on the reflections that emanate

• Provides distance information in a numerical format

• TDR can detect hardware packet sniffers attached to the network that are otherwise silent

Page 158: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

158

Protecting Against a Sniffer

• The heart of defense against a sniffer is to make the data inconvenient to use

• Encourage the use of applications that use standards-based encryption, such as:– Secure Sockets Layer (SSL)– Pretty Good Privacy (PGP) and Secure/Multipurpose

Internet Mail Extensions (S/MIME)– Secure Shell (SSH)

Page 159: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

159

Secure Socket Layer (SSL)

• Designed by Netscape

• Provides data security between application protocols

• Secure Sockets Layer, or SSL– Nonproprietary protocol providing data encryption,

server authentication, message integrity, and client authentication for a TCP/IP connection

• SSL is built as a security standard into all Web browsers and servers

• SSL comes in two forms, 40-bit and 128-bit

Page 160: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

160

Pretty Good Privacy (PGP) and Secure/Multipurpose Internet Mail

Extensions (S/MIME)• E-mail messages can be sniffed at various points

• Basic requirements for securing e-mail messages– Privacy– Authentication

• Methods that ensure the security of e-mail messages– PGP– S/MIME

Page 161: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

161

Secure Shell (SSH)

• Secure alternative to Telnet

• SSH protects against:– IP spoofing– Spoof attacks on the local network– IP source routing– DNS spoofing– Interception of cleartext password– Man-in-the-middle attacks

Page 162: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

162

More Protection

• At OSI layer-2– Enable port security on a switch– Enforce static ARP

• At OSI layer-3– IPSEC paired with secure, authenticated naming

services (DNSSEC)

• Firewalls can be a mixed blessing– Sniffers are most effective behind a firewall, where

legacy cleartext protocols are often allowed by corporate security policy

Page 163: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

163

Summary

• A sniffer, or packet sniffer, is an application that monitors, filters, and captures data packets transferred over a network

• Bundled sniffers come built into operating systems

• Nonbundled sniffers are either commercial sniffers with a cost of ownership or free sniffers

• The components of a sniffer are hardware, capture driver, buffer, decoder, and packet analysis

• Sniffers need to be placed where they will get the smallest aggregate network traffic

Page 164: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

164

Summary (continued)

• The standard behavior in a TCP/IP network that sniffers exploit is that all packets are passed to all the nodes in the subnet

• Sniffers change the NIC operation mode to promiscuous mode

• Wireshark (Ethereal),Tcpdump/Windump, Snort, and Network Monitor are all modern packet sniffers

• Sniffit works on SunOS, Solaris, UNIX, and IRIX

• Sniffer Pro, EtherPeek NX, and Fluke Networks Protocol Analyzers are examples of commercial packet sniffers

Page 165: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

165

Summary (continued)

• Several tools exist, or have existed, to detect a sniffer

• All tools for protecting your network from a packet sniffer involve some level of encryption

Page 166: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

SANS SEC504 – Day Two

Module 5TCP/IP Vulnerabilities

Page 167: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

167

Objectives

• Give a definition of TCP/IP

• Know the steps of TCP/IP communication

• Recognize weaknesses in TCP/IP

• Identify steps in protecting information from vulnerabilities in TCP/IP

Page 168: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

168

TCP/IP Vulnerabilities

• Transmission Control Protocol/Internet Protocol (TCP/IP)– Suite of protocols that underlie the Internet– Comprises many protocols and applications– Common language of networked computers– Makes transferring information fast and efficient

• IP has tools to correctly rout packets

• TCP is responsible for safe and reliable data transfer between host computers

Page 169: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

169

TCP/IP Vulnerabilities (continued)

• Illegitimate users take advantage of TCP/IP vulnerabilities– By exploiting the “three-way handshake”

• Unauthorized users may launch a denial-of-service attack on the destination computer– Floods network with so many additional requests that

regular traffic is slowed or completely interrupted

Page 170: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

170

TCP/IP Vulnerabilities (continued)

Figure 5-1 TCP/IP

Page 171: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

171

Data Encapsulation

• Data encapsulation– Enclosing higher-level protocol information in lower-

level protocol information– Also called data hiding– Implementation details of a class are hidden from user

Page 172: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

172

Data Encapsulation (continued)

Figure 5-2 TCP/IP data encapsulation example

Page 173: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

173

IP (Internet Protocol)

• Internet Protocol (IP)– Transmits data from source to final destination– Network protocol operating at layer 3 of the OSI Model

• And layer 2 or 3 of the TCP/IP Model

– IP is connectionless• No guarantee of delivery of packets to the destination

• IP routes packets over network hardware

Page 174: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

174

IP (Internet Protocol) (continued)

• IP addresses formats– IPv4 (32-bit address)

• Usually written as a dotted-decimal, e.g., 192.168.100

– IPv6 (128-bit address)• Usually written as eight groups of four hex digits, e.g.,

2001:0db8:85a3:08d3:1319:8a2e:0370:7334

• IP address exhaustion date– Approximately the beginning of 2011

Page 175: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

175

IP (Internet Protocol) (continued)

• IP packets often arrive out of sequence– Vulnerability that attackers can exploit

• When a large IP packet is sent over a network, it is broken down– Called fragmentation

Page 176: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

176

IP (Internet Protocol) (continued)

Page 177: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

177

IP (Internet Protocol) (continued)

Page 178: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

178

Page 179: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

179

TCP

• Uses a connection-oriented design– Participants in a TCP session must create connection

• Connection is called the three-way handshake

• Provides connection-oriented services between a source and destination computer– And guarantees delivery of packets

• Packets reach the application layer in the right order– TCP identifies and assembles packets based on

sequence numbers

Page 180: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

180

TCP (continued)

• Source and destination computers exchange the initial sequence number (ISN)– When a connection is made

• Packets are accepted within a particular range– Specified during the establishment of a connection

Page 181: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

181

TCP (continued)

Figure 5-3 TCP header

Page 182: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

182

TCP (continued)

Page 183: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

183

TCP (continued)

Page 184: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

184

Connection Setup and Release

• Three-way handshake sets up and releases a connection

• TCP packet flags: URG,ACK, PSH,RST,SYN, and FIN

• Packets can have more than one flag set– Normally a packet will have only one flag sent, except

with SYN/ACK or FIN/ACK

• Three packets in a TCP connection:SYN --> SYN/ACK --> ACK

Page 185: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

185

Connection Setup and Release (continued)

• Connection Setup– Source computer delivers a SYN packet to the

destination computer• Packet has the initial sequence number (ISN)

• ISN is indicated by whether the SYN bit is “set”

– Receiving computer transmits a SYN with an acknowledgment, ACK

– Source computer sends an ACK to the destination computer as a response

• With an “in-range” sequence number

Page 186: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

186

Figure 5-4 TCP/IP connection setup

Page 187: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

187

Connection Setup and Release (continued)

• Connection Release– Source computer sends a FIN packet to the

destination computer– Destination computer then sends a FIN/ACK packet– Source computer sends an ACK packet– Either computer could send an RST and close the

session (reset) immediately

Page 188: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

188

TCP Timers

• All TCP sessions are tracked with timers built into the TCP protocol

• Timers used by TCP/IP– Connection establishment

• A session will not be established if it takes longer than 75 seconds for the destination server to respond

– FIN_WAIT• Waits for FIN packets. Its default value is 10 minutes

Page 189: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

189

TCP Timers (continued)

• Timers used by TCP/IP (continued)– TIME_WAIT

• Default value for this timer is two minutes

• Waits for packets to arrive at the destination computer

– KEEP_ALIVE• Checks to see if the destination computer is active

• Computer may send a test packet every two hours to verify whether the other computer is alive and idle

Page 190: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

190

Vulnerabilities in TCP/IP

• During the development of TCP/IP in the 1980s– Security was not a priority

• Since 1990, security has become a serious problem

• Some of the vulnerabilities– IP spoofing– Connection hijacking– ICMP attacks– TCP SYN attacks– RIP attacks

Page 191: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

191

IP Spoofing

• Steps– Attackers send packets to the victim or target

computer with a false source address– Victim accepts the packet and sends a response

“back” to the indicated source computer– Attacker must guess the proper sequence numbers to

send the final ACK packet

• Hacker may have a connection to victim’s machine – And hold it as long as the computer remains active

Page 192: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

192

IP Spoofing (continued)

• Sequence Guessing– Hacker sends a few connections to the victim

• Learns how quickly sequence number is incrementing

– Attacker then sends a spoofed ACK packet with a “best guess” victim’s sequence number

– Hacker can guess the sequence number because the number is generated using a global counter

• And is incremented in fixed units

Page 193: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

193

IP Spoofing (continued)

• Source Routing– Sender using source routing can specify return path

• Through which the destination computer sends its reply

– Attacker looks for an intermediate computer or router• That could forward packets to the target computer

– Most newer routers and firewalls are configured to drop source-routed packets

Page 194: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

194

Connection Hijacking

• Connection hijacking– Allows an attacker to control an existing connection

• Steps– An attacker desynchronizes a series of packets

between the source and destination computer– Extra packets sent to one of the victims force the

victim to choose which packet to accept– If the victim chooses to discard the authentic packets

and interacts with the spoofed packets• The attacker has hijacked the connections

Page 195: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

195

ICMP Attacks

• Packets are used to send fraudulent or deceptive connection information among computers

• ICMP is used to test for connectivity using utilities such as the ping command

• Denial-of-service (DoS) attacks can be formulated by using ICMP packets– Destination Unreachable and Time to Live Exceeded

• Attackers transmitting spoofed packets can successfully reset existing connections

Page 196: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

196

TCP SYN Attacks

• Exploits host implementation of three-way handshake

• When Host B receives the SYN request from A, it must keep track of the partially opened connection– In a queue for at least 75 seconds

• Most systems are limited and can keep track of only a small number of connections

• An attacker can overflow the listen queue by sending more SYN requests than the queue can handle– SYN flooding

Page 197: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

197

RIP Attacks

• Take advantage of RIP (Routing Information Protocol)

• RIP– Essential component in a TCP/IP network – Distribution of routing information within networks

• RIP packet is often used without verification– Attacks on RIP change the destination of data

• Once the router is modified, it transmits all of the packets to the hacker computer

Page 198: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

198

Securing TCP/IP

• Data in packets is not encrypted or authenticated

• Packet sniffer can observe contents of the packets

• Attackers can send spoofed packets from any computer

• Must employ many methods simultaneously to achieve success in this area

Page 199: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

199

Securing TCP/IP (continued)

• Methods to decrease vulnerabilities in TCP/IP– Modify default timer values– Increase the number of simultaneous connections

that a computer can handle– Reduce the time limit used to listen for replies to the

SYN/ACK in the three-way handshake– Change method used to generate sequence numbers– Firewall rules that block spoofed packets

Page 200: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

200

Securing TCP/IP (continued)

• Methods to decrease vulnerabilities in TCP/IP (continued)– Avoid using the source address authentication– If an operator allows outside connections from trusted

hosts, enable encryption sessions at the router– Packets can be encrypted or sent via encrypted VPN

Page 201: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

201

IP Security Architecture (IPSec)

• IP Security Architecture (IPSec)– Collection of Internet Engineering Task Force (IETF)

standards– Defines an architecture at the Internet Protocol (IP)

layer that protects IP traffic• By using various security services

Page 202: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

202

IP Security Architecture (IPSec) (continued)

Page 203: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

203

IP Security Architecture (IPSec) (continued)

Page 204: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

204

IP Security Architecture (IPSec) (continued)

• IPSec provides:– Encryption of user data for privacy– Authentication of the integrity of a message– Protection against certain types of security attacks,

such as replay attacks– Ability for devices to negotiate security algorithms and

keys required for secure authenticated connections– Two security modes, tunnel and transport, to meet

different network needs

Page 205: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

205

Summary

• Internet Protocol (IP) is responsible for sending data from a source computer to a destination computer

• TCP guarantees the delivery of packets

• Some of the timers that are important for TCP/IP security are Connection Establishment, FIN_WAIT,TIME_WAIT, and KEEP_ALIVE

• Vulnerabilities in TCP/IP include TCP SYN attacks, IP spoofing, connection hijacking, RIP attacks, and ICMP attacks

Page 206: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

206

Summary (continued)

• Vulnerabilities in TCP/IP can be decreased by modifying the default timer values, generating random sequence numbers, properly configured firewalls, TCP wrappers on UNIX and Linux boxes, authentication, or encryption

• IP Security Architecture (IPSec) is a collection of Internet Engineering Task Force (IETF) standards – Defines an architecture at Internet Protocol (IP) layer

that protects IP traffic by using various security services

Page 207: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

207

Summary (continued)

• IPSec provides– Encryption of user data– Authentication of message integrity– Protection against certain types of security attacks,

such as replay attacks– Ability for devices to negotiate security algorithms and

keys required for secure authenticated connections– Two security modes, tunnel and transport, to meet

different network needs

Page 208: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

SANS SEC504 – Day Two

Module 6Encryption and Password Cracking

Page 209: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

209

Objectives

• Understand basic cryptographic principles

• Understand the fundamentals of encryption

• Describe the most common ciphers in use today

• Identify the most common attacks on passwords

• Use various programs for cracking passwords

Page 210: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

210

Encryption and Password Cracking

• Strong passwords– Good defense against unwanted entry

• Guessing, stealing, or cracking passwords– Foundation of defeating any kind of security

Page 211: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

211

Cryptography

• Cryptography– Algorithm encrypts a ciphertext document from a

plaintext document– Algorithm decrypts the ciphertext back into plaintext

• Transposition– Change in the position or order of letters or words– Does not rely on length of password– Transposition is based on probabilities– Anyone can break a transposition cipher based on

frequency of letters

Page 212: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

212

Cryptography (continued)

• Substitution– Replacement of a letter or group of letters with

another letter or group of letters– Enigma

• Possibly the most famous substitution cryptography machine

• Used by the German Army during World War II

– Turing Bombe• Machine to crack the “Enigma Code”

• Developed by Alan Turing

Page 213: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

213

Cryptography (continued)

• Substitution (continued)– Colossus

• Programmable computer (1943 by Max Newman)

• Common terms when dealing with cryptography– Cleartext– Cyphertext– Key– Algorithm– Hash

Page 214: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

214

Symmetric and Asymmetric Key Encryption

• Encryption can be performed with either a symmetric key or an asymmetric key

Page 215: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

215

Symmetric Key Encryption

• Sometimes called secret key algorithms

• Uses same key to encrypt and to decrypt the data

• Sender and recipient must have a copy of the key– Inherent vulnerability of secret key algorithms is that

the key must be transmitted

• Faster that asymmetric key algorithms

Page 216: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

216

Symmetric Key Encryption (continued)

Table 6-1 Symmetric key cipher examples

Page 217: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

217

Symmetric Key Encryption (continued)

• Stream Ciphers– Use a key stream to encrypt and decrypt a plaintext

message

• Key stream is similar to a one-time pad– A list of random numbers from 1 to 25– Numbers in the one-time pad are added to the letters

in the plaintext to encrypt• And subtracted from the cyphertext to decrypt

– Algorithm XORs key stream with plaintext message

Page 218: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

218

Symmetric Key Encryption (continued)

• Block Ciphers– Operate on blocks of data

• Algorithm breaks the plaintext document into blocks (usually 8 or 16 bytes long)– Operates on each block independently

• Plaintext will always be padded

• Block ciphers allow you to reuse keys

Page 219: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

219

Asymmetric Key Algorithms

• Also called public key algorithms

• Two keys for encrypting and decrypting data

• Each user has a public key and a private key– Public keys can be sent unencrypted over unsecured

media

• Public key encrypts data– Private key decrypt s data encrypted with public key

Page 220: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

220

Asymmetric Key Algorithms (continued)

Table 6-2 Asymmetric key cipher examples

Page 221: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

221

Asymmetric Key Algorithms (continued)

• DSA (Digital Signature Algorithm)– Digital signature connects documents with the holder

of a specific key– Considered too slow for general encryption

• Digital Time Stamps– Connects document with a specific time of origination

Page 222: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

222

Cryptanalysis

• Cryptanalyst decodes messages to make them readable

• First and most important step in cryptanalysis – Detecting the key values

Page 223: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

223

Description of Popular Ciphers

• Average user tends to confuse the categories within the cryptographic taxonomy

Page 224: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

224

Symmetrical Key Ciphers

• DES (Data Encryption Standard)– A block cipher– Developed in the early- to mid-1970s– FIPS-approved cryptographic algorithm– Uses a 56-bit key to encrypt and decrypt– Breaks the plaintext into 64-bit blocks

• Applies a series of permutations to each block

– Can use same algorithm for encryption and decryption

Page 225: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

225

Symmetrical Key Ciphers (continued)

• Security of DES– Dependent upon the chosen key– Susceptible to brute-force attacks

• 3DES (Triple DES)– Encrypts text three times with DES using different keys

• Speed of 3DES– Almost three times slower than DES

• Security of 3DES– Equivalent to single DES using a 112-bit key

Page 226: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

226

Symmetrical Key Ciphers (continued)

• AES (Advanced Encryption Standard)– Also known as Rijndael– Block cipher adopted as an encryption standard by the

U.S. government– Superseded DES in 2001– Uses a block size of 128 bits, and can use either 128-,

192-, or 256-bit keys– Input bit sequence is copied to a 4×4 array of bytes

known as the State array• Transformed via a series of substitutions/transpositions

Page 227: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

227

Symmetrical Key Ciphers (continued)

• Speed of AES– Faster than DES, but slower than Blowfish

• Security of AES– All successful attacks upon AES have been through

side-channel attacks– Side-channel attacks are based on factors other than

the strength of the algorithm

Page 228: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

228

Symmetrical Key Ciphers (continued)

• IDEA (International Data Encryption Algorithm)– Algorithm developed at ETH Zurich, in Switzerland– Uses a 128-bit key, and operates on 64-bit blocks– Uses series of identical operations applied to the data

for both encryption and decryption

• Speed of IDEA– Somewhat faster than 3DES, but slower than DES

• Security of IDEA– Resistant to differential cryptanalysis– Some weak keys are known

Page 229: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

229

Symmetrical Key Ciphers (continued)

• Skipjack– NSA-developed encryption algorithm that was

developed for use in the Clipper chip– Uses an 80-bit key size and operates on 64-bit blocks– Partially vulnerable to differential cryptanalysis

• RC4– Designed by RSA Data Security, Inc.– Main benefit of RC4 is its speed– Can be useful where moderate security is needed

Page 230: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

230

Asymmetric Key Ciphers

• RSA (Rivest, Shamir, and Adleman)– Most popular public key encryption standard– RSA develops keys that are the product of two 1024-

bit prime numbers– Invented in 1977– RSA is based on the fact that it is very difficult to factor

large numbers

• Security of RSA– Some progress has been made in factoring large

(300+ digit) numbers

Page 231: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

231

Asymmetric Key Ciphers (continued)

• Diffie-Hellman– Allows two parties who do not have prior knowledge of

each other to establish a shared secret key• Over a public, insecure channel

– Currently considered secure

• DSS (Digital Signature Standard)– Based on the Digital Signature Algorithm (DSA)

– Used to generate digital signatures for authentication of electronic documents

– Combination of public key cryptography and a hash function

Page 232: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

232

Asymmetric Key Ciphers (continued)

• Elliptic Curve Cryptosystems– Elliptic curves are harder to solve than factoring the

products of large prime numbers– Elliptic curves, as used in cryptography, are mainly

defined over finite fields– Shorter keys can be used

• Neo for Java– Uses a matrix of 251 8-bit numbers– Said to be the equivalent of RSA-1024

Page 233: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

233

Asymmetric Key Ciphers (continued)

• Lattice-Based Cryptosystems– Based on NP-complete problems involving geometric

shapes built of lines or vectors– Lattice-based systems have not proven to be effective

for cryptography• As they are too slow in practice

Page 234: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

234

Cryptographic Hash Functions

• Hash functions are used in cryptography to transform variable length into a fixed-size hash value

• Hashes are often referred to as “digital fingerprints”

• One-way hashes– Easy to create the hash from the input data, but very

difficult to recreate the input data from the hash

• Message Digest Algorithm 5 (MD5)– Secure hash algorithm developed in 1992 by Rivest– Operates on input data using 512-bit blocks, and

produces a 128-bit hash value

Page 235: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

235

Cryptographic Hash Functions (continued)

• SHA, SHS (Secure Hash Algorithm)– Developed by the U.S. government and adopted as a

FIPS standard– Several variations of SHA hash functions exist– Operates on either 512-bit blocks or 1024-bit blocks– SHA-1 hashes are 160 bits long– SHA-2, produce larger hashes (224, 256, 384, and

512 bits)– Considered superior to MD5

Page 236: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

236

Attacks on Passwords

• Password protection is open to many kinds of attack– From dictionary attacks to sheer guesswork

Page 237: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

237

Dictionary Attacks

• Guessing passwords by using a list of common words

• Can determine the key necessary to decrypt an encrypted document

• Usually do not work against complex passwords

• Crackers need the file that contains the passwords of the target

• Defense: limit the number of guesses allowed before the user is locked out

Page 238: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

238

Dictionary Attacks (continued)

• Hybridization attacks– Guess passwords by creating new words– Add letters or numbers to every word in a dictionary– Some hybridization methods use a number spread

• Insert numbers into passwords

– Duplication: duplicating a word to form a new word– Substituting with symbols: replacing letters in words

with symbols that look similar to the missing letters

Page 239: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

239

Dictionary Attacks (continued)

Table 6-3 Important hybridization methods

Page 240: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

240

Dictionary Attacks (continued)

• Guidelines to protect against dictionary and hybridization attacks– Avoid using the same password for everything– Avoid using one’s own name in a password, as well as

that of a child, spouse, friend, or pet– Avoid using common words or names for passwords– Include random letters, numbers, and characters– Avoid writing down difficult passwords where they

might easily be found

Page 241: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

241

Brute-Force Attacks

• Use all possible combination of letters, numbers, and special characters to determine the target password

• Very time consuming and requires patience

• Slow compared to dictionary attacks

• Need a large amount of RAM and a fast processor

• Most effective when the encrypted document or password hash file– Can be extracted from the target system and tested on

an anonymous offline location

Page 242: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

242

Observation

• “Snooping,” “eavesdropping,” or “shoulder-surfing”

• Used whenever an attacker has physical proximity – And can literally watch the victim type in their

username and password

Page 243: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

243

Keyloggers

• Records every key pressed on the target’s computer

• Can easily be installed on any computer

• Keyloggers are generally invisible to the victim

Page 244: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

244

Social Engineering

• Cracker can pretend to be a legitimate user of the target system– And extract information simply by asking

• People behave naively when a so-called computer expert questions them

• Another form of social engineering is called phishing

Page 245: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

245

Sniffing Methods

• Crackers use packet sniffers– To catch cleartext passwords from protocols such as

Telnet, FTP, and POP3

Page 246: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

246

Password File Stealing

• Cracker can steal or copy the files where the password hashes are stored– From the victim’s computer

• Cracker can take all the time necessary to perform a brute-force attack

• Sometimes passwords are not stored in the main system but in a shadow file– Readable only by users with administrative privileges

Page 247: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

247

Password Crackers

• Some widely used cracker programs are:– Cain and Abel– Crack– John the Ripper– Telnet_crack– THC Hydra– L0phtCrack

Page 248: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

248

Crack

• Alec Muffet designed Crack for UNIX-based systems in 1991

• Scans UNIX password files and then extracts weak logon passwords

• Can also detect encrypted ciphertext by using the Crypt (3) algorithm

Page 249: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

249

John the Ripper

• A fast password cracker

• Currently available for many versions of UNIX, DOS, Win32, BeOS, and OpenVMS

• Primary purpose is to detect weak UNIX passwords

• Can edit its dictionary to add more common words

• Modes– Wordlist mode, single-crack mode, incremental mode,

and external mode

Page 250: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

250

THC Hydra

• Useful network authentication cracker which supports many different services

Page 251: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

251

L0phtcrack and Lc5

• Developed to help system administrators and security professionals– Check password weaknesses of the Windows NT

operating system

• The company that owned L0phtCrack, the @Stake company, was purchased by Symantec

• Symantec has discontinued support

Page 252: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

252

Summary

• Requiring the use of effective, strong passwords is one of the best ways to secure a network against attackers

• Basic types of cryptography include transposition and substitution ciphers

• Encryption can be performed using either symmetric key algorithms or asymmetric key algorithms

• Popular symmetric key ciphers include DES, 3DES, AES (Rijndael), IDEA, Skipjack, and RC4

Page 253: SANS SEC504 – Day Two Module 1 Ethics of Hacking and Cracking

253

Summary (continued)

• Popular asymmetric key ciphers include RSA, Diffie-Hellman, DSS, and elliptic curve cryptography

• Cryptographic hash functions generate a fixed-size hash value from a message of any length

• Effective password security depends on choosing strong passwords

• Common attacks on passwords include technical measures and physical techniques

• Password-cracking programs are readily available