Module 2 - Vulnerabilities and Cyber Security Safeguards
Module 2 - Vulnerabilities and Cyber Security Safeguards
Internet Usage
Connectivity ❑The Internet is full of spyware and adware that can be installed
14
❑ More connected a device is the higher the chance of a vulnerability. automatically on computers.
Personal or sensitive data has to be protected with encryption and access controls to Attackers can use this software coding mistake, where the storage capacity of a program is
prevent unauthorized people from accessing it. overwritten, to take control of or to access your system.
For example, open cloud storage or misconfigured HTTP headers. In this type of vulnerability, untrusted data is used to implement attacks.
To avoid this kind of software security weakness, you need to make sure you have 8. Broken/Missing Authentication
properly configured your OS, frameworks, and applications. Weaknesses in session management and credential management result in broken
authentication, which means an attacker is able to compromise passwords or other
6. Broken access control information to access a user’s account.
Broken user restrictions can cause severe software weaknesses.
Improperly implemented authentication and session management can result in this kind
For example, if you have an admin panel for your website, you want to restrict that area so of software vulnerability.
only admin users can access it.
How to Prevent Software Vulnerabilities How to Prevent Software Vulnerabilities
1. Test Your Software
It’s a good practice to test your software often as this will help you find and get rid of 4. Use a Code Signing Certificate
vulnerabilities quickly. You can test your software using code analysis tools, white box Digitally signing your code using a code signing certificate will make your code tamper-
testing, black box testing, and other techniques. proof, making it impossible for third parties to tamper with your code. A code signing
certificate will make sure your files remain secure and it will also prevent hackers from
2. Update the Software Regularly adding security vulnerabilities to your code.
It is important to regularly update software as outdated software is prone to vulnerabilities.
By making sure your software uses up to date components and dependencies, you can
prevent security issues and software vulnerabilities.
• Monitoring network traffic and system logs: Security systems administrators are
responsible for monitoring network traffic and system logs to detect and respond to
potential security threats or suspicious activities.
• Keeping up-to-date with the latest security threats and technologies: Security systems
administrators are responsible for staying up-to-date with the latest security threats
and technologies to ensure that an organization's security systems are effective against
current and emerging cyber threats.
• Security Risks:
Opening up access can potentially increase the risk of unauthorized access or data
breaches. It's crucial to implement strong security measures to mitigate these risks.
Challenges Complex Network Architectures
• Trust and Communication: • Complex network architectures can introduce various vulnerabilities that may pose
Building trust among employees and stakeholders is essential. Clear communication about challenges to the overall security of the network.
the purpose, benefits, and limitations of open access is vital to avoid misunderstandings. 1. Increased Attack Surface:
The larger and more complex a network, the greater the attack surface. This provides
• Redundancy and Backups: more entry points for attackers to exploit vulnerabilities and gain unauthorized access.
Ensure redundancy and backups are in place in case of a security incident. Regularly test
and update these systems to maintain data integrity. 2. Complex Configuration Errors:
The complexity of network configurations increases the likelihood of errors,
• Monitoring and Auditing: misconfigurations, and oversights. These mistakes can lead to unintended security
Implement continuous monitoring and auditing to track who accesses what data. This vulnerabilities that attackers may exploit.
helps in identifying any unusual activities or potential security incidents.
3. Interconnected Systems:
• Education and Training: In a complex network, multiple systems and components are interconnected. If a
Regularly educate employees about the importance of data security and their role in vulnerability is discovered in one part of the network, it may be exploited to compromise
maintaining it. Training programs can help them understand the risks and best practices. other connected systems.
• Unsecured Devices:
Lack of awareness about the importance of securing devices (computers, smartphones, IoT
devices) can result in the use of outdated software, missing security patches, and weak
configurations, increasing the risk of exploitation.
Vulnerabilities due to poor Cyber Security Vulnerabilities due to poor Cyber Security
awareness awareness
• Social Engineering Exploitation: • Insufficient Software Updates:
Cybercriminals may exploit individuals with poor cybersecurity awareness through social Failure to regularly update software and applications increases the likelihood of falling
engineering tactics, manipulating them into divulging sensitive information or performing victim to exploits targeting known vulnerabilities.
actions that compromise security. • Unawareness of Cyber security Policies:
• Unprotected Networks: Employees or individuals may not be aware of and adhere to organizational or industry-
Failure to secure home or workplace networks, including the use of weak or default router specific cyber security policies, leading to non-compliance and increased risks.
passwords, can expose individuals to unauthorized access and data interception. • Inadequate Training and Education:
• Lack of Data Backups: Lack of cyber security training and education can result in employees being unaware of
Individuals or organizations with poor cybersecurity awareness may neglect regular data best practices, making them more susceptible to unintentional security breaches.
backups, making them more vulnerable to data loss due to ransomware or other cyber • Non-compliance with Policies:
threats. In organizational settings, employees with poor cybersecurity awareness may not be
• Insecure Wi-Fi Practices: aware of or may disregard established security policies, leading to non-compliance and
Poor awareness may lead to the use of unsecured Wi-Fi networks, exposing users to risks increased vulnerability.
such as man-in-the-middle attacks or unauthorized access.
Audit Audit
3. Regular Security Audits: 6. User Access Reviews:
Conduct regular security audits to assess the effectiveness of your security measures. Regularly review and audit user access permissions to ensure that users have the
Schedule both internal and external audits to gain different perspectives on your appropriate level of access based on their roles.
security posture. Remove or adjust access for users who no longer need specific privileges.
4. Penetration Testing: 7. Incident Response Planning:
Perform penetration testing to simulate real-world attacks and identify potential Develop and regularly update an incident response plan to address security incidents
weaknesses in your systems. promptly.
Regularly update and refine penetration testing scenarios to address emerging threats. Conduct simulations and tabletop exercises to ensure that your team is prepared to
5. Vulnerability Scanning: respond effectively.
Use automated tools for vulnerability scanning to identify weaknesses in your network, 8. Log Management:
applications, and systems. Implement robust log management to monitor and analyze system logs for suspicious
Regularly update and run these scans to stay ahead of potential vulnerabilities. activities.
Regularly review logs to detect and respond to potential security incidents.
Audit Authentication
9. Patch Management: • Authentication is a critical component of safeguarding against vulnerabilities, as it helps ensure
Establish a patch management process to promptly apply security patches and updates. that only authorized users gain access to systems, applications, and data. Here are some best
Regularly review and update software to address known vulnerabilities. practices for strengthening authentication and enhancing security:
10. Employee Training: 1. Multi-Factor Authentication (MFA):
Provide regular security awareness training to employees to educate them about potential risks Implement multi-factor authentication to require users to provide two or more authentication
and best practices. factors (e.g., password, biometrics, one-time codes).
Ensure that employees are aware of the latest phishing and social engineering tactics. MFA adds an extra layer of security, making it more difficult for unauthorized individuals to
11. Third-Party Audits: access accounts.
Engage third-party auditors to provide an independent assessment of your security measures. 2. Strong Password Policies:
Consider certifications like ISO 27001 to demonstrate your commitment to security standards. Enforce strong password policies, including minimum length, complexity requirements, and
12. Document and Review: regular password changes.
Document the results of your audits and assessments. Educate users on the importance of creating unique and secure passwords.
Regularly review and update your security policies and procedures based on the findings and
changes in the threat landscape.
Authentication Authentication
3. Biometric Authentication: 6. Secure Communication Protocols:
Where feasible, implement biometric authentication methods such as fingerprint, facial Use secure communication protocols, such as HTTPS, to protect authentication data during
recognition, or retina scans. transit.
Biometrics provide a unique and difficult-to-replicate method of verifying user identity. Avoid transmitting sensitive information, especially credentials, over unsecured networks.
4. Account Lockout Policies: 7. Regular Auditing and Monitoring:
Implement account lockout policies to prevent brute force attacks. After a specified number of Conduct regular audits of user accounts, permissions, and authentication logs.
failed login attempts, lock the account temporarily. Monitor for suspicious or unauthorized activities and respond promptly to any anomalies.
Configure lockout parameters based on the organization's security needs. 8. Centralized Authentication Systems:
5. Session Management: Utilize centralized authentication systems, such as LDAP (Lightweight Directory Access
Implement session timeout settings to automatically log out users after a period of inactivity. Protocol) or Active Directory, to manage user credentials in a unified manner.
Regularly review and adjust session management policies based on security requirements. Ensure that these systems are properly secured and regularly audited.
Authentication Cryptography
9. Secure Password Storage: Cryptography plays a crucial role in safeguarding information by providing techniques for securing
Hash and salt passwords before storing them to protect against data breaches. Avoid storing data, protecting communication, and ensuring the integrity and confidentiality of sensitive
plain-text passwords. information.
Regularly review and update password storage mechanisms to align with industry best
practices. 1. Use Strong Encryption Algorithms:
10. User Training and Awareness: Employ well-established and widely recognized encryption algorithms, such as AES (Advanced
Educate users on the importance of strong authentication practices and the risks associated Encryption Standard), for securing data at rest and in transit.
with weak authentication. Regularly update cryptographic algorithms to stay ahead of potential vulnerabilities.
Encourage users to report any suspicious activities or attempts at unauthorized access. 2. Key Management:
11. Regular Security Assessments: Implement a robust key management system to generate, distribute, store, and rotate cryptographic
Conduct regular security assessments, including penetration testing, to identify and address keys securely.
potential vulnerabilities in the authentication process. Regularly update and strengthen key management practices to prevent unauthorized access.
Stay informed about the latest authentication technologies and best practices. 3. Secure Key Storage:
12. Adaptive Authentication: Safeguard cryptographic keys by storing them in secure, tamper-resistant environments.
Implement adaptive authentication mechanisms that adjust the level of authentication required Consider using hardware security modules (HSMs) for key protection and management.
based on risk factors, user behavior, or contextual information.
This helps detect and respond to abnormal or high-risk activities.
Cryptography Cryptography
4. Secure Communication Protocols: 7. Implement Forward Secrecy:
Use secure communication protocols such as TLS/SSL for encrypting data in transit. Enable forward secrecy in communication protocols to ensure that compromised session keys do not
Ensure that protocols and ciphers are configured securely, and stay updated on best practices compromise past or future sessions.
for securing communication. Regularly review and update configurations to support forward secrecy.
5. Digital Signatures: 8. Data Encryption at Rest:
Encrypt sensitive data stored on servers, databases, or other storage systems.
Implement digital signatures to verify the authenticity and integrity of messages or documents.
Implement disk encryption to protect data even when the physical storage is compromised.
Use strong hash functions and signing algorithms for creating digital signatures.
9. Regularly Update Cryptographic Libraries:
6. Secure Hash Functions:
Keep cryptographic libraries and software up-to-date to address vulnerabilities and take advantage of
Choose secure hash functions (e.g., SHA-256) for data integrity verification. improved security features.
Avoid using deprecated or vulnerable hash algorithms. Monitor security advisories for any updates related to cryptographic implementations.
10. Use Cryptographic Random Number Generators:
Use secure random number generators for generating cryptographic keys and initialization vectors.
Avoid using predictable or non-random sources for generating cryptographic values.
Cryptography Deception
11. Quantum-Resistant Cryptography: • In cybersecurity, deception refers to the use of intentionally misleading information, decoys, and
Stay informed about the development and adoption of quantum-resistant cryptographic algorithms, traps to misdirect or detect attackers and enhance the overall security posture of an
especially if your organization deals with long-term data storage or transmission. organization.
12. Adherence to Standards:
Adhere to recognized security standards (e.g., FIPS, ISO) for cryptographic implementations. • The goal of deception is to create confusion, slow down attackers, and gather valuable
Regularly assess and update cryptographic practices based on emerging standards and best practices.
information about their tactics, techniques, and procedures.
13. Regular Security Audits:
Conduct regular security audits, including cryptographic assessments, to identify and address potential
• Deception techniques are employed strategically to identify and respond to threats before they
vulnerabilities.
Engage external experts for cryptographic reviews and validations. can cause harm
• The primary goal of an IDS is to detect and respond to security incidents, including unauthorized • The primary purpose of a security policy is to establish guidelines, standards, and procedures
access, malware infections, and other types of cyber threats. that govern how an organization manages, protects, and secures its information resources.
• A well-defined security policy helps mitigate risks, ensures compliance with regulations, and
fosters a culture of security within the organization.
91 92
❑ Thereare three new categories, four cate gories with naming and scoping
❑This is when the attacker inserts (injecting code) malicious
changes, and some consolidation in the Top 10 for 2021.
SQL statements into form fields and other injection points,
with the intention of gathering information from and
controlling the database.
95 96
❑Prepared statements with parameterized queries can mitigate SQL-related
web application vulnerabilities. A prepared statement helps to sanitize the ❑ It stands for Damn Vulnerable Web Application.
input and ensures that it is considered as a string literal in SQL rather than as
part of the SQL query.
❑DVWA is a vulnerable web application developed using PHP
❑Migrating to Object Relational Mapping Tools (ORMs) is another excellent and M y S Q L that allows ethical hackers to test out their hacking
option. However, most O R M s allow non-parameterized queries in addition skills and security tools.
to performing parameterized queries.
❑Make the most of LIMIT and other SQL controls within your queries so that
even if an SQL injection attack does occur, it can prevent the mass disclosure of
records.
❑Prevent injections is to attempt to escape all characters that have a
special meaning in SQL.
97 98
99 100
CROSS-SITE SCRIPTING (XSS) TYPES OF CROSS-SITE SCRIPTING (XSS)
Reflected XSS (Non-persistent)
❑Script is executed (reflected)on the victim side. Script is not stored on
the server.
❑ Data at rest and transit are not protected enough. ❑ Encrypt all data in transit with secure protocols.
❑This attack takes place due to web security based vulnerability when a
reference to an external entity containing XML input gets possessed by an XML
parser that is weakly configured.
❑As a result of this attack, denial of service, confidential data disclosure, port
scanning from the machine perspective where the parser is located, server-
side request forgery, and other system impact results.
❑It often allows an attacker to view files on an application server filesystem and
to interact with an back end or external systems that the application itself can43 Barkha Wadhvani 114
acceBasrksha.Wadhvani
❑This can give them the ability to modify or ❑Access control determines whether the user is allowed to carry
delete contents on the website, or even worse, out the action that they are attempting to perform.
gain full control over the web application.
Barkha Wadhvani 117 Barkha Wadhvani 118
HOWBROKENACCESS CONTROL HO
WBROKENACCESS CONTROL
Forced browsing:
ATTACKW ORKS? ATTACKW
ORKS?
Insecure I D’s (Insecure Direct Object Reference): Let say, I am visiting a ❑Forced browsing is when the user tries to access resources that are
p a g e by URL with unique ID., https://example.com/profile?id=13. not referenced by the application, but still available.
But what if I replace the ID with another user’s ID? If the webserver is configured improperly, then if I ❑If someone directly edits the URL, e.g. visit
visit another p a g e and I will get the profile of another user. https://example.com/admin, they might access the admin page
https://example.com/profile?id=5. if the access control is broken.
❑Use can reach the root directory, and the attacker can access any file
from there. In order to defend against this attack, the webserver ❑ Developers should prevent browsers from storing sensitive data in their cache . This can b e
should be configured in such way that it has no access to the files that it accomplished by for example using HTML meta tags.
does not need. Filtering for .. in the input parameter is another potential
solution..
❑Basically, any poorly documented ❑ Secure password policy is not implemented (Limit Login attempts)
configuration changes, default settings,
or a technical issue across any
component in your endpoints could ❑Software is out of date and flaws are unpatched (attacker can use various
lead to a misconfiguration. ways to exploit)
❑ Files and directories are unprotected (by forceful browsing access can 54
Barkha Wadhvani 123 be taBakrkeha nWa)dhvani
TYPES OF SYSTEM MISCONFIGURATION PREVENT SYSTEM MISCONFIGURATION
❑Unused features are enabled or installed (unused stuff susceptible to ❑ Proper configuration of default Error Page.
misconfiguration)
❑ Limit access to administrator interfaces.
❑ Disable debugging.
❑Security features not maintained or configured properly (Failure to
properly configure and maintain security) ❑ Disable the use of default accounts and passwords.
❑ Disable Directory Listing.
❑Unpublished URLs are not blocked from receiving traffic from ordinary ❑ Regularly patch and update software.
users (failure to block URL for scanning) ❑ Remove unused features.
❑ Use automation to your advantage.
❑Improper / poor application coding practices (No proper input/output
validation )
55
❑ DireBacrkhtaoWradyhvaTniraversal (to access directories outside the root directory) Barkha Wadhvani 126