Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Applied Network Security
Applied Network Security

Applied Network Security: Proven tactics to detect and defend against all kinds of network attack

Arrow left icon
Profile Icon Warun Levesque Profile Icon Salmon Profile Icon Michael McLafferty
Arrow right icon
Free Trial
Paperback Apr 2017 350 pages 1st Edition
eBook
S$36.99 S$52.99
Paperback
S$66.99
Subscription
Free Trial
Arrow left icon
Profile Icon Warun Levesque Profile Icon Salmon Profile Icon Michael McLafferty
Arrow right icon
Free Trial
Paperback Apr 2017 350 pages 1st Edition
eBook
S$36.99 S$52.99
Paperback
S$66.99
Subscription
Free Trial
eBook
S$36.99 S$52.99
Paperback
S$66.99
Subscription
Free Trial

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
Table of content icon View table of contents Preview book icon Preview Book

Applied Network Security

Sniffing the Network

In this chapter, we will focus on the various tools and methods used to monitor network traffic. The objective for this chapter is to help the reader gain an understanding of Nmap, Wireshark, and the importance of monitoring a network for potential attacks. This chapter will provide the most common commands used in Nmap. We will provide screenshots and demonstrate how to use the syntax. In this chapter, we will mostly focus on two main network monitoring tools. We will discuss Nmap first because it is a command-line-based tool. Nmap also has a GUI-based version, known as Zenmap. There are advantages to developing your skill with command-line-based tools. They will allow you to gain a better understanding of how the tools function and allow you more flexibility, dependability, and control. GUI-based monitoring tools such as Wireshark also have advantages; we will discuss this in this chapter...

What is network sniffing?

Network sniffing is a collection of packet data that is transmitted throughout the network. Network sniffing is also known as packet analysis. There are different types of network sniffers. Two of the most common are Ethernet sniffers and wireless sniffers. A network sniffer is a piece of software or hardware that can capture and log network traffic.

Nmap is a popular network sniffing tool used by many cyber security professionals. Before using this tool, you must learn how to install it. You also need to be able to check the version and locate the user manual. It is recommended that you use Kali Linux as the operating system when using Nmap. Kali Linux comes with many pre-installed tools such as Nmap and Wireshark. If you are using a version of Linux without pre-installed tools, you must perform a fresh install. The best and most efficient way to install Nmap is to clone the repository...

Lab 1-a scan to search for DDoS reflection UDP services

Scan for UDP DDoS reflectors nmap -sU -A -PN -n -pU:19,53,123,161 -script=ntp-monlist,dns-recursion,snmp-sysdescr 192.168.1.0/24

This Nmap command will scan a target list for systems with open UDP services that allow reflection attacks to take place:


Using Wireshark filters

If you're not familiar with Wireshark, then you'll soon find out how powerful and effective this tool can be. Wireshark is a packet analyzer software that's open source and free to use. It can be used to troubleshoot networking issues and hunt down malicious activities. Basically, every bit (literally) of information that flows in and out of a network can be captured and dumped into a single location. Then we can take our time analyzing this information, using filters to narrow down our search. As of writing this book, the current version of Wireshark is 2.2.2, but always make sure that yours is up-to-date:

  1. When you launch Wireshark, you should see the following screen. You will need to select the interface you want to scan on, depending on whether you use an Ethernet or a wireless connection. I am connected via Wi-Fi, so that is what I choose. Yours may be named differently...

Wireshark filter cheat sheet

This will only show packets containing the selected IP address. This can be either the source or the destination IP:

ip.addr ==x.x.x.x

This will show the communication between two IP addresses, which can be from the direction of the source or the destination:

ip.addr ==x.x.x.x && ip.addr ==x.x.x.x

You could also just type in the name of the protocol that you want to see:

http or dns

This filter will only show the TCP packets that are passing through the specified port number:

tcp.port==xxx

You may further specify the details of this filtering option to narrow your search of the TCP packets:

tcp.flags.reset==1

To identify certain types of web traffic, such as requests that are being made to certain websites on the network, enter the following:

http.request

Put an exclamation in front followed by the initial parentheses:

!(arp or icmp or dns)

tcp contains searches for exact...

Lab 2

Another tool used for network scanning is Sparta. The following lab demonstrates how this tool works. For this lab, we are using Kali Linux running in VMware.

