Security Audit

What, Why, and How of Penetration Testing

Published on: July 19, 2021

What, Why, and How of Penetration Testing

Penetration testing, also called Pentest, is a cybersecurity process that helps you stay ahead of hackers. In a pentest, an ethical hacker finds security vulnerabilities in your application, network, or system, and helps you fix them before attackers get wind of these issues and exploit them. This makes Pentesting a non-negotiable fundamental step for a website or business owner. Let’s dive deeper into what is penetration testing and what to expect from it.

What is penetration testing?

Penetration testing is the method to evaluate the security of an application or network by safely exploiting any security vulnerabilities present in the system. These security flaws can be present in various areas such as system configuration settings, login methods, and even end-users risky behaviors. Pentesting is required, apart from assessing security, to also evaluate the efficiency of defensive systems and security strategies.

Pentests are usually comprised of both manual or automated tests, which aim to breach the security of the application with proper authorization. Once the vulnerabilities are discovered and exploited, the client is provided with a detailed penetration testing report containing information about the scope of the test, vulnerabilities found, their severity, and suggestions to patch them up.

How does penetration testing differ from vulnerability assessment?

The term Penetration Testing appears in the latter half of the term VAPT, which stands for Vulnerability Assessment and Penetration Testing. Quite understandably, people confuse VA (Vulnerability Assessment) & PT (Penetration Testing) as the same process and use them interchangeably. Well, they are not and shouldn’t be swapped with one another. The difference between them is crucial when judging how it fits the requirements. Both are essential security evaluators that help in strengthening your application’s security standards.

The purpose of a vulnerability assessment is to find and alert the user of any security flaws present in the target. While penetration testing exploits the vulnerabilities found in VA to determine the extent of damage that can be done. Commonly vulnerability scans are automated processes, while pentestings are predominantly done manually.

Vulnerability assessments are mainly done by qualified technicians using automated tools, results of which are then compiled and attested. In comparison, pentesting is generally done by white hat hackers or ethical hackers. They are security experts and bring in the human element to break into a system. In pentesting, vulnerability assessment can be used in the initial steps to identify targets and potential attack vectors.

Cost is another factor that differentiates these two. Compared to pentesting, vulnerability assessments cost less. Vulnerability scan reports mainly contain a list of security vulnerabilities and a detailed description of these. While pentesting reports generally contain the vulnerabilities ranked according to their severity. ease of exploitation, and the extent of risk.

Both these processes are complementary in nature and are usually performed together, in a combined process called VAPT, or Security Audit.

What are the different approaches to penetration testing?

There are three approaches adopted by testers in regards to penetration testing, based on the information available and the type of weakness to be found:

1. White box

In a White box test, the testers have complete knowledge of the system and complete access. The objective of this approach is to conduct in-depth testing of the system and gather as much information as possible. The advantage, in this case, is that since the tester has unbridled access and knowledge of the system, including code quality and internal designs, the pentest can identify even remotely located vulnerabilities, thus giving a nearly complete picture of the security.

2. Black box

As you have guessed correctly, in this approach the tester has no knowledge of the system and designs the test as an uninformed attacker. This approach is the closest to a real-world attack and involves a high degree of technical skills. This approach has the longest duration and costs more than the white-box approach.

3. Gray box

As the name suggests, this approach stands midway between white and black box testing. The tester has only limited knowledge of the system. The advantage of this approach is that with the limited amount of knowledge, the tester has a more focused area of attack and thus avoids any trial-and-error method of attacks.

Penetration testing approaches (Source: Devopedia)

What are the different types of penetration tests?

1. Network pentesting

The objective of a network penetration test is to find vulnerabilities in the network infrastructure, either on-premise or cloud environment such as Azure Penetration Testing and AWS Penetration Testing. It is one of the basic tests, and a crucial one too to protect your data and the security of your application. In this test, a wide range of areas such as configurations, encryption, and outdated security patches, are tested and checked.

