Hands-On Ethical Hacking and Network Defense
Hands-On Ethical Hacking and Network Defense
2
Malicious Software (Malware)
4
Antivirus Software
Detects and removes viruses
Detection based on virus signatures
Must update signature database periodically
Use automatic update feature
5
6
Base 64 Encoding
8
Macro Viruses
Virus encoded as a macro
Macro
Lists of commands
Can be used in destructive ways
Example: Melissa
Appeared in 1999
It is very simple – see link Ch 3c for source
code
9
Writing Viruses
Even nonprogrammers
can create macro viruses
Instructions posted on
Web sites
Virus creation kits available for
11
ATM Machine Worms
Cyberattacks against ATM machines
Slammer and Nachi worms
Trend produces antivirus for ATM machines
See links Ch 3g, 3h, 3i
Nachi was written to clean up damage caused
by the Blaster worm, but it got out of control
See link Ch 3j
Diebold was criticized for using Windows for
ATM machines, which they also use on voting
machines
12
13
14
Trojan Programs
Insidious attack against networks
Disguise themselves as useful programs
Hide malicious content in program
Backdoors
Rootkits
Allow attackers remote access
15
Firewalls
Identify traffic on uncommon ports
Can block this type of attack, if your
firewall filters outgoing traffic
Windows XP SP2’s firewall does not filter
outgoing traffic
Vista’s firewall doesn’t either (by default),
according to link Ch 3l and 3m
Trojan programs can use known ports to
get through firewalls
HTTP (TCP 80) or DNS (UDP 53)
16
17
Trojan Demonstration
Make a file with
command-line Windows
commands
Save it as
C:\Documents and Settings\
username\cmd.bat
Start, Run, CMD will execute this file
instead of
C:\Windows\System32\Cmd.exe
18
Improved Trojan
20
Deceptive Dialog Box
21
Adware
Similar to spyware
Can be installed without the user being aware
Sometimes displays a banner
Main goal
Determine user’s online purchasing habits
Tailored advertisement
Main problem
Slows down computers
22
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
25
Educating Your Users
Structural training
Most effective measure
Includes all employees and management
E-mail monthly security updates
Simple but effective training method
Update virus signature database
automatically
26
Educating Your Users
SpyBot and Ad-Aware
Help protect against spyware and adware
Windows Defender is excellent too
Firewalls
Hardware (enterprise solution)
Software (personal solution)
Can be combined
Intrusion Detection System (IDS)
Monitors your network 24/7
27
FUD
Fear, Uncertainty and Doubt
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
Users should be aware of potential threats
Build on users’ knowledge
28
Intruder Attacks on Networks
and Computers
Attack
Any attempt by an unauthorized person to access or use
network resources
Network security
Security of computers and other devices in a network
Computer security
Securing a standalone computer--not part of a network
infrastructure
Computer crime
Fastest growing type of crime worldwide
29
Denial-of-Service Attacks
Denial-of-Service (DoS) attack
Prevents legitimate users from accessing
network resources
Some forms do not involve computers, like
feeding a paper loop through a fax machine
DoS attacks do not attempt to access
information
Cripple the network
Make it vulnerable to other type of attacks
30
Testing for DoS Vulnerabilities
Performing an attack yourself is not wise
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 be flooded with billions of requests
Loss of bandwidth
Degradation or loss of speed
Often participants are not aware they are part of
the attack
Attacking computers could be controlled using Trojan
programs
32
Buffer Overflow Attacks
Vulnerability in poorly written code
Code does not check predefined size of input field
Goal
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
35
Ping of Death Attacks
Type of DoS attack
Not as common as during the late 1990s
How it works
Attacker creates a large ICMP packet
More than 65,535 bytes
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 3n)
36
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 likely than attacks
from outside the company
38
Keyloggers
Used to capture keystrokes on a computer
Hardware
Software
Software
Behaves like Trojan programs
Hardware
Easy to install
Goes between the keyboard and the CPU
KeyKatcher and KeyGhost
39
40
41
Keyloggers (continued)
Protection
Software-based
Antivirus
Hardware-based
Random visual tests
Look for added hardware
Superglue keyboard connectors in
42
Behind Locked Doors
Lock up your servers
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
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 3o)
44
Card Reader Locks
Keep a log of who
enters and leaves the
room
Security cards can be
used instead of keys
for better security
Image from link Ch 3p
45