0% found this document useful (0 votes)
23 views

Cse Assignment 2

Cyber Security Essentials

Uploaded by

Kaivalya Parihar
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)
23 views

Cse Assignment 2

Cyber Security Essentials

Uploaded by

Kaivalya Parihar
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/ 8

CSE ASSIGNMENT 2

.1.Explain secure software development life cycle ..


Planning and Requirements Gathering

 Security Requirements: Identify security requirements alongside functional


requirements. This includes compliance with regulations, data protection needs, and
threat modeling.
 Risk Assessment: Perform an initial risk assessment to understand potential threats
and vulnerabilities related to the software.

2. Design

 Secure Architecture: Design the system with security in mind, incorporating


principles like least privilege, defense in depth, and secure defaults.
 Threat Modeling: Analyze potential threats and design countermeasures to address
them. Tools like STRIDE or DREAD can be useful here.

3. Implementation (Coding)

 Secure Coding Practices: Follow secure coding standards (e.g., OWASP Top Ten)
to mitigate common vulnerabilities such as SQL injection, cross-site scripting, etc.
 Code Reviews: Conduct regular code reviews focusing on security issues and
ensuring adherence to secure coding practices.

4. Testing

 Security Testing: Perform security-specific tests, such as penetration testing, static


and dynamic code analysis, and vulnerability assessments.
 Validation of Security Controls: Ensure that security controls work as intended and
that the software is resilient against attacks.

5. Deployment

 Secure Configuration: Ensure that the deployment environment is securely


configured, including firewalls, access controls, and monitoring.
 Patch Management: Establish a process for applying security patches and updates to
both the software and its dependencies.

6. Maintenance

 Monitoring and Logging: Implement logging and monitoring to detect and respond
to security incidents post-deployment.
 Incident Response Plan: Develop an incident response plan to handle potential
security breaches, including communication and recovery strategies.

7. Review and Improvement


 Post-Mortem Analysis: After incidents or near misses, conduct reviews to identify
what went wrong and how to improve security in future projects.
 Continuous Training: Provide ongoing security training and awareness for
developers and stakeholders to keep security top of mind.

2.write short note on common applications


vulnerabilities..
SQL Injection

 Description: An attacker can manipulate SQL queries by injecting malicious code


into input fields, allowing unauthorized access to the database.
 Impact: Can lead to data theft, data manipulation, or complete database compromise.

2. Cross-Site Scripting (XSS)

 Description: This occurs when an application allows users to input data that is then
rendered in a web page without proper validation or escaping.
 Impact: Attackers can execute scripts in the context of a user’s browser, leading to
session hijacking, data theft, or defacement.

3. Cross-Site Request Forgery (CSRF)

 Description: An attacker tricks a user into unknowingly submitting a request to a web


application where the user is authenticated.
 Impact: Can lead to unauthorized actions on behalf of the user, such as changing
account settings or initiating transactions.

4. Insecure Direct Object References (IDOR)

 Description: An application exposes direct references to internal objects (like


database records), allowing unauthorized access if proper access controls are not
implemented.
 Impact: Attackers can access or modify data that they should not have access to.

5. Security Misconfiguration

 Description: This occurs when security settings are improperly configured or left
with default settings in an application or server.
 Impact: Can lead to unauthorized access, data leaks, or the exposure of sensitive
information.

6. Sensitive Data Exposure

 Description: Failure to protect sensitive information (like passwords, credit card


numbers, or personal data) through encryption or secure transmission.
 Impact: Leads to data breaches and can result in identity theft or financial loss.
7. Broken Authentication and Session Management

 Description: Flaws in authentication mechanisms that allow attackers to compromise


user accounts or session tokens.
 Impact: Can lead to unauthorized access and account takeover.

8. Using Components with Known Vulnerabilities

 Description: Incorporating libraries or frameworks that have known security


vulnerabilities without applying patches or updates.
 Impact: Attackers can exploit these vulnerabilities to compromise the application.

9. Insufficient Logging and Monitoring

 Description: Failure to log and monitor application activity properly, which can
hinder the detection of security incidents.
 Impact: Makes it difficult to respond to attacks or understand their impact post-
incident.

3.commpare security features of windows , Linux, and


