Name common Design Flaws in File Handling?
Path Traversal:
What: Attackers use filenames like ../../etc/passwd to access restricted files outside the intended directory.
../../etc/passwd
Example: Accessing system files (e.g., passwords) by tricking the app into navigating up folder levels.
Null Byte Injection:
What: Adding %00 (null byte) to filenames to bypass validation (e.g., malicious.php%00.jpg becomes malicious.php).
%00
malicious.php%00.jpg
malicious.php
Example: Disguising executable code as an image file.
Improper Resource Handling:
What: Failing to close files properly, leading to resource leaks and denial-of-service (DoS) attacks.
Example: Crashing the server by flooding it with open files due to unclosed streams.
Key Fixes: Validate filenames, strip null bytes, and ensure resources are closed after use.
What ae common Design Flaws in File Upload?
Upload of dangerous Content
upload of files that can execute a harmful script on the server or after on the client after downloading it -> check content of files
Ability to overwrite files
through file path injection
Quota Overload DoS:
Upload huge amounts of data leading to denial of service because consuming all the storage -> e.g. zip-bombs.
Zuletzt geändertvor 2 Monaten