Software Security
15 important questions on Software Security
What is privilege escalation? How is it obtained?
It is obtained through bugs, a wrong configuration, design flaws...
What two types of privilege escalation exist?
- Vertical privilege escalation: Elevate the rights to a higher level.
- How: Buffer overflows, Android rooting, jailbreaking.
- Goal: Obtain root access.
- Horizontal privilege escalation: Obtain rights of another user on the same level.
- How: Session hijacking using scross-site scripting, packet sniffing.
What is a race condition?
It can be a;
- Software problem: TOCTTOU time-of-check-to-time-of-use or multithreading.
- Hardware problem: In Intel, CPUs...
- Higher grades + faster learning
- Never study anything twice
- 100% sure, 100% understanding
For what malicious intent are race conditions used for?
What is a buffer overflow?
An error that occurs when a program, while
writing data to a buffer, overruns the buffer's boundary and overwrites adjacent memory locations.
Buffer contains data that is stored for a short amount of time. E.g. RAM.
What is the most commonly exploited type of security flaw?
What programming languages are particularly vulnerable for buffer overflows? Why?
- There is no check that data written to buffer is within the boundaries of
the buffer
- There exist vulnerable functions for manipulating strings: gets(), strcpy()
Name three ways to escalate privileges.
- Malicious software = Can exploit buffer overflows or unintentional flaws.
- Row hammer attacks = Row hammer is a vulnerability in DRAM chips that allows attackers to take advantage of devices by repeatedly triggering bit flips in order to modify or corrupt data.
- Neighboring location can potentially belong to another process with different privileges.
- SQL injection = Usually occurs when you ask a user for input on a web page (like their username) and instead of a username, the attacker gives you an SQL statement that you will unknowingly run on your database.
- Attacker can learn/change/destroy existing data or make it unavailable.
What is session fixation?
It permits an attacker to hijack a valid user session by making the victim click on a link with a fixed session ID known to the attacker.
What is DRM? What is bypassing DRM?
Bypassing DRM is a privilege escalation attack.
It is a type of jailbreaking for game consoles that allows the user to break out of the restricted environment and run the attacker's code.
Jailbreak is removing restrictions from a device imposed by the manufacturer or operator to allow the installation of unauthorized software.
What is input validation? Why do we use it?
We use it to avoid things as buffer overflow or SQL injection. I.e. the input 98764874236492483649247836489236492 or DROP DATABASE users.
What is client-side input validation?
- Typically done with Javascript
- Does not require a round trip to the server so it reduces network traffic and is user friendly
What problem comes with client-side input validation?
- Turn off Javascript.
- Edit the form before submitting it (using Tampermonkey or other software to run user scripts).
- Write a script that interacts with the web server instead of using a web browser at all.
Even more, the user can send arbitrary values to the server this way. The user can also modify any client-side state.
What is server-side input validation?
For values entered by the user:
- Always do very careful checks on the values of all fields.
- These values can potentially contain completely arbitrary data (including accented chars, control chars, etc.) and be of any length.
For client state:
- Make sure client has not modified the data in any way.
- Don't send the actual state but maintain a session id.
What is malware? How can it be executed?
It can be executed by:
- User action
- Downloading and running malicious software.
- Viewing a web page containing malicious code.
- Opening an executable email attachment.
- Inserting a CD/DVD or USB fash drive.
- Exploiting an existing flaw in a system.
- Buffer overfows in network daemons.
- Buffer overfows in email clients, web browsers, database severs.
The question on the page originate from the summary of the following study material:
- A unique study and practice tool
- Never study anything twice again
- Get the grades you hope for
- 100% sure, 100% understanding