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
$19.99 per month
Paperback Aug 2015 134 pages 1st Edition
eBook
$18.99 $21.99
Paperback
$26.99
Subscription
Free Trial
Renews at $19.99p/m
Arrow left icon
Profile Icon Vitula
Arrow right icon
$19.99 per month
Paperback Aug 2015 134 pages 1st Edition
eBook
$18.99 $21.99
Paperback
$26.99
Subscription
Free Trial
Renews at $19.99p/m
eBook
$18.99 $21.99
Paperback
$26.99
Subscription
Free Trial
Renews at $19.99p/m

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

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

Frequently bought together


Stars icon
Total $ 147.97
Advanced Penetration Testing for Highly-Secured Environments, Second Edition
$65.99
Learning zANTI2  for Android Pentesting
$26.99
Mastering Metasploit
$54.99
Total $ 147.97 Stars icon

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

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.