0% found this document useful (0 votes)
35 views28 pages

UNIT III Secured Program

The document outlines key concepts in program security, including secure programming practices, types of program errors, and malicious code. It emphasizes the importance of access controls, user authentication, secure coding practices, and regular updates to protect against threats. Additionally, it discusses the significance of employee training and layered security approaches to mitigate risks in software development and deployment.

Uploaded by

99210041525
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views28 pages

UNIT III Secured Program

The document outlines key concepts in program security, including secure programming practices, types of program errors, and malicious code. It emphasizes the importance of access controls, user authentication, secure coding practices, and regular updates to protect against threats. Additionally, it discusses the significance of employee training and layered security approaches to mitigate risks in software development and deployment.

Uploaded by

99210041525
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 28

UNIT III

PROGRAM SECURITY
SYLLABUS
• Secure Program
• Non-Malicious Program Error
• Virus
• Targeted Malicious Code
• Controls against program Threat
• Control of Access to general objects
• User Authentication
• Secure Coding Practice
• Vulnerabilities in Web Applications
1. Secured Programs
• Definition:
– Secure programming is a set of practices that help
prevent cyber attacks and data breaches by writing
secure code. It's a key part of information security,
which protects data, software, hardware, and
people.
Secure programming practices:

• Input validation: Ensures that user input is


properly validated for size, format, and type
• Authentication and authorization: Uses
strong passwords and multi-factor
authentication to verify user identity
• Error handling and logging: Catches errors
in code before they cause catastrophic failures
• Secure coding: Enforces best practices and
production-ready code standards
Other aspects of secure programming:
• Code reviews
• Automated security scanning
• Penetration testing
• Application security
• Cloud security
• Data security
• Network infrastructure security
Most Secure Programming Languages for Web Development

– 1. Ruby
– 2. .NET
– 3. HTML
– 4. ASP
– 5. PHP
– 6. Perl
– 7. Python
– 8. Shell Scripting
– 9. SQL
– 10. Java
– 11. JavaScript
– 12. ColdFusion
– 13. C++
– 14. C
– 15. Go
Why JAVA is Considered as Secured
Programming?
• Java is considered a secure programming language because it has many built-in security
features, including:
• Automatic memory management: Java automatically manages memory and garbage
collection, which reduces the chance of programming errors
• Strong typing: Java's strong data typing makes its code more secure than other
languages
• Bytecode verification: A bytecode verifier checks that bytecodes conform to Java's
language rules and do not violate them
• Exception handling: Java can catch undesired results during runtime and report them to
the programmer
• Security manager: Java has a security manager that helps keep code secure
• Cryptography: Java includes built-in cryptography
• Authentication: Java includes built-in authentication
• Public key infrastructure: Java includes built-in public key infrastructure
• Private transmission: Java includes private transmission
• Corruption prevention: Java includes corruption prevention
2. Non-malicious program error
• Definition:
– A non-malicious program error is an unintentional
error that occurs in a software program. These
errors happen during the design, coding, or testing
phases of software development.
Buffer Overflow
Malicious program errors
• Malicious program errors are errors caused by
malicious code, which is code that is
intentionally designed to cause damage to a
system. Malicious code can be used to steal
data, disrupt networks, and compromise
passwords.
• Examples of malicious programs
Viruses, Worms, Trojan viruses, Spyware,
Adware, and Ransomware.
Types of program errors
• Compilation errors: Also known as syntax
errors, these are reported by the compiler
• Runtime errors: These errors occur when a
program crashes or produces an incorrect
output while it's being executed
• Logical errors: These errors occur when a
program runs without crashing but doesn't
produce the correct result
Errors, faults and failures

• Errors, faults and failures


