Penetration Testing
The oft-preferred environment for penetration testing is the production environment. Organizations would prefer pen testing performed when the applications and network are more stable, i.e., tested and validated as production-ready.
Penetration (or pen for short) testing or ethical hacking simulates a possible cyberattack on the system. It follows a plan that starts with a survey (reconnaissance) of the system topology, which includes the network, applications, and databases for vulnerabilities—next, a network mapping tool runs to scan for open ports and firewalls.
Once the system vulnerabilities assessment completes, pen testing can proceed to exploitation, where the tester exploits the system simulating what could happen in actual attacks. During the exploitation, the tester takes care not to cause damage to other systems in the production environment.
The benefit of using the production environment is that the results will be accurate. The test results will manifest the actual vulnerabilities of the infrastructure and applications. Also, any violations that are identified will be in real-time.
The drawback of pen testing in production:
- The pen testing can interfere with operations causing system outages.
- In many instances, penetration testing is performed a few weeks before production cutover. Security breaches and vulnerabilities identified during the testing may require more time to remediate before deploying codes to production. Raising security risks and recording a plan to fix the problem at a specific date doesn't guarantee that the vulnerabilities will be addressed on time and with the right resources. A cyberattack can occur before the problem is fixed.
Will pen testing in a non-production environment mitigate the problem?
There is better opportunity for testing not to be rushed when performing pen testing in a non-production environment because
- The team will not have to worry about interference with operations.
- Pen testing can be performed in parallel with other non-functional testing, such as performance and volume testing.
- Business will be informed of the identified vulnerabilities so that weaknesses are addressed and applied in production before the cutover date.
For this to work, however, the non-production environment must closely resemble the production environment. It will have the same network and firewall configuration, automated workflow orchestration, and connection to production databases.
Penetration testing must include penetrating network services, databases, web applications, mobile applications, and APIs. Use cases to have brute force attacks and social engineering attacks.
Security Testing
Moving security testing left means testing for application security at the early stages of the development lifecycle. This testing method entails close collaboration between the development, security, and operations teams.
The principle behind security testing left is to detect security vulnerabilities early so that they can be fixed with less impact on cost and delivery date. It is a project management approach that integrates security, development, and operations processes.
How this will work:
- The information security team will provide input to the technical design, test plans, and test cases.
- Developers must closely work with the security and testing teams throughout the software development lifecycle.
- The security review will be a gating factor to releasing the design to the development stage.
- All levels and stages of testing must include test cases that validate that the solution satisfies the security requirements.
- The security and operations review will be a gating factor in releasing the codes to production.
- Develop automated security testing to facilitate integrating (continuous integration) evolving security tests and approaches.
This approach reinforces security in planning, building, testing, and deployment to deliver secure software.
The benefits of having a collaborative DevSecOps culture:
- Developers and the security team share the security responsibility.
- Developers and testers understand security issues and apply security best practices.
- The DevSecOps team delivers better and more secure codes, and they help minimize workflow bottlenecks.
- Security vulnerabilities are detected during the development phase rather than during the implementation or testing phase. Remediation is performed as part of the build workflow.
- Security detection is planned and monitored.
- Multiple testing and more extensive test coverage mean errors are identified before codes are deployed to production.
- Application security testing builds a defense against potential attacks. By the time the codes reach the environment where penetration testing is performed, application vulnerabilities sighted will be minimal.
Mitigating DevSecOps Challenges
| Shortfall | Mitigation |
|---|---|
| The information security team is understaffed | The organization hires new talents to join the InfoSec team. |
| The project team engages late the Information Security team | Project methodology includes the engagement of the InfoSec team. Security review of design added as stage gate. |
| The project team fails to collaborate with the InfoSec Team | Once the Security team is engaged, they contribute to the project planning and reviews and participate in stand-ups. |
| Developers not familiar with security risks | Conduct security awareness training for developers. InfoSec team to write automated tests to ensure security requirements are included in the testing processes. |
| Teams working in silos | Change the cultural mindset, emphasizing close collaboration of the development, security, and operations teams. |
| The operations team thinks of system abnormalities as software or infrastructure problems. | A system anomaly is a potential breach. Operations and security teams analyzing a problem together will enhance security protection. |