Docsity

PrepIQ Access Data Advanced SQLite Mobile Application Analysis Ultimate Exam, Exams of Technology

Toggle sidebar
bg1
PrepIQ Access Data Advanced SQLite Mobile
Application Analysis Ultimate Exam
**Question 1.** Which field in the first 100 bytes of an SQLite file identifies the file
format version?
A) Page size
B) File header string
C) SQLite format number
D) Reserved space size
**Answer:** C
**Explanation:** Bytes 68-71 contain the 4-byte integer “SQLite format 3”, which
identifies the file format version.
**Question 2.** In SQLite, what is the default page size if not explicitly set?
A) 512 bytes
B) 1024 bytes
C) 4096 bytes
D) 8192 bytes
**Answer:** C
**Explanation:** SQLite defaults to a 4096-byte page size, which balances
performance and storage efficiency for most platforms.
**Question 3.** Which page type stores the mapping from overflow pages back to
the original table row?
A) Leaf B-Tree page
B) Interior B-Tree page
C) Pointer-Map page
D) Freelist trunk page
**Answer:** C
**Explanation:** Pointer-Map pages are used in WAL mode to map overflow pages
to their owning B-Tree leaf page.
**Question 4.** What does the “payload” of a cell contain?
A) Only the rowid
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f

Partial preview of the text

Download PrepIQ Access Data Advanced SQLite Mobile Application Analysis Ultimate Exam and more Exams Technology in PDF only on Docsity!

Application Analysis Ultimate Exam

Question 1. Which field in the first 100 bytes of an SQLite file identifies the file format version? A) Page size B) File header string C) SQLite format number D) Reserved space size Answer: C Explanation: Bytes 68-71 contain the 4-byte integer “SQLite format 3”, which identifies the file format version. Question 2. In SQLite, what is the default page size if not explicitly set? A) 512 bytes B) 1024 bytes C) 4096 bytes D) 8192 bytes Answer: C Explanation: SQLite defaults to a 4096-byte page size, which balances performance and storage efficiency for most platforms. Question 3. Which page type stores the mapping from overflow pages back to the original table row? A) Leaf B-Tree page B) Interior B-Tree page C) Pointer-Map page D) Freelist trunk page Answer: C Explanation: Pointer-Map pages are used in WAL mode to map overflow pages to their owning B-Tree leaf page. Question 4. What does the “payload” of a cell contain? A) Only the rowid

Application Analysis Ultimate Exam

B) The complete serialized record, possibly split across overflow pages C) The index key only D) The page header checksum Answer: B Explanation: The payload holds the full serialized row data; if it exceeds the usable space, excess bytes are stored in overflow pages. Question 5. Which SQLite command removes unused pages and compacts the database file? A) ANALYZE B) VACUUM C) REINDEX D) PRAGMA integrity_check Answer: B Explanation: VACUUM copies live data to a new file, discarding free pages and reducing file size. Question 6. Which ACID property guarantees that a transaction’s changes survive a power loss? A) Atomicity B) Consistency C) Isolation D) Durability Answer: D Explanation: Durability ensures that once a transaction commits, its effects are permanently recorded on disk. Question 7. In forensic terms, why is SQLite’s atomic commit important? A) It allows partial writes to be recovered later. B) It guarantees that either all changes are written or none are, preventing torn pages.

Application Analysis Ultimate Exam

D) It contains the encryption key. Answer: B Explanation: Slack space can retain residual data from overwritten files, useful for recovery of deleted SQLite content. Question 11. Which tool is commonly used to view raw SQLite signatures within a hex editor? A) sqlite3.exe B) Wireshark C) HxD or Bless D) Regedit Answer: C Explanation: Hex editors like HxD allow investigators to locate the “SQLite format 3” magic bytes directly in a binary dump. Question 12. Orphaned records in SQLite are most likely found on which page type? A) Index B-Tree interior page B) Overflow page without a pointer-map entry C) Freelist trunk page D) Shared memory page Answer: B Explanation: If an overflow page loses its pointer-map reference, the data it holds becomes orphaned but may still contain valid payload. Question 13. Which file extension typically denotes a rollback journal in SQLite? A) .wal B) .shm C) .journal D) .db-shm Answer: C

Application Analysis Ultimate Exam

Explanation: The rollback journal is stored in a file with the same base name plus “.journal”. Question 14. During recovery, what does a “hot” journal indicate? A) The database is encrypted. B) A transaction was in progress when the database was closed abruptly. C) The journal has been vacuumed. D) The journal file is larger than 1 GB. Answer: B Explanation: A hot journal contains uncommitted changes that were active at the time of a crash, useful for reconstructing the pre-crash state. Question 15. In Write-Ahead Logging (WAL), which file holds the shared memory region used for locking? A) *.db-wal B) *.db-shm C) *.db-journal D) *.db-log Answer: B Explanation: The “.shm” file stores the lock state and checkpoint information shared between processes. Question 16. After a checkpoint, which statement about the WAL file is true? A) It is always empty. B) It contains only records that have not yet been checkpointed. C) It is deleted automatically. D) It contains a copy of the entire database. Answer: B Explanation: Checkpointing copies committed frames to the main database, leaving only newer or uncommitted frames in the WAL.

