Attacker attacks the victim throw vulnerabilities to cause threats, so:
Threat is any potential occurrence, malicious or otherwise, that could harm an asset. In other words, a threat is any bad thing that can happen to your assets.
Vulnerability is a weakness that makes a threat possible.
Attack is an action that exploits a vulnerability or enacts a threat.
Asset: A resource of value such as the data in a database or on the file system, or a system resource
Countermeasure. A safeguard that addresses a threat and mitigates risk
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.
This section is to determine how security requirements can be detected.
As we mention in the opposite graph:
Generate abuse cases from Use cases
Risk assessment
Risk based security test
Penetration testing
Feedback
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.
Injection
Broken Authentication
XXE: XML External entities
Sensitive data exposure
Security Misconfiguration
In-Secure deserialization
Broken Access control
Cross-site scripting
Insufficient Logging and monitoring
Using components with known vulnerabilities
Mission Critical Assets
Data Security
Application Security
End point Security
Network Security
Perimeter Security
Human Layer
Destruction (Data/Infrastructure)
Disturb service availability
Data exploits
Money stealing
(Web Application Firewall) is a specialized security solution that monitors, filters, and blocks HTTP/HTTPS traffic to and from a web application, protecting it from various attacks.
🔍 Traffic Inspection
⛔ Automatic Blocking
🔧 Custom Rules
🧠 Machine Learning (some WAFs)
SQL Injection
Cross-Site Scripting (XSS)
File Inclusion (LFI/RFI)
Command Injection
CSRF (Cross-Site Request Forgery)
Commercial: AWS WAF, Azure WAF, Cloudflare, Imperva, F5
Open Source: ModSecurity (Apache/Nginx), NAXSI
WAF complements but does not replace secure coding.
It’s strongest against input-based attacks (e.g., injections).
Less effective against logic-based or role-based vulnerabilities.
Fixation : It’s an attack that hacker can steal your session ID and use it in executing http requests
XSS : Cross site scripting
CSRF: Cross-Site Request forgery is an attack where a malicious site sends a request to a vulnerable site where the user is currently logged in.
Hijacking : To steal something from the client or the server
Brute-Force: Attacker trying many passwords or passphrases with the hope of eventually guessing correctly. Can be resolved by delaying the repetitive trials and block the incoming IPs from IIS
Tampering: Means attacker trails for changing the parameters values in order to do something
Sniffing : It’s the act of monitoring traffic on the network for data such as plaintext passwords or configuration information. With a simple packet sniffer, an attacker can easily read all plaintext traffic. Also, attackers can crack packets encrypted by lightweight hashing algorithms and can decipher the payload that you considered to be safe. The sniffing of packets requires a packet sniffer in the path of the server/client communication. SSL is the key countermeasure. The attacker place packet-sniffing tool on the network to monitor the traffic.
SonarQube
Invicti
Acunetix
Problem
Hackers act as a Man in the middle
He creates a fake certificate to force it to be able to decrypt SSL using Burp Suite, and MITM proxy
Using that, He can take your token and complete the process
Or create a valid token, and try the broken authentication and authorization
SSL strippng: Another approch, hacker tries to connect using http instead of https
Solution
Enable HSTS (HTTP Strict Transport Security) at all layers: Strict-Transport-Security
Enable TLS 1.2 or higher
Obfuscate the frontend
Eliminate sensitive data exposure like secret keys:
Keep it in secret-map like Vault
Enable Auto-Rotate Secret key instead of a fixed one
Enable WAF services(Web application firewall) that to prevent overengineering the solution by security aspects, as it apply machine learning mechanisms for anomaly detection, and OWASP best practices.
apply MFA: (Multi factor authentication), before and during the process, like 2-factor authentication before sensitive operations in the solution:
Sensitive data exposure
Ownership transfer
Encrypt sensitive data, and only enable decryption from the solution
Enable a grace-period: like 24-48 hours to make sure it's real transactions
The core zero-trust principle is: "Never Trust, Always Verify."
In order to implement this principle, We should apply the following practices:
Integrate SAST tools at the pipeline, like SonarCloud
Automated Security Testing (OWASP ZAP, Burp Suite )
WAF as the umbrella for your solution, which detects the following:
XSS
Rate limiting
Anomaly detection
Injections
Block malicious payloads
Strong Authentication (OAuth 2.0, OpenID Connect, JWT)
Enable CORS restrictions
Configure and implement CSRF tokens
MFA: Multi-factor authentication, authentication at first login
Implement Role-Based Access Control (RBAC) to prevent access to improper services
Encrypt payload
Use secret keys
Auto-Rotate secret keys
Use a secret key for each channel
Never expose secret key in the front-end layer
Obfuscation of frontend
Add HSTS and XSS headers at the frontend
Add HSTS and XSS headers at the backend
Continuous authentication on core activities:
Payment
Asset transfer
Encrypt traffic
SSL
TLS 1.2 or higher
Prevent data crawling
Infrastructure security
API versioning deprecation model for old APIs
Front End Security
Communication Security
Backend Security
Database Security
Infrastructure security