Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
24 views9 pages

Cybersecurity Cheatsheet

The OWASP Top 10 is a standard document that outlines the ten most critical web application security risks, maintained by the Open Web Application Security Project. Key risks include broken access control, cryptographic failures, and injection vulnerabilities, each with examples and recommended fixes. This document serves as a guide for cybersecurity assessments and secure development practices.

Uploaded by

dhanushammu401
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views9 pages

Cybersecurity Cheatsheet

The OWASP Top 10 is a standard document that outlines the ten most critical web application security risks, maintained by the Open Web Application Security Project. Key risks include broken access control, cryptographic failures, and injection vulnerabilities, each with examples and recommended fixes. This document serves as a guide for cybersecurity assessments and secure development practices.

Uploaded by

dhanushammu401
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

Here is a concise explanation of the OWASP Top 10, which is a standard awareness

document listing the ten most critical web application security risks. It's maintained by the
Open Web Application Security Project (OWASP) and widely used in cybersecurity
assessments and secure development practices.

🔟 OWASP Top 10 Security Risks (2021 Edition)

1. Broken Access Control

 What it is: When users can act outside their intended permissions.

 Example: A user accessing admin functions or data just by changing a URL or request.

 Fix: Implement strict role-based access checks on the server side.

2. Cryptographic Failures (Previously: Sensitive Data Exposure)

 What it is: Weak encryption or poor protection of sensitive data like passwords,
credit card numbers, etc.

 Example: Storing passwords in plaintext or using outdated SSL/TLS.

 Fix: Use strong encryption protocols, securely store and transmit sensitive data.

3. Injection

 What it is: Attacker injects malicious code into a program (like SQL, NoSQL, OS
commands).

 Example: SQL Injection – using ' OR 1=1 -- in a login field to bypass authentication.

 Fix: Use prepared statements, parameterized queries, and input validation.

4. Insecure Design

 What it is: Security flaws due to poor system design, not just coding bugs.

 Example: Lack of multi-factor authentication in a high-risk application.

 Fix: Implement secure design principles from the start – threat modeling, security
patterns, etc.

5. Security Misconfiguration
 What it is: Insecure default settings, unnecessary features enabled, or outdated
software.

 Example: Running an application in debug mode in production.

 Fix: Use security hardening guides, remove unused services, regular audits.

6. Vulnerable and Outdated Components

 What it is: Using libraries, frameworks, or components with known vulnerabilities.

 Example: Running a web server with an old version that has known exploits.

 Fix: Regularly update dependencies and monitor for vulnerability disclosures.

7. Identification and Authentication Failures

 What it is: Weaknesses in login mechanisms, like broken authentication logic or poor
session handling.-

 Example: Allowing brute-force login attempts without rate limiting.

 Fix: Use MFA (Multi-Factor Authentication), secure session tokens, strong password
policies.

8. Software and Data Integrity Failures

 What it is: Failure to verify code, updates, or data integrity.

 Example: Using unsigned software updates or allowing plugins without verification.

 Fix: Use digital signatures, secure CI/CD pipelines, and integrity checks.

9. Security Logging and Monitoring Failures

 What it is: Inadequate logging, monitoring, or alerting on security events.

 Example: A breach going unnoticed because suspicious activity wasn't logged.

 Fix: Log critical events, monitor them in real-time, set up alerts and incident response
plans.

10. Server-Side Request Forgery (SSRF)


 What it is: Attacker tricks server into making requests to unintended internal or
external systems.

 Example: Exploiting a file upload API to access internal services like metadata
endpoints.

 Fix: Validate URLs, block internal IPs, and use network-level access controls.

✅ Summary Table

Risk # Risk Name Key Concern

1 Broken Access Control Unauthorized access

2 Cryptographic Failures Weak data protection

3 Injection Code manipulation

4 Insecure Design Flaws in system architecture

5 Security Misconfiguration Unsafe default settings

6 Vulnerable/Outdated Components Using known-vulnerable libraries

7 Identification/Auth Failures Broken login/session handling

8 Software/Data Integrity Failures Tampering with trusted processes

9 Logging/Monitoring Failures Lack of visibility into attacks

10 SSRF Server misused to access resources

Let me know if you'd like this in text, PDF, or Word format, or if you want real-life examples
or fixes for any of these.

8. Software and Data Integrity Failures

 Meaning: Trusting code or updates without checking if they were changed.

 Example: Automatically updating software from an insecure source.

 Why it's bad: Attackers can insert malicious code into the update.

 Fix: Use trusted sources, sign code and files, and protect your build/update process.

9. Security Logging and Monitoring Failures


 Meaning: Not keeping track of what's happening in your system.

 Example: Not recording failed login attempts or suspicious activity.

 Why it's bad: You might not notice if you're under attack.

 Fix: Set up logs for important events and monitor them regularly.

10. Server-Side Request Forgery (SSRF)

 Meaning: The server is tricked into making a request on behalf of an attacker.

 Example: A file upload tool lets an attacker access internal services by entering a
special URL.

 Why it's bad: Hackers can reach systems that should be private.

 Fix: Block dangerous requests, check URLs, and don’t allow open access to internal
services.

🧠 Simple Summary

# Risk Name Real-Life Meaning

1 Broken Access Control Anyone can do anything on your app

2 Cryptographic Failures Secrets aren't well protected

3 Injection Hackers insert code to control your app

4 Insecure Design Poor planning leads to weak security

5 Security Misconfiguration Wrong settings or weak defaults

6 Outdated Components Using old software with known problems

7 Auth Failures Login system can be bypassed

8 Data Integrity Failures Trusting updates or files too easily

