Complete Download Network performance and security : testing and analyzing using open source and low-cost tools 1st Edition Chapman - eBook PDF PDF All Chapters
Complete Download Network performance and security : testing and analyzing using open source and low-cost tools 1st Edition Chapman - eBook PDF PDF All Chapters
com
https://ebookluna.com/download/network-performance-and-
security-testing-and-analyzing-using-open-source-and-low-
cost-tools-ebook-pdf/
OR CLICK HERE
DOWLOAD NOW
https://ebookluna.com/product/ebook-pdf-cryptography-and-network-
security-principles-and-practice-7th/
ebookluna.com
https://ebookluna.com/product/ebook-pdf-computer-security-and-
penetration-testing-2nd-edition/
ebookluna.com
https://ebookluna.com/download/open-radio-access-network-o-ran-
systems-architecture-and-design-ebook-pdf/
ebookluna.com
(eBook PDF) Advanced Mathematical And Computational Tools
In Metrology And Testing X
https://ebookluna.com/product/ebook-pdf-advanced-mathematical-and-
computational-tools-in-metrology-and-testing-x/
ebookluna.com
https://ebookluna.com/download/penetration-testers-open-source-
toolkit-ebook-pdf/
ebookluna.com
https://ebookluna.com/download/cryptography-and-network-security-
principles-and-practice-global-edition-ebook-pdf/
ebookluna.com
https://ebookluna.com/product/ebook-pdf-cost-management-measuring-
monitoring-and-motivating-performance-3rd-canadian-edition/
ebookluna.com
Network Performance
and Security
Testing and Analyzing Using
Open Source and Low-Cost Tools
Chris Chapman
No part of this publication may be reproduced or transmitted in any form or by any means,
electronic or mechanical, including photocopying, recording, or any information storage and
retrieval system, without permission in writing from the publisher. Details on how to seek
permission, further information about the Publisher’s permissions policies, and our arrangements
with organizations such as the Copyright Clearance Center and the Copyright Licensing Agency
can be found at our website: www.elsevier.com/permissions.
This book and the individual contributions contained in it are protected under copyright by the
Publisher (other than as may be noted herein).
Notices
Knowledge and best practice in this field are constantly changing. As new research and experience
broaden our understanding, changes in research methods, professional practices, or medical
treatment may become necessary.
Practitioners and researchers must always rely on their own experience and knowledge in
evaluating and using any information, methods, compounds, or experiments described herein. In
using such information or methods they should be mindful of their own safety and the safety of
others, including parties for whom they have a professional responsibility.
To the fullest extent of the law, neither the Publisher nor the authors, contributors, or editors,
assume any liability for any injury and/or damage to persons or property as a matter of products
liability, negligence or otherwise, or from any use or operation of any methods, products,
instructions, or ideas contained in the material herein.
ISBN: 978-0-12-803584-9
Introduction to practical
security and performance
testing
1
This book is intended to help you practically implement real-world security and op-
timize performance in your network. Network security and performance is becoming
one of the major challenges to the modern information technology (IT) infrastruc-
ture. Practical, layered implementation of security policies is critical to the continued
function of the organization. I think not a week goes by where we do not hear about
data theft, hacking, or loss of sensitive data. If you dig deeper into what actually
happens with security breaches, what you read in the news is only a small fraction of
the true global threat of inadequate or poorly executed security. One thing that we all
hear when an article or a news item is released is excessive amounts of buzz words
around security, with little content about how it may have been prevented. The truth
is, security mitigation is still in its infant stages, following a very predictable pattern
of maturity like other network-based technologies. Performance is another critical
part of a well-performing network. Everyone knows they need it, but to test it and
measure it is not only a science, but also an art.
I assume that the reader of this book has a desire to learn about practical security
techniques, but does not have a degree in cyber security. I assume as a prerequisite
to implementing the concepts in this book, the reader has a basic understanding of IT
implementation, has a mid level experience with Windows and Active directory, and
has had some experience with Linux. Furthermore, my intent in this book is to mini-
mize theory and maximize real-world, practical examples of how you can use readily
available open source tools that are free, or relatively low cost, to help harden your
network to attacks and test your network for key performance roadblocks before and
during deployment in a production network. In fact, the major portion of theory that I
will cover is in this chapter, and the focus of that information will be on giving you a
baseline understanding in practical deployment and applications of security and per-
formance. I also assume noting, and will take you through execution of best practices.
objective. The threat risk to your network is generally in proportion to the value or
impact of the data in your network, or the disruption of your services no longer func-
tioning. Let me give a few examples to clarify this point. If your company processed
a high volume of credit card transactions (say you were an e-commerce business)
then the data stored in your network (credit card numbers, customer data, etc.) is a
high target value for theft because the relative reward for the criminals is high. (For
example, credit card theft in 2014 was as high as $8.6B [source: http://www.heritage.
org/research/reports/2014/10/cyber-attacks-on-us-companies-in-2014].) Or, if your
business handles very sensitive data, such as patient medical record (which gener-
ally have the patient-specific government issued IDs such as social security numbers
attached), you are a prime target. In either case, the value of data in your network
warrants the investment and risk of stealing it. Say, you are a key logistics ship-
ping company, the value to the attacker may be to disrupt your business, causing
wider economic impact (classic pattern for state-sponsored cyber terrorism [exam-
ple: http://securityaffairs.co/wordpress/18294/security/fireeye-nation-state-driven-
cyber-attacks.html]). On the other hand, if you host a personal information blog, it is
unlikely that cyber crime will be an issue. To put it bluntly, it is not worth the effort
for the attackers. The one variable in all of this is the people who attack network “be-
cause they can.” They tend to use open source exploit tools, and tend to be individu-
als or very small groups, but can be anywhere on the Internet. We have to be aware
of the relative value of our data, and plan security appropriately.
There are many ways of attacking a network, let us spend a few moments and
cover some of the basics of security and performance. If we divide attacks into their
classification, we can see the spread of class of attacks growing over time. What
types of attacks may you experience in the production network?
DDoS ATTACK
DDoS, or distributed denial of service, attacks are an attack class with the intent to
disrupt some element of your network by utilizing some flaw in a protocols stack (eg,
on a firewall), or a poorly written security policy. The distributivenes comes into play
because these attacks can first affect devices such as personal computer (PC) or mobile
device on the Internet, and then at a coordinated time, can attack the intended target.
An example would be a TCP SYN flood, where many attempted, but partial, TCP con-
nections are opened with the attempt to crash a service on the target. DDoS attacks may
also be blended with other exploits in multistage attacks for some multistage purpose.
BOTNET/WORM/VIRUS ATTACK
A botnet is a code that first attempts to install its self within the trusted portion of your
network, though combined and blended attacks may spread to other resources across
your network. A botnet has two possible objectives. First, spread as far and as fast as
it can within the target domain and then at a specified time, bring down elements in the
network (like PCs). Second, a botnet can quietly sit in the network, collect data, and
A baseline understanding of security concepts 3
“phone home” back to a predefined collection site over well-known protocols. This
is considered a scrapping attack because data are collected from behind your firewall
and sent over known-good protocols such as HTTP/HTTP(S) back home.
TROJAN HORSE
A trojan horse is a type of attack that embeds the malicious code in some other
software that seems harmless. The intent is to get the user to download, install, and
run the innocent software, which then will case the code to infect the local resource.
Another great example of this is infected content that is downloaded off of P2P net-
works such as Bittorent; the user runs the content and the malicious code is installed.
ZERO-DAY ATTACK
A zero-day attack is a traffic pattern of interest that in general has no matching patterns
in malware or attack detection elements in the network. All new attacks are characterized
initially as zero-day attacks.
KEYLOGGERS
A keylogger is a code that is installed by malware and sets on a device that has
keyboard input (like a PC) and records keystrokes. The hope of the keylogger is that
it will capture user login credentials, credit card number, government ID numbers,
which can later be sold or used. Keylogger can be deployed by botnets, or themselves
be deployed. Variants of keyloggers will look at other inputs and records. For ex-
ample, variant code may listen to your built-in microphone or record video from the
integrated camera (or just take periodic snapshots).
a login, capture data, and phone home or become purely malicious. This class of at-
tack is a good example of how attackers desire malicious code to be undetected for as
long as possible, especially when the exploit is attempting to collect data.
PHISHING ATTACK
A phishing attack can come in many forms, but generally focus on web content modifi-
cation and emails. The idea behind a phishing attack is to look legitimate, attempt the tar-
get to give sensitive data, and capture/sell the data for profit or use it for malicious means.
ROOTKIT
A rootkit is a special type of worm that can embed its self deeply into the operating
system (thus the “Root”) such that it can take over the system involuntarily. Rootkits
can be very difficult to remove and detect.
FIRMWARE VIRUS
A firmware virus will attempt to reflash elements that have firmware, such as your
hard drive or PC EFI. This is related to the rootkit family of attacks and in some
cases can physically destroy equipment. For example, a virus inserted in a hard drive
firmware can destroy the lower layer formatting of the drive, or corrupt TRIM setting
to accessibly use SSD memory cells to failure. On a server, EFI virus could increase
CPU core voltage and turn off fans to cause death by heat.
HIJACK ATTACK/RANSOMWARE
This class of attack attempts to take a legitimate active session and insert or redirect
data to a collector. For example, imagine an e-commerce session, where users ship-
ping and credit card information is captured. This class of attack is sometimes called
a “Man in the Middle” attack. In the case of Ransomware, the attack will shut down
the device functions and make the user pay, sometimes even a small amount, to “un-
lock” their PC. Attackers know that if a user pays, say $5, to “recover” their gear, it
may not be worth reporting. This, multiplied by millions, can be big business.
SPOOF/EVASION ATTACK
In this class of attack, the attacker intentionally rewrites Ipv4, UDP, and TCP fields
to try to hide from firewall rules. For example, if I take an attack and use IPv4 frag-
mentation, I might be able to hide the attack from the firewall policy rules, because as
the attacker, I hope the firewall pattern matching code does not cover this condition.
send malformed or excessive data to “crash” some or part of the application, firewall,
or any network element in between. Sometimes, this is called a knockdown attack.
PASSWORD ATTACK
This kind of attack uses automation to break a password by many iterations. There
are three types of approaches: Brute-force, dictionary, and hybrid attempts. This is
always a roll of the dice, but in some cases, especially with a dictionary technique,
attackers know users have poor password selection habits, and will try clusters of
known combinations first.
PENETRATION ATTACKS
A penetration attack is more complicated than other types of attacks, because it tends
to be multistage, distributed, and orchestrated. These types of attacks can be the most
damaging, because generally they require a level of sophistication and resources to
achieve their target. Many security breaches you might hear about in the news are
sophisticated penetration attacks, especially if there is a large volume of data theft.
Penetration attacks are like high stakes poker. It requires skills, patience, strategy,
and stages, but has very large payouts if successful.
MALWARE
Malware is a generic class of attack that may refer to distributed as trojans, worms,
botnets via applications, websites, or emails. Malware is the most prodigious form of
attacks, with Q4 millions of variants flowing through the Internet annually. It should
be noted that attacks can form hierarchies. For example, malware may be used to
insert rootkits or keyloggers. Malware may also insert other malware as a cascading
infection through your network.
the requirement of transacting business over the Internet is a critical mindset toward
security and performance of the modern network.
There are two really good websites that will show live attacks based on a world
map.
NorseIP (http://map.ipviking.com/) and Digital Attack Map (http://www.
digitalattackmap.com/#anim=1&color=0&country=ALL&list=0&time=16843&view
=map) will show live attacks based on country.
Both of these sites should be used to see patterns of attacks across the Internet.
The intent is to demonstrate scope and scale of attacks that happen daily.
DISTRIBUTED FIREWALL
Original firewalls were a single appliance with a trusted, untrusted, and DMZ net-
work connections. They would have a policy that would allow or drop conversations.
This model has evolved into a distributed firewall, which will allow you to write an
enterprise-wide policy and distribute it across key peering points in the network as
well as firewall nodes sharing threat information network wide. So what are some of
the functions of the modern firewall.
Access control
Access control is a Go/No-Go policy that looks at source, destination, and traffic and
makes a decision to allow or deny a conversation. It is considered “mild” security, but
is useful to deploy in a layered security model.
Location management
Where is the user geographically sourced. Are they from an approved location or not?
Security network elements 7
User management
Who specifically is using the application, and are they authorized?
Access times
Is this user allowed this workflow at this time, or not?
Workflow intelligence
Is this person allowed access to this par of the application or not?
Logging
Logging, or documentation of event to a central logging server, will keep a histori-
cal record of events. Logging can be very CPU intensive, so what and how you log
is critical. Best practice is to log negative events. In some jurisdictions, logging is
becoming a legal requirement.
Remote access/VPN
Remote access, generally subdivided into site-to-site (remote branch) and remote
access (point-to-point ) virtual private network (VPN), is a technology that creates a
tunnel through the Internet that is secure and encrypted. The main flavors are IPSec
(older) and SSL-VPN (newer).
IPS/IDS
The purpose of this element is to detect or prevent intrusion and perform some ac-
tion. Typically, this element will either be passively inline with traffic (IPS) to allow
it to block attack, or hang off of a network tap (IDS) such that the element will detect
and perform some action. For example, the IPS/IDS service contains a database of
patterns that predict an attack. If a traffic flowing through the appliance triggers three
patterns, and IDS will log the event, IPS will attempt to block the traffic.
PROXY SERVER
A proxy server is a device that will terminate TCP connections and regenerate them
on the outbound side. Typically, the user must configure the proxy server and port
number in the local application, such as the web browser. Proxy servers can be a
layer of protection, because they isolate traffic above TCP/UDP from the original
connections. This has the benefit of potentially blocking TCP-based attacks. Proxy
server should be considered a layer of security, but should never be deployed as the
exclusive element of security.
TOR NETWORK
“The Onion Router” (ToR) is an anonymity routing technology that hides the identity
of users through random path routing. A ToR shim is useful to evade specific pathways
(where people may be spying) since it picks paths randomly. ToR is not absolutely
secure, and must always be combined with other encryption to improve security.
8 CHAPTER 1 Introduction to practical security and performance testing
PERSONAL FIREWALL/ANTI-VIRUS/ANTI-MALWARE
This class of security object is typically installed on the desktop. They tend to per-
form “Leaf” analysis, inspecting the local file system and memory for infections.
They can use significant local resources, and generally require “syncing” to keep the
local database up to date. The implication of the personal firewall is two fold. First,
the firewall is only as good as the underlying technology used to scan traffic. It is
possible for a firewall to miss an attack because the scanning engine was not engi-
neered to detect the attack. Second, a firewall is only as good as its last database sync.
The implication is that periodic work is required for all nodes to keep up to date.
because the network can have a great experience factor for a full year, and users will
tend to not take that fact into consideration. When a user in the network perceives a
negative event such as a slow loading page, or disrupted voice quality on SIP, then
they place a very strong weight on the times the network did not work vs. the times
it did work. In general, users just expect the network and its services to just work all
the time. Furthermore, users frame their experience on the basis of the service, not the
protocol. What I mean by this is they will see the “CRM” is good or bad, not HTTP
and user experience is a measure perceived impairment for workflow within the ser-
vice. So what can go wrong in a service? These are divided into hard and soft errors.
HARD ERRORS
When a user cannot login (authentication problem) or receives a “404 page not
found” error a hard error occurs. These events can occur randomly, periodically, or
one shot. They are very measurable and discrete because the condition either exists
or does not exist. Hard errors have a lot of perceived weight by the user because it
directly prevents them from completing their task, increasing frustration. In addition,
a hard error can be weighed on the basis of when and where it occurs. For example,
if a user cannot log in to the CRM, the hard error impact on user experience can
range from annoying (low impact coefficient) to panic (high impact coefficient) on
the basis of the specific user condition and criticality of the desired user action. The
bottom line on hard errors is that they are never good, they contribute the greatest to a
negative user experience, they can be perceptually multiplied based on the user situa-
tion, and they take a very long time to balance out with well-performing workflows.
SOFT ERRORS
If a hard error is black and white, a soft error is a shade of gray. They tend to be
expressed as slowdown of a service which can occur randomly, periodic, or per-
sistently. The tendency of the user to notice a soft error is directly proportional to
critical nature of the service and where the user is within the workflow. Soft errors
impact the perception of quality in a meaningful but different way than more direct
hard errors. Whereas a hard error such as a page not found is perceived as a definite
failure, soft errors like slow loading pages, or high variability in page time loading
will cumulatively degrade the perception of quality over time. Users will assign more
negative impact to soft errors on the basis of frequency, cluster events, or if there is
a perceived pattern of slowdowns. For example, if a user between 8 and 9 am each
day sees the CRM system to be “slow” they will place much more negative influence,
such as a hard error coefficient, than if it happened “last Tuesday, one time,” which
tend to be more easily dismissed by the user. Users recognize patterns, and give extra
weight to those patterns.
Hard errors are remembered for long durations of time, especially if there is a
high coefficient of effect. This is then followed by pattern or clusters of soft er-
rors, followed by nonreoccurring soft errors. These experience events do also get
10 CHAPTER 1 Introduction to practical security and performance testing
e xamined by the users as a set. So seeing periodic hard errors and clusters of soft
errors dramatically lowers user experience.
landline phone network as a benchmark. MOS scoring was derived from this
study. It is assumed that MOS scoring is a factual and meaningful measure model
that predicts how users will judge voice quality. Given that we use the phone daily,
it should be considered a core service in the network.
We have to differentiate what we are measuring, an MOS score will measure an
impact of the network on voice, but that does not translate into excellent call quality.
Say, for example, the handsets have a bug or simple do not decode voice well, no
amount of network tuning will get you acceptable quality. It is strongly recommended
that you ask the handset and IP phone vendor to specifically test and demonstrate SIP
through their device. In addition, hard errors can also occur in specific SIP functions
such as bridging, call transfer, voicemail, etc. We will not cover these specific types
of hard error events, but you should be aware of them.
BANDWIDTH CONSTRICTION
Typically, there are many hops in the network between the client and the server. Band-
width constriction can happen anywhere in this chain, and tends to be a “weakest
12 CHAPTER 1 Introduction to practical security and performance testing
NETWORK LATENCY
Latency can play a big part in performance. Latency in a datacenter should be very
small (100’s of uSeconds). Across a WAN, on a point-to-point link, the natural “in
the ground” latency is approximately 1 mSec per 100 km of distance. The effect of
latency is that it can slow bandwidth and if latency is too high, TCP may time out,
reduce the window size, and try to recover, which is expensive to performance. Too
much latency can also effect audio quality, forcing a lower quality coded to be ne-
gotiated.
JITTER
This impairment is dynamic variation in latency across time. SIP stacks especially
do not like jitter. This impairment is impossible to eliminate, but should be managed
and capped at less than ±0.5% of the average latency, maximum.
The following illustrations from New Zealand are introduced here for
comparison.
Fig. 1100.—New Zealand house posts.
This suggests comparison with some of the Moki and British Guiana
figures.
The same authority gives on page 66, from the same island and
neighborhood, the illustration copied as the right-hand character of
the same figure.
By comparing some of the New Mexican, Zuñi, and Pueblo drawings
with the above figure the resemblance is obvious. This is most
notable in the outline of the square abdomen and the widespread
legs.
Fig. 1103.—Nicaraguan petroglyphs.
Fig. 1103, also mentioned and figured by Dr. Bransford as found with
the preceding in Nicaragua, resembles some of the petroglyphs
presented in the collection from Owens valley, California.
The carvings in Fig. 1104 are from British Guiana, and are
reproduced from im Thurn (i):
Fig. 1104.—Deep carvings in Guiana.
Dr. Ladisláu Netto (c) gives an account of characters copied from the
inscriptions of Cachoeira Savarete, in the valley of the Rio Negro,
here reproduced as Fig. 1109. They represent men and animals,
concentric circles, double spirals, and other figures of indefinite
form. The design in the left hand of the middle line evidently
represents a group of men gathered and drawn up like soldiers in a
platoon.
The same authority, p. 552, furnishes characters copied from rocks
near the villa of Moura in the valley of the Rio Negro, here
reproduced as Fig. 1110. They represent a series of figures on which
Dr. Netto remarks as follows:
The same authority, p. 522, gives carvings copied from the rocks of
the banks of the Rio Negro, from Moura to the city of Mañaus, some
of which are reproduced as Fig. 1111. The group on the left Dr.
Netto believes to represent a crowned chief, having by his side a
figure which may represent either the sun or the moon in motion,
but which, were it carved by civilized men, would suggest nothing
more remarkable than a large compass.
The same authority, p.
553, presents characters
copied from stones on the
banks of the Rio Negro,
Brazil, here reproduced as
Fig. 1112.
They are rather sketches Fig. 1112.—Brazilian pictograph.
or vague tracings and
attempts at drawing than
definite characters. The human heads found in most of the figures
observed at this locality resemble the heads carved in the
inscriptions of Central America and on the banks of the Colorado
river. The left-hand character, which here appears to be simply a
rude drawing of a nose and the eyes belonging to a human face,
may be compared with the so-called Thunderbird from Washington,
contributed by Rev. Dr. Eels (see Fig. 679).
Dr. E. R. Heath (b), in his Exploration of the River Beni, introducing
Fig. 1113, says:
Fig. 1113.—Brazilian petroglyphs.
SECTION 2.
HOMOMORPHS AND SYMMORPHS.
SKY.
Fig. 1117.—Sky.
With the above characters for sun compare the left-hand character
of Fig. 1121, found at Cuxco, Peru, and taken from Wiener (h).
In the pictorial notation of the Laplanders the sun bears its usual
figure of a man’s head, rayed. See drawings in Scheffer’s History of
Lapland, London, 1704.
The Ojibwa pictograph for sun is seen in the second character of Fig.
1121, taken from Schoolcraft (r). The sun’s disk, together with
indications of rays, as shown in the third character of the same
figure, and in its linear form, the fourth character of that figure, from
Champollion, Dict., constitutes the Egyptian character for light.
Fig. 1122.—Light. Red-Cloud’s Census. This is to be compared with
the rays of the sun as above shown, but still more closely resembles
the old Chinese character for light, or more specifically “light above
man,” in the left-hand character of Fig. 1123, reported by Dr. Edkins.
Fig. 1122.—
Light.
The other characters of the same figure are given by Schoolcraft (s)
as Ojibwa symbols of the sun.
The left-hand character of Fig. 1124, from Proc. U. S. Nat. Museum
(a), shows the top of an heraldic column of the Sentlae (Sun) gens
of the Kwakiutl Indians in Alert bay, British Columbia, which
represents the sun surrounded by wooden rays. A simpler form is
seen in the right character of the same figure where the face of the
sun is also fastened to the top of a pole. The author, Dr. Boas, states
that Fig. 1125 is the sun mask used by the same gens in their
dance. This presents another mode in which the common symbolic