Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
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
Learning zANTI2  for Android Pentesting
Learning zANTI2  for Android Pentesting

Learning zANTI2 for Android Pentesting: Dive into the world of advanced network penetration tests to survey and attack wireless networks using your Android device and zANTI2

Arrow left icon
Profile Icon Vitula
Arrow right icon
NZ$14.99 NZ$31.99
eBook Aug 2015 134 pages 1st Edition
eBook
NZ$14.99 NZ$31.99
Paperback
NZ$39.99
Subscription
Free Trial
Arrow left icon
Profile Icon Vitula
Arrow right icon
NZ$14.99 NZ$31.99
eBook Aug 2015 134 pages 1st Edition
eBook
NZ$14.99 NZ$31.99
Paperback
NZ$39.99
Subscription
Free Trial
eBook
NZ$14.99 NZ$31.99
Paperback
NZ$39.99
Subscription
Free Trial

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

Learning zANTI2 for Android Pentesting

Chapter 2. Scanning for Your Victim

As you might've guessed already, a scan is something essential, especially in our case of performing MITM-type of attacks and whatnot. Without completing a successful scan, we would not be able to perform a successful attack. In this chapter, we're going to:

  • Learn what scanning and network discovery is
  • Find out the different types of scans and categories zANTI provides
  • Understand what each scan one does
  • Identify which method is best suited for a particular scenario

Network discovery

Let's proceed to the stage of looking around: detecting victims and scanning. Imagine this situation as the one over a shooting range: you grab your weapon (zANTI2, in our case), aim and shoot. You have to aim for your target, obviously—otherwise, you would not hit it. The same thing applies to our case—we need to trace and find the target before we shoot. And that's what the scan does.

Now, when you're familiar with the interface of the lovely app, it should not be a problem to perform a successful scan on a target. If you're still confused about how to trigger a proper scan, let's go trough the process once more.

To avoid any confusion, there are two scan types. Both are used for scanning, but one for a general network discovery (called network mapping) and the other one for a slightly more detailed scan performed on a single target. Let's talk about the first one first, the network discovery.

Network discovery is essential,...

Open or closed?

I've mentioned open ports. I guess I'll explain this a bit more because this is something you should probably know before getting into the game.

Although Nmap is now one of the best scanning software out here, it started as a port scanner. It's a simple but efficient port scanner. The simple command nmap on target scans 1000 TCP ports on it. You've probably heard of open or closed ports, but in fact Nmap divides ports into six states:

  • Open
  • Closed
  • Filtered
  • Unfiltered
  • Open|filtered
  • Closed|filtered

First, let's explain open and closed ports. If a host is accepting Transmission Control Protocol (TCP) connections, User Datagram Protocol (UDP) datagrams, or Stream Control Transmission Protocol (SCTP) associations, we call this port opened.

Finding open ports is often the main goal of port scanning, considering that each open port is vulnerable to attacks. Hackers are attacking these, while system administrators are trying to protect them from unwanted connections...

Scan types

In some cases, you are looking to determine whether the host is up, and in some cases, you want to really dig deep and find out as much information as possible from the target. Sometimes, you want to detect if the OS target is running, so you can determine whether there are any possible exploits on it. Nmap offers a fine amount of scan types, which let you investigate and find the exact information just the way you want. Let's have a look at the ones available through zANTI2:

Scan types

In zANTI2, the advanced scanning can be triggered for individual targets only. After you're done with network mapping, choose one of the targets and select Scan to perform advanced scanning on target, as the app says.

Scan types

You'll find yourself in a new activity window with these three options. The first option, Scan type, lets you choose the type of scan triggered on the target. There are many scan types including regular, intense, or ping that you will get to know more about in a jiffy. The Execute...

Run script

Run script, as the title suggests, executes one of the available scripts. This option triggers the Nmap Scripting Engine and fires one of the scripts available from the huge index of scripts available in the Nmap archive. We'll get to this in a jiff because there's more to talk about.

