Skip to content

Commit ce21102

Browse files
authored
help update
help update
1 parent ca995ba commit ce21102

File tree

1 file changed

+20
-13
lines changed

1 file changed

+20
-13
lines changed

templates/msbuild_sql_query.csproj

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,27 @@
22
<!--
33
Author: Scott Sutherland (@_nullbind), NetSPI 2019
44
Version: 0.1 (work in progress)
5-
Description: This is a simple C# SQL Server client that can be run through msbuild.
6-
By setting the "enableicmp" variable to true, and setting the IP, the results of each query
7-
can be included in the payload of the ICMP echo request for the purpose of data exfiltration.
8-
The payloads are encrypted by default, the salt/key are hard coded. You can use the baked in decryption
9-
function to decrypt the payload data on the receiving system. You can also disable
10-
encrypted payloads by setting the "enableEncryption" variable to "false", but cleartext data == bad idea.
11-
Type "help" for basic instructions.
12-
Instructions:
13-
1. Save this to a .xml or .csproj file.
14-
2. In a console, navigate to the folder containing this .csproj or .xml file.
15-
3. Run the msbuild.exe command from its path using one of the commands below.
16-
You can explicitly define the .csproj file to load, but it is not required
17-
if only one .csproj file existing the your current working directory.
5+
Description:
6+
This is a simple C# SQL Server client console that can be run through msbuild.
7+
8+
Features:
9+
1. Uses hardcode connection string by default. Change with setconn command.
10+
2. Writes query results to c:\windows\temp\file.csv by default. Change with setfile command.
11+
3. ICMP exfilatation is disabled by default. By setting the "enableicmp" variable to true, and
12+
setting the IP, the results of each query will be sent to the provided IP in the payloads of ICMP echo requests.
13+
The payloads are encrypted by default and the salt/key are hard coded. You can use the baked in decryption
14+
function to decrypt the payload data on the receiving system. You can also disable
15+
encrypted payloads by setting the "enableEncryption" variable to "false", but cleartext data == bad idea.
16+
4. Type "help" for basic instructions.
17+
18+
Execution Instructions:
19+
1. Save this file as an .xml or .csproj file.
20+
2. In a console, navigate to the folder containing this .csproj or .xml file.
21+
3. Run the msbuild.exe command from its path using one of the commands below.
22+
You can explicitly define the .csproj file to load, but it is not required
23+
if only one .csproj file exists your current working directory.
1824
C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe
25+
C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe file.xml
1926
C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe file.csproj
2027
2128
Note: This execution technique is entirely based on Casey Smith magic.

0 commit comments

Comments
 (0)