SQLite
SQLite
Commands
# Open DB file
.open <your_file.db>
# List databases
.databases
# List tables
.tables
# Structure of table
.schema <table>Command Execution
load_extension
Suppose we're on Linux and there's a bash script which asks for a username that will be used to activate the user.
The commands looks like this:
We need to create a .c script that we compile into a library.
This library will spawn an elevated shell.
For this to work we're going to create a payload that we'll feed to the script. Once the script reaches the point where the username is used in the sql statement, a shell with elevated privileges will be spawned.
Last updated