The ultimate objective of any software developer is to create performant, secure, and usable applications. Realizing this goal requires every application to be tested thoroughly.
Testing is therefore a critical aspect of creating robust applications. Its what ensures the developed software meets the desired quality expectations.
This blog examines one of the vital testing methods: white box penetration testing. In this blog, well review the following:
What Is White Box Penetration Testing?
How Is White Box Pen Testing Performed?
Types of white box pen testing
White Box Pen Testing Techniques
White Box Pen Testing Tools
Advantages of White Box Pen Testing
Disadvantages of White Box Pen Testing
Differences Between White Box and Other Types of Pen Testing
Penetration testing, also referred to as ethical hacking or pen testing, is the process of performing an authorized attack on a system to identify security weaknesses or vulnerabilities.
White box is a type of penetration testing that assesses an applications internal working structure and identifies its potential security loopholes. The term white box is used because of the possibility to see through the programs outer covering (or box) into its inner structure. Its also called glass box pen testing, code-based pen testing, transparent box pen testing, open box pen testing, or clear box pen testing.
In this type of testing, the ethical hacker has full-disclosure of the applications internal configurations, including source code, IP addresses, diagrams, and network protocols. White box pen testing aims to simulate a malicious intruder who could have full familiarity with the target systems internal structure.
White box testing has three basic steps: prepare for testing, create and execute tests, and create the final report.
Preparation is the first step in the white box penetration testing technique. It involves learning and understanding the internal workings of the target application.
Performing successful white box testing requires the pen tester to have an in-depth knowledge of the inner functionalities powering the application. This way, itll be easier to create test cases to uncover security loopholes in the target software.
In this preparation phase, the tester acquaints themself with the source code of the application, such as the programming language used to create it and the tools used to deploy it.
After understanding how the application works internally, the pen tester then creates tests and executes them.
In this stage, the tester runs test cases that assess the softwares source code for the existence of any anomalies. The tester may write scripts to test the application manually, use testing tools for performing automated tests, or use other testing methods.
In the last stage, the pen tester creates a report that communicates the results of the entire testing process. The report should be provided in a format that is easy to understand, give a detailed description of the testing activity, and summarize the outputs of the testing tasks.
Creating the final report justifies the steps and strategies used, allows the team to analyze and improve the efficiency of the testing process, and provides a document for future reference.
There are several white box testing types that can be used to assess the internal functionalities of an application and reveal any security weaknesses.
WhiteSource Report DevSecOps Insights 2020 Download FreeReport
The main ones include the following:
Unit testing. The individual units or components of the applications source code are tested. It aims to validate whether each unit of the application can behave as desired. This type of white box testing is essential in identifying security anomalies early in the software development life cycle. Defects discovered during unit testing are easier and cheaper to fix.
Integration testing. This type of open box testing involves combining individual units or components of the applications source code and testing them as a group. The purpose is to expose errors in the interactions of the different interfaces with one another. It takes place after unit testing.
Regression testing. In regression testing, the pen tester performs further tests to verify that a recent change in the applications code has not harmed existing functionalities. The already executed test cases are rerun to confirm that previously created and tested features are working as desired. It verifies that the old code still works even after fixing bugs, adding extra security features, or implementing any changes.
A major technique for performing white box penetration testing is code coverage.
Code coverage is a metric that gauges the extent to which the source code has been tested. It computes the number of lines of code that have been validated successfully by a test scenario.
This is the formula for calculating it:
Code coverage = (Number of lines of code executed / Total number of lines of code) * 100
Suppose all your tests are passing with flying colors, but only capture about 55% of your codebase. Do the test results give you enough confidence?
With code coverage, you can determine the efficiency of the test implementation, quantitatively measure how your code is exercised, and identify the areas of your program not executed by test cases.
There are three main types of white box testing techniques and methods related to code coverage: statement, branch, and function coverage.
Statement coverage is the most basic form of code coverage analysis in white box pen testing. It measures the number of statements executed in an applications source code.
This is the formula for calculating it:
Statement coverage = (Number of statements executed / Total number of statements) * 100
Branch coverage is a white box pen testing technique that measures the number of branches of the control structures that have been executed.
It can check if statements, case statements, and other conditional loops present in the source code.
For example, in an if statement, branch coverage can determine if both the true and false branches have been exercised.
This is the formula for calculating it:
Branch coverage = (Number of branches executed / Total number of branches) * 100
Function coverage evaluates the number of defined functions that have been called. A pen tester can also provide different input parameters to assess if the logic of the functions could make them vulnerable to attacks.
This is the formula for calculating it:
Function coverage = (Number of functions executed / Total number of functions) * 100
Here are some common open source white box testing tools:
JUnit is a unit testing tool for pen testers using the Java programming language.
HtmlUnit is a Java-based headless browser that allows pen testers to make HTTP calls that simulate the browser functionality programmatically. Its mostly used for performing integration tests on web-based applications atop other unit testing tools like JUnit.
PyUnit is a unit testing tool for pen testers using the Python programming language.
Selenium is a suite of testing tools for automatically validating web applications across various platforms and browsers. It supports a wide range of programming languages, including Python, C#, and JavaScript.
Benefits of performing code-based penetration testing include the following:
The tests are deep and thorough, which maximizes the testers efforts.
It allows for code optimization and identification of hidden security issues.
Automating test cases is easier. This greatly reduces the time and costs of running repetitive tests.
Since white box testers are acquainted with the internal workings, the communication overhead between them and developers is reduced.
It offers the ability to identify security threats from the developers point of view.
Disadvantages of performing code-based penetration testing include the following:
White box testing is time-consuming and demanding because of its rigorous approach to penetration testing.
The tests are not done from the users perspective. This may not represent a realistic scenario of a potential non-informed attacker.
White box penetration testing is often compared to black box penetration testing. In black box testing, the pen tester does not have a deep understanding of the applications internal structures or workings. The term black box is used because its difficult to see through the programs outer covering (or box) when its completely closed.
One major difference between the two testing strategies is that black box pen testing does not have any prior information about the internal workings of the target system. A black box tester aims to penetrate the system just like an uninformed outside attacker does. Black box penetration testing is suitable when the pen tester wants to imitate an actual external attack scenario.
In penetration testing, white box is a useful approach to simulating the activities of an attacker who has full knowledge of the internal operations of the target system. It allows the pen tester to have exhaustive access to all the details about the system. This enables the pen tester to identify as many vulnerabilities as possible.
Of course, in some situations, you may opt for other pen testing methods, such as black box testing, to assume the stance of a non-informed outside potential attacker.
Recent Articles By Author
*** This is a Security Bloggers Network syndicated blog from Blog WhiteSource authored by Patricia Johnson. Read the original post at: https://resources.whitesourcesoftware.com/blog-whitesource/white-box-penetration-testing
Visit link:
The Most Comprehensive Guide to White Box Penetration Testing - Security Boulevard
- Research, Evaluation and Learning at the International Rescue Committee - World - ReliefWeb [Last Updated On: August 10th, 2020] [Originally Added On: August 10th, 2020]
- Conserving Biodiversity with AI - BBN Times [Last Updated On: August 10th, 2020] [Originally Added On: August 10th, 2020]
- DevOps Fundamentals You Ever Wanted To Know - hackernoon.com [Last Updated On: August 10th, 2020] [Originally Added On: August 10th, 2020]
- Another Perspective on Evictions - Bacon's Rebellion [Last Updated On: August 10th, 2020] [Originally Added On: August 10th, 2020]
- Amitabh Bachchan on fans alternate job suggestion: My job is now insured - The Indian Express [Last Updated On: August 10th, 2020] [Originally Added On: August 10th, 2020]
- Will You Soon Download Packaging Machine Controls from the Internet? - Packaging Digest [Last Updated On: August 10th, 2020] [Originally Added On: August 10th, 2020]
- 5 free resources every data scientist should start using today - The Next Web [Last Updated On: August 10th, 2020] [Originally Added On: August 10th, 2020]
- Who's hoping to make an Epic impact on Green Bay area music scene with a new concert venue? | Streetwise - Green Bay Press Gazette [Last Updated On: August 10th, 2020] [Originally Added On: August 10th, 2020]
- Industrial robots are dominating but are they safe from cyber-attacks? - TechHQ [Last Updated On: August 10th, 2020] [Originally Added On: August 10th, 2020]
- Friday Rant - Rise of the Rogue-Bots? - Diginomica [Last Updated On: August 10th, 2020] [Originally Added On: August 10th, 2020]
- Important Reasons Why You Should Pick RoR As Your Web-Based Development Project - Customer Think [Last Updated On: August 10th, 2020] [Originally Added On: August 10th, 2020]
- Portrait of the software developer as an artist - ComputerWeekly.com [Last Updated On: August 10th, 2020] [Originally Added On: August 10th, 2020]
- Python may be your safest bet for a career in coding - Gadgets Now [Last Updated On: August 10th, 2020] [Originally Added On: August 10th, 2020]
- 1Password is coming to Linux - ZDNet [Last Updated On: August 10th, 2020] [Originally Added On: August 10th, 2020]
- IBM creates an open source tool to simplify API documentation - TechRepublic [Last Updated On: August 10th, 2020] [Originally Added On: August 10th, 2020]
- Mastercard : Accelerate Ignites Next Generation of Fintech Disruptors and Partners to Build the Future of Commerce - Marketscreener.com [Last Updated On: August 12th, 2020] [Originally Added On: August 12th, 2020]
- Expanding the Universe of Haptics | by Lofelt | Aug, 2020 - Medium [Last Updated On: August 12th, 2020] [Originally Added On: August 12th, 2020]
- UX Designer Salary: 5 Important Things to Know - Dice Insights [Last Updated On: August 12th, 2020] [Originally Added On: August 12th, 2020]
- Persistent memory reshaping advanced analytics to improve customer experiences - IT World Canada [Last Updated On: August 12th, 2020] [Originally Added On: August 12th, 2020]
- NextCorps and SecondMuse Open Application Period for Programs that Help Climate Technology Startups Accelerate Hardware Manufacturing - GlobeNewswire [Last Updated On: August 12th, 2020] [Originally Added On: August 12th, 2020]
- Buried deep in the ice is the GitHub code vault humanity's safeguard against devastation - ABC News [Last Updated On: August 12th, 2020] [Originally Added On: August 12th, 2020]
- Top 12 Most Used Tools By Developers In 2020 - Analytics India Magazine [Last Updated On: August 12th, 2020] [Originally Added On: August 12th, 2020]
- Facebook's React 17 JavaScript library: Here's why its top feature is 'no new features' - ZDNet [Last Updated On: August 12th, 2020] [Originally Added On: August 12th, 2020]
- CORRECTING and REPLACING Anyscale Hosts Inaugural Ray Summit on Scalable Python and Scalable Machine Learning - Business Wire [Last Updated On: August 12th, 2020] [Originally Added On: August 12th, 2020]
- Google: Here's how much we give to open source through our GitHub activity - ZDNet [Last Updated On: August 12th, 2020] [Originally Added On: August 12th, 2020]
- How Chriselle Lim And Joan Nguyen Created Bmo, The Coworking Space And Virtual Classroom Of The Future (With A Childcare Twist) - Forbes [Last Updated On: August 13th, 2020] [Originally Added On: August 13th, 2020]
- How Will Public Libraries Adapt To New School Year Norms? - Book Riot [Last Updated On: August 13th, 2020] [Originally Added On: August 13th, 2020]
- Google: We'll test hiding the full URL in Chrome 86 to combat phishing - ZDNet [Last Updated On: August 13th, 2020] [Originally Added On: August 13th, 2020]
- How to install Python 3 and PIP 3 on Ubuntu 20.04 LTS - Linux Shout - H2S Media [Last Updated On: August 13th, 2020] [Originally Added On: August 13th, 2020]
- What are Bitcoin Wallets: Everything You Need to Know - Programming Insider [Last Updated On: August 13th, 2020] [Originally Added On: August 13th, 2020]
- JSHint is Now Free Software after Updating License to MIT Expat - WP Tavern [Last Updated On: August 13th, 2020] [Originally Added On: August 13th, 2020]
- How to learn JavaScript: These are the best online courses - Mashable [Last Updated On: August 13th, 2020] [Originally Added On: August 13th, 2020]
- What developers need to know about inter-blockchain communication - ComputerWeekly.com [Last Updated On: August 14th, 2020] [Originally Added On: August 14th, 2020]
- Introducing the CDK construct library for the serverless LAMP stack - idk.dev [Last Updated On: August 14th, 2020] [Originally Added On: August 14th, 2020]
- IBM asked software developers to take on the wrath of Mother Nature - The Drum [Last Updated On: August 14th, 2020] [Originally Added On: August 14th, 2020]
- Aspire Technology Launches First Truly Secure Public Blockchain for Creation of Digital Assets - GlobeNewswire [Last Updated On: August 14th, 2020] [Originally Added On: August 14th, 2020]
- GM Creates And Shares New Workplace Safety Technologies - Pulse 2.0 [Last Updated On: August 14th, 2020] [Originally Added On: August 14th, 2020]
- Key Considerations and Tools for IP Protection of Computer Programs in Europe and Beyond - Lexology [Last Updated On: August 14th, 2020] [Originally Added On: August 14th, 2020]
- The state of application security: What the statistics tell us - CSO Online [Last Updated On: August 14th, 2020] [Originally Added On: August 14th, 2020]
- Open Source: What's the delay on the former high/middle school on North Mulberry? - knoxpages.com [Last Updated On: August 14th, 2020] [Originally Added On: August 14th, 2020]
- The Risks Associated with OSS and How to Mitigate Them - Security Boulevard [Last Updated On: August 14th, 2020] [Originally Added On: August 14th, 2020]
- news digest: Microsoft launches open source website, TensorFlow Recorder released, and Stackery brings serverless to the Jamstack - SD Times -... [Last Updated On: August 14th, 2020] [Originally Added On: August 14th, 2020]
- Build Your Own PaaS with Crossplane: Kubernetes, OAM, and Core Workflows - InfoQ.com [Last Updated On: August 17th, 2020] [Originally Added On: August 17th, 2020]
- ISRO Is Recruiting For Vacancies with Salary Upto Rs 54000: How to Apply - The Better India [Last Updated On: August 17th, 2020] [Originally Added On: August 17th, 2020]
- Does technology increase the problem of racism and discrimination? - TechTarget [Last Updated On: August 17th, 2020] [Originally Added On: August 17th, 2020]
- CORRECTING and REPLACING Anyscale Hosts Inaugural Ray Summit on Scalable Python and Scalable Machine Learning - Yahoo Finance [Last Updated On: August 17th, 2020] [Originally Added On: August 17th, 2020]
- In the City: Take advantage of open recreation, cultural and park amenities - Coloradoan [Last Updated On: August 17th, 2020] [Originally Added On: August 17th, 2020]
- Exploring the future of modern software development - ComputerWeekly.com [Last Updated On: August 21st, 2020] [Originally Added On: August 21st, 2020]
- Hadoop Developer Interview Questions: What to Know to Land the Job - Dice Insights [Last Updated On: August 21st, 2020] [Originally Added On: August 21st, 2020]
- SiFive Opens Business Unit to Build Chips With Arm and RISC-V Inside - Electronic Design [Last Updated On: August 21st, 2020] [Originally Added On: August 21st, 2020]
- Use Pulumi and Azure DevOps to deploy infrastructure as code - TechTarget [Last Updated On: August 21st, 2020] [Originally Added On: August 21st, 2020]
- Why ASP.NET Core Is Regarded As One Of The Best Frameworks For Building Highly Scalable And Modern Web Applications - WhaTech [Last Updated On: August 21st, 2020] [Originally Added On: August 21st, 2020]
- NITK figures 4th in Google Summer of Code ranking - BusinessLine [Last Updated On: August 21st, 2020] [Originally Added On: August 21st, 2020]
- Learn More About Dynamo for Revit: Features, Functions, and News - ArchDaily [Last Updated On: August 21st, 2020] [Originally Added On: August 21st, 2020]
- Linux Foundation showcases the greater good of open source - ComputerWeekly.com [Last Updated On: August 21st, 2020] [Originally Added On: August 21st, 2020]
- Programming language Kotlin 1.4 is out: This is how it's improved quality and performance - ZDNet [Last Updated On: August 21st, 2020] [Originally Added On: August 21st, 2020]
- Top 10 Languages That Paid Highest Salaries Worldwide In 2020 - Analytics India Magazine [Last Updated On: August 21st, 2020] [Originally Added On: August 21st, 2020]
- Programming language Rust: Mozilla job cuts have hit us badly but here's how we'll survive - ZDNet [Last Updated On: August 21st, 2020] [Originally Added On: August 21st, 2020]
- In-App Bidding Gathers Steam, But Adoption Looks Nothing Like Header Bidding On The Web - AdExchanger [Last Updated On: August 21st, 2020] [Originally Added On: August 21st, 2020]
- 13 thoughts on Fitting Snake Into A QR Code - Hackaday [Last Updated On: August 21st, 2020] [Originally Added On: August 21st, 2020]
- Newham test and trace app was designed by man who grew up in the borough - Newham Recorder [Last Updated On: August 21st, 2020] [Originally Added On: August 21st, 2020]
- 'Trapped in a code' the fight over our algorithmic future - Open Democracy [Last Updated On: August 21st, 2020] [Originally Added On: August 21st, 2020]
- Telegram launches one-on-one video calls on iOS and Android - The Verge [Last Updated On: August 21st, 2020] [Originally Added On: August 21st, 2020]
- AWS Controllers for Kubernetes Will Be A 'Boon For Developers' - CRN: Technology news for channel partners and solution providers [Last Updated On: August 21st, 2020] [Originally Added On: August 21st, 2020]
- Coding within company constraints - ComputerWeekly.com [Last Updated On: August 21st, 2020] [Originally Added On: August 21st, 2020]
- Open Source and Open Standards: The Recipe for Success Featured - The Fast Mode [Last Updated On: August 21st, 2020] [Originally Added On: August 21st, 2020]
- How Intel helped give the worlds first cyborg a voice - The Next Web [Last Updated On: August 21st, 2020] [Originally Added On: August 21st, 2020]
- Tiger Woods, Rory McIlroy near bottom of field at The Northern Trust - ESPN [Last Updated On: August 22nd, 2020] [Originally Added On: August 22nd, 2020]
- Intel Owl OSINT tool automates the intel-gathering process using a single API - The Daily Swig [Last Updated On: August 22nd, 2020] [Originally Added On: August 22nd, 2020]
- IOTA Foundation presents the current projects in the mobility industry - Crypto News Flash [Last Updated On: August 22nd, 2020] [Originally Added On: August 22nd, 2020]
- How 'Fortnite' and 'Second Life' Shaped the Future of Indian Market - Santa Fe Reporter [Last Updated On: August 22nd, 2020] [Originally Added On: August 22nd, 2020]
- Apple Enters $ 2 Trillion Club, Github's Chinese Counterpart And More In This Week's Top News - Analytics India Magazine [Last Updated On: August 22nd, 2020] [Originally Added On: August 22nd, 2020]
- As world grapples with pandemic, schools are the epicenter - ABC News [Last Updated On: August 24th, 2020] [Originally Added On: August 24th, 2020]
- Why Businesses Should Embrace Modernizing Their Legacy Applications - TechBullion [Last Updated On: August 24th, 2020] [Originally Added On: August 24th, 2020]
- Is It Time To Rename RPG? - IT Jungle [Last Updated On: August 24th, 2020] [Originally Added On: August 24th, 2020]
- Phantasy Star Online programmers on breaking new ground and their Diablo-style isometric prototype - Polygon [Last Updated On: August 24th, 2020] [Originally Added On: August 24th, 2020]
- How To Learn To Program In Python By Playing Videogames - Analytics India Magazine [Last Updated On: August 24th, 2020] [Originally Added On: August 24th, 2020]
- New Microsoft program to help develop the quantum computing workforce of the future in India - Microsoft [Last Updated On: August 24th, 2020] [Originally Added On: August 24th, 2020]
- How the Docker Revolution Will Change Your Programming, Part 1 - Walter Bradley Center for Natural and Artificial Intelligence [Last Updated On: August 24th, 2020] [Originally Added On: August 24th, 2020]
- The art of developing happy customers - ComputerWeekly.com [Last Updated On: August 24th, 2020] [Originally Added On: August 24th, 2020]