SECO Secure SPF-Sample - Exam-EN-v1.1 PDF
SECO Secure SPF-Sample - Exam-EN-v1.1 PDF
This document provides a sample exam for you to familiarise yourself with the structure and topic
areas of the current Secure Programming Foundation examination. We strongly recommend you to
test your knowledge before taking the actual assessment. The results of this test do not count towards
your certification assessment.
Examination type
• Computer-based
• 40 Multiple choice: 2,5 points per question
• 60 minutes
Examination details
1
Secure Programming Foundation Sample Exam
Questions
Question 1
What is the best answer to the question: why do we have insecure software?
A. Consumers cannot objectively assess the quality and security of available software
B. The software industry can sell more software if they offer more features for a lower price and
faster delivery than their competition
C. We are bad at estimating risks. Consequently, we are unable to estimate the odds that the
software built for us is vulnerable and we are unable to predict the resulting damage if those
vulnerabilities are exploited
D. Consumers focus on price and features and software vendors are not liable for insecure products
Question 2
The following words are in alphabetical order: Exploit, Patch, Threat, Vulnerability.
What is the best chronological order?
Question 3
What does the abbreviation STRIDE mean, as related to exploiting system vulnerabilities?
A. Survey the system, Testing applications, Identify security objectives, Decompose it, Evaluate
compliancy
B. Spoofing, Tampering, Repudiation, Information disclosure, Denial of service, Elevation of
privilege
C. Security architecture, Threat evaluation, Identify vulnerabilities, Data asset matching, Evaluate
compliancy
D. Safe standards, Target hardening, Identify threats, Detection of intrusions, Elevation of privilege
2
Secure Programming Foundation Sample Exam
Question 4
To ascertain the trust boundary and improve security, it helps if a web application can be divided in
clear and modular components. Which answer explains the best why this is difficult?
A. In today's web applications, JavaScript and applets are called within the browser but these
components directly communicate with the web server
B. Most users score web applications only on performance and this contradicts modular design, in
which the code amount is limited by building multi-purpose routines
C. The clear communication line between web client and web server can be blurred by a so-called
man in the middle (MITM) proxy
D. Modern applications can contain millions of lines of code, and the resulting complexity of the
code impedes modular design
Question 5
A. It is one of the three original HTTP Request types distinguished in the CGI standard: GET, POST
and CONNECT
B. The original semantics of the CGI standard require that a GET request modifies the application
state
C. GET parameters are visible in URL and therefore in the Browser address bar and in various logs
D. The original semantics were forgotten and today both GET and POST requests are equally secure
Question 6
Which of the following HTTP verbs are marked as custom in RFC 2616, section 9?
A. TRACE
B. CONNECT
C. DELETE (modify state)
D. LOCK
Question 7
3
Secure Programming Foundation Sample Exam
Question 8
Question 9
A user can send his session identifier to the web server to resume a previous session. What is the
best way to send a session identifier?
A. as a login parameter
B. as a cookie
C. as a POST parameter
D. as a GET parameter
Question 10
A. A JavaScript which verifies that the top page is equal to the web site page breaks Clickjacking
attacks
B. Break Clickjacking attacks by including an X-Frame-Options header with value "deny", which page
can only be loaded in a frame from the specified URI
C. The user is misled to perform actions on a transparent page overlaying the visible web site page
D. Break Clickjacking attacks by including an X-Frame-Options header with value "allow-from" so
pages can only be loaded in a frame from the same web site
Question 11
What will the (PCRE) regular expression '<name>.*</name>' match in the following string:
<members><name>Alice</name><name>Bob</name><name>Eve</name></members>
A. <name>Alice</name><name>Bob</name><name>Eve</name>
B. <name>Alice</name><name>Bob</name>
C. <name>Alice</name>
D. <members><name>Alice</name><name>Bob</name><name>Eve</name></members>
4
Secure Programming Foundation Sample Exam
Question 12
Injection attacks are possible if a system passes user input unfiltered to a subsystem, which allows
instructions. Which is most likely NOT a source of untrusted input data?
A. A system file
B. e-mail
C. A pointer to XML document
D. HTTP headers
Question 13
Which of the following commands is an example of a parameterized query (not vulnerable for SQL
injection)?
A. [C#] SqlCommand cmd = new SqlCommand("SELECT * FROM people WHERE LastName ="
+LastName.Text+"')", conn);
B. [PHP] $query = "SELECT * FROM people WHERE LastName =".$_POST['LastName'];
C. [Python] cmd = "SELECT * FROM people WHERE LastName ='%s'" % (LastName)
D. [JDBC] PreparedStatement statement = connection.prepareStatement( "SELECT * FROM people
WHERE LastName = ?" ); statement.setString(1, LastName);
Question 14
To avoid SQL injection, what is the MAIN difficulty for a programmer to neutralize metacharacters?
Question 15
5
Secure Programming Foundation Sample Exam
Question 16
What is the best regular expression to validate a phone number in a pattern like '+31 70 1234567'
A. \+[0-9]{2}\s*[0-9]{2}\s*[0-9]{7}
B. ^\+[0-9\s]{13}$
C. [+ 0123456789]{14}
D. \n[^A-Za-z]{13}
Question 17
Question 18
Any C programmer should use functions that protect his program against buffer overflow attacks.
Which of the following functions qualifies for this?
A. fgets
B. printf
C. strcat
D. strcpy
Question 19
Which of the following techniques offers the WORST protection against stack overflows?
A. Stack canaries
B. Non-executable stack
C. Use Java (without pointers and memory access)
D. Use statements that checks lengths
Question 20
To prevent XSS attacks, escaping metacharacters is necessary. What is the MAIN difficulty in this?
6
Secure Programming Foundation Sample Exam
Question 21
An attacker can upload and store malware files on a server. Which option offers the best protection
against an XSS attack in this scenario?
Question 22
Which of the following is NOT a good practice for validating encoded input?
A. First normalize, then validate and then process the normalized input
B. Use length checks that take encodings into account
C. Validation is performed after the input has been decoded
D. Implement the same secure code conversion functions on all subsystems
Question 23
Question 24
Question 25
7
Secure Programming Foundation Sample Exam
Question 26
Why is a distinction between internally developed code and third-party code less relevant, from a
security perspective?
Question 27
Question 28
Which of the following information does NOT enable a Side Channel attack?
Question 29
A. System should handle unhandled exceptions with a generic error message (no debug
information)
B. Debug information should be logged, but never displayed to the user
C. An error message should include an error id for the user's reference
D. To avoid breaking in, block a user account after a fixed number of failed login attempt
8
Secure Programming Foundation Sample Exam
Question 30
A. The encryption system must not be required to be a secret, and its falling into the hands of the
enemy should not cause any inconvenience
B. The encryption system must be practically, if not mathematically, indecipherable
C. The encryption system must be portable, and its usage and function must not require the
concourse of several people
D. The encryption system must be easy to use, requiring neither mental strain nor the knowledge of
a long series of rules to observe
Question 31
Question 32
What is the best way Eve can set up a Man-in-the-Middle (MitM) attack to interfere with the secret
communications between Alice and Bob?
A. Eve decrypts messages Alice sent to Bob using Alice’s public key
B. Eve tricks the certificate authority (CA) into believing that she is Alice, depositing a new public
key
C. Eve tricks Alice into using Eve's public key instead of Bob's public key
D. Eve uses both Alice’s and Bob’s public keys to decrypt the keys of the message exchanged
between them
Question 33
9
Secure Programming Foundation Sample Exam
Question 34
Question 35
What is the best description of the focus of the Framework Secure Software?
A. Certify the security of a piece of software and give developers feedback on the security of the
application under construction
B. Prescribes what should be done in the software development process
C. How organisations can improve the security delivered by the development process
D. Compare and categorise the practices organisations use. Some best practices are more advanced
than others
Question 36
Which process is (partly) described by the following steps: 1) identify system assets 2) identify system
information content and supported business processes 3) identify parties interested in attacking the
system?
A. threat modelling
B. risk analysis
C. risk management
D. asset management
Question 37
To determine the attack surface, a data flow diagram (DFD) can be composed. Which elements does
a DFD contain?
A. Information input and output for the system, the data flows through the system, the data stores
and the system border
B. Agents (closed rectangle), processes (ellipse), data stores (open rectangle), data flows (arrow)
and trust boundaries (dotted line)
C. A visual overview of the flow of information, where data comes from, where it goes and how it
gets stored
D. Entities (square), processes (circles), Data stores (open rectangle), Data flows (line) and the
system border
10
Secure Programming Foundation Sample Exam
Question 38
Which of the following actions is NOT an element of Threat management (part of architectural
analysis)?
Question 39
Question 40
11
Secure Programming Foundation Sample Exam
Answers
12
Secure Programming Foundation Sample Exam
13
Secure Programming Foundation Sample Exam
Digital badges
SECO-Institute and digital badge provider Acclaim have partnered to
provide certification holders with a digital badge of their SECO-
Institute certification. Digital badges can be used in email signatures
as well as on personal websites, social media sites such as LinkedIn
and Twitter, and electronic copies of resumes. Digital badges help
certification holders convey employers, potential employers and
interested parties the skills they have acquired to earn and maintain a
specialised certification.
https://www.seco-institute.org/claim-your-foundation-badge
14
Secure Programming Foundation Sample Exam
SPF-Sample Exam-EN-v1.0
15