question
stringlengths
6
3.53k
text
stringlengths
17
2.05k
source
stringclasses
1 value
Current software is complex and often relies on external dependencies. What are the security implications?
There is little security, in the sense that the version history can be edited by the users. Only one user can work on a file at a time.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Current software is complex and often relies on external dependencies. What are the security implications?
There can also be production configurations that cause security problems. These issues can put the legacy system at risk of being compromised by attackers or knowledgeable insiders. Integration with newer systems may also be difficult because new software may use completely different technologies.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Which of the following statements are true about command injection?
Shell injection (or command injection) is named after Unix shells, but applies to most systems which allow software to programmatically execute a command line. Here is an example vulnerable tcsh script: If the above is stored in the executable file ./check, the shell command ./check " 1 ) evil" will attempt to execute the injected shell command evil instead of comparing the argument with the constant one. Here, the code under attack is the code that is trying to check the parameter, the very code that might have been trying to validate the parameter in order to defend against an attack.Any function that can be used to compose and run a shell command is a potential vehicle for launching a shell injection attack. Among these are system(), StartProcess(), and System.Diagnostics.Process.Start().
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Which of the following statements are true about command injection?
Since part of the command it composes is taken from the URL provided by the web browser, this allows the URL to inject malicious shell commands. One can inject code into this program in several ways by exploiting the syntax of various shell features (this list is not exhaustive): Some languages offer functions to properly escape or quote strings that are used to construct shell commands: PHP: escapeshellarg() and escapeshellcmd() Python: shlex.quote()However, this still puts the burden on programmers to know/learn about these functions and to remember to make use of them every time they use shell commands. In addition to using these functions, validating or sanitizing the user input is also recommended. A safer alternative is to use APIs that execute external programs directly, rather than through a shell, thus preventing the possibility of shell injection. However, these APIs tend to not support various convenience features of shells, and/or to be more cumbersome/verbose compared to concise shell-syntax.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Daemons are just long running processes. When applying mitigations to these processes, several aspects change. Which ones?
The program is called when needed, it appears and performs its job, then it quickly leaves, letting the user continue her more normal activity, usually a sovereign application.' Daemonic applications are background processes that require no direct user interaction. Parasitic or Auxiliary applications are similar to transient applications in providing a limited, focused set of functionality and occupy a small space, but they are shown persistently and can be used for a long period of time.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Daemons are just long running processes. When applying mitigations to these processes, several aspects change. Which ones?
A daemon is usually created either by a process forking a child process and then immediately exiting, thus causing init to adopt the child process, or by the init process directly launching the daemon. In addition, a daemon launched by forking and exiting typically must perform other operations, such as dissociating the process from any controlling terminal (tty).
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Which of the following apply to recent Android-based mobile systems but not to Linux-based desktop systems?
This is a comparison on mobile operating systems. Only the latest versions are shown in the table below, even though older versions may still be marketed.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Which of the following apply to recent Android-based mobile systems but not to Linux-based desktop systems?
Android alone is more popular than the popular desktop operating system Microsoft Windows, and in general smartphone use (even without tablets) outnumbers desktop use.Mobile devices, with mobile communications abilities (e.g., smartphones), contain two mobile operating systems – the main user-facing software platform is supplemented by a second low-level proprietary real-time operating system which operates the radio and other hardware. Research has shown that these low-level systems may contain a range of security vulnerabilities permitting malicious base stations to gain high levels of control over the mobile device.Mobile operating systems have majority use since 2017 (measured by web use); with even only the smartphones running them (excluding tablets) having majority use, more used than any other kind of device. Thus traditional desktop OS is now a minority-used kind of OS; see usage share of operating systems. However, variations occur in popularity by regions, while desktop-minority also applies on some days in countries such as United States and United Kingdom. Android and iOS currently dominate 80% of the market share of mobile operating systems worldwide.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Which of the following attack vectors apply to mobile Android systems?
Availability – Attacking a smartphone can limit or deprive a user's access to it.Attacks on mobile security systems include: Botnets – Attackers infect multiple machines with malware that victims generally acquire via e-mail attachments or from compromised applications or websites. The malware then gives hackers remote control of "zombie" devices, which can then be instructed to perform harmful acts. Malicious applications – Hackers upload malicious programs or games to third-party smartphone application marketplaces.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Which of the following attack vectors apply to mobile Android systems?
These attacks exploit weaknesses related to smartphones that can come from means of wireless telecommunication like WiFi networks and GSM. There are also attacks that exploit software vulnerabilities from both the web browser and operating system. Finally, there are forms of malicious software that rely on the weak knowledge of average users. Different security counter-measures are being developed and applied to smartphones, from security in different layers of software to the dissemination of information to end-users. There are good practices to be observed at all levels, from design to use, through the development of operating systems, software layers, and downloadable apps.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Does AddressSanitizer prevent \textbf{all} use-after-free bugs?
AddressSanitizer: Memory error detection for Linux, macOS, Windows, and more. Part of LLVM. BoundsChecker: Memory error detection for Windows based applications. Part of Micro Focus DevPartner.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Does AddressSanitizer prevent \textbf{all} use-after-free bugs?
Another application might be memory starved, but would be unable to utilize the free memory "owned" by another application.While an application could not beneficially utilize a sister application's heap, it could certainly destroy it, typically by inadvertently writing to a nonsense address. An application accidentally treating a fragment of text or image, or an unassigned location as a pointer could easily overwrite the code or data of other applications or even the OS, leaving "lurkers" even after the program was exited. Such problems could be extremely difficult to analyze and correct.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
For security reasons, you accept the performance and memory overhead introduced by common sanitizers and deploy them in your user-facing production server software. Assuming that all memory safety bugs in your software are detected by the sanitizers, which of the following properties do the sanitizers provide to your code?
Rather the program's behavior is undefined. To make a fuzzer more sensitive to failures other than crashes, sanitizers can be used to inject assertions that crash the program when a failure is detected. There are different sanitizers for different kinds of bugs: to detect memory related errors, such as buffer overflows and use-after-free (using memory debuggers such as AddressSanitizer), to detect race conditions and deadlocks (ThreadSanitizer), to detect undefined behavior (UndefinedBehaviorSanitizer), to detect memory leaks (LeakSanitizer), or to check control-flow integrity (CFISanitizer).Fuzzing can also be used to detect "differential" bugs if a reference implementation is available.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
For security reasons, you accept the performance and memory overhead introduced by common sanitizers and deploy them in your user-facing production server software. Assuming that all memory safety bugs in your software are detected by the sanitizers, which of the following properties do the sanitizers provide to your code?
Instead, memory safety properties must either be guaranteed by the compiler via static program analysis and automated theorem proving or carefully managed by the programmer at runtime. For example, the Rust programming language implements a borrow checker to ensure memory safety, while C and C++ provide no memory safety guarantees.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
What is/are the goal/s of compartmentalization?
"Compartmentalization" refers to the separation of spaces in the living system that allow for separate environments for necessary chemical processes. Compartmentalization is necessary to protect the concentration of the ingredients for a reaction from outside environments.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
What is/are the goal/s of compartmentalization?
When referring to engineering, compartmentalization is the general technique of separating two or more parts of a system to prevent malfunctions from spreading between or among them. This entails the breaking up of a project or problem into sub classes and sub categories, with the intention of simplifying the task at hand, or to efficiently distribute it amongst a number of teams or people. == References ==
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Which of the following statements about code instrumentation is/are correct?
Instrumentation - requiring code to be added during compile or assembly to achieve statement stepping. Code can be added manually to achieve similar results in interpretive languages such as JavaScript. instruction set simulation - requiring no code modifications for instruction or statement steppingIn some software products which facilitate debugging of High level languages, it is possible to execute an entire HLL statement at a time.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Which of the following statements about code instrumentation is/are correct?
In the context of computer programming, instrumentation refers to the measure of a product's performance, in order to diagnose errors and to write trace information. Instrumentation can be of two types: source instrumentation and binary instrumentation.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Which of the following statements about libFuzzer is/are correct?
libfixmath is a platform-independent fixed-point math library aimed at developers wanting to perform fast non-integer math on platforms lacking a (or with a low performance) FPU. It offers developers a similar interface to the standard math.h functions for use on Q16.16 fixed-point numbers. libfixmath has no external dependencies other than stdint.h and a compiler which supports 64-bit integer arithmetic (such as GCC). Conditional compilation options exist to remove the requirement for a 64-bit capable compiler as many compilers for microcontrollers and DSPs do not support 64-bit arithmetic.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Which of the following statements about libFuzzer is/are correct?
While the Lehmer RNG can be viewed as a particular case of the linear congruential generator with c=0, it is a special case that implies certain restrictions and properties. In particular, for the Lehmer RNG, the initial seed X0 must be coprime to the modulus m, which is not required for LCGs in general. The choice of the modulus m and the multiplier a is also more restrictive for the Lehmer RNG. In contrast to LCG, the maximum period of the Lehmer RNG equals m − 1, and it is such when m is prime and a is a primitive root modulo m. On the other hand, the discrete logarithms (to base a or any primitive root modulo m) of Xk in Z m {\displaystyle \mathbb {Z} _{m}} represent a linear congruential sequence modulo the Euler totient φ ( m ) {\displaystyle \varphi (m)} .
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Which of the following statements about symbolic execution is/are correct?
Consider the program below, which reads in a value and fails if the input is 6. During a normal execution ("concrete" execution), the program would read a concrete input value (e.g., 5) and assign it to y. Execution would then proceed with the multiplication and the conditional branch, which would evaluate to false and print OK. During symbolic execution, the program reads a symbolic value (e.g., λ) and assigns it to y. The program would then proceed with the multiplication and assign λ * 2 to z. When reaching the if statement, it would evaluate λ * 2 == 12. At this point of the program, λ could take any value, and symbolic execution can therefore proceed along both branches, by "forking" two paths.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Which of the following statements about symbolic execution is/are correct?
Symbolic execution is used to reason about a program path-by-path which is an advantage over reasoning about a program input-by-input as other testing paradigms use (e.g. dynamic program analysis). However, if few inputs take the same path through the program, there is little savings over testing each of the inputs separately.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Which of the following statements about coverage-guided fuzzing is/are correct?
Fuzzing is used mostly as an automated technique to expose vulnerabilities in security-critical programs that might be exploited with malicious intent. More generally, fuzzing is used to demonstrate the presence of bugs rather than their absence. Running a fuzzing campaign for several weeks without finding a bug does not prove the program correct. After all, the program may still fail for an input that has not been executed, yet; executing a program for all inputs is prohibitively expensive. If the objective is to prove a program correct for all inputs, a formal specification must exist and techniques from formal methods must be used.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Which of the following statements about coverage-guided fuzzing is/are correct?
Complex software systems, especially multi-vendor distributed systems based on open standards, perform input/output operations to exchange data via stateful, structured exchanges known as "protocols." One kind of fault injection that is particularly useful to test protocol implementations (a type of software code that has the unusual characteristic in that it cannot predict or control its input) is fuzzing. Fuzzing is an especially useful form of Black-box testing since the various invalid inputs that are submitted to the software system do not depend on, and are not created based on knowledge of, the details of the code running inside the system.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Which of the following statements about fuzzing is/are correct?
Fuzzing is used mostly as an automated technique to expose vulnerabilities in security-critical programs that might be exploited with malicious intent. More generally, fuzzing is used to demonstrate the presence of bugs rather than their absence. Running a fuzzing campaign for several weeks without finding a bug does not prove the program correct. After all, the program may still fail for an input that has not been executed, yet; executing a program for all inputs is prohibitively expensive. If the objective is to prove a program correct for all inputs, a formal specification must exist and techniques from formal methods must be used.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Which of the following statements about fuzzing is/are correct?
Fuzzing is a testing technique that involves executing a program on a wide variety of inputs; often these inputs are randomly generated (at least in part). Gray-box fuzzers use code coverage to guide input generation.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Which of the following statements about testing is/are correct?
It may also be appropriate to use very long strings. Failure to test each possible parameter value may result in a bug. Testing only one of these could result in 100% code coverage as each line is covered, but as only one of seven options are tested, there is only 14.2% PVC.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Which of the following statements about testing is/are correct?
Verification for: completeness, correctness, testability
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Which of the following statements about mitigations are correct?
It is typically expected that the extent of mitigation should mirror the proposed impact. For example, if a project will result in permanent destruction of habitat, mitigation measures will likely require either the creation of new habitat or the protection of habitat, and mitigated habitat should be permanently protected. Similarly, mitigation for Low-Effect HCPs and small projects may involve a payment to a fund or purchasing mitigation credits.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Which of the following statements about mitigations are correct?
Several factors affect mitigation cost estimates. One is the baseline. This is a reference scenario that the alternative mitigation scenario is compared with. Others are the way costs are modelled, and assumptions about future government policy.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Given this program snippet which is part of a large (> 10000 LoC) codebase, which of these statements are true, given that the contents of string "s" are attacker controlled, the attacker can run the function f only once, the attacker has access to the binary and the binary is compiled for x86\_64 on a modern Linux system? \begin{lstlisting}[language=C,style=c] #include <string.h> void f(char* s) { char b[100] = {0}; memcpy(b, s, strlen(s)); printf("\%s", b); } \end{lstlisting}
The following C code demonstrates a typical insecure string comparison which stops testing as soon as a character doesn't match. For example, when comparing "ABCDE" with "ABxDE" it will return after 3 loop iterations: By comparison, the following version runs in constant-time by testing all characters and using a bitwise operation to accumulate the result: In the world of C library functions, the first function is analogous to memcmp(), while the latter is analogous to NetBSD's consttime_memequal() or OpenBSD's timingsafe_bcmp() and timingsafe_memcmp. On other systems, the comparison function from cryptographic libraries like OpenSSL and libsodium can be used.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Given this program snippet which is part of a large (> 10000 LoC) codebase, which of these statements are true, given that the contents of string "s" are attacker controlled, the attacker can run the function f only once, the attacker has access to the binary and the binary is compiled for x86\_64 on a modern Linux system? \begin{lstlisting}[language=C,style=c] #include <string.h> void f(char* s) { char b[100] = {0}; memcpy(b, s, strlen(s)); printf("\%s", b); } \end{lstlisting}
Some functions in the C standard library have been notorious for having buffer overflow vulnerabilities and generally encouraging buggy programming ever since their adoption. The most criticized items are: string-manipulation routines, including strcpy() and strcat(), for lack of bounds checking and possible buffer overflows if the bounds aren't checked manually; string routines in general, for side-effects, encouraging irresponsible buffer usage, not always guaranteeing valid null-terminated output, linear length calculation; printf() family of routines, for spoiling the execution stack when the format string doesn't match the arguments given. This fundamental flaw created an entire class of attacks: format string attacks; gets() and scanf() family of I/O routines, for lack of (either any or easy) input length checking.Except the extreme case with gets(), all the security vulnerabilities can be avoided by introducing auxiliary code to perform memory management, bounds checking, input checking, etc. This is often done in the form of wrappers that make standard library functions safer and easier to use. This dates back to as early as The Practice of Programming book by B. Kernighan and R. Pike where the authors commonly use wrappers that print error messages and quit the program if an error occurs.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Which of AddressSanitizer (ASan), MemorySanitizer (MemSan), UndefinedBehaviorSanitizer (UBSan) or ThreadSanitizer (TSan) can detect bugs (if any) in the following code snippet? \begin{lstlisting}[language=C,style=c] int sum_up_to(int x) {} // Return sum of integers up to x int result = x; for (int i = x; i >= 0; i--) { if (INT_MAX - i <= result) { break; } result += i; } return result; } \end{lstlisting}
Run-time overflow detection implementation UBSan (undefined behavior sanitizer) is available for C compilers. In Java 8, there are overloaded methods, for example Math.addExact(int, int), which will throw an ArithmeticException in case of overflow. Computer emergency response team (CERT) developed the As-if Infinitely Ranged (AIR) integer model, a largely automated mechanism to eliminate integer overflow and truncation in C/C++ using run-time error handling.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Which of AddressSanitizer (ASan), MemorySanitizer (MemSan), UndefinedBehaviorSanitizer (UBSan) or ThreadSanitizer (TSan) can detect bugs (if any) in the following code snippet? \begin{lstlisting}[language=C,style=c] int sum_up_to(int x) {} // Return sum of integers up to x int result = x; for (int i = x; i >= 0; i--) { if (INT_MAX - i <= result) { break; } result += i; } return result; } \end{lstlisting}
Rather the program's behavior is undefined. To make a fuzzer more sensitive to failures other than crashes, sanitizers can be used to inject assertions that crash the program when a failure is detected. There are different sanitizers for different kinds of bugs: to detect memory related errors, such as buffer overflows and use-after-free (using memory debuggers such as AddressSanitizer), to detect race conditions and deadlocks (ThreadSanitizer), to detect undefined behavior (UndefinedBehaviorSanitizer), to detect memory leaks (LeakSanitizer), or to check control-flow integrity (CFISanitizer).Fuzzing can also be used to detect "differential" bugs if a reference implementation is available.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Which of AddressSanitizer (ASan), MemorySanitizer (MemSan), UndefinedBehaviorSanitizer (UBSan) or ThreadSanitizer (TSan) can detect bugs (if any) in the following code snippet? \begin{lstlisting}[language=C,style=c] int sum_array(int *arr, size_t len) { // Return sum of array elements int result = 0; for (size_t i = 0; i <= len; i++) { result += arr[i]; } return result; } \end{lstlisting}
Run-time overflow detection implementation UBSan (undefined behavior sanitizer) is available for C compilers. In Java 8, there are overloaded methods, for example Math.addExact(int, int), which will throw an ArithmeticException in case of overflow. Computer emergency response team (CERT) developed the As-if Infinitely Ranged (AIR) integer model, a largely automated mechanism to eliminate integer overflow and truncation in C/C++ using run-time error handling.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Which of AddressSanitizer (ASan), MemorySanitizer (MemSan), UndefinedBehaviorSanitizer (UBSan) or ThreadSanitizer (TSan) can detect bugs (if any) in the following code snippet? \begin{lstlisting}[language=C,style=c] int sum_array(int *arr, size_t len) { // Return sum of array elements int result = 0; for (size_t i = 0; i <= len; i++) { result += arr[i]; } return result; } \end{lstlisting}
Clang supports the same -fstack-protector options as GCC and a stronger "safe stack" (-fsanitize=safe-stack) system with similarly low performance impact. Clang also has three buffer overflow detectors, namely AddressSanitizer (-fsanitize=address), UBSan (-fsanitize=bounds), and the unofficial SafeCode (last updated for LLVM 3.0).These systems have different tradeoffs in terms of performance penalty, memory overhead, and classes of detected bugs. Stack protection is standard in certain operating systems, including OpenBSD.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
In x86-64 Linux, the canary is \textbf{always} different for every?
{\text{ }}}_{1}}}: L2_CACHE_MISS: ALL, ε 2 {\displaystyle {{{\text{ }}\!\!\varepsilon \!\! {\text{ }}}_{2}}}: RETRIED_UOPS, ε 3 {\displaystyle {{{\text{ }}\!\!\varepsilon \!\! {\text{ }}}_{3}}}: RETIRED_MMX_AND_FP_INSTRUCTIONS: ALL, ε 4 {\displaystyle {{{\text{ }}\!\!\varepsilon \!\!
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
In x86-64 Linux, the canary is \textbf{always} different for every?
The syntax differs depending on the specific platform and implementation:
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Select all of the regions that ASLR randomizes the address when PIE is not enabled in x86-64 Linux:
Address space layout randomization (ASLR) introduced in Windows Vista was improved in Windows 8 and has been updated in Windows 8.1 to allow randomization to be unique across devices.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Select all of the regions that ASLR randomizes the address when PIE is not enabled in x86-64 Linux:
Address space layout randomization (ASLR) is a computer security technique involved in preventing exploitation of memory corruption vulnerabilities. In order to prevent an attacker from reliably jumping to, for example, a particular exploited function in memory, ASLR randomly arranges the address space positions of key data areas of a process, including the base of the executable and the positions of the stack, heap and libraries.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Which of the following in Linux x86-64 assembly snippets can be used as a gadget AND can be chained with more gadgets (e.g., in a ROP/JOP chain)?
There are several factors that characterize an SROP exploit and distinguish it from a classical return-oriented programming exploit.First, ROP is dependent on available gadgets, which can be very different in distinct binaries, thus making chains of gadget non-portable. Address space layout randomization (ASLR) makes it hard to use gadgets without an information leakage to get their exact positions in memory. Although Turing-complete ROP compilers exist, it is usually non-trivial to create a ROP chain.SROP exploits are usually portable across different binaries with minimal or no effort and allow easily setting the contents of the registers, which could be non-trivial or unfeasible for ROP exploits if the needed gadgets are not present. Moreover, SROP requires a minimal number of gadgets and allows constructing effective shellcodes by chaining system calls. These gadgets are always present in memory, and in some cases are always at fixed locations:
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Which of the following in Linux x86-64 assembly snippets can be used as a gadget AND can be chained with more gadgets (e.g., in a ROP/JOP chain)?
Instruction sequences like pop rdi, ret and the like would be helpful in this regard. A simple ROP version of the write system call would be: pop rdi; ret (socket) pop rsi; ret (buffer) pop rdx; ret (length) pop rax; ret (write syscall number) syscallOne problem with this methodology is that even if useful gadgets are found in the address space after they return the address on the stack would lead to non-executable stack with a high probability. To remedy this, BROP proposers conceived stop gadgets.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Does the following code snippet contain bugs? If so, which line(s)? \begin{lstlisting}[language=C,style=c] void echo() { char buf[100]; scanf("%s", buf); printf(buf); } \end{lstlisting}
In a number of cases, the undefined behavior has led to "Format string attack" security vulnerabilities. In most C or C++ calling conventions arguments may be passed on the stack, which means in the case of too few arguments printf will read past the end of the current stackframe, thus allowing the attacker to read the stack. Some compilers, like the GNU Compiler Collection, will statically check the format strings of printf-like functions and warn about problems (when using the flags -Wall or -Wformat). GCC will also warn about user-defined printf-style functions if the non-standard "format" __attribute__ is applied to the function.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Does the following code snippet contain bugs? If so, which line(s)? \begin{lstlisting}[language=C,style=c] void echo() { char buf[100]; scanf("%s", buf); printf(buf); } \end{lstlisting}
Most compilers will not catch this at compile time, and instead compile this to executable code that will crash: When the program containing this code is compiled, the string "hello world" is placed in the rodata section of the program executable file: the read-only section of the data segment. When loaded, the operating system places it with other strings and constant data in a read-only segment of memory. When executed, a variable, s, is set to point to the string's location, and an attempt is made to write an H character through the variable into the memory, causing a segmentation fault. Compiling such a program with a compiler that does not check for the assignment of read-only locations at compile time, and running it on a Unix-like operating system produces the following runtime error: Backtrace of the core file from GDB: This code can be corrected by using an array instead of a character pointer, as this allocates memory on stack and initializes it to the value of the string literal: Even though string literals should not be modified (this has undefined behavior in the C standard), in C they are of static char type, so there is no implicit conversion in the original code (which points a char * at that array), while in C++ they are of static const char type, and thus there is an implicit conversion, so compilers will generally catch this particular error.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Which of the following statement(s) is/are true? To achieve memory safety for C, ...
Memory safety is the state of being protected from various software bugs and security vulnerabilities when dealing with memory access, such as buffer overflows and dangling pointers. For example, Java is said to be memory-safe because its runtime error detection checks array bounds and pointer dereferences. In contrast, C and C++ allow arbitrary pointer arithmetic with pointers implemented as direct memory addresses with no provision for bounds checking, and thus are potentially memory-unsafe.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Which of the following statement(s) is/are true? To achieve memory safety for C, ...
Fail-Safe C is an open-source memory-safe ANSI C compiler that performs bounds checking based on fat pointers and object-oriented memory access.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
What is the difference between C++'s \texttt{static\_cast} and \texttt{dynamic\_cast}?
The dynamic_cast operator in C++ is used for downcasting a reference or pointer to a more specific type in the class hierarchy. Unlike the static_cast, the target of the dynamic_cast must be a pointer or reference to class. Unlike static_cast and C-style typecast (where type check is made during compilation), a type safety check is performed at runtime. If the types are not compatible, an exception will be thrown (when dealing with references) or a null pointer will be returned (when dealing with pointers). A Java typecast behaves similarly; if the object being cast is not actually an instance of the target type, and cannot be converted to one by a language-defined method, an instance of java.lang.ClassCastException will be thrown.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
What is the difference between C++'s \texttt{static\_cast} and \texttt{dynamic\_cast}?
C++ also provides the dynamic_cast operator, which allows code to safely attempt conversion of an object, via a base reference/pointer, to a more derived type: downcasting. The attempt is necessary as often one does not know which derived type is referenced. (Upcasting, conversion to a more general type, can always be checked/performed at compile-time via static_cast, as ancestral classes are specified in the derived class's interface, visible to all callers.)
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Once software has been shipped, what does the Software Development Lifecycle require you to do to maintain security guarantees?
For security, new software releases often require controls such as back ups, version control, and a secure implementation. Software distribution is assessed for compliance. Software distribution is assessed for compliance with license agreements.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Once software has been shipped, what does the Software Development Lifecycle require you to do to maintain security guarantees?
Applications are typically developed using high-level programming languages which in themselves can have security implications. The core activities essential to the software development process to produce secure applications and systems include: conceptual definition, functional requirements, control specification, design review, code review and walk-through, system test review, and maintenance and change management. Building secure software is not only the responsibility of a software engineer but also the responsibility of the stakeholders which include: management, project managers, business analysts, quality assurance managers, technical architects, security specialists, application owners, and developers.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
You share an apartment with friends. Kitchen, living room, balcony, and bath room are shared resources among all parties. Which policy/policies violate(s) the principle of least privilege?
Both Su's solution and Azrieli&Shmaya's solution make a "Miserly tenants" assumption - they assume that a tenant always prefers a free room to a non-free room. This assumption is strong and not always realistic. If one of the rooms is very bad, it is possible that some tenants will not want to live in that room even for free.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
You share an apartment with friends. Kitchen, living room, balcony, and bath room are shared resources among all parties. Which policy/policies violate(s) the principle of least privilege?
Authorizations are expressed as access policies in some types of "policy definition application", e.g. in the form of an access control list or a capability, or a policy administration point e.g. XACML. On the basis of the "principle of least privilege": consumers should only be authorized to access whatever they need to do their jobs.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Which of the following statement(s) is/are correct?
Since A is false, A→B is true. So C is true.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Which of the following statement(s) is/are correct?
Statements are separated by one semicolon (;)
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Consider the following shellcode, which of the following statement(s) is/are correct? \begin{lstlisting}[language=nasm,style=nasm] needle: jmp gofar goback: pop %rdi xor %rax, %rax movb $0x3b, %al xor %rsi, %rsi xor %rdx, %rdx syscall gofar: call goback .string "/bin/sh" \end{lstlisting}
So to refer to a file literally called "*", the shell must be told not to interpret it in this way, by preceding it with a backslash (\). This modifies the interpretation of the asterisk (*). Compare:
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Consider the following shellcode, which of the following statement(s) is/are correct? \begin{lstlisting}[language=nasm,style=nasm] needle: jmp gofar goback: pop %rdi xor %rax, %rax movb $0x3b, %al xor %rsi, %rsi xor %rdx, %rdx syscall gofar: call goback .string "/bin/sh" \end{lstlisting}
In hacking, a shellcode is a small piece of code used as the payload in the exploitation of a software vulnerability. It is called "shellcode" because it typically starts a command shell from which the attacker can control the compromised machine, but any piece of code that performs a similar task can be called shellcode. Because the function of a payload is not limited to merely spawning a shell, some have suggested that the name shellcode is insufficient. However, attempts at replacing the term have not gained wide acceptance.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Which of the following mitigation(s) can prevent reliable exploitation of the following vulnerable code snippet? \begin{lstlisting}[language=C,style=c] #include <stdio.h> #include <stdlib.h> void win(void) { system("/bin/sh"); } int main(int argc, char *argv[]) { char buf[128]; scanf("%126[^\n]", buf); // Reads up to 126 chars up until newline into buf printf(buf); return 0; } \end{lstlisting}
Some functions in the C standard library have been notorious for having buffer overflow vulnerabilities and generally encouraging buggy programming ever since their adoption. The most criticized items are: string-manipulation routines, including strcpy() and strcat(), for lack of bounds checking and possible buffer overflows if the bounds aren't checked manually; string routines in general, for side-effects, encouraging irresponsible buffer usage, not always guaranteeing valid null-terminated output, linear length calculation; printf() family of routines, for spoiling the execution stack when the format string doesn't match the arguments given. This fundamental flaw created an entire class of attacks: format string attacks; gets() and scanf() family of I/O routines, for lack of (either any or easy) input length checking.Except the extreme case with gets(), all the security vulnerabilities can be avoided by introducing auxiliary code to perform memory management, bounds checking, input checking, etc. This is often done in the form of wrappers that make standard library functions safer and easier to use. This dates back to as early as The Practice of Programming book by B. Kernighan and R. Pike where the authors commonly use wrappers that print error messages and quit the program if an error occurs.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Which of the following mitigation(s) can prevent reliable exploitation of the following vulnerable code snippet? \begin{lstlisting}[language=C,style=c] #include <stdio.h> #include <stdlib.h> void win(void) { system("/bin/sh"); } int main(int argc, char *argv[]) { char buf[128]; scanf("%126[^\n]", buf); // Reads up to 126 chars up until newline into buf printf(buf); return 0; } \end{lstlisting}
Contrary to many other security issues, the root cause of format string vulnerabilities is relatively easy to detect in x86-compiled executables: For printf-family functions, proper use implies a separate argument for the format string and the arguments to be formatted. Faulty uses of such functions can be spotted by simply counting the number of arguments passed to the function; an 'argument deficiency' is then a strong indicator that the function was misused.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Which of the following is/are true about stack canaries?
The processor is made aware that no code exists in that part of memory, and refuses to execute anything found in there. Canaries – randomly place values in a stack. At runtime, a canary is checked when a function returns.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Which of the following is/are true about stack canaries?
Unlike the call stack, which also stores local program variables, passed arguments, spilled registers and other data, the shadow stack typically just stores a second copy of a function's return address. Shadow stacks provide more protection for return addresses than stack canaries, which rely on the secrecy of the canary value and are vulnerable to non-contiguous write attacks.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Which of the following statement(s) is/are true about Safe Exception Handling (SEH)?
This system serves two purposes: it provides a substrate on which language-specific exception handling can be implemented, and it is how the kernel notifies applications of exceptional conditions such as dereferencing an invalid pointer or stack overflow. The Microsoft/Borland C++ compilers had the ability to use this system as soon as it was introduced in Windows 95 and NT, however the actual implementation was undocumented and had to be reverse engineered for the Wine project and free compilers. SEH is based on pushing exception handler frames onto the stack, then adding them to a linked list stored in thread-local storage (the first field of the thread environment block). When an exception is thrown, the kernel and base libraries unwind the stack running handlers and filters as they are encountered. Eventually, every exception unhandled by the application will be dealt with by the default backstop handler, which pops up the Windows common crash dialog.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Which of the following statement(s) is/are true about Safe Exception Handling (SEH)?
For properly compiled applications, SafeSEH checks that, when an exception is raised during program execution, the exception's handler is one defined by the application as it was originally compiled. The effect of this protection is that an attacker is not able to add his own exception handler which he has stored in a data page through unchecked program input.When NX is supported, it is enabled by default. Windows allows programs to control which pages disallow execution through its API as well as through the section headers in a PE file.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Which of the following statement(s) is/are true about CFI?
Control-flow integrity (CFI) is a general term for computer security techniques that prevent a wide variety of malware attacks from redirecting the flow of execution (the control flow) of a program.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Which of the following statement(s) is/are true about CFI?
The Common Flash Memory Interface (CFI) is an open standard jointly developed by AMD, Intel, Sharp and Fujitsu. It is implementable by all flash memory vendors, and has been approved by the non-volatile-memory subcommittee of JEDEC. The goal of the specification is the interchangeability of flash memory devices offered by different vendors. The developer is able to use one driver for different flash products by reading identifying information from the flash chip.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
A shadow stack...
In computer security, a shadow stack is a mechanism for protecting a procedure's stored return address, such as from a stack buffer overflow. The shadow stack itself is a second, separate stack that "shadows" the program call stack. In the function prologue, a function stores its return address to both the call stack and the shadow stack. In the function epilogue, a function loads the return address from both the call stack and the shadow stack, and then compares them.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
A shadow stack...
If the two records of the return address differ, then an attack is detected; the typical course of action is simply to terminate the program or alert system administrators about a possible intrusion attempt. A shadow stack is similar to stack canaries in that both mechanisms aim to maintain the control-flow integrity of the protected program by detecting attacks that tamper the stored return address by an attacker during an exploitation attempt. Shadow stacks can be implemented by recompiling programs with modified prologues and epilogues, by dynamic binary rewriting techniques to achieve the same effect, or with hardware support.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Which of the following statements are true about DEP?
Diethyl phthalate (DEP) is a phthalate ester. It occurs as a colourless liquid without significant odour but has a bitter, disagreeable taste. It is more dense than water and insoluble in water; hence, it sinks in water.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Which of the following statements are true about DEP?
The second row shows that either *SS or Ident must dominate Dep. From the /kæt/ + /z/ tableau, it was established that Dep dominates Ident; this means that *SS must dominate Dep. So far, the following rankings have been shown to be necessary: *SS, Max ≫ Dep ≫ IdentWhile it is possible that Agree can dominate Dep, it is not necessary; the ranking given above is sufficient for the observed to emerge.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Assume we enforce CFI for function returns. Which of the following statements are true?
If the procedure had a more complex control flow, such as a label after the return statement and a goto elsewhere in the procedure, then a feasible execution path might exist to the assignment to b. Also, even though some calculations are performed in the function, their values are not stored in locations accessible outside the scope of this function. Furthermore, given the function returns a static value (96), it may be simplified to the value it returns (this simplification is called constant folding).
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Assume we enforce CFI for function returns. Which of the following statements are true?
Control passes to the statement following the terminated statement. A function returns to its caller by the return statement. When return is followed by an expression, the value is returned to the caller as the value of the function. Encountering the end of the function is equivalent to a return with no expression. In that case, if the function is declared as returning a value and the caller tries to use the returned value, the result is undefined.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
ASLR needs support from:
Support for ASLR appeared in FreeBSD 13.0. It is enabled by default since 13.2.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
ASLR needs support from:
Support for ASLR in userland appeared in NetBSD 5.0 (released April 2009), and was enabled by default in NetBSD-current in April 2016.Kernel ASLR support on amd64 was added in NetBSD-current in October 2017, making NetBSD the first BSD system to support KASLR.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
ASLR stands for
Support for ASLR appeared in FreeBSD 13.0. It is enabled by default since 13.2.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
ASLR stands for
ISLR (also known as word-level SLR) is the task of recognizing individual signs or tokens called glosses from a given segment of signing video clip. This is commonly seen as a classification problem when recognizing from isolated videos, but requires other things like video segmentation to be handled when used for real-time applications.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Which of the following statements about mitigations are true?
It is typically expected that the extent of mitigation should mirror the proposed impact. For example, if a project will result in permanent destruction of habitat, mitigation measures will likely require either the creation of new habitat or the protection of habitat, and mitigated habitat should be permanently protected. Similarly, mitigation for Low-Effect HCPs and small projects may involve a payment to a fund or purchasing mitigation credits.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Which of the following statements about mitigations are true?
Several factors affect mitigation cost estimates. One is the baseline. This is a reference scenario that the alternative mitigation scenario is compared with. Others are the way costs are modelled, and assumptions about future government policy.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
When a test fails, it means that:
Badly written tests, for example ones that include hard-coded error strings, are themselves prone to failure, and they are expensive to maintain. This is especially the case with fragile tests. There is a risk that tests that regularly generate false failures will be ignored, so that when a real failure occurs, it may not be detected.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
When a test fails, it means that:
A failure in an early test case breaks a later test case even if no actual fault exists in the UUT, increasing defect analysis and debug efforts. Testing precise execution, behavior, timing or performance. Building "all-knowing oracles".
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Tick all correct answers:
Those tag questions which expect an affirmative answer may employ the particle xom in second position within the sentence. Comparing statement, yes/no question, and tag question expecting an affirmative answer: Dghes k'argi amindia, 'The weather is good today' Dghes k'argi amindia?, 'is the weather good today?' Dghes xom k'argi amindia?, 'the weather is good today, isn't it? 'These sentences contain an -a suffixed to the word amindi 'weather'.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Tick all correct answers:
Queries that have a yes-or-no, or possible-impossible, answer can easily be answered with these modes of perfection. If the chart perfects, the answer is "yes". Otherwise, in the case of denial of perfection, "no".
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Which of the following statement(s) is/are true about different types of coverage for coverage-guided fuzzing?
There are a number of coverage criteria, but the main ones are: Function coverage – has each function (or subroutine) in the program been called? Statement coverage – has each statement in the program been executed? Edge coverage – has every edge in the control-flow graph been executed? Branch coverage – has each branch (also called the DD-path) of each control structure (such as in if and case statements) been executed?
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Which of the following statement(s) is/are true about different types of coverage for coverage-guided fuzzing?
Coverage as applied to hardware verification languages refers to the collection of statistics based on sampling events within the simulation. Coverage is used to determine when the device under test (DUT) has been exposed to a sufficient variety of stimuli that there is a high confidence that the DUT is functioning correctly. Note that this differs from code coverage which instruments the design code to ensure that all lines of code in the design have been executed. Functional coverage ensures that all desired corner and edge cases in the design space have been explored.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Which of the following is/are true about fuzzing?
Fuzzing is used mostly as an automated technique to expose vulnerabilities in security-critical programs that might be exploited with malicious intent. More generally, fuzzing is used to demonstrate the presence of bugs rather than their absence. Running a fuzzing campaign for several weeks without finding a bug does not prove the program correct. After all, the program may still fail for an input that has not been executed, yet; executing a program for all inputs is prohibitively expensive. If the objective is to prove a program correct for all inputs, a formal specification must exist and techniques from formal methods must be used.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Which of the following is/are true about fuzzing?
Fuzzing is a testing technique that involves executing a program on a wide variety of inputs; often these inputs are randomly generated (at least in part). Gray-box fuzzers use code coverage to guide input generation.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Which of the following is/are true about fuzzing?
Fuzzing is used mostly as an automated technique to expose vulnerabilities in security-critical programs that might be exploited with malicious intent. More generally, fuzzing is used to demonstrate the presence of bugs rather than their absence. Running a fuzzing campaign for several weeks without finding a bug does not prove the program correct. After all, the program may still fail for an input that has not been executed, yet; executing a program for all inputs is prohibitively expensive. If the objective is to prove a program correct for all inputs, a formal specification must exist and techniques from formal methods must be used.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Which of the following is/are true about fuzzing?
Fuzzing is a testing technique that involves executing a program on a wide variety of inputs; often these inputs are randomly generated (at least in part). Gray-box fuzzers use code coverage to guide input generation.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Which of the following is/are true about fuzzing?
Fuzzing is used mostly as an automated technique to expose vulnerabilities in security-critical programs that might be exploited with malicious intent. More generally, fuzzing is used to demonstrate the presence of bugs rather than their absence. Running a fuzzing campaign for several weeks without finding a bug does not prove the program correct. After all, the program may still fail for an input that has not been executed, yet; executing a program for all inputs is prohibitively expensive. If the objective is to prove a program correct for all inputs, a formal specification must exist and techniques from formal methods must be used.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Which of the following is/are true about fuzzing?
Fuzzing is a testing technique that involves executing a program on a wide variety of inputs; often these inputs are randomly generated (at least in part). Gray-box fuzzers use code coverage to guide input generation.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Which of the following is/are true about testing?
Testing is the feedback mechanism in the software development process. It tells you where corrections need to be made to stay on course at any given iteration of a development effort. It also tells you about the current quality of the system being developed.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Which of the following is/are true about testing?
Testing is an integral part of software development that needs to be planned. It is also important that testing is done proactively; meaning that test cases are planned before coding starts, and test cases are developed while the application is being designed and coded.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Which of the following is/are true about fuzzing with sanitizers?
Rather the program's behavior is undefined. To make a fuzzer more sensitive to failures other than crashes, sanitizers can be used to inject assertions that crash the program when a failure is detected. There are different sanitizers for different kinds of bugs: to detect memory related errors, such as buffer overflows and use-after-free (using memory debuggers such as AddressSanitizer), to detect race conditions and deadlocks (ThreadSanitizer), to detect undefined behavior (UndefinedBehaviorSanitizer), to detect memory leaks (LeakSanitizer), or to check control-flow integrity (CFISanitizer).Fuzzing can also be used to detect "differential" bugs if a reference implementation is available.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Which of the following is/are true about fuzzing with sanitizers?
Fuzzing is used mostly as an automated technique to expose vulnerabilities in security-critical programs that might be exploited with malicious intent. More generally, fuzzing is used to demonstrate the presence of bugs rather than their absence. Running a fuzzing campaign for several weeks without finding a bug does not prove the program correct. After all, the program may still fail for an input that has not been executed, yet; executing a program for all inputs is prohibitively expensive. If the objective is to prove a program correct for all inputs, a formal specification must exist and techniques from formal methods must be used.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Consider the Diffie-Hellman secret-key-exchange algorithm performed in the cyclic group $(\mathbb{Z}/11\mathbb{Z}^\star, \cdot)$. Let $g=2$ be the chosen group generator. Suppose that Alice's secret number is $a=5$ and Bob's is $b=3$. Which common key $k$ does the algorithm lead to? Check the correct answer.
We suppose that both Alice and Bob have access to the XTR public key data ( p , q , T r ( g ) ) {\displaystyle \left(p,q,Tr(g)\right)} and intend to agree on a shared secret key K {\displaystyle K} . They can do this by using the following XTR version of the Diffie–Hellman key exchange: Alice picks a ∈ Z {\displaystyle a\in \mathbb {Z} } randomly with 1 < a < q − 2 {\displaystyle 1
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Consider the Diffie-Hellman secret-key-exchange algorithm performed in the cyclic group $(\mathbb{Z}/11\mathbb{Z}^\star, \cdot)$. Let $g=2$ be the chosen group generator. Suppose that Alice's secret number is $a=5$ and Bob's is $b=3$. Which common key $k$ does the algorithm lead to? Check the correct answer.
Bob's private key is similarly secure. No party other than Alice or Bob can compute the shared secret, unless that party can solve the elliptic curve Diffie–Hellman problem.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
If we compute $\gcd(70,51)$ via Euclid’s extended algorithms, we produce a sequence of $(u, v)$ pairs, the last of which satisfies $\gcd(70,51)=70 imes u + 51 imes v$. Check the correct sequence.
As for the integers, the Euclidean division allows us to define Euclid's algorithm for computing GCDs. Starting from two polynomials a and b, Euclid's algorithm consists of recursively replacing the pair (a, b) by (b, rem(a, b)) (where "rem(a, b)" denotes the remainder of the Euclidean division, computed by the algorithm of the preceding section), until b = 0. The GCD is the last non zero remainder. Euclid's algorithm may be formalized in the recursive programming style as: gcd ( a , b ) := if b = 0 then a else gcd ( b , rem ⁡ ( a , b ) ) .
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
If we compute $\gcd(70,51)$ via Euclid’s extended algorithms, we produce a sequence of $(u, v)$ pairs, the last of which satisfies $\gcd(70,51)=70 imes u + 51 imes v$. Check the correct sequence.
We have s(2P) = s(14,-53) = –593/106 (mod n). Using the Euclidean algorithm: 455839 = 4300·106 + 39, then 106 = 2·39 + 28, then 39 = 28 + 11, then 28 = 2·11 + 6, then 11 = 6 + 5, then 6 = 5 + 1. Hence gcd(455839, 106) = 1, and working backwards (a version of the extended Euclidean algorithm): 1 = 6 – 5 = 2·6 – 11 = 2·28 – 5·11 = 7·28 – 5·39 = 7·106 – 19·39 = 81707·106 – 19·455839.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
How many integers $n$ between $1$ and $2021$ satisfy $10^n \equiv 1 \mod 11$? Check the correct answer.
Since gcd(3, 10) = 1, the linear congruence 3x ≡ 1 (mod 10) will have solutions, that is, modular multiplicative inverses of 3 modulo 10 will exist. In fact, 7 satisfies this congruence (i.e., 21 − 1 = 20). However, other integers also satisfy the congruence, for instance 17 and −3 (i.e., 3(17) − 1 = 50 and 3(−3) − 1 = −10).
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
How many integers $n$ between $1$ and $2021$ satisfy $10^n \equiv 1 \mod 11$? Check the correct answer.
Using 11 as an example, 11 divides 11 = 10 + 1. That means 10 ≡ − 1 ( mod 11 ) {\displaystyle 10\equiv -1{\pmod {11}}} . For the higher powers of 10, they are congruent to 1 for even powers and congruent to −1 for odd powers: 10 n ≡ ( − 1 ) n ≡ { 1 , if n is even − 1 , if n is odd ( mod 11 ) .
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Check the correct statement concerning a standard-array-based decoder.
In practice, decoding via a standard array requires large amounts of storage - a code with 32 codewords requires a standard array with 2 32 {\displaystyle 2^{32}} entries. Other forms of decoding, such as syndrome decoding, are more efficient. Decoding via standard array does not guarantee that all vectors are decoded correctly.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Check the correct statement concerning a standard-array-based decoder.
Thus the decoder can detect and correct a single error and at the same time detect (but not correct) a double error. If the decoder does not attempt to correct errors, it can reliably detect triple bit errors. If the decoder does correct errors, some triple errors will be mistaken for single errors and "corrected" to the wrong value.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus