> For the complete documentation index, see [llms.txt](https://iptracej.gitbook.io/windows-linux-and-active-directory-ctf-notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://iptracej.gitbook.io/windows-linux-and-active-directory-ctf-notes/database-attacks/sqlite.md).

# SQLite

### Access to database

```bash
# Access to Audit.db file
sqlite3 <database filename>.db 
sqlite3 Audit.db
```

### View databases

```bash
# Get command
sqlite3> .help

# Check database name
sqlite> .database

# Show tables
sqlite3> .tables

# show the content in the table
sqlite3> select * from <table name>;
```

### View database with GUI&#x20;

```bash
# Open a sqlitebrwoser
sqlitebrowser database.db
```

You can run SQL queries from the application.

<figure><img src="https://4082237222-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnA4bAkddGXesk1QCLYAY%2Fuploads%2FGkExb87O8iuVsfBoPCXP%2Fimage.png?alt=media&amp;token=f022f245-6094-470b-9cd1-e1e921ef4005" alt=""><figcaption></figcaption></figure>