– An error is a mistake in the software.
– An error may lead to an incorrect state, or fault (one error may lead to many faults)
– A fault may cause the system to depart from its required behavior. Such departure is a failure
• A fault is internal, while a failure is external
• Inadvertent or intentional flaws? ("...whether the stone hits the pitcher or the pitcher hits the
stone, it's going to be bad for the pitcher")
• Fixing Faults
– "Penetrate and patch"
– May result in worse security

• Difficulties
– Almost impossible to assure that a program does what is intended and nothing more
– Software engineers are not "security conscious
• Types of flaws
– validation error
– domain error
– serialization and aliasing
– inadequate authentication/authorization
– boundary condition violation
– other exploitable logic errors
3. Malicious code
• virus --- attaches itself to a program and copies itself
to other programs
• trojan horse --- program with unexpected additional
functionality
• logic bomb --- triggers action based on some event
• trapdoor --- allows unauthorized access
• worm --- propagates copies of itself through a
network
• rabbit --- replicates itself without limit (exhausts
resources)
How Virus Attach?
How Virus Attach?
How Virus Replacing a Program?
BOOT SECTOR VIRUS
CONTROLS AGAINST PROGRAM THREATS

• Three Type of Control


– Developmental
– operating system
– Administrative
Developmental Control
– software development is a collaborative effort, involving people with
different skill sets who combine their expertise to produce a working
product.
• Development requires people who can
– specify the system, by capturing the requirements and building a model of
how the system should work from the users' point of view
– design the system, by proposing a solution to the problem described by the
requirements and building a model of the solution
– implement the system, by using the design as a blueprint for building a
working solution
– test the system, to ensure that it meets the requirements and implements the
solution as called for in the design
– review the system at various stages, to make sure that the end products are
consistent with the specification and design models
– document the system, so that users can be trained and supported
– manage the system, to estimate what resources will be needed for
development and to track when the system will be done
– maintain the system, tracking problems found, changes needed, and changes
made, and evaluating their effects on overall quality and functionality
Principles of Software Engineering
– Modularization is the process of dividing a task
into subtasks. This division is done on a logical or
functional basis. Each component performs a
separate, independent part of the task.
– Encapsulation hides a component's implementation
details, but it does not necessarily mean complete
isolation
– Information Hiding Developers who work where
modularization is stressed can be sure that other
components will have limited effect on the ones
they write
Layered Approach
To mitigate program threats, implement a layered approach
including robust access controls, strong authentication, secure
coding practices, regular security patches, and malware protection
software.
1. Access Controls & Authentication:
Principle of Least Privilege:
Grant users only the necessary permissions to perform their tasks,
minimizing the potential impact of unauthorized access.
Strong Authentication:
Implement multi-factor authentication (MFA) to verify user identities and
prevent unauthorized access.
Role-Based Access Control (RBAC):
Assign roles and permissions based on job functions, not individual users,
for easier management and reduced risk.
Secure Session Management:
Implement mechanisms to protect user sessions and prevent session
hijacking.
2. Secure Coding Practices:
Input Validation:
Thoroughly validate all user inputs to prevent injection attacks and other
vulnerabilities.
Output Encoding:
Encode data before displaying it to prevent cross-site scripting (XSS) attacks.
Secure Algorithms:
Use strong cryptographic algorithms and avoid using weak or deprecated
ones.
Error Handling:
Implement robust error handling to prevent exposing sensitive information or
system vulnerabilities.
Secure Coding Standards:
Follow industry best practices and coding standards to minimize the risk of
introducing vulnerabilities.
3. Security Patches and Updates:
Regular Updates:
Keep software and operating systems up-to-date with
the latest security patches and updates.
Patch Management:
Implement a robust patch management process to
ensure that vulnerabilities are addressed promptly.
Software Supply Chain Security:
Secure the software supply chain to prevent malware
from being distributed through legitimate software
updates.
4. Malware Protection:
Antivirus and Antimalware Software:
Install and regularly update antivirus and antimalware
software to detect and remove malicious code.
Endpoint Detection and Response (EDR):
Implement EDR solutions to detect and respond to advanced
threats that may bypass traditional security controls.
Firewalls:
Use firewalls to control network traffic and prevent
unauthorized access to systems and data.
Intrusion Detection/Prevention Systems (IDS/IPS):
Deploy IDS/IPS to detect and prevent network-based
attacks.
5. Security Awareness Training:
• Employee Education: Train employees on
security best practices, common threats, and
their role in maintaining security.
• Phishing Awareness: Educate employees
about phishing attacks and how to identify and
avoid them.
• Social Engineering Awareness: Train
employees to recognize and resist social
engineering tactics.
Control of Access to General Objects
• Protecting memory is a specific case of the more general problem of
protecting objects. As multiprogramming has developed, the numbers and
kinds of objects shared have also increased. Here are some examples of the
kinds of objects for which protection is desirable:
• memory
• a file or data set on an auxiliary storage device
• an executing program in memory
• a directory of files
• a hardware device
• a data structure, such as a stack
• a table of the operating system
• instructions, especially privileged instructions
• passwords and the user authentication mechanism
• the protection mechanism itself
• There are several complementary goals in
protecting objects.
– Check every access.
– Enforce least privilege.
– Verify acceptable usage.
 protection mechanisms appropriate for general objects are
 Directory
 Every file has a unique owner who possesses "control" access rights
(including the rights to declare who has what access) and to revoke access
to any person at any time. Each user has a file directory, which lists all the
files to which that user has access.

You might also like