Cyber Security
OWASP for Web and Mobile
OWASP for Web and Mobile
OWASP was founded in 2001 as an open-source initiative to improve software security.
🔹 It started as a small community project to document common web vulnerabilities.
🔹 Over time, it became a global nonprofit organization known for its standards like the OWASP Top 10, ASVS, and tools like ZAP.
The Open Web Application Security Project, or OWASP, is an international non-profit organization dedicated to web application security. One of OWASP’s core principles is that all of their materials be freely available and easily accessible on their website, making it possible for anyone to improve their own web application security. The materials they offer include documentation, tools, videos, and forums. Perhaps their best-known project is the OWASP Top 10.
The OWASP Top 10 is a regularly-updated report outlining security concerns for web application security, focusing on the 10 most critical risks. The report is put together by a team of security experts from all over the world. OWASP refers to the Top 10 as an ‘awareness document’ and they recommend that all companies incorporate the report into their processes in order to minimize and/or mitigate security risks.
01-Broken Access control
Failures in enforcing user permissions, leading to unauthorized data or action access
Practices:
RBAC(Role based access control)
RBAC at API scope level
GateKeeper design pattern
02- Cryptographic Failure
It's related to sensitive data exposure, and how do we expose it, it should be using concrete strong encryption algorithms, so Weak or missing encryption, poor key management, and deprecated algorithms are the subject of this type
Practices:
Encryption
Hashing
HMAC key
Key rotation(Manual or automated)
TLS 1.2+, AES-256, Vault, HSM
Encrypt in transit and at rest
Sample:
Sensitive Data stored in plaintext in DB
03- Injection
Untrusted input executed as code or queries
Types:
XSS: Cross-site scripting
SQL Injection
Pen Tools:
SQLmap
NoSQLMap
Burp Exts
Defense tools:
WAF
ORM
Prepared statements
04- Insecure design
Lack of security-focused architecture planning, threat modeling gaps
Absence of threat modeling that expects potential threats for the solution, and creates the proper governance to secure the design.
Examples:
No limit on failed login attempts (no brute-force protection)
Storing sensitive data without encryption by design
Not applying least privilege in user roles
Relying only on client-side validation
No threat modeling done in the design phase
Pen Tools:
ThreatModeler,
OWASP Threat
Dragon
05- Security Misconfiguration
Default settings, exposure, or misconfigured servers/apis
06- Using components with known vulnerabilities
Use of unpatched libraries or third‑party modules
07- Identification and authorization failure
Weak login, session management, or credential handling
08- Software and data integrity failure
Unsafe update paths, unverified data inputs (incl. CI/CD pipelines)
09- Security Logging and monitoring failure
Inadequate logging/alerting leads to delayed detection
10- Server-side request forgery
Server tricked into making unintended requests
Why OWASP has a separate Top 10 for Mobile Apps?
Different Attack Surface
Mobile apps interact with device hardware (GPS, camera, sensors, Bluetooth, NFC) unlike web apps.
Risks like insecure data storage on device or improper use of platform permissions are unique to mobile.
Platform-Specific Security Models
iOS and Android have sandboxing, app store review, permission models—different from browsers/servers.
Offline Data & Local Storage
Mobile apps often store sensitive data (tokens, cached files) locally, increasing risk of reverse engineering and tampering.
Reverse Engineering & Tampering Risks
Mobile apps are distributed as binaries (APK, IPA) which attackers can decompile, modify, and repackage.
Network & API Dependencies
Mobile relies heavily on backend APIs + insecure communication channels (public Wi-Fi, mobile networks).
User Behavior
Users install apps from unofficial sources (especially on Android), increasing malware risks.
01- Improper Credential Usage
What: Storing or handling passwords, tokens insecurely
Example: Hardcoded API keys or storing tokens in SharedPreferences (Android)
Resolution: Use secure keystore/keychain; never hardcode credentials
02- Inadequate Supply Chain Security
What: Using vulnerable libraries or compromised SDKs
Example: App includes a 3rd-party SDK that leaks location data
Resolution: Use SBOM, verify dependencies, pin versions, scan with SCA tools
03- Insecure Authentication/Authorization
What: Weak login, session or access control mechanisms
Example: No lockout on failed login; insecure token validation
Resolution: Use OAuth 2.0/OIDC, MFA, rate limits, token expiry
04- Insufficient Input/Output Validation
What: No validation on inputs or outputs; allows injection attacks
Example: App accepts raw user input into SQL query
Resolution: Sanitize/validate all inputs, escape outputs
05- Insecure Communication
What: Data transmitted over unprotected channels
Example: Sending login over HTTP instead of HTTPS
Resolution: Enforce HTTPS, validate TLS certs, use SSL pinning
06- Inadequate Privacy Controls
What: Leaks personal or sensitive user info without consent
Example: App accesses microphone/location without informing user
Resolution: Follow platform privacy APIs, get explicit user consent
07- Insufficient Binary Protections
What: Easy to reverse engineer and modify the app
Example: APK decompiled to extract API keys or disable checks
Resolution: Use code obfuscation, root/jailbreak detection, integrity checks
08- Security Misconfiguration
What:Insecure default settings, open debug endpoints
Example: Debug flag enabled in production app
Resolution: Disable debug mode, secure manifest, validate configs
09- Insecure Data Storage
What: Sensitive data stored insecurely on device
Example: Credit card info saved in plain text on device
Resolution: Use platform keystore/encrypted storage APIs
10 Insufficient Cryptography
What: Weak encryption or misuse of crypto libraries
Resolution: Use AES-256 for encryption, PBKDF2/bcrypt/Argon2 for hashing
As the evolution of microservices architecture, the need arises for an OWASP APIs security model that increases the communication between front-end and backend, which OWASP has issues the top 10 vulnerabilities for APIs according to their research for the communities across the world, which can be determined as follows:
API1: Broken Object Level Authorization (BOLA): The whole object
Attackers manipulate object IDs (e.g., user IDs) to access data they shouldn’t.
Example: User A can fetch User B’s records.
Why: Result of not attaching JWT to API scope
Solution: RBAC/ABAC
API2: Broken Authentication
Weak or missing authentication allows attackers to impersonate users.
Example: No MFA, predictable tokens, or missing session validation.
Solution: Strengthen you JWT + MFA + short-live token
API3: Broken Object Property Level Authorization (BOPLA): Attribute based
APIs expose or allow modification of sensitive fields that users shouldn’t control.
Includes also: Excessive data exposure, which was in OWASP 2019
Example: A user updates their role from “user” to “admin” via API.
Solution: ABAC/ Prevent automapping
API4: Unrestricted Resource Consumption
API doesn’t limit requests → denial of service or high resource usage.
Example: No rate limiting or quota enforcement.
Solution: Apply both business and technical rate limiting
API5: Broken Function Level Authorization
Attackers access sensitive API functions they shouldn’t.
Example: Normal user accessing admin-only endpoints.
Solution: RBAC
API6: Unrestricted Access to Sensitive Business Flows
Business logic is exposed without controls, allowing abuse.
Example: Automated checkout bots bypassing purchase limits.
Solution: CAPTCHA
API7: Server-Side Request Forgery (SSRF)
API fetches a URL supplied by the attacker, letting them reach internal systems.
Example: API allows arbitrary URL fetching → attacker scans internal network.
API8: Security Misconfiguration
Default, misconfigured, or unnecessary settings expose vulnerabilities.
Example: Exposed Swagger UI in production with open API keys.
API9: Improper Inventory Management
Shadow APIs or old versions left unprotected.
Example: v1 API still active with weak security while v2 is hardened.
Concrete repository for API, with versioning
API10: Unsafe Consumption of APIs
Trusting external APIs blindly without validation.
Example: App trusts a third-party API response that injects malicious data.
The OWASP Testing Guide (OTG) defines core practices for security testing of web applications. The key practices are organized into categories covering common vulnerabilities and testing approaches. Here’s a concise summary of the core practices:
Information Gathering (OTG-INFO)
Identify application architecture, endpoints, and technologies.
Map URLs, parameters, and entry points.
Configuration and Deployment Management Testing (OTG-CONFIG)
Check for insecure server configurations.
Verify HTTPS, headers, default accounts, and error messages.
Identity Management Testing (OTG-AUTHN / OTG-AUTHZ)
Test authentication mechanisms (password policies, multi-factor).
Test authorization controls to prevent privilege escalation.
Session Management Testing (OTG-SESS)
Verify secure session IDs, cookie attributes, and logout behavior.
Input Validation Testing (OTG-INPVAL)
Check for injection flaws (SQL, OS, LDAP).
Test input sanitization and output encoding.
Error Handling Testing (OTG-ERR)
Check for sensitive information disclosure via error messages.
Cryptography Testing (OTG-CRYP)
Verify proper use of encryption, hashing, and secure key storage.
Business Logic Testing (OTG-BUSLOGIC)
Identify logic flaws that bypass intended functionality.
Client-Side Testing (OTG-CLNT)
Test browser-side controls, JavaScript, and local storage security.
API and Web Services Testing (OTG-API / OTG-WST)
Test API endpoints for authentication, authorization, injection, and data exposure.
File Upload and Handling Testing (OTG-FILE)
Test upload functionality for malware, file type restrictions, and path traversal.
Mobile Testing (if included, OTG-MOB)
Assess mobile apps for data storage, communication, and platform-specific risks.
These practices are used systematically to cover the attack surface, combining manual testing and automated tools. OWASP also emphasizes documenting test cases, reproducing vulnerabilities, and verifying fixes.
Preparation & Planning
Establish incident response procedures.
Ensure forensic tools and processes are ready before incidents.
Train staff on evidence handling.
Evidence Preservation
Isolate affected systems to prevent data loss.
Create bit-by-bit forensic images of drives and memory.
Maintain integrity with hashing (MD5, SHA-256).
Chain of Custody
Document every step: who collected, moved, or analyzed evidence.
Prevent contamination or tampering.
Data Collection & Acquisition
Collect volatile data first (RAM, network connections, running processes).
Collect non-volatile data (disk, logs, databases) systematically.
Use write-blockers when imaging drives.
Analysis
Examine logs, system artifacts, network captures, and application data.
Identify attack vectors, malware behavior, and unauthorized actions.
Use automated tools alongside manual review for accuracy.
Documentation & Reporting
Keep detailed notes of methods, timelines, and findings.
Produce reports suitable for legal or compliance purposes.
Include reproducible evidence for auditors or courts.
Security & Confidentiality
Store evidence securely.
Limit access to authorized personnel.
Recovery & Lessons Learned
Apply patches, fixes, or policy changes.
Update forensic procedures based on findings.
In short: “Preserve, Collect, Analyze, Document, and Learn.”
Dr. Ghoniem Lawaty
Tech Evangelist @TechHuB Egypt