Sparta is built into Kali 2.0, but if you don't have it, you can get it from the Kali repository by typing kali > apt-get install Sparta:

  1. To get started, open a terminal window and type sparta. The following screenshot demonstrates the first screen you will see:
  1. When you click on it, a GUI resembling the following will open:
  1. Once Sparta has started, we need to add some hosts. If we click on the space that says Click here to add host(s) to scope, it opens a window where we can add IP addresses or the range of IP addresses we want to scan. We are also able to use CIDR notation to indicate an entire subnet, such as 192.168.181.0/24:
  1. After adding our IP host range in the window, click Add to scope. Sparta will start scanning your hosts...

Sparta

One of the best features of Sparta is that it integrates so many tools into one single GUI. When we click on the Tools tab, Sparta displays the numerous tools that we can apply to this target system, including the following:

  • Mysql-default
  • nikto
  • Snmp-enum
  • Smtp-enum-vrfy
  • Snmp-default
  • Snmp-check

Brute-force passwords

Sparta can also brute-force passwords. Using hydra, you can specify the IP, port, and service, then brute-force it:

For those who want a single scanning and enumeration tool with an easy-to-use GUI, Sparta is the perfect reconnaissance tool.

Lab 3-scanning

The following demonstration will be a more detailed Nmap lab to reinforce what you have learned earlier in the chapter. This lab uses Kali Linux running in VMware:

  1. Open Nmap in Kali.
  2. Open a terminal in Kali and type nmap.

When you do so, Nmap will display its help screen, as shown in the following screenshot:

  1. Let's try to use the -sS and -sT scans.

Using Nmap's basic syntax, type in the following:

          nmap <scantype> IP address

We get results like those shown in the following screenshot, showing all of the TCP ports that are open on our target machine and the default service for each port:

  1. Next, we can scan for a specific port or port range.

Nmap uses the -p switch to designate a port or port range. So, if we were only looking for ports 100-200, we could use the following:

          kali > nmap 192.168.10.70 -p100-200

As you can see, this command scans and reveals...

Scanning a subnet

Often, we want to scan more than a single IP address. Nmap allows us to use CIDR notation to designate an entire subnet. So, for instance, to scan on the entire class C subnet (256 hosts), type nmap 192.168.10.0/24:

Spoofing and decoy scans

When we are scanning machines that are not ours, we often want to hide our IP (our identity). Obviously, every packet must contain our source address or else the response from the target system will not know where to return to. The same applies to spoofing our IP when using Nmap. We can spoof our IP address (-S) in Nmap, but as a result, any response and any info we are trying to gather will return to the spoofed IP. Not very useful if we are scanning in order to gather info. A better solution is to obfuscate...

Evading firewalls

Many firewalls and routers block or drop the ICMP (echo request and echo reply) ping. This is meant to obscure the presence of the hosts behind the firewall and protect against a possible DoS using the ping packet. When you use Nmap to scan a system or network, by default, it sends out a ping to see if the host is up. If it gets a response, it then sends the specified packets to scan the system. If the ping is blocked or dropped, Nmap gives up and says, host is down. To get around firewalls and routers that block or drop the ping, we need to suppress Nmap's default behavior of sending out that initial ping and get past the firewall that is blocking us. We can do this by using the -P0 switch. Type nmap -sS -P0 192.168.10.70:

Gathering version info

When Nmap runs a port scan, it retrieves the port info (open/closed/filtered) and then gives us the default service that is running on that port. As one can run any service on any port, that may not be adequate information. If our attack requires a particular service on a particular port, gathering the default information may not be enough. We need to know what service is actually running on that port, not the default service. For instance, knowing that port 80 is open and running HTTP is good to know, but if our attack is specific to Apache, and the target has Microsoft's IIS running on that port, it won't work. We often need the service on the port.

Nmap has a feature that interrogates the service running on each port scanned. It can be used with the -sV switch. Type nmap -sV 192.168.10.70:

Note that, in the output we received, the server is running an older version of IIS on...

Starting the listener

First, we need to start our listener:

  1. Open Metasploit by typing msfconsole.
  2. Type use exploit/multi/handler.
  3. As stated before, we will be using meterpreter reverse_tcp payload. To set the payload, type the following:
      set payload windows /meterpreter/reverse_tcp

This module doesn't have any settings that we can touch by default, so we need to add a payload. This tells the module what sort of reverse shell we're listening for; it'll help manage it for us:

  • use exploit/multi/handler: handles the incoming connection
  • set payload windows/meterpreter/reverse_tcp: reverses the TCP payload
  • show options: shows the available options to set
  1. We also need to set up the LHOST and LPORT and make sure they're the same as the ones you set up in Step 3.

Then type Set lhost 192.168.10.50 Set lport 8080:

          Set lhost 192.168.10.50
          Set lport 8080
  1. Our handler is...