Application Analysis Ultimate Exam

B) ATTACH DATABASE 'file' KEY 'password'; C) ALTER DATABASE SET ENCRYPTION = 'password'; D) PRAGMA key = 'password'; Answer: D Explanation: SQLCipher uses PRAGMA key to set the decryption key before opening the database. Question 21. Which Android app’s database typically contains a table named “messages” with a “media_wa_type” column? A) Facebook Messenger B) WhatsApp C) Snapchat D) Telegram Answer: B Explanation: WhatsApp’s “msgstore.db” includes a “media_wa_type” field indicating the type of attached media. Question 22. The Android “MediaStore” database stores thumbnails in which column type? A) TEXT (file path) B) INTEGER (resource ID) C) BLOB (binary image) D) REAL (timestamp) Answer: C Explanation: Thumbnails are stored as binary blobs for quick retrieval. Question 23. When reverse-engineering an unknown app database, which pragma helps reveal the schema? A) PRAGMA integrity_check; B) PRAGMA foreign_keys; C) PRAGMA table_info(table_name);

Application Analysis Ultimate Exam

D) PRAGMA journal_mode; Answer: C Explanation: PRAGMA table_info returns column names, types, and constraints for a given table. Question 24. Which SQLite function converts a Unix epoch (seconds since 1970) to a human-readable date? A) datetime() B) strftime('%Y-%m-%d', column) C) unixepoch() D) date() Answer: A Explanation: datetime(column, 'unixepoch') interprets the integer as seconds since 1970- 01 - 01. Question 25. macOS “Absolute Time” counts nanoseconds from which epoch? A) 1970- 01 - 01 UTC B) 2001- 01 - 01 UTC C) 1904- 01 - 01 UTC D) 1601- 01 - 01 UTC Answer: B Explanation: Apple’s Core Data timestamps use the reference date of 2001 - 01 - 01. Question 26. Which SQLite expression converts a Chrome/WebKit timestamp (microseconds since 1601) to UTC? A) datetime(column/1000000, 'unixepoch') B) datetime((column/1000000) - 11644473600, 'unixepoch') C) datetime(column, 'unixepoch') D) strftime('%Y-%m-%d', column/1000) Answer: B

Application Analysis Ultimate Exam

Question 30. In SQLite, which function extracts the first 4 bytes of a BLOB as an integer? A) substr(blob,1,4) B) CAST(blob AS INTEGER) C) sqlite3_blob_read() D) typeof(blob) Answer: B Explanation: Casting a BLOB to INTEGER interprets the first 8 bytes as a little-endian integer; for 4-byte values, ensure the BLOB length matches. Question 31. Which pragma reveals the current page size of a database? A) PRAGMA page_count; B) PRAGMA page_size; C) PRAGMA max_page_size; D) PRAGMA file_format; Answer: B Explanation: PRAGMA page_size returns the number of bytes per page. Question 32. What does the “freelist_count” field in the SQLite header represent? A) Number of pages currently in use B) Number of free pages available for allocation C) Number of overflow pages D) Number of B-Tree leaf pages Answer: B Explanation: freelist_count indicates how many pages are on the freelist, i.e., available for reuse. Question 33. Which SQLite internal table holds the mapping of auto-increment values? A) sqlite_master

Application Analysis Ultimate Exam

B) sqlite_sequence C) sqlite_stat D) sqlite_temp_master Answer: B Explanation: sqlite_sequence stores the largest ROWID used for AUTOINCREMENT tables. Question 34. In a forensic timeline, why is it important to note the “last_checkpoint” value in a WAL file? A) It indicates the size of the database. B) It shows when the WAL was created. C) It marks the point up to which data has been merged into the main DB, establishing a cut-off for evidence. D) It stores the encryption key. Answer: C Explanation: The last_checkpoint transaction ID tells investigators which WAL frames are already persisted, helping to order events. Question 35. Which SQLite command lists all tables in the current database? A) .tables (sqlite3 shell) B) SELECT * FROM sqlite_master; C) PRAGMA list_tables; D) SHOW TABLES; Answer: B Explanation: Querying sqlite_master with type='table' returns the schema of all tables. Question 36. When analyzing a WhatsApp “msgstore.db”, which column typically holds the sender’s phone number? A) key_remote_jid B) remote_resource

Application Analysis Ultimate Exam

D) ROWS 10

Answer: A Explanation: SQLite supports the LIMIT clause to restrict the number of returned rows. Question 40. When a B-Tree leaf page becomes full, what operation does SQLite perform? A) Truncate the page B) Split the page and propagate the median key to the parent C) Convert it to an interior page D) Delete the page and re-insert all rows Answer: B Explanation: Page splitting maintains B-Tree balance by moving half the entries to a new page and updating the parent. Question 41. Which pragma enables write-ahead logging for a database connection? A) PRAGMA journal_mode = WAL; B) PRAGMA synchronous = OFF; C) PRAGMA locking_mode = EXCLUSIVE; D) PRAGMA auto_vacuum = FULL; Answer: A Explanation: Setting journal_mode to WAL activates the write-ahead log. Question 42. In a forensic context, what does “checkpointing” refer to? A) Encrypting the database file B] Compressing the journal file C) Flushing WAL frames to the main database file D) Deleting orphaned records Answer: C