Intense scan

Intense scan is a very detailed, comprehensive scan. Logically, this means the intense scan may take up much more time scanning than the others will probably take, though it may come in useful when you want accurate results. This scan does the following scans and detections to reach the most accurate result as possible:

  • OS detection
  • Version detection
  • Script scanning
  • Traceroute

Let's cover these first. OS detection does a detailed detection of operating system running on a host. Nmap does this scan by stack fingerprinting, which works by sending series of TCP/UDP packets and then monitoring the response from the target. This scan is one of the best-known scans of Nmap. More about OS detection is given on the following pages.

The version detection is, described by Nmap, a high speed, parallel the operation via nonblocking sockets and a probe definition grammar designed for efficient yet powerful implementation. Version detection determines the application name and version number...

Network discovery


Let's proceed to the stage of looking around: detecting victims and scanning. Imagine this situation as the one over a shooting range: you grab your weapon (zANTI2, in our case), aim and shoot. You have to aim for your target, obviously—otherwise, you would not hit it. The same thing applies to our case—we need to trace and find the target before we shoot. And that's what the scan does.

Now, when you're familiar with the interface of the lovely app, it should not be a problem to perform a successful scan on a target. If you're still confused about how to trigger a proper scan, let's go trough the process once more.

To avoid any confusion, there are two scan types. Both are used for scanning, but one for a general network discovery (called network mapping) and the other one for a slightly more detailed scan performed on a single target. Let's talk about the first one first, the network discovery.

Network discovery is essential, no doubts about that. Without this function, you...

Open or closed?


I've mentioned open ports. I guess I'll explain this a bit more because this is something you should probably know before getting into the game.

Although Nmap is now one of the best scanning software out here, it started as a port scanner. It's a simple but efficient port scanner. The simple command nmap on target scans 1000 TCP ports on it. You've probably heard of open or closed ports, but in fact Nmap divides ports into six states:

  • Open

  • Closed

  • Filtered

  • Unfiltered

  • Open|filtered

  • Closed|filtered

First, let's explain open and closed ports. If a host is accepting Transmission Control Protocol (TCP) connections, User Datagram Protocol (UDP) datagrams, or Stream Control Transmission Protocol (SCTP) associations, we call this port opened.

Finding open ports is often the main goal of port scanning, considering that each open port is vulnerable to attacks. Hackers are attacking these, while system administrators are trying to protect them from unwanted connections using known security tools...

Scan types


In some cases, you are looking to determine whether the host is up, and in some cases, you want to really dig deep and find out as much information as possible from the target. Sometimes, you want to detect if the OS target is running, so you can determine whether there are any possible exploits on it. Nmap offers a fine amount of scan types, which let you investigate and find the exact information just the way you want. Let's have a look at the ones available through zANTI2:

In zANTI2, the advanced scanning can be triggered for individual targets only. After you're done with network mapping, choose one of the targets and select Scan to perform advanced scanning on target, as the app says.

You'll find yourself in a new activity window with these three options. The first option, Scan type, lets you choose the type of scan triggered on the target. There are many scan types including regular, intense, or ping that you will get to know more about in a jiffy. The Execute script option...

Run script


Run script, as the title suggests, executes one of the available scripts. This option triggers the Nmap Scripting Engine and fires one of the scripts available from the huge index of scripts available in the Nmap archive. We'll get to this in a jiff because there's more to talk about.

Intense scan


Intense scan is a very detailed, comprehensive scan. Logically, this means the intense scan may take up much more time scanning than the others will probably take, though it may come in useful when you want accurate results. This scan does the following scans and detections to reach the most accurate result as possible:

  • OS detection

  • Version detection

  • Script scanning

  • Traceroute

Let's cover these first. OS detection does a detailed detection of operating system running on a host. Nmap does this scan by stack fingerprinting, which works by sending series of TCP/UDP packets and then monitoring the response from the target. This scan is one of the best-known scans of Nmap. More about OS detection is given on the following pages.

