{"id":13573678,"url":"https://github.com/Tw1sm/SQL-BOF","last_synced_at":"2025-04-04T12:31:21.922Z","repository":{"id":230082820,"uuid":"748830412","full_name":"Tw1sm/SQL-BOF","owner":"Tw1sm","description":"Library of BOFs to interact with SQL servers","archived":false,"fork":false,"pushed_at":"2024-12-11T00:38:02.000Z","size":557,"stargazers_count":149,"open_issues_count":0,"forks_count":21,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-11T01:27:14.825Z","etag":null,"topics":["bof","sql"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Tw1sm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2024-01-26T20:42:23.000Z","updated_at":"2024-12-11T00:48:51.000Z","dependencies_parsed_at":"2024-03-27T19:26:23.419Z","dependency_job_id":"ddf1d975-2d21-4bde-963c-b4c764805884","html_url":"https://github.com/Tw1sm/SQL-BOF","commit_stats":null,"previous_names":["tw1sm/sql-bof"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tw1sm%2FSQL-BOF","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tw1sm%2FSQL-BOF/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tw1sm%2FSQL-BOF/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tw1sm%2FSQL-BOF/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Tw1sm","download_url":"https://codeload.github.com/Tw1sm/SQL-BOF/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247179724,"owners_count":20897090,"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":["bof","sql"],"created_at":"2024-08-01T15:00:39.492Z","updated_at":"2025-04-04T12:31:21.916Z","avatar_url":"https://github.com/Tw1sm.png","language":"C","readme":"# SQL-BOF\nA library of beacon object files to interact with remote SQL servers and data. This collection is templated off the TrustedSec [CS-Situational-Awareness-BOF](https://github.com/trustedsec/CS-Situational-Awareness-BOF) collection and models the functionality of the [SQLRecon](https://github.com/skahwah/SQLRecon) project.\n\n## Usage\n#### Cobalt Strike\nLoad the aggressor script located at `SQL/SQL.cna`\n\n#### Havoc\nLoad the python script located at `SQL/SQL.py`\n\n## Available commands\n|Commands|Usage|Notes|\n|--------|-----|-----|\n|sql-1434udp|[server IP] |Enumerate SQL Server connection info |\n|sql-adsi|[server] [ADSI_linkedserver] [opt: port] [opt: database] [opt: linkedserver] [opt: impersonate] |Obtain ADSI creds from ADSI linked server |\n|sql-agentcmd |[server] [command] [opt: database] [opt: linkedserver] [opt: impersonate] |Execute a system command using agent jobs |\n|sql-agentstatus |[server] [opt: database] [opt: linkedserver] [opt: impersonate] |Enumerate SQL agent status and jobs |\n|sql-checkrpc |[server] [opt: database] [opt: linkedserver] [opt: impersonate] |Enumerate RPC status of linked servers |\n|sql-clr |[server] [dll_path] [function] [opt: database] [opt: linkedserver] [opt: impersonate] |Load and execute .NET assembly in a stored procedure |\n|sql-columns |[server] [table] [opt: database] [opt: linkedserver] [opt: impersonate] |Enumerate columns within a table |\n|sql-databases |[server] [opt: database] [opt: linkedserver] [opt: impersonate] |Enumerate databases on a server|\n|sql-disableclr |[server] [opt: database] [opt: linkedserver] [opt: impersonate] |Disable CLR integration |\n|sql-disableole |[server] [opt: database] [opt: linkedserver] [opt: impersonate] |Disable OLE Automation Procedures |\n|sql-disablerpc |[server] [linkedserver] [opt: database] [opt: impersonate] |Disable RPC and RPC out on a linked server |\n|sql-disablexp |[server] [opt: database] [opt: linkedserver] [opt: impersonate] |Disable xp_cmdshell |\n|sql-enableclr |[server] [opt: database] [opt: linkedserver] [opt: impersonate] |Enable CLR integration |\n|sql-enableole |[server] [opt: database] [opt: linkedserver] [opt: impersonate] |Enable OLE Automation Procedures |\n|sql-enablerpc |[server] [linkedserver] [opt: database] [opt: impersonate] |Enable RPC and RPC out on a linked server |\n|sql-enablexp |[server] [opt: database] [opt: linkedserver] [opt: impersonate] |Enable xp_cmdshell |\n|sql-impersonate |[server] [opt: database] |Enumerate users that can be impersonated |\n|sql-info |[server] [opt: database] |Gather information about the SQL server |\n|sql-links |[server] [opt: database] [opt: linkedserver] [opt: impersonate] |Enumerate linked servers |\n|sql-olecmd |[server] [command] [opt: database] [opt: linkedserver] [opt: impersonate] |Execute a system command using OLE automation procedures |\n|sql-query |[server] [query] [opt: database] [opt: linkedserver] [opt: impersonate] |Execute a custom SQL query |\n|sql-rows |[server] [table] [opt: database] [opt: linkedserver] [opt: impersonate] |Get the count of rows in a table |\n|sql-search |[server] [search] [opt: database] [opt: linkedserver] [opt: impersonate] |Search a table for a column name |\n|sql-smb |[server] [\\\\\\\\listener] [opt: database] [opt: linkedserver] [opt: impersonate] |Coerce NetNTLM auth via xp_dirtree |\n|sql-tables |[server] [opt: database] [opt: linkedserver] [opt: impersonate] |Enumerate tables within a database |\n|sql-users |[server] [opt: database] [opt: linkedserver] [opt: impersonate] |Enumerate users with database access |\n|sql-whoami |[server] [opt: database] [opt: linkedserver] [opt: impersonate] |Gather logged in user, mapped user and roles |\n|sql-xpcmd |[server] [command] [opt: database] [opt: linkedserver] [opt: impersonate] |Execute a system command via xp_cmdshell |\n\n## References\n- [SQLRecon](https://github.com/skahwah/SQLRecon) by [@sanjivkawa](https://twitter.com/sanjivkawa)\n- [PySQLRecon](https://github.com/Tw1sm/PySQLRecon)\n- [CS-Situational-Awareness-BOF](https://github.com/trustedsec/CS-Situational-Awareness-BOF)\n","funding_links":[],"categories":["C"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTw1sm%2FSQL-BOF","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FTw1sm%2FSQL-BOF","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTw1sm%2FSQL-BOF/lists"}