macos
1. User Permissions and Access Control

 Windows:
o Uses a robust User Account Control (UAC) system to manage permissions.
o Supports Active Directory for enterprise-level access control and policy
enforcement.
o Default accounts (like Administrator) have significant privileges, which can be
a risk if not managed properly.
 Linux:
o Employs a traditional Unix-like permission model (owner, group, others).
o The use of sudo allows users to perform administrative tasks without full
administrative privileges, promoting the principle of least privilege.
o User and group management is highly configurable.
 macOS:
o Also uses Unix-based permissions similar to Linux.
o Incorporates System Integrity Protection (SIP) to restrict the actions of both
users and applications, enhancing system security.
o Utilizes a permission model that emphasizes user privacy and control over
applications.

2. Built-in Security Tools

 Windows:
o Comes with Windows Defender, a built-in antivirus and anti-malware
solution.
o Offers Windows Firewall for network protection.
o Features BitLocker for full disk encryption and Windows Hello for biometric
authentication.
 Linux:
o Many distributions come with built-in firewalls (e.g., iptables or UFW).
o Supports a variety of security tools, such as SELinux or AppArmor for
mandatory access control.
o Regularly updated repositories provide access to security patches and tools.
 macOS:
o Includes XProtect, a built-in antivirus solution that checks for known malware.
o Features Gatekeeper to prevent the installation of untrusted software.
o FileVault offers full disk encryption, enhancing data security.

3. Update Management

 Windows:
o Regularly releases updates through Windows Update, which includes security
patches.
o Users often have limited control over update scheduling, but can defer some
updates in enterprise environments.
 Linux:
o Generally offers more flexible update management, allowing users to choose
when and how to apply updates.
o Most distributions have a centralized package manager for easy access to
security patches.
o Frequent security updates due to the open-source nature and community
vigilance.
 macOS:
o Updates are managed through the Mac App Store, providing a unified
approach to software and system updates.
o Generally releases security updates alongside system updates, with options to
schedule installations.

4. Architecture and Design Philosophy

 Windows:
o A more closed-source model, which can make it challenging to evaluate
security vulnerabilities.
o More targeted by malware due to its widespread use, especially in enterprise
environments.
 Linux:
o Open-source architecture encourages community involvement in identifying
and addressing vulnerabilities.
o Typically seen as more secure by default due to its permission model and
minimal installation of unnecessary services.
 macOS:
o Combines Unix-based architecture with proprietary elements, allowing for a
controlled yet flexible environment.
o Focuses on user experience, which can sometimes lead to vulnerabilities if
users are not cautious.
Conclusion

Each operating system has strengths and weaknesses in terms of security.

 Windows offers a range of built-in tools and enterprise-level controls but is a frequent
target for malware.
 Linux is highly configurable and secure by design, making it popular for servers and
security-focused environments.
 macOS combines user-friendly features with solid security mechanisms, appealing to
users who prioritize privacy and security.

4.explain network monitoring and management tools ..


Network monitoring and management tools are essential for ensuring the performance,
reliability, and security of network infrastructures. They help administrators oversee network
operations, identify issues, and optimize performance. Here’s an overview of key features,
types, and popular tools in this domain:

Key Features

1. Real-Time Monitoring:
o Continuously checks the status of network devices (routers, switches, servers,
etc.) and services.
o Provides insights into bandwidth usage, latency, packet loss, and other
performance metrics.
2. Alerting and Notifications:
o Sends alerts via email, SMS, or in-app notifications when predefined
thresholds are crossed (e.g., high latency, device downtime).
o Helps administrators respond to issues promptly.
3. Traffic Analysis:
o Monitors network traffic to analyze patterns and usage.
o Identifies bandwidth hogs and unusual traffic that could indicate security
issues.
4. Reporting and Analytics:
o Generates reports on network performance, uptime, and historical data.
o Provides insights for capacity planning and network optimization.
5. Configuration Management:
o Assists in managing device configurations and backups.
o Enables version control and change management to prevent misconfigurations.
6. Security Monitoring:
o Monitors for suspicious activity, such as unauthorized access or abnormal
traffic patterns.
o Often integrates with intrusion detection/prevention systems (IDS/IPS).

Types of Tools

