From the course: Complete Guide to Penetration Testing

Unlock the full course today

Join today to access over 24,700 courses taught by industry experts.

Accessing SQLite databases

Accessing SQLite databases

- When doing pen testing, we'll often come across SQLite databases on everything from browsers to mobile devices. It's useful to have a way to automate access in order to build testing tools and to do manual testing. We can do this relatively easily with Python. Let's take a look at where we'll find the database Chrome uses to store cookies. We're here in a rather deep folder of our homepage called AppData\Local\Google\Chrome\User Data\Default\Network Let's see what it contains. We can see the file called cookies. That's what we want. I've copied this to Carly, so let's take a look at it using a Python script called squeal1. nano squeal1.py Here we open the SQLite_3 library and connect to our cookies database. We then execute a query using select against the master SQLite configuration to get the names of tables in the database. So let's run that. python squeal1.py We can see the list of tables in this database,…

Contents