Network pentesting is further divided into types:

1.1 External pentest:

This scenario simulates an attack from an outsider with access to the internet and no prior knowledge of the system. The tester will attempt to break into your system by exploiting vulnerabilities from outside and access internal data and systems.

1.2 Internal pentest:

This is more concerned with testing your application from within and is focused on the internal environment. The pre assumption, in this case, is that the attackers have been able to breach the outer layer and are already within the network.

External threats are riskier than internal ones as gaining access to the internal networks is a result of a breach in the external security protocols. Thus, beginning with an external pentest is a good idea.

Below are some of the network pentests that are done:

  • Testing routers
  • Firewall bypasses
  • DNS footprinting
  • Evasion of IPS/IDS
  • Scanning and testing open ports
  • SSH attacks
  • Tests on proxy servers

2. Web application pentesting

The purpose of this is to uncover security lapses in websites, e-commerce platforms (like Magento, PrestaShop, etc.), customer relationship management software, and content management systems, among others. This test checks the entire application including custom-built functionalities and business logic, to protect against data breaches and other attacks.

Web Application Penetration Testing (Source: iicybersecurity)

With the rise in web-based applications, it is not strange that the huge amount of data stores and transmitted through these make for attractive targets to cyber attackers. Organizations and individuals with web apps must conduct this test periodically to keep up with the latest attacks methodologies and security flaws. Some of the common vulnerabilities include:

  • Wireless encryption and network traffic
  • Unprotected access points and hotspots
  • Spoofing MAC address
  • Weak credentials
  • DDoS (Distributed Denial of Service) attacks
  • SQL/code injection attacks
  • XSS (Cross-Site Scripting)
  • Misconfigured web servers
  • Website database

3. Social engineering

Unlike the above tests, where the technical aspect of the application is put under scrutiny, in social engineering, human psychology comes under the scanner. Testers leverage and exploit human nature to break into a system in social engineering penetration testing. Through manipulation, the tester will coax the individual to reveal sensitive information which will be used to penetrate the system and plan further attacks.

Social engineering penetration testing (Source: ScienceDirect)

Some of the common methods of attack are:

Even though social engineering pentest is not widely done, it is necessary to get a complete picture of your application’s security standards.

The life cycle of penetration testing

Rigorous and detailed planning for penetration testing is required to successfully conduct one. There are multiple stages in penetration testing:

Step 1: Pre-Engagement Analysis

Before even planning a test, it’s imperative that you along with your security provider discuss topics such as the scope of the test, budget, objectives, etc. Without these, there won’t be clear enough direction of the test and will result in a lot of wasted effort

Step 2: Intelligence gathering

Before commencing the pentest, the tester will attempt to find all publically available information about the system and anything that would help in breaking in. These would assist in creating a plan of action as well as reveal potential targets.

Step 3: Vulnerability assessment

In this stage, your application is checked for security vulnerabilities by analyzing your security infrastructure and configuration. The tester searches for any opening or security gaps that can be exploited to break into the system.

Step 4: Exploitation

Once the tester is armed with the knowledge of vulnerabilities present in the system, they will start exploiting them. This will help in identifying the nature of the security gaps and the effort required to exploit them.

Related: Metasploit Basics for Beginners – Exploiting Windows XP (MS08–067) with Metasploit (Kali Linux) – Part 1

Step 5: Post-exploitation

The main objective of a pentest is to simulate a real-world attack in which attackers would cause real damage after exploiting the security flaws in the system. Thus, once the tester can enter the system, they will use all available means to escalate their privileges.

Step 6: Maintaining access

Once attackers get access to a system, they try to keep a channel open for further exploitation through backdoors and rootkits. The same is done by testers too. They install malware and other programs to keep the system infected and check if these programs are detected and removed by the application.

Step 7: Reporting