1. Network Performance Monitoring (NPM) Tools:


o Focus on the performance metrics of the network and its devices.
o Example: SolarWinds NPM, Paessler PRTG.
2. Network Configuration Management Tools:
o Manage device configurations, backups, and compliance.
o Example: ManageEngine Network Configuration Manager.
3. Network Traffic Analysis Tools:
o Analyze and visualize network traffic for bandwidth management and
troubleshooting.
o Example: Wireshark, NetFlow Analyzer.
4. Network Security Monitoring Tools:
o Focus on detecting and responding to security threats within the network.
o Example: Snort, Suricata.
5. Unified Network Management Tools:
o Provide a comprehensive solution that combines monitoring, configuration,
and security management.
o Example: Cisco Prime, Nagios.

Conclusion

Network monitoring and management tools play a crucial role in maintaining the health and
security of network infrastructures. By leveraging these tools, organizations can proactively
identify and resolve issues, optimize performance, and enhance overall network security. The
choice of tools depends on specific needs, such as the size of the network, the complexity of
the infrastructure, and budget considerations. Regular use and analysis of these tools help
ensure a robust and reliable network environment.

5.explain in details XSS..


How XSS Works

XSS exploits the trust a user has for a particular site. Attackers can inject scripts into content
that is sent to the user's browser, allowing them to execute arbitrary code in the context of
that user's session. This typically occurs in situations where user input is not properly
sanitized or validated before being rendered on the web page.

Types of XSS

1. Stored XSS (Persistent XSS):


o Description: The malicious script is stored on the server (e.g., in a database)
and served to users when they access the affected web page.
o Example: An attacker submits a comment containing a script that gets saved.
Every time a user views that comment, the script executes in their browser.
2. Reflected XSS (Non-Persistent XSS):
o Description: The injected script is reflected off a web server immediately,
often via a URL or form submission. The script is not stored and must be
executed by the victim clicking a link.
o Example: An attacker crafts a URL that includes a script and tricks the user
into clicking it. The server reflects the script back in the response, executing it
in the user's browser.
3. DOM-based XSS:
o Description: This type of XSS occurs when the client-side script manipulates
the Document Object Model (DOM) in a way that allows an attacker to
execute their code. The server does not need to be involved.
o Example: An attacker modifies the URL to include malicious JavaScript that
the web application inadvertently uses to update the page content without
proper validation.

Potential Impacts

1. Session Hijacking:
o Attackers can steal session cookies, allowing them to impersonate users and
access sensitive information or perform actions on their behalf.
2. Data Theft:
o Sensitive information, such as personal data, credentials, or financial details,
can be exfiltrated.
3. Defacement:
o Attackers can modify the appearance of a web page, damaging the reputation
of the site and eroding user trust.
4. Malware Distribution:
o Attackers can redirect users to malicious sites or force them to download
malware.

Prevention Measures

1. Input Validation and Output Encoding:


o Validate all user inputs to ensure they meet expected formats (e.g., strings,
numbers).
o Encode outputs properly before rendering them in HTML to prevent the
browser from interpreting them as executable code. Use libraries that
automatically handle encoding, such as OWASP Java Encoder or similar tools.
2. Content Security Policy (CSP):
o Implement CSP headers to restrict the sources from which scripts can be
loaded and executed. This adds an additional layer of security against XSS
attacks.
3. HttpOnly and Secure Flags for Cookies:
o Set the HttpOnly flag on cookies to prevent JavaScript from accessing them,
reducing the risk of session hijacking. Use the Secure flag to ensure cookies
are transmitted only over HTTPS.
4. Use Framework Security Features:
o Many web development frameworks provide built-in protections against XSS.
For example, Angular and React automatically escape data in templates,
mitigating risks.
5. Regular Security Audits and Penetration Testing:
o Conduct regular security assessments and testing to identify and fix potential
XSS vulnerabilities in your applications.

Conclusion
Cross-Site Scripting (XSS) is a critical vulnerability that can have severe consequences for
both users and web applications. By understanding how XSS works and implementing
effective prevention measures, developers and organizations can significantly reduce the risk
of exploitation and enhance the overall security of their web applications. Regular security
training and awareness are also essential for developers to stay vigilant against this type of
attack.

You might also like