HandsOn Ethical Hacking and Network Defense Chapter 3

  • Slides: 45
Download presentation
Hands-On Ethical Hacking and Network Defense Chapter 3 Network and Computer Attacks Hands-On Ethical

Hands-On Ethical Hacking and Network Defense Chapter 3 Network and Computer Attacks Hands-On Ethical Hacking and Network Defense

Objectives Describe the different types of malicious software Describe methods of protecting against malware

Objectives Describe the different types of malicious software Describe methods of protecting against malware attacks Describe the types of network attacks Identify physical security attacks and vulnerabilities 2

Malicious Software (Malware) Network attacks prevent a business from operating Malicious software (Malware) includes

Malicious Software (Malware) Network attacks prevent a business from operating Malicious software (Malware) includes n n n Virus Worms Trojan horses Goals n n n Destroy data Corrupt data Shutdown a network or system 3

Viruses Virus attaches itself to an executable file Can replicate itself through an executable

Viruses Virus attaches itself to an executable file Can replicate itself through an executable program n Needs a host program to replicate No foolproof method of preventing them 4

Antivirus Software Detects and removes viruses Detection based on virus signatures Must update signature

Antivirus Software Detects and removes viruses Detection based on virus signatures Must update signature database periodically Use automatic update feature 5

6

6

Base 64 Encoding Used to evade anti-spam tools, and to obscure passwords Encodes six

Base 64 Encoding Used to evade anti-spam tools, and to obscure passwords Encodes six bits at a time (0 – 64) with a single ASCII character n n A - Z: a – z: 1 – 9: + and - 0 – 25 26 – 51 52 – 61 62 and 63 See links Ch 3 a, 3 b 7

Viruses (continued) Commercial base 64 decoders Shell n n Executable piece of programming code

Viruses (continued) Commercial base 64 decoders Shell n n Executable piece of programming code Should not appear in an e-mail attachment 8

Macro Viruses Virus encoded as a macro Macro n n Lists of commands Can

Macro Viruses Virus encoded as a macro Macro n n Lists of commands Can be used in destructive ways Example: Melissa n n Appeared in 1999 It is very simple – see link Ch 3 c for source code 9

Writing Viruses Even nonprogrammers can create macro viruses n Instructions posted on Web sites

Writing Viruses Even nonprogrammers can create macro viruses n Instructions posted on Web sites n Virus creation kits available for download (see link Ch 3 d) Security professionals can learn from thinking like attackers n But don’t create and release a virus! People get long prison terms for that. 10

Worms Worm n Replicates and propagates without a host Infamous examples n n Code

Worms Worm n Replicates and propagates without a host Infamous examples n n Code Red Nimda Can infect every computer in the world in a short time n At least in theory 11

ATM Machine Worms n n n Cyberattacks against ATM machines Slammer and Nachi worms

ATM Machine Worms n n n Cyberattacks against ATM machines Slammer and Nachi worms Trend produces antivirus for ATM machines See links Ch 3 g, 3 h, 3 i n Nachi was written to clean up damage caused by the Blaster worm, but it got out of control See link Ch 3 j n Diebold was criticized for using Windows for ATM machines, which they also use on voting machines 12

13

13

14

14

Trojan Programs Insidious attack against networks Disguise themselves as useful programs n Hide malicious

Trojan Programs Insidious attack against networks Disguise themselves as useful programs n Hide malicious content in program Backdoors Rootkits n Allow attackers remote access 15

Firewalls Identify traffic on uncommon ports Can block this type of attack, if your

Firewalls Identify traffic on uncommon ports Can block this type of attack, if your firewall filters outgoing traffic n n Windows XP SP 2’s firewall does not filter outgoing traffic Vista’s firewall doesn’t either (by default), according to link Ch 3 l and 3 m Trojan programs can use known ports to get through firewalls n HTTP (TCP 80) or DNS (UDP 53) 16

17

17

Trojan Demonstration Make a file with command-line Windows commands Save it as C: Documents

Trojan Demonstration Make a file with command-line Windows commands Save it as C: Documents and Settings usernamecmd. bat Start, Run, CMD will execute this file instead of C: WindowsSystem 32Cmd. exe 18

Improved Trojan Resets the administrator password Almost invisible to user Works in Win XP,

Improved Trojan Resets the administrator password Almost invisible to user Works in Win XP, but not so easy in Vista 19

Spyware Sends information from the infected computer to the attacker n n Confidential financial

Spyware Sends information from the infected computer to the attacker n n Confidential financial data Passwords PINs Any other stored data Can register each keystroke entered (keylogger) Prevalent technology Educate users about spyware 20

Deceptive Dialog Box 21

Deceptive Dialog Box 21

Adware Similar to spyware n Can be installed without the user being aware Sometimes

Adware Similar to spyware n Can be installed without the user being aware Sometimes displays a banner Main goal n n Determine user’s online purchasing habits Tailored advertisement Main problem n Slows down computers 22

Protecting Against Malware Attacks Difficult task New viruses, worms, Trojan programs appear daily Antivirus

Protecting Against Malware Attacks Difficult task New viruses, worms, Trojan programs appear daily Antivirus programs offer a lot of protection Educate your users about these types of attacks 23

24

24

25

25

Educating Your Users Structural training n n Most effective measure Includes all employees and

Educating Your Users Structural training n n Most effective measure Includes all employees and management E-mail monthly security updates n Simple but effective training method Update virus signature database automatically 26

Educating Your Users Spy. Bot and Ad-Aware n n Help protect against spyware and

Educating Your Users Spy. Bot and Ad-Aware n n Help protect against spyware and adware Windows Defender is excellent too Firewalls n n n Hardware (enterprise solution) Software (personal solution) Can be combined Intrusion Detection System (IDS) n Monitors your network 24/7 27

FUD Fear, Uncertainty and Doubt n n n Avoid scaring users into complying with

FUD Fear, Uncertainty and Doubt n n n Avoid scaring users into complying with security measures Sometimes used by unethical security testers Against the OSSTMM’s Rules of Engagement Promote awareness rather than instilling fear n n Users should be aware of potential threats Build on users’ knowledge 28

Intruder Attacks on Networks and Computers Attack n Any attempt by an unauthorized person

Intruder Attacks on Networks and Computers Attack n Any attempt by an unauthorized person to access or use network resources Network security n Security of computers and other devices in a network Computer security n Securing a standalone computer--not part of a network infrastructure Computer crime n Fastest growing type of crime worldwide 29

Denial-of-Service Attacks Denial-of-Service (Do. S) attack n n Prevents legitimate users from accessing network

Denial-of-Service Attacks Denial-of-Service (Do. S) attack n n Prevents legitimate users from accessing network resources Some forms do not involve computers, like feeding a paper loop through a fax machine Do. S attacks do not attempt to access information n n Cripple the network Make it vulnerable to other type of attacks 30

Testing for Do. S Vulnerabilities Performing an attack yourself is not wise n You

Testing for Do. S Vulnerabilities Performing an attack yourself is not wise n You only need to prove that an attack could be carried out 31

Distributed Denial-of-Service Attacks Attack on a host from multiple servers or workstations Network could

Distributed Denial-of-Service Attacks Attack on a host from multiple servers or workstations Network could be flooded with billions of requests n n Loss of bandwidth Degradation or loss of speed Often participants are not aware they are part of the attack n Attacking computers could be controlled using 32 Trojan programs

Buffer Overflow Attacks Vulnerability in poorly written code n Code does not check predefined

Buffer Overflow Attacks Vulnerability in poorly written code n Code does not check predefined size of input field Goal n n n Fill overflow buffer with executable code OS executes this code Can elevate attacker’s permission to Administrator or even Kernel Programmers need special training to write secure code 33

34

34

35

35

Ping of Death Attacks Type of Do. S attack Not as common as during

Ping of Death Attacks Type of Do. S attack Not as common as during the late 1990 s How it works n Attacker creates a large ICMP packet More than 65, 535 bytes n n Large packet is fragmented at source network Destination network reassembles large packet Destination point cannot handle oversize packet and crashes Modern systems are protected from this (Link Ch 3 n) 36

Session Hijacking Enables attacker to join a TCP session Attacker makes both parties think

Session Hijacking Enables attacker to join a TCP session Attacker makes both parties think he or she is the other party 37

Addressing Physical Security Protecting a network also requires physical security Inside attacks are more

Addressing Physical Security Protecting a network also requires physical security Inside attacks are more likely than attacks from outside the company 38

Keyloggers Used to capture keystrokes on a computer n n Hardware Software n Behaves

Keyloggers Used to capture keystrokes on a computer n n Hardware Software n Behaves like Trojan programs Hardware n n n Easy to install Goes between the keyboard and the CPU Key. Katcher and Key. Ghost 39

40

40

41

41

Keyloggers (continued) Protection n Software-based Antivirus n Hardware-based Random visual tests Look for added

Keyloggers (continued) Protection n Software-based Antivirus n Hardware-based Random visual tests Look for added hardware Superglue keyboard connectors in 42

Behind Locked Doors Lock up your servers n n Physical access means they can

Behind Locked Doors Lock up your servers n n Physical access means they can hack in Consider Ophcrack – booting to a CD-based OS will bypass almost any security 43

Lockpicking Average person can pick deadbolt locks in less than five minutes n After

Lockpicking Average person can pick deadbolt locks in less than five minutes n After only a week or two of practice Experienced hackers can pick deadbolt locks in under 30 seconds Bump keys are even easier (Link Ch 3 o) 44

Card Reader Locks Keep a log of who enters and leaves the room Security

Card Reader Locks Keep a log of who enters and leaves the room Security cards can be used instead of keys for better security n Image from link Ch 3 p 45