Summary

In this chapter, we went over how to use Nmap and Wireshark to monitor network traffic. You are now able to use both these tools, since you have an understanding of the commands and filter syntax. By using what you have learned in this chapter, you can now monitor a network for signs of attack. With this knowledge, you can be effective in stopping network attacks before they can do serious damage. You also learned about two valuable tools that can also diagnose non-malicious network anomalies. It is recommended that you master the use of Wireshark and study for a certification in its use. Many employers in the network security field are impressed with extensive knowledge of tools such as Wireshark.

In later chapters, we will discuss other network security tools that can be used in combination with Wireshark.

Left arrow icon Right arrow icon

Key benefits

  • Deep dive into the advanced network security attacks and techniques by leveraging tools such as Kali Linux 2, MetaSploit, Nmap, and Wireshark
  • Become an expert in cracking WiFi passwords, penetrating anti-virus networks, sniffing the network, and USB hacks
  • This step-by-step guide shows you how to confidently and quickly detect vulnerabilities for your network before the hacker does

Description

Computer networks are increasing at an exponential rate and the most challenging factor organisations are currently facing is network security. Breaching a network is not considered an ingenious effort anymore, so it is very important to gain expertise in securing your network. The book begins by showing you how to identify malicious network behaviour and improve your wireless security. We will teach you what network sniffing is, the various tools associated with it, and how to scan for vulnerable wireless networks. Then we’ll show you how attackers hide the payloads and bypass the victim’s antivirus. Furthermore, we’ll teach you how to spoof IP / MAC address and perform an SQL injection attack and prevent it on your website. We will create an evil twin and demonstrate how to intercept network traffic. Later, you will get familiar with Shodan and Intrusion Detection and will explore the features and tools associated with it. Toward the end, we cover tools such as Yardstick, Ubertooth, Wifi Pineapple, and Alfa used for wireless penetration testing and auditing. This book will show the tools and platform to ethically hack your own network whether it is for your business or for your personal home Wi-Fi.

Who is this book for?

This book is for network security professionals, cyber security professionals, and Pentesters who are well versed with fundamentals of network security and now want to master it. So whether you’re a cyber security professional, hobbyist, business manager, or student aspiring to becoming an ethical hacker or just want to learn more about the cyber security aspect of the IT industry, then this book is definitely for you.

What you will learn

  • Use SET to clone webpages including the login page
  • Understand the concept of Wi-Fi cracking and use PCAP file to obtain passwords
  • Attack using a USB as payload injector
  • Familiarize yourself with the process of trojan attacks
  • Use Shodan to identify honeypots, rogue access points, vulnerable webcams, and other exploits found in the database
  • Explore various tools for wireless penetration testing and auditing
  • Create an evil twin to intercept network traffic
  • Identify human patterns in networks attacks

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Apr 28, 2017
Length: 350 pages
Edition : 1st
Language : English
ISBN-13 : 9781786466273
Category :
Tools :

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details

Publication date : Apr 28, 2017
Length: 350 pages
Edition : 1st
Language : English
ISBN-13 : 9781786466273
Category :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just S$6 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just S$6 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total S$ 208.97
Applied Network Security
S$66.99
Penetration Testing Bootcamp
S$66.99
Mastering Python Networking
S$74.99
Total S$ 208.97 Stars icon

Table of Contents

17 Chapters
Introduction to Network Security Chevron down icon Chevron up icon
Sniffing the Network Chevron down icon Chevron up icon
How to Crack Wi-Fi Passwords Chevron down icon Chevron up icon
Creating a RAT Using Msfvenom Chevron down icon Chevron up icon
Veil Framework Chevron down icon Chevron up icon
Social Engineering Toolkit and Browser Exploitation Chevron down icon Chevron up icon
Advanced Network Attacks Chevron down icon Chevron up icon
Passing and Cracking the Hash Chevron down icon Chevron up icon
SQL Injection Chevron down icon Chevron up icon
Scapy Chevron down icon Chevron up icon
Web Application Exploits Chevron down icon Chevron up icon
Evil Twins and Spoofing Chevron down icon Chevron up icon
Injectable Devices Chevron down icon Chevron up icon
The Internet of Things Chevron down icon Chevron up icon
Detection Systems Chevron down icon Chevron up icon
Advance Wireless Security Lab Using the Wi-Fi Pineapple Nano/Tetra Chevron down icon Chevron up icon
Offensive Security and Threat Hunting Chevron down icon Chevron up icon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.