what’s unit testing that happens at the Coding phase of the SDLC?
๐น Unit testing is a type of software testing where individual parts (units) of the code are tested separately to make sure they work correctly.
๐น It happens during the Coding phase of the Software Development Life Cycle (SDLC) and is usually done by developers.
๐น Why is Unit Testing Important?
โ Finds bugs early โ Helps detect small errors before they affect the entire system.
โ Ensures each function works correctly โ Each method, function, or class is tested separately.
โ Makes debugging easier โ If something breaks, you know exactly which part of the code is causing the problem.
What is User Acceptance Testing (UAT) in Simple Terms?
๐น User Acceptance Testing (UAT) is the final phase of software testing where real users test the system to make sure it works as expected before it goes live.
๐น It ensures that the software meets business requirements and is ready for use by actual users.
๐น Why is UAT Important?
โ Confirms the software meets business needs โ Does it solve the real problem?
โ Finds usability issues โ Is it easy to use for the end users?
โ Prevents costly errors after release โ Identifies any missing features or bugs before the software is launched.
๐น Example of UAT in Action:
๐ฉโ๐ผ Scenario: A company is developing a new employee payroll system.
1๏ธโฃ The developers finish coding and the system passes all technical tests (unit testing, integration testing).
2๏ธโฃ Before launching, the HR team (real users) tests it to ensure:
โ
Salaries are calculated correctly.
โ
Payslips generate without errors.
โ
Employees get paid on time.
3๏ธโฃ If everything works as expected, the system is approved for release.
4๏ธโฃ If issues are found, they are reported and fixed before going live.
What is QA (Quality Assurance) in Simple Terms?
๐น Quality Assurance (QA) is the process of making sure that software works correctly, meets requirements, and is free of bugs before it is released.
๐น QA happens throughout the Software Development Life Cycle (SDLC) to prevent defects rather than just fixing them.
What is DevOps and DevSecOps in Simple Terms?
๐น What is DevOps? (Development + Operations)
๐น DevOps is a collaboration between developers (Dev) and IT operations (Ops) to speed up software development, testing, and deployment.
๐น It aims to automate and streamline the software delivery process so updates and new features can be released faster and more reliably.
โ
Key Features of DevOps:
โ Faster software releases ๐
โ Automated testing and deployment ๐
โ Continuous Integration & Continuous Deployment (CI/CD) โ
โ Better collaboration between developers and IT teams ๐จโ๐ป๐ฉโ๐ป
๐ Example:
A company uses DevOps to release updates to its mobile app every week instead of every few months.
๐น What is DevSecOps? (Development + Security + Operations)
๐น DevSecOps is DevOps with Security built-in. It ensures that security is a priority throughout the entire software development process, not just at the end.
๐น Instead of testing for security after the software is built, DevSecOps integrates security from the start.
โ
Key Features of DevSecOps:
โ Security is included in every stage of development ๐
โ Automated security testing in CI/CD pipelines ๐
โ Developers are trained to write secure code ๐
โ Faster response to security vulnerabilities ๐ง
๐ Example:
A bank uses DevSecOps to ensure its online banking app is secure by automating security scans in its software release process.
Difference Between Blind Content-Based and Blind Timing-Based SQL Injection
Both Blind Content-Based and Blind Timing-Based SQL Injection occur when the attacker doesn’t directly see error messages or database output but still tries to extract information from a database.
๐น 1. Blind Content-Based SQL Injection (Boolean-Based)
๐น The attacker injects SQL queries and observes changes in the web page content to determine if the query was successful or not.
๐น It is called Boolean-Based SQL Injection because it relies on True/False responses from the server.
โ
Example Scenario:
๐น A website login form takes a username and password from users and checks if they exist in the database:
SELECT * FROM users WHERE username = ‘admin’ AND password = ‘12345’;
๐น An attacker enters this SQL payload in the password field:
OR 1=1 –
๐น The query becomes:
SELECT * FROM users WHERE username = ‘admin’ AND password = ‘’ OR 1=1 – ‘;
๐น If the page loads normally, the attacker knows the injection worked!
๐น If the page says “Invalid Login”, the attacker tries a different input.
๐ How the Attacker Knows?
If the web page content changes (e.g., redirects to a new page or displays “Welcome Admin”), the attacker confirms the query is successful.
If the response is unchanged, the query failed.
๐น 2. Blind Timing-Based SQL Injection (Time Delay Exploitation)
๐น The attacker can’t see any content changes, so they use SQL commands that delay responses to determine if the query was executed.
๐น This is useful when error messages and responses are completely hidden.
โ
Example Scenario:
๐น An attacker injects this SQL query:
SELECT * FROM users WHERE username = ‘admin’ AND IF(1=1, SLEEP(5), 0);
๐น The query tells the database:
If 1=1 is TRUE, wait 5 seconds before responding.
Otherwise, respond immediately.
๐น If the webpage takes 5 seconds to load, the attacker knows the injection worked!
๐ How the Attacker Knows?
Normal response time = Query failed.
5-second delay = Query worked (database executed the attacker’s command).
What is a DLL (Dynamic-Link Library)?
๐น A DLL (Dynamic-Link Library) is a shared file that contains code and functions that multiple programs can use at the same time.
๐น It helps programs run efficiently, reducing redundancy and saving memory.
โ Example of a DLL:
User32.dll โ Handles user interface functions (e.g., buttons, windows).
Kernel32.dll โ Provides access to system functions like file handling.
๐ Think of a DLL like a toolbox ๐งฐ: Instead of every program having its own tools, they all share a common toolbox to avoid wasting resources.
What is a False Authentication Mechanism in Social Engineering? (Simple Explanation)
๐น False Authentication Mechanism is a social engineering trick where an attacker creates a fake authentication process to trick victims into entering their login credentials or performing an action that gives the attacker access.
๐น It exploits human trust by making the victim believe they are logging into a legitimate system when, in reality, they are handing over their credentials to the attacker.
What is NTLM in Simple Terms?
๐น NTLM (NT LAN Manager) is an old authentication protocol developed by Microsoft to allow Windows computers to verify user identities when logging into a system or network.
๐น It is used for Windows authentication, especially in environments where Active Directory (AD) is not available.
๐ Think of NTLM like an ID badge for logging into Windows networks. It helps a computer confirm, โIs this user really who they say they are?โ
๐น How NTLM Works (Simple Explanation)
NTLM uses a challenge-response mechanism instead of directly sending passwords over the network.
โ
Example Scenario: Logging Into a Windows Network
1๏ธโฃ You enter your username and password on your Windows login screen.
2๏ธโฃ NTLM doesnโt send your password directlyโinstead, it:
Takes your password, encrypts it (hashes it), and stores it securely.
When you log in, the system checks the stored hash to see if it matches the one generated from your login attempt.
3๏ธโฃ If the hashes match, youโre authenticated and allowed to access the network.
๐ Key Point: NTLM avoids sending plain-text passwords but is still outdated and vulnerable to attacks.
What is a Pass-the-Hash (PtH) Attack? (Simple Explanation)
๐น How NTLM Pass-the-Hash Works (Step-by-Step)
1๏ธโฃ User Authentication:
When a user logs into a Windows machine, the password is hashed (converted into an encrypted form) using NTLM.
The hash is stored locally and can be used for authentication without sending the actual password over the network.
2๏ธโฃ Attacker Gets the Hash:
The attacker may steal the hash from the computerโs memory, from a dumped file, or through tools like Mimikatz (which can extract NTLM hashes).
Example: If the attacker compromises a user’s machine, they can extract the NTLM hash from the machine’s memory or from network traffic.
3๏ธโฃ Attacker Uses the Hash:
The attacker then uses this hash to authenticate as the victim on another machine or network service, without needing the actual password.
The attacker passes the hash to a new system, tricking it into thinking itโs the real user.
4๏ธโฃ Gaining Access:
The system accepts the hash as a valid login credential and grants access to the attacker.
This attack can spread across the network, especially if the same credentials are used on multiple systems.
NOTE:
In an NTLM authentication environment, the authentication happens at the network level, not just the local device, and the network only accepts the password hash for authentication, not the plain-text password.
What is an Unvalidated Redirection URL Vulnerability?
๐น Unvalidated redirection URL vulnerability happens when a website allows users to be redirected to another site without properly checking the URL.
๐น Attackers exploit this flaw to send victims to malicious websites disguised as legitimate ones, leading to phishing attacks, session hijacking, or credential theft.
๐น How Does an Unvalidated Redirect Work? (Example)
โ
Scenario: A banking website has a redirect feature after login:
https://bank.com/login?redirect=success.html
This URL ensures that after logging in, users are sent to success.html on the bank’s website.
The problem? The website does not validate where the redirect is pointing.
๐ฅ Attackerโs Trick (Modifying the URL):
An attacker modifies the redirect parameter to a phishing site:
https://bank.com/login?redirect=http://hacker.com/fake-login
The victim clicks this fake link, thinking itโs a real bank login page.
They enter their username & password, unknowingly sending them to the attacker.
1๏ธโฃ Indirect Reflected XSS via Form Submission & Link Sharing
๐น Even though the attacker types the malicious script, the victim will see the reflected response when they visit the manipulated page.
โ Scenario: A Fake Error Message on a Login Page
A banking website has a login form.
If users enter incorrect credentials, the site reflects the username in an error message:
<p>Sorry, the username "<b>admin</b>" does not exist.</p>
The attacker submits the login form with a malicious input:
<script>
alert('Hacked!')
</script>The website doesnโt sanitize the input and reflects it in the error message, so the victim sees:
<p>Sorry, the username "
<script>
alert('Hacked!')
</script>" does not exist.</p>Now, the attacker copies the URL with the injected input and sends it to a victim:
https://bank.com/login?username=
alert('Hacked!')The attacker injects the script using form input but tricks victims into visiting the URL with the malicious payload.
This works the same way as URL-based Reflected XSS, except the payload originates from a form field.
The most effective way to launch a Reflected XSS attack is to:
1๏ธโฃ Inject a malicious script into a vulnerable form input (e.g., search bar, login field, or feedback form).
2๏ธโฃ Make sure the input is reflected in the page’s response (without being sanitized or encoded).
3๏ธโฃ URL-encode the payload so it remains valid inside a link.
4๏ธโฃ Attach the encoded payload to a link and send it to the victim (via email, social media, or messages).
5๏ธโฃ When the victim clicks the link, the website processes the malicious script and executes it in their browser.
6๏ธโฃ The attack takes effect, which could lead to:
Stealing session cookies (to hijack the victimโs account).
Stealing login credentials (redirecting users to a fake login page).
Executing malware downloads (forcing malicious actions on the victim’s device).
Defacing the webpage (modifying content visible to the user).
What is Server-Side Request Forgery (SSRF)
๐น Server-Side Request Forgery (SSRF) is a cyberattack where an attacker tricks a server into making requests to internal or external resources on its behalf.
๐น The attacker exploits a vulnerable web application to send unauthorized requests from the server, often targeting internal networks or cloud services.
๐ Think of it like tricking a receptionist into calling secret phone numbers for you, giving you access to information you shouldnโt have.
๐น How Does SSRF Work? (Step-by-Step)
โ
Step 1: Attacker Finds a Vulnerable Web Application
A website allows users to fetch remote content by providing a URL (e.g., a file downloader, profile picture fetcher, or metadata checker).
โ
Step 2: Attacker Manipulates the URL Input
Instead of a normal request like:
https://example.com/fetch?url=https://trusted-website.com/image.jpg
The attacker modifies the URL to access internal services:
https://example.com/fetch?url=http://localhost/admin
Since the request is made by the server, the firewall assumes itโs legitimate and allows it.
โ
Step 3: The Server Fetches Restricted Data
The server unknowingly sends back sensitive internal data to the attacker.
If the attacker targets cloud services, they might retrieve credentials or sensitive API keys.
What is SOAR?
๐น SOAR (Security Orchestration, Automation, and Response) is a cybersecurity system that helps security teams detect, respond to, and manage threats automatically.
๐น It reduces manual work by automating tasks like investigating alerts, blocking threats, and responding to incidents.
๐น SOAR (Security Orchestration, Automation, and Response) is a cybersecurity system that helps security teams detect, respond to, and manage threats automatically.
๐น It reduces manual work by automating tasks like investigating alerts, blocking threats, and responding to incidents.
โ
SOAR does not replace existing security toolsโit integrates with them.
โ
Security tools like firewalls, SIEM, EDR (Endpoint Detection & Response) install SOAR agents to connect and automate responses.
โ
Example: A SOAR agent installed on a SIEM system can automate threat analysis.
๐ Best for: Organizations that already have SIEM, firewalls, and security tools and want to automate responses.
๐น How SOAR Works (Step-by-Step Example)
โ
Scenario: A Phishing Email Attack
1๏ธโฃ A phishing email is sent to employees.
2๏ธโฃ SOAR detects it using email security tools and threat intelligence.
3๏ธโฃ It automatically analyzes the email, checking links and attachments for malware.
4๏ธโฃ If the email is malicious, SOAR blocks the sender, deletes the email, and alerts the security team.
5๏ธโฃ If needed, SOAR quarantines any infected devices to prevent further damage.
๐ Result: The threat is neutralized without requiring human effort for every step.
What is a Parameterized Query?
๐น A parameterized query is a way to safely handle user input in SQL queries by separating the data (input) from the SQL commands.
๐น It prevents SQL injection attacks by ensuring that user input is treated as data, not executable code.
example:
cursor.execute(“SELECT * FROM users WHERE username = ? AND password = ?”, (userInput, passwordInput))
breakdown of the different environments and their roles, along with examples: