UNIT III Secured Program
UNIT III Secured Program
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:
– 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
• 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