9 No Logging/Monitoring You don’t notice if something goes wrong

10 SSRF Server used to attack other systems

Would you like this explanation in Word, PDF, or plain text document? I can generate that
for you.
Ask ChatGPT

Tools

1. SQL Injection (SQLi)

 What it is: Attacker injects harmful SQL commands to access or modify data.

 Example: admin' OR 1=1 -- in login form bypasses login.

 ✅ Fixes:

o Use parameterized queries or prepared statements (not string


concatenation).

o Use ORMs like SQLAlchemy or Hibernate that auto-handle queries.

o Validate and sanitize user input.

o Disable detailed error messages in production.

2. Cross-Site Scripting (XSS)

 What it is: Running attacker-controlled scripts in someone else’s browser.

 Example: <script>alert('hacked')</script> in comment box.

 ✅ Fixes:

o Escape all user inputs in HTML, JS, or URL contexts.

o Use libraries like DOMPurify to sanitize HTML.

o Implement Content Security Policy (CSP) headers.

o Avoid dangerous functions like innerHTML or document.write().

3. Cross-Site Request Forgery (CSRF)

 What it is: Tricks logged-in users into doing actions (e.g. changing password).

 Example: Auto-submitting form to change password using user's cookie.

 ✅ Fixes:

o Use CSRF tokens in every form and verify on the server.

o Set cookies with SameSite=Lax or Strict.

o Check Referer or Origin headers.


4. Clickjacking

 What it is: Tricking users into clicking invisible elements.

 Example: A fake game page clicking the “Transfer Money” button.

 ✅ Fixes:

o Add header: X-Frame-Options: DENY or SAMEORIGIN.

o Use frame-ancestors 'none' in Content-Security-Policy.

o Use frame-busting JavaScript like if (top !== self) top.location = self.location.

5. CORS Misconfiguration

 What it is: Allowing cross-origin access to sensitive data.

 Example: Allowing Access-Control-Allow-Origin: * with credentials.

 ✅ Fixes:

o Only allow trusted origins (hardcoded).

o Never use * with Access-Control-Allow-Credentials: true.

o Validate Origin header before allowing CORS responses.

6. XML External Entity (XXE) Injection

 What it is: XML input loads local or remote files.

 Example: XML containing <!ENTITY x SYSTEM "file:///etc/passwd">.

 ✅ Fixes:

o Disable external entities in XML parsers:

 Java: factory.setFeature("http://apache.org/xml/features/disallow-
doctype-decl", true)

o Use JSON instead of XML when possible.

o Use secure libraries that disable XXE by default.

7. Server-Side Request Forgery (SSRF)


 What it is: Server makes a request to internal or unintended systems.

 Example: Accessing http://localhost:8080/admin via image upload form.

 ✅ Fixes:

o Allow only whitelisted external URLs.

o Block access to localhost, 127.0.0.1, and internal IPs.

o Disable unnecessary protocols like file://, ftp://.

8. OS Command Injection

 What it is: Attacker runs commands on the server’s operating system.

 Example: Entering ; whoami in an input to see server user.

 ✅ Fixes:

o Use safe APIs (e.g. execFile() instead of exec()).

o Never pass raw user input into system commands.

o Validate and whitelist input strictly (e.g., only numbers).

9. Path Traversal

 What it is: Accessing restricted files by manipulating file paths.

 Example: Changing image path to ../../../../etc/passwd.

 ✅ Fixes:

o Sanitize user input and remove ../ sequences.

o Use server-side functions that normalize paths (e.g., realpath()).

o Restrict access to specific directories only.

10. Business Logic Vulnerabilities

 What it is: Abusing how an app works to get unfair results.

 Example: Reusing a discount coupon or skipping payment step.

 ✅ Fixes:

o Review app workflows with abuse cases in mind.


o Add server-side validation (not just frontend checks).

o Track and limit unusual behavior (like too many password resets or
purchases).

11. Host Header Attacks

 What it is: Manipulating the Host header to poison cache or reset links.

 Example: Making the reset password email link point to attacker site.

 ✅ Fixes:

o Never trust the Host header from the request.

o Use absolute URLs set on the server side, not from headers.

o Implement proper server-side validation of hostnames.

12. OAuth Issues

 What it is: Abusing login with Google/Facebook flows.

 Example: Manipulating the redirect URL to steal tokens.

 ✅ Fixes:

o Strictly validate redirect URIs.

o Don’t expose access tokens in URLs.

o Use state parameters to prevent CSRF in OAuth.

13. File Upload Vulnerabilities

 What it is: Uploading harmful files to execute code or break the system.

 Example: Uploading shell.php to gain server access.

 ✅ Fixes:

o Allow only safe file types (e.g., .jpg, .pdf) and verify content type.

o Rename files and store outside the web root.

o Scan uploaded files with antivirus or sandbox.

o Block double extensions (.jpg.php) and validate filename on server.


✅ Final Advice

Vulnerability Key Fix

SQLi Use prepared statements and input validation

XSS Sanitize and encode all user input

CSRF Add CSRF tokens and use SameSite cookies

Clickjacking Use X-Frame-Options and CSP

CORS Misconfig Restrict origins and never allow * with credentials

XXE Disable DTDs and external entities in XML parsers

SSRF Validate URLs and block internal IP ranges

OS Command Injection Avoid shell commands; sanitize input strictly

Path Traversal Use secure path functions and whitelist file names

Business Logic Validate logic on the server and limit abuse

Host Header Never trust headers for URL generation

OAuth Validate redirect URIs and use state tokens

File Upload Limit types, scan files, and store securely

You might also like