








































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!









































Question 1. Which IronPython version is bundled with Cellebrite Physical Analyzer (PA) for scripting? A) 2. B) 3. C) 3. D) 2. Answer: A Explanation: PA ships with IronPython 2.7, enabling compatibility with .NET libraries while using Python 2 syntax. Question 2. In PA Python scripts, which object provides access to the currently opened case? A) CaseManager B) CurrentCase C) Case D) Analyzer Answer: C Explanation: The Case object is the entry point for accessing artifacts, devices, and case metadata within a PA session. Question 3. What is the correct way to declare a string variable that will hold a file path in PA Python? A) path = r"C:\Extraction\file.db" B) path = "C:/Extraction/file.db" C) path = u"C:\\Extraction\\file.db" D) All of the above Answer: D Explanation: All three syntaxes produce a valid Unicode string; raw strings, forward slashes, and escaped backslashes are accepted. Question 4. Which control structure is most appropriate for iterating over every artifact in a case?
A) while loop B) for loop C) if statement D) try block Answer: B Explanation: A for loop can directly iterate over the collection returned by Case.Artifacts, simplifying processing. Question 5. How would you safely open a SQLite file that might be locked by another process in a PA script? A) sqlite3.connect(file, timeout=30) B) sqlite3.connect(file, check_same_thread=False) C) sqlite3.connect(file, isolation_level=None) D) sqlite3.connect(file, detect_types=sqlite3.PARSE_DECLTYPES) Answer: A Explanation: Setting a timeout allows SQLite to wait for the lock to be released, preventing immediate failure. Question 6. Which Python exception should you catch when a required artifact attribute is missing? A) KeyError B) AttributeError C) IndexError D) TypeError Answer: B Explanation: Accessing a non-existent attribute on an object raises AttributeError. Question 7. When converting a Unix epoch timestamp (seconds since 1970) to a readable format, which function is used? A) datetime.fromtimestamp() B) time.strftime()
D) All of the above Answer: D Explanation: All three approaches can access the BLOB data depending on how the row is accessed (dictionary, attribute, or index). Question 11. How can you identify the file type of a BLOB by its magic bytes in a PA script? A) Compare the first four bytes to known signatures using blob[:4] B) Use mimetypes.guess_type() on the BLOB C) Call filetype.from_buffer(blob) from the external library D) Both A and C are viable within PA Answer: D Explanation: Direct byte comparison works, and the filetype third-party library (if imported) can also detect signatures. Question 12. Which Python library is pre-installed in the PA environment for JSON handling? A) simplejson B) json C) ujson D) rapidjson Answer: B Explanation: The standard library json module is always available and used for parsing JSON data. Question 13. When parsing an Apple Property List (plist) file, which module should you import? A) plistlib B) xmltodict C) yaml D) configparser
Answer: A Explanation: plistlib provides functions to read and write both binary and XML plists. Question 14. In a PA script, which method adds a custom tag to an artifact? A) artifact.AddTag("MyTag") B) artifact.Tags.Add("MyTag") C) artifact.AddCustomTag("MyTag") D) artifact.SetTag("MyTag") Answer: B Explanation: The Tags collection on an artifact exposes an Add method for custom tagging. Question 15. Which of the following best describes the purpose of the Write-Ahead Log (WAL) file in SQLite? A) Stores schema definitions only B) Contains a transaction log that can be replayed to recover recent changes C) Holds encrypted copies of the database D) Is a backup of the main database file Answer: B Explanation: WAL records changes before they are checkpointed to the main database, enabling recovery of recent inserts, updates, and deletes. Question 16. To retrieve deleted rows from a SQLite database using PA Python, which pragma should be executed? A) PRAGMA integrity_check; B) PRAGMA foreign_keys=ON; C) PRAGMA journal_mode=WAL; D) PRAGMA read_uncommitted = TRUE; Answer: D
Question 20. When handling a malformed JSON string in a PA script, which exception should be caught? A) ValueError B) json.JSONDecodeError C) TypeError D) UnicodeDecodeError Answer: B Explanation: json.JSONDecodeError is a subclass of ValueError raised specifically for JSON parsing failures. Question 21. Which PA API method returns the list of all files under a specific directory in the extraction? A) Case.GetFiles(path) B) FileSystem.GetDirectoryFiles(path) C) Case.FileSystem.GetFilesRecursive(path) D) Artifact.GetChildren(path) Answer: C Explanation: Case.FileSystem.GetFilesRecursive traverses the extraction hierarchy and returns every file matching the path. Question 22. To add an “Actionable Intelligence” note to an artifact, which property is used? A) artifact.Notes.Add() B) artifact.ActionableIntelligence = "text" C) artifact.AddNote("text") D) artifact.CustomFields["AI"] = "text" Answer: C Explanation: The AddNote method appends a free-form note that can be flagged as actionable intelligence.
Question 23. Which of the following statements about Protocol Buffers (protobuf) in PA scripts is true? A) They can be parsed directly with the built-in json module. B) The protobuf Python package must be imported and compiled with the .proto schema. C) Protobuf data is always stored as plain text in mobile apps. D) PA provides a native proto_decode method that needs no external libraries. Answer: B Explanation: To decode protobuf, the .proto definition must be compiled into Python classes using the protobuf library. Question 24. Which method is used to write a new artifact into the case database from a script? A) Case.AddArtifact(artifact) B) Case.CreateArtifact(type, attributes) C) Case.Artifacts.New(type, **kwargs) D) Case.InsertArtifact(artifact) Answer: C Explanation: Case.Artifacts.New creates a new artifact of a specified type and allows attribute assignment. Question 25. When iterating over rows returned by a SQLite query in PA, which method fetches them one at a time? A) cursor.fetchmany() B) cursor.fetchone() C) cursor.fetchall() D) cursor.iter_rows() Answer: B Explanation: fetchone() returns the next row, enabling memory-efficient processing of large result sets.
incorrect. (The exam expects recognition that all are valid; the answer key marks this as a trick question.) Question 29. Which regular expression flag makes the pattern case-insensitive? A) re.MULTILINE B) re.DOTALL C) re.IGNORECASE D) re.VERBOSE Answer: C Explanation: re.IGNORECASE (or re.I) causes the regex engine to ignore case differences. Question 30. To parse a nested JSON object containing a list of messages, which Python construct is most appropriate? A) for msg in json_data["messages"]: B) while json_data["messages"]: C) if "messages" in json_data: D) json_data.get("messages") only Answer: A Explanation: Iterating over the list directly accesses each message object for further processing. Question 31. Which PA API property provides the absolute path of an artifact’s source file on the host device? A) artifact.FilePath B) artifact.SourcePath C) artifact.Location D) artifact.Path Answer: B Explanation: SourcePath stores the original location of the file within the extracted device image.
Question 32. Which method allows you to commit changes made by a script to the case database? A) Case.Save() B) Case.Commit() C) Case.Flush() D) Case.ApplyChanges() Answer: B Explanation: Case.Commit() writes all pending modifications to the underlying case store. Question 33. When reading a large SQLite file, which connection parameter reduces memory usage? A) detect_types=sqlite3.PARSE_DECLTYPES B) factory=sqlite3.Connection C) cached_statements=0 D) uri=True Answer: C Explanation: Setting cached_statements=0 disables statement caching, lowering memory overhead for massive queries. Question 34. In PA, which artifact type is used to represent a chat message? A) InstantMessage B) ChatLog C) Message D) Communication Answer: A Explanation: The standardized type InstantMessage maps to chat and messaging artifacts across platforms.
B) Decoder.Order C) Decoder.Sequence D) Decoder.Weight Answer: A Explanation: Priority determines where the custom decoder fits within the built-in decoding chain. Question 39. Which method retrieves the raw binary of a file artifact without extracting it to the host file system? A) artifact.GetData() B) artifact.Read() C) artifact.BinaryContent D) artifact.Stream() Answer: A Explanation: GetData() returns the bytes of the artifact directly from the case store. Question 40. In a PA script, how would you log a debug message that appears in the Analyzer’s console? A) print("Debug info") B) logger.debug("Debug info") C) Case.Log("Debug info") D) Console.WriteLine("Debug info") Answer: C Explanation: Case.Log writes messages to the PA log view, visible during script execution. Question 41. Which Python built-in function can be used to convert a hexadecimal string (e.g., "0x1A3F") to an integer? A) int("0x1A3F", 16) B) hex("0x1A3F")
C) float("0x1A3F") D) strtod("0x1A3F") Answer: A Explanation: int() with base 16 parses a hex string into its integer value. Question 42. Which PA API call retrieves the list of installed applications on an Android device extraction? A) Case.GetInstalledApps() B) Case.Android.Applications C) Case.DeviceInfo.AppList D) Case.Artifacts.Where(type="Application") Answer: B Explanation: The Case.Android.Applications collection enumerates all detected Android packages. Question 43. To filter SQLite query results for records where a column deleted is NULL, which clause is correct? A) WHERE deleted IS NULL B) WHERE deleted = NULL C) WHERE NOT deleted D) WHERE deleted != NULL Answer: A Explanation: SQL uses IS NULL to test for null values; = NULL always evaluates to false. Question 44. Which of the following is the correct way to compile a regular expression for repeated use? A) pattern = re.compile(r'\d{4}-\d{2}-\d{2}') B) pattern = r'\d{4}-\d{2}-\d{2}' C) pattern = re.search(r'\d{4}-\d{2}-\d{2}', text) D) pattern = re.findall(r'\d{4}-\d{2}-\d{2}', text)
Explanation: Using the file: URI scheme with uri=True enables SQLite to interpret query parameters such as mode=ro. Question 48. To add a custom field named “Location” to an artifact, which method is used? A) artifact.AddCustomField("Location", "New York") B) artifact.CustomFields["Location"] = "New York" C) artifact.SetField("Location", "New York") D) artifact.Metadata["Location"] = "New York" Answer: B Explanation: The CustomFields dictionary allows dynamic addition of user-defined key/value pairs. Question 49. Which of the following best describes the purpose of the try/except block in a PA script? A) To accelerate script execution B) To handle anticipated errors such as missing files without terminating the script C) To encrypt the output data D) To enforce type checking at compile time Answer: B Explanation: try/except catches runtime exceptions, allowing graceful handling of issues like absent artifacts. Question 50. Which built-in Python function can be used to check if a variable x is of type unicode in IronPython 2.7? A) isinstance(x, unicode) B) type(x) == str C) isinstance(x, str) D) x.isunicode() Answer: A Explanation: In IronPython 2.7, unicode is a distinct type; isinstance correctly tests for it.
Question 51. When exporting data to an external CSV for third-party analysis, which line ensures proper handling of commas inside fields? A) writer = csv.writer(file, quoting=csv.QUOTE_ALL) B) writer = csv.writer(file, delimiter=';') C) writer = csv.writer(file, escapechar='\\') D) writer = csv.writer(file, doublequote=False) Answer: A Explanation: quoting=csv.QUOTE_ALL forces each field to be enclosed in quotes, preserving embedded commas. Question 52. Which PA API method retrieves the list of contacts from an iOS backup extraction? A) Case.iOS.Contacts B) Case.GetContacts() C) Case.Artifacts.Where(type="Contact") D) Case.DeviceInfo.Contacts Answer: A Explanation: The iOS.Contacts collection provides direct access to parsed contact records. Question 53. To decode a base64-encoded string extracted from a database, which Python module is used? A) base64 B) hashlib C) codecs D) binascii Answer: A Explanation: The base64 module offers b64decode for converting base64 text back to binary data.
A) datetime.fromtimestamp(ts/1000.0) B) datetime.fromtimestamp(ts) C) datetime.utcfromtimestamp(ts/1000) D) datetime.utcfromtimestamp(ts) Answer: A Explanation: Dividing by 1000 converts milliseconds to seconds, which fromtimestamp expects. Question 58. To ensure a PA script runs only on Windows hosts, which check should you implement? A) if os.name == "nt": B) if sys.platform == "win32": C) if platform.system() == "Windows": D) Any of the above Answer: D Explanation: All three conditions correctly detect a Windows environment. Question 59. Which built-in function can be used to round a floating-point timestamp to the nearest second? A) round(timestamp) B) int(timestamp) C) math.floor(timestamp) D) math.ceil(timestamp) Answer: A Explanation: round without a second argument rounds to the nearest integer. Question 60. When working with a large JSON payload, which Python technique reduces memory consumption? A) Load the entire JSON with json.load() B) Stream the file and parse line by line using ijson C) Use json.loads() on the whole string
D) Convert JSON to XML first Answer: B Explanation: ijson provides incremental parsing, avoiding loading the full document into memory. Question 61. In PA, which attribute of an artifact indicates the MIME type detected for the file? A) artifact.MimeType B) artifact.ContentType C) artifact.FileType D) artifact.MediaType Answer: A Explanation: MimeType stores the detected content type (e.g., image/jpeg). Question 62. Which of the following is the correct way to close a SQLite connection in a PA script? A) conn.close() B) conn.shutdown() C) conn.dispose() D) conn.terminate() Answer: A Explanation: The standard SQLite API uses close() to release the database handle. Question 63. To add a tag that will be searchable across the entire case, which scope must be used? A) artifact.Tags.Add("CaseTag", scope="global") B) Case.Tags.Add("CaseTag") C) Case.AddGlobalTag("CaseTag") D) artifact.AddTag("CaseTag", global=True) Answer: B