Cyber Security
OWASP for Web and Mobile
OWASP for Web and Mobile
Lecture 04: OWASP for Web & 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.
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
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
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
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
Default settings, exposure, or misconfigured servers/apis
Use of unpatched libraries or third‑party modules
Weak login, session management, or credential handling
Unsafe update paths, unverified data inputs (incl. CI/CD pipelines)
Inadequate logging/alerting leads to delayed detection
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.
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
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
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
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
What: Data transmitted over unprotected channels
Example: Sending login over HTTP instead of HTTPS
Resolution: Enforce HTTPS, validate TLS certs, use SSL pinning
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
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
What:Insecure default settings, open debug endpoints
Example: Debug flag enabled in production app
Resolution: Disable debug mode, secure manifest, validate configs
What: Sensitive data stored insecurely on device
Example: Credit card info saved in plain text on device
Resolution: Use platform keystore/encrypted storage APIs
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:
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
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
APIs expose or allow modification of sensitive fields that users shouldn’t control.
Also includes: Excessive data exposure, which was in OWASP 2019
Example: A user updates their role from “user” to “admin” via API.
Solution: ABAC/ Prevent automapping
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
Attackers access sensitive API functions they shouldn’t.
Example: Normal user accessing admin-only endpoints.
Solution: RBAC
Business logic is exposed without controls, allowing abuse.
Example: Automated checkout bots bypassing purchase limits.
Solution: CAPTCHA
API fetches a URL supplied by the attacker, letting them reach internal systems.
Example: API allows arbitrary URL fetching → attacker scans internal network.
Default, misconfigured, or unnecessary settings expose vulnerabilities.
Example: Exposed Swagger UI in production with open API keys.
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
Trusting external APIs blindly without validation.
Example: App trusts a third-party API response that injects malicious data.
Dr. Ghoniem Lawaty
Tech Evangelist @TechHuB Egypt