Securing Applications
What is an application?
An application is any software, such as web, mobile, desktop, API, embedded, or cloud-native, that performs functions for users or systems. Because they handle sensitive data and business processes, applications are prime targets for attackers.
This section covers security for applications your organization builds or customizes (“first-party” or “custom” apps). Security for third-party, off-the-shelf, or SaaS apps is addressed elsewhere.
Application Risk Analysis
Challenge: Shadow applications
Shadow applications are applications that are unknown to the security team. Even if the security team has established policies to protect applications, shadow applications might not be protected by them, opening them to unmanaged risk, potentially outside the organization’s risk appetite.
Breach analysis has revealed that shadow assets are frequently the target of cyberattacks because they:
- Lack required security controls (such as authentication, authorization, encryption)
- Miss critical updates and vulnerability patches
- Store or process sensitive data without proper safeguards
Solutions
- Build and Maintain an Application Inventory: Document all known applications, including their owners, purpose, and where they are hosted.
- Cross-Department Collaboration: Security staff regularly participates in product, engineering, and IT meetings to identify new applications early.
- DNS Monitoring: Monitor DNS records for new domains/subdomains that may indicate the presence of shadow applications.
- Code Repository Monitoring: Monitor platforms like GitHub for repositories related to your organization that may reveal new or untracked applications.
- Automated Discovery Tools: Use External Attack Surface Management (EASM) and similar automated tools to continuously discover unknown applications across your environment.
Challenge: Application vulnerabilities
Applications often contain vulnerabilities such as injection flaws, broken authentication, and insecure deserialization, which attackers exploit to gain unauthorized access or disrupt operations.
Solutions
- Regularly scan applications for vulnerabilities using automated tools and manual testing.
- Apply security patches promptly.
- Follow secure coding practices and conduct code reviews.
- Use application firewalls to block common attacks.
Reachability: Prioritizing Vulnerabilities
Modern application security tools use reachability analysis to help prioritize which vulnerabilities are most likely to be exploitable in your environment. There are two main approaches: static reachability (analyzing code without execution, at the package or function level) and runtime reachability (observing code execution in live or test environments, often at the function level). Function-level analysis provides much more precise results. Static reachability is more workflow-oriented and suitable for early detection, while runtime reachability is better for confirming exploitability and reducing wasted developer effort. For a detailed comparison, see Reachability Analysis.
Challenge: User authentication
Weak or improperly implemented authentication allows attackers to impersonate users or escalate privileges.
Solutions
- Enforce strong password policies and multi-factor authentication (MFA).
- Use secure authentication protocols (e.g., OAuth, SAML).
- Regularly review and test authentication mechanisms.
Challenge: Secrets management
Hardcoded or improperly stored secrets (API keys, passwords) can be leaked and abused by attackers.
Solutions
- Store secrets in dedicated secrets management tools.
- Rotate secrets regularly and monitor for exposure.
- Avoid hardcoding secrets in source code.
Challenge: Application security management
Lack of centralized security management leads to inconsistent controls and missed vulnerabilities.
Solutions
- Implement centralized application security policies and tools.
- Integrate security into the software development lifecycle (SDLC).
- Conduct regular security training for developers.
Challenge: Malicious 3rd-party packages
Third-party libraries may contain vulnerabilities or malicious code, introducing risk to applications.
Solutions
- Use trusted sources for dependencies and monitor for vulnerabilities.
- Regularly update and patch third-party packages.
- Employ software composition analysis tools.
Challenge: DDoS attacks
Distributed Denial of Service (DDoS) attacks can overwhelm applications, causing downtime and loss of service.
Solutions
- Deploy DDoS protection services and rate limiting.
- Monitor traffic for unusual spikes.
- Develop incident response plans for DDoS scenarios.
Challenge: Bot management
Malicious bots can scrape data, abuse APIs, or perform automated attacks.
Solutions
- Implement bot detection and mitigation solutions.
- Use CAPTCHAs and rate limiting.
- Monitor for abnormal automated activity.
Challenge: Sensitive data leaks into logs
Sensitive information (e.g., credentials, personal data) may be inadvertently logged, risking exposure.
Solutions
- Mask or redact sensitive data in logs.
- Limit log access and retention.
- Regularly review logs for sensitive data exposure.
Challenge: Distributing on-premises software
Distributing software for on-premises deployment can introduce risks if not securely packaged and delivered.
Solutions
- Sign software packages and verify integrity.
- Provide secure update mechanisms.
- Educate customers on secure deployment practices.
Challenge: Malicious code modification
Attackers may attempt to modify application code to introduce backdoors or vulnerabilities.
Solutions
- Use code signing and integrity checks.
- Restrict access to source code and build systems.
- Monitor for unauthorized code changes.
Challenge: Detection
Failure to detect attacks or breaches in applications can lead to prolonged exposure and damage.
Solutions
- Implement application monitoring and alerting.
- Use intrusion detection and prevention systems.
- Regularly review security logs and incident reports.
Additional Resources
Table of contents
- 3rd-Party Packages Scanning
- Anti-Bot
- Application Attack Simulation
- Bug Bounty Programs
- Code Scanning
- Customer Identity Platforms
- DDoS Protection
- Infrastructure-as-Code (IaC) Scanning
- Integrated Application Security Platforms
- Kubernetes Security / Container Security
- Penetration Testing
- Secrets Management
- Web Application Firewall