ITT420 - Chapter 11 Configuration Management & Security
ITT420 - Chapter 11 Configuration Management & Security
Configuration Maintenance
• Crontab options
• -e create, edit
• -l list
• Format
Minutes hours day month weekday Shellcmd
0-59 0-23 1-31 1-12 Mon-Sun
• E.g.
15 3 * * Mon-Fri
/etc/script
• “ * “ = any (wildcard)
http://adminschoice.com/crontab-quick-reference
Human Computer Job Scheduling
hostname hostname
ipconfig ifconfig
nslookup nslookup
• On Solaris:
ifconfig
• On Linux
ifconfig
• For each interface, the display includes the following fields:
• Link encap This specifies the link encapsulation protocol that the
interface will use when transmitting data link frames. Supported types
include Ethernet, Local Loopback, and Point-to-Point Protocol.
• HWaddr This is the data link address for the encapsulation.
• protocol Ethernet uses the hexadecimal notation, such as in the entry
for the eth0 interface: 00:10:5A:28:5D:7C.
• inet addr This is the IP address associated with this interface.
• Bcast This represents the network layer broadcast address.
• Mask This represents the subnet mask address.
ifconfig
• With ifconfig, it is possible to disable an active interface
or enable a disabled interface while the system is running.
ifconfig
• Using ifconfig, the following important
information can be changed for an interface:
• IP address
• Network mask
• Broadcast address
• Data link address
• MTU
netstat
• short for “network status”, provides a wealth of information
regarding the present status of network connections, routing
information, and other important network related data
• use for monitoring and is one of the most popular debugging
aids available on UNIX/Linux (Windows too)
• Different command line options control the display behavior of
netstat.
• The functionality can be divided into a number of categories and
used to accomplish the following:
• List active network sessions
• Show interface information and statistics
• Display routing table information
netstat
• Options for netstat:
netstat
• Sample of netstat in Linux:
netstat
• By scanning the output of netstat, the network
administrator can easily notice any service that
shouldn’t be running
• E.g. many organizations consider the finger
facility to be a security risk because it can provide
user account information to anyone requesting it
• Once detected with netstat, the finger service can
be disabled by modifying the /etc/inetd.conf
(Solaris) or /etc/xinetd.conf (Linux) network
configuration file.
netstat
• An extremely useful feature of netstat on Linux is
the -p option, show the associated process or
program name that has run with the ports opened.
# netstat -t -p -a
netstat
• One of the primary ways to examine routing table is
with the -r option:
In this example, the routing table includes a destination network, gateway (or
router), network mask, some status flags, two size fields, a metric value, and the
interface with which the route is associated.
netstat
• The netstat command
can be used to display
protocol statistics.
• the supported protocols
including TCP, UDP, and
RAW.
• RAW is a combination
of both IP and ICMP
packets
ping
• used to determine general availability of any TCP/IP device.
E.g.:
ping
• On Linux, use the -c command-line option with an
argument of 1 and the ping command will issue a
single request to rubens:
# ping -c 1 rubens
ping
• This network diagram
shows several devices
attached to two different
networks that are
interconnected via Router
Z.
• When a ping request is
issued from node B on
network A to node C on
network B, the request is
passed via router Z. If
router Z should stop
functioning, the requests
will never reach node C.
• As a result, node C
becomes unreachable from
the perspective of node B.
Advanced Network Tools
• tcpdump - a general-purpose network traffic
monitor that can capture and display packets
and their contents
• traceroute - command to show network
connectivity
tcpdump
• Used as a protocol analyzer, providing one of the best ways to
investigate communication and/or connectivity problems
among systems and networking devices
• The packets scanned will be displayed with information in
either a short or long format, depending on the command-
line options used
• Has a very powerful filtering mechanism that can search for
packets that match a specific string or criteria
tcpdump
tcpdump
• Two primary capture modes:
• Promiscuous - every packet transmitted on the network is
captured
• Nonpromiscuous - only broadcast frames and frames
addressed to the local system will be available to the
interface
• can produce a significant amount of output,
thus, quiet option (-q ) is used
• The format of the output will include a
timestamp, source and destination hosts (or
address), the high-level network protocol,
some flags, and additional protocol
information
tcpdump
• The output also includes a summary of the number of packets
obtained before the user terminated the command.
• The end of the output includes a count of the number of
packets captured by and the number of packets that were
dropped
• tcpdump tool provides a large number of command-line
options i.e. capture modes, control output, specify filter
specifications, and specify additional operating characteristics
tcpdump
• These options are grouped according to their
function and include the following categories:
• Operating modes - to control how tcpdump will capture
and display network traffic
• Display options - control how tcpdump will display
packets from the network
• Packet filter options - predefined pattern that is compared
to incoming packets and consists of a series of one or
more primitives that may be combined with operators
such as and, or, and not
tcpdump
Operating modes:
Option Description
-c Captures specified number of packets and then
quits
-F Uses file as source for filter expression
-I Captures packets using alternate network
interface
-p Disables capturing in promiscuous mode
-r Reads capture file instead of network interface
-w Saves raw packets to file
tcpdump
To capture ten packets from the eth1 interface
tcpdump
Display options
Option Description
-e Prints link-level header information on
each line
-v Specifies verbose mode
-q Specifies quick mode, displays short
packet
information
-t Disables printing of the timestamp
-s Limits the size of packets captured
-x Displays both hexadecimal and ASCII
format
tcpdump
• A sample of command and output that shows a file
transfer session using FTP and ARP broadcasts
tcpdump
• Packet Filter
• Normally, network packets
are read from the network
interface by the associated
driver on behalf of the
kernel. Next, tcpdump
requests the information
from the kernel using
system calls. The tcpdump
tool provides a large
number of predefined
expressions or primitives
that can be used to build
very powerful packet filters.
tcpdump
• to display all packets that are greater than 56
bytes:
# tcpdump greater 56
• To display all packets that are less than 60
bytes:
# tcpdump -x less 60
traceroute
• examines and records the path to a specified network
destination.
• uses the Time-To-Live (TTL) field contained within an IP
packet and attempts to obtain an ICMP TIME_EXCEEDED
message from each host along the route to the destination
• coupled with an attempt to attach to the destination at an
unreachable port, it will cause a systematic response from
every router along the path to the ultimate destination
traceroute
• to display the IP path between the local system running
traceroute and the destination system called Vermeer:
• The first packet sent is an ICMP request packet with the TTL
field set to 1. With IP, any packet that reaches the router
decrements the TTL by 1, which makes it 0.
traceroute
• When a router gets a packet and the
TTL is 0, it is supposed to discard the
packet and notify the sender. This
forces the router to respond with a
TIME_EXCEEDED message back to
monet. After this happens, traceroute
measures the amount of time
between when it sent the packet and
when it obtained the reply. This is
known as the round-trip time, or RTT,
and is displayed in milliseconds
(1,000th of a second) as shown after
the hostname and IP address
information. This implies that the RTT
of the first series of probe packets
took 4.25 milliseconds (or .004
seconds), and the third series took
2.89 milliseconds (or .028 seconds).
traceroute
• The second line details the second
routing hop and shows that
traceroute reached the destination
system vermeer with slower RTT
times than the first. When the second
probe was sent, the router
decremented the TTL, and then
passed this packet to vermeer.
Because traceroute is attempting
• to access an unused port, vermeer
responds with the PORT
UNREACHABLE error. In fact, as a
general rule on large (and sometimes
small) networks, performance
between systems and networks can
(and will) vary a significant amount
even from one moment to the next.
Conclusion
Security
• Security is freedom from risk or danger; safety
• Security is about protecting things of value to any party in
relation to the possible risks - incl material & intellectual
assets
• Security is huge and increasingly important problem because
computer systems are getting more and more complex
• No. of attacks & break-ins to computer systems keep on
increasing every year
Introduction
• Anything that can cause a failure that would then result in
loss is considered a threat
• A risk is the likelihood of a threat successfully exploiting a
vulnerability and the estimated cost (or potential damage)
both in the short and long term you may incur as a result.
• Things to protect (the list is keep increasing):
• Integrity
• Confidentiality/Privacy
• Availability
• Reliability
Introduction
• Risk is the possibility of suffering harm or losses;
danger
• Suffering harm or losses from:
• Access to data
• integrity of data
• availability of services
• reputation
• monetary loss due to any of the above
• monetary loss due to physical items of actual value
Introduction
• “Risk Assessment”
• identify assets
• identify threats
• identify vulnerabilities
• determine likelihood of damage
• estimate cost of recovery
• estimate cost of defense
Introduction
Access and Privilege
• A fundamental of prerequisite for security is the ability to
restrict access to data.
• This leads directly to a notion of privilege (access level) for
certain users
Four Independent Issues
• Burgess states that there are four basic elements of
security:
• Privacy or confidentiality - restriction of access
• Authentication - verification of presumed identity
• Integrity - protection against corruption or loss
(redundancy)
• Trust - underlies every assumption
• Additional points from other authors:
• Availability - preventing disruption of a service
• Non-repudiation - preventing deniability of actions
Security Characteristics
• A system can be compromised by:
• Physical threats - natural disasters, bombs, power failures
etc
• Human threats – hacking, cracking, stealing, trickery,
bribery, spying, sabotage, accidents
• Software (logical) threats - viruses, trojan horses, logic
bombs, denial of service etc
Physical Security
• Remember that who has physical access to a
machine can control the machine!
• Consider:
• tamper-proof, locking cases
• door locks, window bars
• biometric identification
• security cameras, motion detectors etc.
Physical Security
• Hosts, disks, network lines (incl.
wireless) can be intercepted
• Radiation from monitor screens
can be captured and listen to
traffic
• The simplest information theft is
while a person is typing his/her
password
• …don’t forget that Kevin Mitnick
used what’ve been thrown in the
trash bin as a source of his
hacking activity
Trust Security
• We need to understand where we need to place the trust so
that it would not be exploited by attackers
• e.g. host that share users’ home-directories trusts the
identities & personal integrity of the users on the hosts which
mount those directories
• su, files i.e. .rhosts, hosts.equiv (on unix) grant root
privileges to other hosts without the need for
authentication!!
Types of Vulnerabilities
• Denial of Service
• Privilege Escalation
• Backdoor
• Direct Access
• Privacy Leak
• Social Engineering
Practical System Security
• Authentication, Passwords and Permissions
• System Integrity
• Data and Network Traffic Encryption
Practical System Security
• Encryption can help mitigate some of the risks
sometimes.
• It may provide security in the areas of:
• Secrecy or Confidentiality
• Accuracy or Integrity
• Authenticity
Practical System Security
• All of previous system are subject to your, your users
and other peoples
• ignorance
• laziness
• malice
• SSL/TLS
• Cryptographic system standard widely used in
sensitive browser–Webserver communication
• Used almost every time you buy online
• URL has https:// instead of http://
• Medium-strength security
• Easy to implement because built into every
browser and Webserver already
• Cannot protect all applications—used mostly for
the World Wide Web and e-mail
Cryptographic Systems
• IPsec
• Protects IP packets and all of their embedded
contents
• So automatically protects all applications