{"id":20563715,"url":"https://github.com/trustedsec/quicksql","last_synced_at":"2025-04-14T14:43:28.578Z","repository":{"id":151080760,"uuid":"256591482","full_name":"trustedsec/quicksql","owner":"trustedsec","description":"QuickSQL is a simple MSSQL query tool that allows you to connect to MSSQL databases and does not require administrative level rights to use. ","archived":false,"fork":false,"pushed_at":"2020-04-17T23:35:11.000Z","size":5992,"stargazers_count":101,"open_issues_count":0,"forks_count":18,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-28T03:41:23.691Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/trustedsec.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.txt","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-17T19:26:47.000Z","updated_at":"2025-02-06T12:43:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"cf1252d9-4c69-4507-8fd9-8758b9aa0a26","html_url":"https://github.com/trustedsec/quicksql","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trustedsec%2Fquicksql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trustedsec%2Fquicksql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trustedsec%2Fquicksql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trustedsec%2Fquicksql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trustedsec","download_url":"https://codeload.github.com/trustedsec/quicksql/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248898730,"owners_count":21179830,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-16T04:20:25.583Z","updated_at":"2025-04-14T14:43:28.572Z","avatar_url":"https://github.com/trustedsec.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# QuickSQL\n\n                                                              \nQuickSQL - a lightweight MSSQL connection and query tool that does not require  administrative level rights. Quick explanation on why this was useful. \n\nWhy write another MSSQL query tool?\n\nOn an engagement, there was a compromised a system under and under the context of a regular user account. When pillaging, found a web.config which contained high level SQL accounts. Needed to query SQL directly (for xp_cmdshell specifically) on the Windows machine that was compromised and without administrator level rights (no SOCKS proxying etc). This works through the pymssql modules within Python and compiled using PyInstaller. Allows you to use the Python MSSQL modules directly on Windows in a compiled binary without the need of Python or administrative level rights. \n\n## Usage\n\u003cpre\u003e\nWritten by: David Kennedy (@HackingDave)\nCompany: TrustedSec (@TrustedSec)\nusage: quicksql.py [-h] [-db DATABASE] -un USERNAME -pw PASSWORD -ip IPADDRESS\n                   -port PORT\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -db DATABASE, --database DATABASE\n                        Database you are selecting to connect to.\n  -un USERNAME, --username USERNAME\n                        The username to specify to authenticate to the\n                        database.\n  -pw PASSWORD, --password PASSWORD\n                        The password for the database. Type blank to\n                        authenticate without a password.\n  -ip IPADDRESS, --ipaddress IPADDRESS\n                        The IP address or hostname of the remote SQL server.\n  -port PORT, --port PORT\n                        The port of the Microsoft SQL port default is 1433.\n\u003c/pre\u003e\nQuickSQL is a simple MSSQL query tool that allows you to connect to a SQL server that you already have credentials for and execute raw queries. You do not need to install the ODBC drivers for Windows and this works without administrative level permissions. \n\nThere are two files, the quicksql.py which is the source code for quicksql and can be run on anything that has Python3 installed on it. The second is quicksql.exe which can be run on Windows operating systems.\n\nExample:\n\u003cpre\u003e\nquicksql.exe -ip 192.168.5.5 -db blank -un test -pw test -port 1433\n\nOr run help for the parameter names:\n\nquicksql.exe -h\n\u003c/pre\u003e\n\n## Compiling Python to Executable\n\nIf you want to create your own binary directly from the Python code, follow these next steps:\n\n\u003cpre\u003e\n1. Download the latest version of Python for Windows. When installing, ensure that you add the Python path to your command line arguments.\n2. Download the latest version of PyInstaller and unzip the folder. https://github.com/pyinstaller/pyinstaller/zipball/develop\n3. Copy quicksql.py to the PyInstaller folder.\n4. Install pymssql and pywin32 and pywin32-ctypes by typing: python -m pip install pymssql pywin32 pywin32-ctypes.\n5. Run the following command: python pyinstaller.py --onefile quicksql.py.\n6. Navigate to quicksql/dist and your execuable is there.\n\u003c/pre\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrustedsec%2Fquicksql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrustedsec%2Fquicksql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrustedsec%2Fquicksql/lists"}