The version detection is, described by Nmap, a high speed, parallel the operation via nonblocking sockets and a probe definition grammar designed for efficient yet powerful implementation. Version detection determines the application name and version number where...

Device type


All fingerprints that are examined by Nmap carry a general type of device (target)—this might be router, firewall, printer, or general purpose device—here, we can see the target listed as general purpose/phone. If Nmap is unsure about multiple results, it will show both of them, separating these with the pipe symbol (router|firewall).

Running


This line shows the OS family and if available; it also shows the OS generation (Linux 2.4.x, for instance). When Nmap cannot narrow down the generations, multiple OSes can be listed, divided by a pipe symbol. If Nmap finds too many OS families, it will omit this line. When there are no perfect matches for the OS family, Nmap adds an accuracy percentage (where 100 percent is a perfect match) after each possible candidate. If Nmap finds no close matches to fingerprints, the line is omitted.

OS CPE


OS CPE shows common platform enumeration (CPE) of the OS. CPE is a standardized way to name software apps, OSes, and hardware platforms. CPE typically contains seven fields:

cpe:/<part>:<vendor>:<product>:<version>:<update>:<edition>:<language>

Some fields, however, can be left blank or even left off. If you take a look at the preceding screenshot, you can see there are five fields listed, one of which is left blank.

You may be wondering what does the o stands for in the cpe:/o: field in the beginning.

To clarify O stands for operating systems, A for applications, and H for hardware platforms. If you take a look at the picture, it lists four possible OSes. It's clear that the target is running Windows 7 Professional operating system, which turns out to be correct. Moving on!

OS Details


This line gives the details about each (matched) fingerprint. If there are multiple matches, all of these are listed and separated by comma (have a look at the image). If there are not any perfect fingerprint matches, the field is renamed to Aggressive OS guesses and fingerprints with a percentage of accuracy of matches are shown.

Network distance


Network distance lists how many routers are between you and your target—the distance for localhost is 0, 1 for a device on the same network segment. Each additional router on the path adds one hop to the count. Again, the line is omitted if Nmap cannot compute it (due to no reply to the relevant probe).

Uptime guess


Not visible on the preceding screenshot, but still a part of OS detection, Nmap tries to determine the approximate uptime of the remote system. Nmap receives several SYN/ACK TCP packets in a row and checks the headers for a timestamp option. Many operating systems use a simple counter starting with zero at boot time and counting during the uptime. By checking the responses, Nmap can determine these values and print these in the scan log.

The uptime guess is marked as a guess because there are several things that can make it very inaccurate. For instance, some operating systems do not start the counter at zero but initialize it with a random value instead.

TCP sequence prediction


It is possible to make a full connection to a system with a poor TCP initial sequence number and perform a blind TCP spoofing attack on them. This kind of attack was the most popular one in the '90s when people used rlogin, which is a remote shell client (like SSH) that allows users to log in on another host via network, communicating using TCP port number 513. In December 1994, Kevin Mitnick had supposedly used this attack to break into Tsutomu Shimomura's (computer security expert, currently CEO of Neofocal Systems) computers. Luckily, almost nobody uses rlogin anymore. However, blind TCP spoofing may still be effective for HTTP requests.

Now, you might be surprised with the log. What does the good luck comment mean? Well, there is an estimated difficulty of how hard the system makes blind IP spoofing (where 0 is the easiest).

These comments are based on this index, starting from trivial joke to easy, medium, formidable, worthy challenge, and finally ending with good...

IP ID sequence generation


This field describes the ID generation algorithm recognized by Nmap, showing a possible vulnerability (to TCP Idle scan, for instance) in the system. However, many systems use a different IP ID for each host they communicate with. In this case, they may appear vulnerable while in fact being secure against the attacks.

Have a look at the scan results of the Intense scan. If you look carefully, the Nmap log shows many more then expected. Notice the port scan, showing four open ports, two of which have been diagnosed with version numbers.