Everything done during this penetration testing is documented in a detailed manner along with steps and suggestions to fix the flaws in the security. Since the nature of the report is highly sensitive, it is ensured that it is safely delivered to authorized personnel. Testers often have meetings and debrief with executives and technical teams to help them understand the report. Security service like Astra also assists by a team of experts to prepare plans for fixing the security issues.

Astra security testing methodology

We, at Astra Security, use a combination of vulnerability assessment and penetration testing to check and find any security flaws in your application. We not only use standard tests but also tailor-fit tests based on your application, to give you the best results.

Website VAPT Process
Astra’s VAPT Process

The scope of work includes:

  • Vulnerability assessment and penetration testing (VAPT)
  • Dynamic and static code analysis
  • Collaborative dashboards to report and manage vulnerabilities
  • Expert technical assistance to patch up security gaps
  • Consultations for best and safe practices

Astra has different testing methodologies based on requirements:

  • For websites and web applications
  • For mobile applications (Android/iOS)
  • For API Security
  • For AWS Cloud Infrastructure
  • For Azure Cloud Infrastructure
  • For network devices – Routers/printers/firewalls

After the penetration testing, Astra prepares a detailed vulnerability report to provide you with a birds-eye view of security status. With their detailed reports and vulnerability management platform, all security flaws were re-fixed within record time. Astra’s reports contain some of the following points:

  • Vulnerability details
  • Video PoCs and screenshots
  • To help reproduce the vulnerabilities, selenium scripts for the developers
  • Threats ranked with CVSS score
  • Impact on business and consequences
  • Custom-fit steps to fix security issues and best practices
Astra’s pentest dashboard

Astra is indeed the security provider that you never had. And to reinforce this fact, you can browse through the numerous satisfied testimonials from the clients. If you want the best VAPT for your applications, then click here and check out Astra.


1. Will a pentest be disruptive to our application? Should we expect a system crash?

A well-planned and coordinated penetration testing will not be disruptive to the system. It is important to ensure that all stakeholders are aware of the timeline and relevant teams are kept informed. With proper expertise and a focused approach, you would not face any likely system crash.

2. How often should penetration testing be done?

The frequency of these tests depends on several factors including budget, size of the environment, and how dynamic the environment is. Testing too frequently will not provide enough time to fix the issues, while too infrequent testing leaves the application vulnerable to newer attack methodologies. To identify the sweet spot, you’ll need to factor in all the variables.

3. What are the qualifications the testing team should possess?

The team members should have in-depth experience in all the various technologies including server infrastructure, web applications, client platforms, and IP networking. They should have certifications such as Certified Ethical Hacker (CEH), Certified Information Systems Security Professional (CISSP), to name a few. At Astra, our teams have advanced degrees from renowned universities, CEH, policy compliance certifications, cybersecurity fundamentals from Kaspersky, among others.

4. How much time is required for penetration testing?

The overall time depends on factors such as the size of the environment, size of the testing team, type of test, etc. Reserve adequate time for the test and assign extra time for reporting. A good estimate would be 4 to 6 weeks, including the planning and reporting stage. The actual test takes around 2 to 3 weeks, depending on the complexity and size of the environment.

Was this post helpful?

Jinson Varghese

Jinson Varghese Behanan is an Information Security Analyst at Astra. Passionate about Cybersecurity from a young age, Jinson completed his Bachelor's degree in Computer Security from Northumbria University. When he isn’t glued to a computer screen, he spends his time reading InfoSec materials, playing basketball, learning French and traveling. You can follow him on Medium or visit his Website for more stories about the various Security Audits he does and the crazy vulnerabilities he finds.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Inline Feedbacks
View all comments

Psst! Hi there. We’re Astra.

We make security simple and hassle-free for thousands
of websites and businesses worldwide.

Our suite of security products include firewall, malware scanner and security audits to protect your site from the
evil forces on the internet, even when you sleep.

earth spiders cards bugs spiders

Made with ❤️ in USA France India Germany