WS U2 Notes PDF
WS U2 Notes PDF
SECURITY
SEMESTER 5
UNIT - 2
HI COLLEGE
SYLLABUS
UNIT - 2
HI COLLEGE
INTERNET AND WEB APPLICATION SECURITY:
EMAIL SECURITY (PGP AND SMIME)
PGP (Pretty Good Privacy) and S/MIME (Secure/Multipurpose Internet Mail
Extensions) are both ways to encrypt email messages to keep them private and
secure. PGP is an open-source encryption method that you can use for free,
while S/MIME is a standard encryption method used by many email providers.
With PGP, you create a public and private key pair. You can share your public
key with others so they can encrypt messages for you, and you use your private
key to decrypt messages. With S/MIME, you get a digital certificate from a
trusted authority that contains your public key and verifies your identity.
Both methods provide strong encryption, but S/MIME is more widely supported
by email providers and clients because it's a standard encryption method
recognized by many organizations and governments. PGP may have
compatibility issues with some email clients or servers, particularly older or less
commonly used systems.
In summary, both PGP and S/MIME are important tools for protecting the
confidentiality and integrity of email communications.
INJECTION FLAWS
Injection flaws are a type of web application security vulnerability that occurs
when user input is not properly sanitized or validated before being executed as
part of a command or query. This can allow attackers to inject malicious code,
such as SQL statements or shell commands, into an application, potentially
compromising the confidentiality, integrity, or availability of data.
1. SQL Injection: This occurs when user input is not properly sanitized or
validated before being executed as part of an SQL statement. Attackers can use
SQL injection to steal sensitive data, modify data, or execute arbitrary
commands on the database server.
2. LDAP Injection: This occurs when user input is not properly sanitized or
validated before being executed as part of an LDAP query. Attackers can use
LDAP injection to steal sensitive data, modify data, or execute arbitrary
commands on the LDAP server.
3. Command Injection: This occurs when user input is not properly sanitized or
validated before being executed as part of a shell command. Attackers can use
command injection to execute arbitrary commands on the server, potentially
compromising the confidentiality, integrity, or availability of data.
ME &
WHO?
Programming bugs refer to errors in the code of a web application that can
cause unexpected behavior or crashes. These bugs can be caused by a variety of
factors, including syntax errors, logic errors, and resource management issues.
While programming bugs are not necessarily malicious, they can still pose a
security risk if they allow attackers to exploit vulnerabilities in the application.
Malicious code, on the other hand, refers to intentional code that is designed to
harm a web application or its users. This can include things like viruses, Trojans,
and worms, as well as more sophisticated attacks like cross-site scripting (XSS)
and SQL injection. Malicious code can be introduced into a web application
through various means, such as compromised third-party libraries or injected
scripts.
SQL INJECTION
SQL injection (SQLi) is a serious cybersecurity threat targeting databases by
inserting malicious SQL code through application input fields. This attack takes
advantage of vulnerabilities in web applications that directly interact with
databases.
There are several types of SQL injection attacks, each exploiting different
weaknesses in an application's input handling:
1. Inband SQLi (Classic SQLi): This is the most common type where the
attacker uses the same communication channel to both launch the attack
and gather results. It includes:
2. Use a strong and unique password: Use a strong and unique password for
your browser and other online accounts. Avoid using easily guessable
passwords like "password" or "123456".
5. Disable unnecessary browser features: Disable features like Flash, Java, and
JavaScript if you don't need them, as they can be used to execute malicious
code.
8. Use a VPN: A virtual private network (VPN) encrypts your internet connection
and hides your IP address, making it more difficult for attackers to track your
online activity.
9. Clear your browsing history: Regularly clear your browsing history, cache, and
cookies to prevent attackers from accessing sensitive information stored in your
browser.
10. Use anti-virus software: Install anti-virus software on your computer and
keep it up-to-date to protect against malware and other security threats.
*Syllabus
1. Use SSL/TLS encryption: SSL/TLS encryption ensures that all data transmitted
between the shopper's browser and the e-commerce website is encrypted,
making it more difficult for attackers to intercept and read sensitive
information.
4. Store sensitive data securely: Store sensitive data, such as credit card
numbers and personal information, in an encrypted format to prevent
unauthorized access.
10. Use anti-virus software: Install anti-virus software on your computer and
keep it up-to-date to protect against malware and other security threats.