Also, notice the warning line saying the OS scan results may not be reliable because Nmap was not capable of finding at least one open and one closed port.

If a message like this shows up, keep in mind that the OS scan loses its accuracy.

The uptime shows up to be somewhere around two days, which in this case, seems to be quite correct.

Let's move on to the other scan types. Whereas the Intense scan is the most comprehensive and accurate...

Ping scan


Ping scan is a quick type of scan that only finds out whether the target is up—it does not scan for ports.

This scan is potentially useful in situations when you're unsure whether the target is up or not to perform more time-consuming actions on it and not waste the time waiting for the results.

In this case, the host seems to be up with 0.014 s latency. In case you don't know, latency is the delay from input into a system, to the desired outcome. We generally recognize three types of latency: Internet, WAN, and Audio latency.

Quick scan and OS detection


Quick scan is slightly faster than the Intense scan by limiting the number of TCP ports scanned to only the top 100 most common TCP ports and by using a more aggressive timing template. This scan, also known as quick scan plus also performs OS detection along with the version detection (that was explained a few pages ago). The best example of usage would be mainly for the OS detection itself, as it's the fastest way to retrieve OS and version info in the shortest amount of time, considering the other scans (Intense and Comprehensive scan) take more time.

Quick traceroute


Quick traceroute traces the paths to target; it does not perform a scan on them. Traceroute is included in the Intense scan and is mostly used for network analysis.

As mentioned, the RTT marks the length of time it takes for a signal to be sent plus the length of time it takes for an acknowledgment of the same signal to be received. In Microsoft Windows, the traceroute is included by way of the tracert command, which basically does the same on websites, tracking the response time redirections. Traceroute is often used by hackers, who use this tool to map the network nodes and get general information about the whole net architecture, making it easy to find and investigate a weak link on the network area. This is one of the reasons some webs block traceroute through utilities such as Firewall to prevent this easy network mapping on the whole net.

Left arrow icon Right arrow icon

Description

A penetration test is one of the most important methods to secure a network or any individual machine. Having knowledge of these methods can enable a user to protect himself/herself from any kinds of attacks. Penetration tests can also be used to discover flaws or loop holes in one's security system, which if not fixed, can be exploited by an unwanted entity. This book starts off with an introduction to what penetration testing is, and how it can be performed on Android using zANTI2. Once you are aware of the basics, we move on to teach you the different types of scans that can be performed to search for targets. You will then learn how to connect to open ports and intrude into an unsecured computer. From here you will explore vulnerabilities and their usage, including ShellShock and SSL Poodle vulnerability. When connected to an open network, a user is susceptible to password and session hijacking, and a number of other cyber attacks. The book therefore ends with one of the main aspects of cyber security: the Man in the Middle attack. You will get to know everything about the MITM attack, how it works, and how one can be protected against it.

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Aug 31, 2015
Length: 134 pages
Edition : 1st
Language : English
ISBN-13 : 9781784396183
Category :
Languages :
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Aug 31, 2015
Length: 134 pages
Edition : 1st
Language : English
ISBN-13 : 9781784396183
Category :
Languages :
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 NZ$7 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 NZ$7 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total NZ$ 217.97
Advanced Penetration Testing for Highly-Secured Environments, Second Edition
NZ$96.99
Learning zANTI2  for Android Pentesting
NZ$39.99
Mastering Metasploit
NZ$80.99
Total NZ$ 217.97 Stars icon
Banner background image

Table of Contents

6 Chapters
1. Introducing Android Pentesting with zANTI2 Chevron down icon Chevron up icon
2. Scanning for Your Victim Chevron down icon Chevron up icon
3. Connecting to Open Ports Chevron down icon Chevron up icon
4. Vulnerabilities Chevron down icon Chevron up icon
5. Attacking – MITM Style Chevron down icon Chevron up icon
Index 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

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.