Application Analysis Ultimate Exam

Explanation: Checkpointing moves committed WAL data into the main SQLite file, ensuring durability. Question 43. Which SQL function can be used to extract the year component from a datetime string? A) year() B) strftime('%Y', column) C) substr(column,1,4) D) datepart('year', column) Answer: B Explanation: strftime with “%Y” returns the four-digit year. Question 44. In SQLite, what does the “AUTOINCREMENT” keyword guarantee? A) RowIDs are never reused, even after deletions. B) RowIDs are assigned sequentially without gaps. C) RowIDs are stored as TEXT. D) The table is indexed automatically. Answer: A Explanation: AUTOINCREMENT forces SQLite to keep track of the highest ROWID ever used, preventing reuse. Question 45. Which Android artifact commonly contains the “jid” (Jabber ID) for a chat participant? A) contacts2.db B) mmssms.db C) wa.db (WhatsApp) D) telephony.db Answer: C Explanation: WhatsApp stores participant identifiers as JIDs in its own database.

Application Analysis Ultimate Exam

A) hex() B) unhex() C) X'...'? D) CAST('...' AS BLOB) Answer: C Explanation: The X'ABCD' literal creates a BLOB from the given hex digits. Question 50. What is the purpose of the “sqlite_master” table? A) Store user data B) Track free pages C) Record the schema definition for tables, indexes, triggers, and views D) Log transaction history Answer: C Explanation: sqlite_master contains one row per schema object, describing its SQL creation statement. Question 51. Which of the following is NOT a valid SQLite data type affinity? A) TEXT B) NUMERIC C) BOOLEAN D) BLOB Answer: C Explanation: SQLite does not have a native BOOLEAN affinity; BOOLEAN is stored as NUMERIC (0 or 1). Question 52. In a forensic examination, why is it important to note the “journal_mode” of a database? A) It determines the encryption algorithm. B) It influences where uncommitted changes may reside (journal vs WAL). C) It changes the file extension.

Application Analysis Ultimate Exam

D) It sets the maximum row size. Answer: B Explanation: Different journal modes store pending changes in different files, affecting recovery strategies. Question 53. Which pragma can be used to enable foreign key enforcement in SQLite? A) PRAGMA foreign_keys = ON; B) PRAGMA enforce_foreign_keys = TRUE; C) PRAGMA enable_fk = 1; D) PRAGMA foreign_key_check; Answer: A Explanation: Setting foreign_keys to ON activates constraint checking. Question 54. In Android’s “contacts2.db”, which table typically stores raw contact data? A) contacts B) raw_contacts C) data D) phone_lookup Answer: B Explanation: raw_contacts links a contact to its various data rows. Question 55. Which SQLite function can be used to compute the MD5 hash of a string (assuming the extension is loaded)? A) md5() B) hash_md5() C) sqlite_md5() D) There is no built-in MD5 function. Answer: D

Application Analysis Ultimate Exam

Question 59. When a B-Tree leaf page contains a “payload overflow” pointer, what does the pointer value represent? A) The page number of the next leaf page. B) The rowid of the record. C) The first overflow page number storing excess payload bytes. D) The index key for the record. Answer: C Explanation: The overflow pointer links to the first overflow page that continues the payload. Question 60. Which SQLite pragma reports the number of pages currently in the file? A) PRAGMA page_count; B) PRAGMA file_size; C) PRAGMA page_used; D) PRAGMA database_size; Answer: A Explanation: PRAGMA page_count returns the total page count. Question 61. In iOS, which framework commonly uses SQLite to store “NSKeyedArchiver” objects? A) CoreData B) HealthKit C) MapKit D) AVFoundation Answer: A Explanation: CoreData can persist NSKeyedArchiver blobs in SQLite BLOB columns. Question 62. Which of the following is a common indicator that an SQLite database has been tampered with?

Application Analysis Ultimate Exam

A) Presence of a .shm file without .wal B) Non-standard page size (e.g., 1234 bytes) C) Missing sqlite_master entries for existing tables D) All of the above Answer: D Explanation: All listed anomalies may suggest manipulation or corruption. Question 63. When performing a forensic carve of a deleted SQLite table, which signature should you search for at the start of a potential table definition? A) “CREATE TABLE” in ASCII B) “sqlite_master” string C) “tbl” binary marker D) “PRAGMA” keyword Answer: A Explanation: Table definitions are stored as SQL text; “CREATE TABLE” is the typical start. Question 64. Which SQLite function can be used to pad a string to a fixed length with spaces? A) lpad() B) rpad() C) printf('%-10s', column) D) substr(column || ' ',1,10) Answer: C Explanation: printf with format specifiers can produce padded strings; SQLite’s printf follows C conventions. Question 65. In Android, the “media.db” database often contains a “_size” column. What does it represent? A) File size in bytes B) Duration in seconds